Skip to content

Commit

Permalink
7/1 refer to test executable using genexp
Browse files Browse the repository at this point in the history
  • Loading branch information
bast committed Jun 30, 2018
1 parent 912279f commit d5a449d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions chapter-07/recipe-01/cxx-example/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
add_library(sum_integers sum_integers.cpp)

add_executable(sum_up main.cpp)

target_link_libraries(sum_up sum_integers)
4 changes: 1 addition & 3 deletions chapter-07/recipe-01/cxx-example/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ target_link_libraries(cpp_test sum_integers)
macro(add_catch_test _name _cost)
math(EXPR num_macro_calls "${num_macro_calls} + 1")
message(STATUS "add_catch_test called with ${ARGC} arguments: ${ARGV}")
# message(STATUS "${_name} equals ${ARGV0}")
# message(STATUS "${_cost} equals ${ARGV1}")

set(_argn "${ARGN}")
if(_argn)
Expand All @@ -16,7 +14,7 @@ macro(add_catch_test _name _cost)
NAME
${_name}
COMMAND
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/cpp_test
$<TARGET_FILE:cpp_test>
[${_name}] --success --out
${PROJECT_BINARY_DIR}/tests/${_name}.log --durations yes
WORKING_DIRECTORY
Expand Down

0 comments on commit d5a449d

Please sign in to comment.