Skip to content

Commit

Permalink
Merge pull request #3846 from msimberg/libs-header-tests
Browse files Browse the repository at this point in the history
Add tests for libs header tests
  • Loading branch information
msimberg authored May 13, 2019
2 parents f5adfcc + ee0c8f4 commit 21e1131
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmake/HPX_AddCompileTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ function(add_hpx_lib_header_tests lib)
add_library(tests.headers.${lib}.${test_name} ${CMAKE_CURRENT_BINARY_DIR}/${full_test_file})
target_link_libraries(tests.headers.${lib}.${test_name} hpx_${lib})
add_dependencies(tests.headers.${lib} tests.headers.${lib}.${test_name})

add_test(NAME "tests.headers.${lib}.${test_name}"
COMMAND ${CMAKE_COMMAND}
--build ${CMAKE_BINARY_DIR}
--target tests.headers.${lib}.${test_name}
--config $<CONFIGURATION>
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
endif()
endforeach()

Expand All @@ -97,4 +104,11 @@ function(add_hpx_lib_header_tests lib)
add_library(tests.headers.${lib}.${test_name} "${CMAKE_CURRENT_BINARY_DIR}/${test_name}.cpp")
target_link_libraries(tests.headers.${lib}.${test_name} hpx_${lib})
add_dependencies(tests.headers.${lib} tests.headers.${lib}.${test_name})

add_test(NAME "tests.headers.${lib}.${test_name}"
COMMAND ${CMAKE_COMMAND}
--build ${CMAKE_BINARY_DIR}
--target tests.headers.${lib}.${test_name}
--config $<CONFIGURATION>
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
endfunction()

0 comments on commit 21e1131

Please sign in to comment.