Hi Folks,

Is the CMAKE_CONFIGURATION_TYPES flag and the associated logic still in use, or has it been deprecated in favor of some other build-type- selection mechanism? I can find precious little information about this online.

I'm working on a cmake-driven project which I would like to be as general as possible. There are some mentions in the existing CMakeLists code of CMAKE_CONFIGURATION_TYPES and CMAKE_CFG_INTDIR, but I can't tell if these are relics or codepaths that would still be actively used under certain circumstances.

If this mechanism is used, could someone answer some questions about how to formulate a CMakeLists to make use of it? Specifically, I can imagine two possible ways this variable could be used by CMake:

(1) The CMakeLists must manually loop over each configuration in CMAKE_CONFIGURATION_TYPES to do some manual file additions or whatnot.
Sample usage under this model:
    FOREACH(config ${CMAKE_CONFIGURATION_TYPES})
      SET(FOO "${BINARY_DIR}/${config}")
      CONFIGURE_FILE(${FILE} ${OUTFILE} IMMEDIATE)
    ENDFOREACH(config)

(2) CMake implicitly re-runs the CMakeLists for each separate configuration type, setting CMAKE_CFG_INTDIR differently for each.
E.g.:
    SET(FOO "${BINARY_DIR}/${CMAKE_CFG_INTDIR}")
    CONFIGURE_FILE(${FILE} ${OUTFILE} IMMEDIATE)
and that code will get run by CMake one time for each configuration type.

Are either of these really the case? If CMAKE_CONFIGURATION_TYPES should still be used, in what manner should they be handled?

Thanks,

Zach

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to