[CMake] CTEST_BUILD_CONFIGURATION is being ignored

Michael Pfeuti michael.pfeuti at 3dimpactmedia.com
Wed Mar 21 12:21:52 EDT 2012


Hi again,


I possibly discovered a BUG. I have the following excerpt from my ctest script that I execute with "ctest -S". In Version 1, I try telling ctest to tell the configuration to configure a Debug Build. But this didn't work. I specifically need to pass the option to the ctest_configure as shown in Version 2. Is there something I didn't get conceptually, or can someone explain to me why Version 1 doesn't work?

Version 1:
...
SET_PROPERTY(GLOBAL PROPERTY SubProject "Debug")
# TODO: I think this is a bug in ctest that we need to pass the option explicitly to configure
SET(CTEST_BUILD_CONFIGURATION           "Debug")

CTEST_START(Experimental)
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_COVERAGE(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_SUBMIT()


Version 2:
...
SET_PROPERTY(GLOBAL PROPERTY SubProject "Debug")
SET(CTEST_BUILD_CONFIGURATION           "Debug")


CTEST_START(Experimental)
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}"
                OPTIONS "-DCMAKE_BUILD_TYPE=${CTEST_BUILD_CONFIGURATION}")
CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_COVERAGE(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_SUBMIT()

Kind Regards
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120321/91d3e3d4/attachment.htm>


More information about the CMake mailing list