mirror of
https://github.com/triqs/dft_tools
synced 2024-10-31 19:23:45 +01:00
exported cmake: add add_all_C_tests_in_current_directory
- for applications...
This commit is contained in:
parent
c95b548108
commit
89c1ae23d1
@ -89,5 +89,17 @@ macro(triqs_add_test_hdf testname h5diff_options)
|
||||
)
|
||||
endmacro(triqs_add_test_hdf)
|
||||
|
||||
# add all the test
|
||||
macro(add_all_C_tests_in_current_directory)
|
||||
FILE(GLOB TestList RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
|
||||
FOREACH( TestName1 ${TestList} )
|
||||
STRING(REPLACE ".cpp" "" TestName ${TestName1})
|
||||
add_executable( ${TestName} ${CMAKE_CURRENT_SOURCE_DIR}/${TestName}.cpp )
|
||||
triqs_add_test_C_simple( ${TestName} )
|
||||
if (TESTS_C_WITH_VALGRIND)
|
||||
add_test ( ${TestName}_valgrind valgrind --error-exitcode=1 ${CMAKE_CURRENT_BINARY_DIR}/${TestName})
|
||||
endif()
|
||||
ENDFOREACH( TestName1 ${TestList} )
|
||||
endmacro()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user