Alex Makarenko wrote:
High all,

I'm struggling with build configurations in VC-80. I have two specific
questions:

1) Does ${OutDir} get resolved for arbitrary paths (other than to targets)?
E.g. I want to specify the path to a text config file generated during the
build. The cmake command and the result of running the test are shown below.
Notice that the path to the test executable is properly resolved but the
path to the config file is not.

# cmake:
ADD_TEST( T1010 appproptest --Config=${CMAKE_CFG_INTDIR}/apppropteston.cfg )

The tests are run by ctest which does not expand VS vars like OutDir. Try this:

ADD_TEST( T1010 appproptest --Config=\${CTEST_CONFIGURATION_TYPE}/apppropteston.cfg )

Note the backslash. This should put "${CTEST_CONFIGURATION_TYPE}" literally into the test file. CTest will expand this with the current configuration (-C option) when running tests.

2) Is it possible to force VC-80 to switch configurations from cmake/ctest?
My understanding that CMAKE_BUILD_TYPE is irrelevant in this case, right? So
I try to use -C option with ctest, with no apparent result (notice "/build
Release" in both cases). Is there something else that needs to be done?

CMAKE_BUILD_TYPE is for the Makefile generators, so it is irrelevant here. The -C option was originally meant for running tests but not building. I see no reason that it should not work for driving build too. Please submit a feature request:

http://www.cmake.org/Bug

-Brad
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to