]> www.ginac.de Git - ginac.git/commitdiff
Trick CTest so the test suite runs when cross-compiling.
authorAlexei Sheplyakov <Alexei.Sheplyakov@gmail.com>
Fri, 27 Jul 2012 18:56:40 +0000 (21:56 +0300)
committerAlexei Sheplyakov <Alexei.Sheplyakov@gmail.com>
Fri, 27 Jul 2012 19:22:46 +0000 (22:22 +0300)
The test suite can be run in some cross-compilation setups (say, MinGW
on Linux). Howerver CTest's add_test command does not add the .exe
suffix on its own, as a result `make test' fails. Let's help add_test a bit.

check/CMakeLists.txt

index 4e9e7454f187d31c6446c3e444e70f1d936d9f31..0243617cb97710ff640645ef5904c252e469924b 100644 (file)
@@ -71,7 +71,7 @@ macro(add_ginac_test thename)
        add_executable(${thename} EXCLUDE_FROM_ALL ${${thename}_sources})
        target_link_libraries(${thename} ginac)
        add_dependencies(check ${thename})
        add_executable(${thename} EXCLUDE_FROM_ALL ${${thename}_sources})
        target_link_libraries(${thename} ginac)
        add_dependencies(check ${thename})
-       add_test(${thename} ${thename})
+       add_test(NAME ${thename} COMMAND ${thename}${CMAKE_EXECUTABLE_SUFFIX})
 endmacro()
 
 macro(add_ginac_timing thename)
 endmacro()
 
 macro(add_ginac_timing thename)