[CMake] ctest, make test and build config

Tyler Roscoe tyler at cryptio.net
Tue May 18 10:52:28 EDT 2010


On Tue, May 18, 2010 at 05:37:32PM +1000, ross hennessy wrote:
> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}, which as I'm on
> windows (I don't think this gets set on linux?), evaluates to either
> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug or
> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release. So I would like my test to
> have this information, and how I've tried doing this so far is to
> supply a parameter to the test eg.
> ADD_TEST( MyTest MyTest -p \${CMAKE_BUILD_TYPE} )

CMAKE_BUILD_TYPE isn't defined on Windows even at CMake time. Just pass
${CMAKE_CFG_INTDIR} to your add_test and you should be good to go.

tyler


More information about the CMake mailing list