Hi,

I would like to add a test to my project (using ADD_TEST) and have it
"load" files from other directories in the project. These other files
that I would like it to load are library files (built by other targets
in the project) and config files (created by other targets). These
files are located in
${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} )

I've tried a variety of variable names in place of the
CMAKE_BUILD_TYPE and none of them evaluate to anything at the time of
running the test! Am I going about this the wrong way? I've looked
into the RUN_TESTS project properties to try and see what was going on
and I found the post build command ctest --force-new-ctest-process, so
I was wondering if the build type gets lost due to the process
spawning?

Thanks, Ross
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to