mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
COOLPROP_TEST flag in CMake so you can add back Tests.cpp and CoolProp-Tests.cpp when building main
This commit is contained in:
@@ -1037,10 +1037,20 @@ if(UNIX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
if (COOLPROP_MAIN_MODULE)
|
||||
# Allow you to independently add back the testing CPP files
|
||||
if(COOLPROP_TEST)
|
||||
list(APPEND APP_SOURCES "${CMAKE_SOURCE_DIR}/src/Tests/Tests.cpp")
|
||||
list(APPEND APP_SOURCES "${CMAKE_SOURCE_DIR}/src/Tests/CoolProp-Tests.cpp")
|
||||
endif()
|
||||
list(APPEND APP_SOURCES "${CMAKE_SOURCE_DIR}/src/main.cxx")
|
||||
add_executable (Main ${APP_SOURCES})
|
||||
add_dependencies (Main generate_headers)
|
||||
if(COOLPROP_TEST)
|
||||
set_target_properties (Main PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -DENABLE_CATCH")
|
||||
endif()
|
||||
if(UNIX)
|
||||
target_link_libraries (Main ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
@@ -1141,6 +1151,8 @@ if (COOLPROP_PROFILE)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
if (COOLPROP_COVERAGE)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# See also http://stackoverflow.com/a/16536401 (detailed guide on using gcov with cmake)
|
||||
|
||||
Reference in New Issue
Block a user