Skip to content

Commit

Permalink
Set proper working directory for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed Sep 10, 2016
1 parent d0fc025 commit 71314cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include(CTest)
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C ${CMAKE_CFG_INTDIR})
function(add_test_executable TEST_NAME)
add_executable (${TEST_NAME} EXCLUDE_FROM_ALL ${ARGN})
add_test(NAME ${TEST_NAME} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests COMMAND $<TARGET_FILE:${TEST_NAME}>)
add_test(NAME ${TEST_NAME} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND $<TARGET_FILE:${TEST_NAME}>)
add_dependencies(check ${TEST_NAME})
target_include_directories(${TEST_NAME} PUBLIC ${CMAKE_SOURCE_DIR}/include)
endfunction(add_test_executable)
Expand Down

0 comments on commit 71314cf

Please sign in to comment.