2018-04-04 12:19:02 +00:00
|
|
|
include_directories(3rdparty/Catch2)
|
2018-04-04 16:36:18 +00:00
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/include)
|
2018-03-26 12:02:43 +00:00
|
|
|
|
2018-04-04 12:19:02 +00:00
|
|
|
add_executable(${PROJECT_NAME}_test test.cpp)
|
|
|
|
add_test(NAME ${PROJECT_NAME}_test COMMAND ${PROJECT_NAME}_test)
|
2018-03-26 12:02:43 +00:00
|
|
|
|
2018-04-04 12:19:02 +00:00
|
|
|
add_executable(${PROJECT_NAME}_test_no_rtti test_no_rtti.cpp)
|
|
|
|
if((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
|
|
|
|
target_compile_options(${PROJECT_NAME}_test_no_rtti PUBLIC -fno-rtti)
|
|
|
|
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
|
|
|
target_compile_options(${PROJECT_NAME}_test_no_rtti PUBLIC /GR-)
|
|
|
|
endif()
|
|
|
|
add_test(NAME ${PROJECT_NAME}_test_no_rtti COMMAND ${PROJECT_NAME}_test_no_rtti)
|