Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
cmake add ECL_TESTS option only enabled in standalone build
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Mar 13, 2019
1 parent fabd216 commit a892ece
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
enable_testing()

if(BUILD_TESTING)
option(ECL_TESTS "Build ECL tests" ON)

add_custom_target(check
COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C Debug
Expand Down
3 changes: 1 addition & 2 deletions validation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ add_dependencies(ecl_validation prebuild_targets)
target_compile_definitions(ecl_validation PRIVATE -DMODULE_NAME="ecl/validation")
target_include_directories(ecl_validation PUBLIC ${ECL_SOURCE_DIR})

if(BUILD_TESTING)
if(ECL_TESTS)
add_definitions(-UNDEBUG) # keep assert

add_subdirectory(tests)
endif()

4 changes: 2 additions & 2 deletions validation/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ add_executable(ecl_tests_data_validator test_data_validator.cpp)
target_link_libraries(ecl_tests_data_validator ecl_validation)

add_test(NAME ecl_tests_data_validator
COMMAND ecl_tests_data_validator
)
COMMAND ecl_tests_data_validator
)

0 comments on commit a892ece

Please sign in to comment.