Debian Codegraph @

hic/tests/test_find_hic/CMakeLists.txt

raw
1
2 # This test builds a package that requires fypp processing
3 # It uses the overriding of compile flags, like IFS is using.
4 #
5 # Test created to avoid regression after fixing issue FCKIT-19,
6 # where compile flags were not propagated to fypp-generated files.
7
8 if( HAVE_TESTS )
9
10 configure_file( test.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test.sh @ONLY )
11
12 unset( _test_args )
13 if( CMAKE_TOOLCHAIN_FILE )
14 if( NOT IS_ABSOLUTE ${CMAKE_TOOLCHAIN_FILE})
15 set( CMAKE_TOOLCHAIN_FILE "${CMAKE_BINARY_DIR}/${CMAKE_TOOLCHAIN_FILE}" )
16 endif()
17 list( APPEND _test_args "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}" )
18 endif()
19 foreach( lang CXX )
20 if( CMAKE_${lang}_COMPILER )
21 list( APPEND _test_args "-DCMAKE_${lang}_COMPILER=${CMAKE_${lang}_COMPILER}" )
22 endif()
23 if( CMAKE_${lang}_FLAGS )
24 list( APPEND _test_args "-DCMAKE_${lang}_FLAGS=${CMAKE_${lang}_FLAGS}" )
25 endif()
26 endforeach()
27
28 add_test( NAME hic_test_find_hic
29 COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test.sh ${_test_args} )
30
31 endif()