mirror of https://github.com/polybar/polybar.git
24 lines
645 B
CMake
24 lines
645 B
CMake
|
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
|
||
|
project(testsuite CXX)
|
||
|
|
||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CPPUNIT_CFLAGS}")
|
||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Weffc++ -frtti -Wno-unused-parameter")
|
||
|
|
||
|
find_package(CppUnit REQUIRED)
|
||
|
add_definitions(${CPPUNIT_CFLAGS_OTHER})
|
||
|
|
||
|
file(GLOB_RECURSE source_files "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
|
||
|
|
||
|
make_executable(testrunner
|
||
|
SOURCES
|
||
|
${source_files}
|
||
|
CMAKE_DEPENDS
|
||
|
${app_binary}
|
||
|
cppunit
|
||
|
xpp)
|
||
|
|
||
|
#add_custom_command(TARGET testrunner POST_BUILD COMMAND testrunner)
|
||
|
add_custom_target(tests testrunner
|
||
|
DEPENDS testrunner
|
||
|
COMMENT "Running CppUnit tests...")
|