Zachary Pincus wrote:
Let me recap to make sure I've got it:
*Configure time* operations (e.g. WRITE_FILE, say) must place
configuration-specific build files in every location specified by
CMAKE_CONFIGURATION_TYPES, because the build-time config is unknown, or
may change.
CMAKE_CONFIGURATION_TYPES is set for generators that support multiple
configuration types (and have per-configuration subdirectories like
Debug and Release). It is empty for other generators and for those
generators the build type is controlled at CMake time by CMAKE_BUILD_TYPE.
*Build time* operations must use the CMAKE_CFG_INTDIR variable to
select a file from the current build directory. This variable expands
to something like $(config) which is intelligible to the IDE running
the build.
*Install time* operations must use the BUILD_TYPE variable (carefully,
so it isn't expanded until install time) which contains the proper
build path. Since install is managed by cmake, and not some IDE, the
CMAKE_CFG_INTDIR variable isn't useful because "$ (config)" or similar
is meaningless to cmake.
Is this all correct (if vaguely confusing)?
Yes, and *Test time* operations should use the CTEST_CONFIGURATION_NAME
variable which like BUILD_TYPE for installing needs to be written
\${CTEST_CONFIGURATION_NAME} to prevent expansion at CMake time.
The reason the names are so different for each stage is historical. We
plan to create a less confusing solution eventually.
-Brad
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake