[CMake] CMAKE_TOOLCHAIN_FILE / testing with 'wine'
Mathieu Malaterre
mathieu.malaterre at gmail.com
Tue Aug 19 14:20:30 EDT 2008
Hi there,
I have written a very simple toolchain file for using mingw32 on
linux. Everything works out of the box nicely (congrats!).
I now trying to get the testing framework to work with wine (the
return value is actually properly propagated).
So far the change needed are:
FOREACH(name ${Common_TEST_SRCS})
+IF(CMAKE_TOOLCHAIN_FILE)
+ ADD_TEST(${name} wine ${GDCM_Common_TESTS}.exe ${name})
+ELSE(CMAKE_TOOLCHAIN_FILE)
ADD_TEST(${name} ${GDCM_Common_TESTS} ${name})
+ENDIF(CMAKE_TOOLCHAIN_FILE)
ENDFOREACH(name)
Is this the correct way of doing it ?
1. The way to differenciate a cross compiled project from a regular
cmake one is by checking the value of CMAKE_TOOLCHAIN_FILE
2. I can always safely append '.exe' to the executable name ?
Thanks,
--
Mathieu
More information about the CMake
mailing list