BUG: Fix documentation of CMAKE_CFG_INTDIR
The documentation of this variable was out-dated and misleading. See issue #9219.
This commit is contained in:
parent
fa3b66fcd2
commit
0e5df2a7bc
@ -120,27 +120,42 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
|
|||||||
|
|
||||||
cm->DefineProperty
|
cm->DefineProperty
|
||||||
("CMAKE_CFG_INTDIR", cmProperty::VARIABLE,
|
("CMAKE_CFG_INTDIR", cmProperty::VARIABLE,
|
||||||
"Build time configuration directory for project.",
|
"Build-time reference to per-configuration output subdirectory.",
|
||||||
"This is a variable that is used to provide developers"
|
"For native build systems supporting multiple configurations "
|
||||||
" access to the intermediate directory used by Visual "
|
"in the build tree (such as Visual Studio and Xcode), "
|
||||||
"Studio IDE projects. For example, if building "
|
"the value is a reference to a build-time variable specifying "
|
||||||
"Debug all executables and libraries end up in a "
|
"the name of the per-configuration output subdirectory. "
|
||||||
"Debug directory. On UNIX systems this variable "
|
"On Makefile generators this evaluates to \".\" because there "
|
||||||
"is set to \".\". However, with Visual Studio this "
|
"is only one configuration in a build tree. "
|
||||||
"variable is set to $(IntDir). $(IntDir) is expanded "
|
"Example values:\n"
|
||||||
"by the IDE only. So this variable should only be "
|
" $(IntDir) = Visual Studio 6\n"
|
||||||
"used in custom commands that will be run during "
|
" $(OutDir) = Visual Studio 7, 8, 9\n"
|
||||||
"the build process. This variable should not be "
|
" $(Configuration) = Visual Studio 10\n"
|
||||||
"used directly in a CMake command. CMake has no "
|
" $(CONFIGURATION) = Xcode\n"
|
||||||
"way of knowing if Debug or Release will be picked "
|
" . = Make-based tools\n"
|
||||||
"by the IDE for a build type. If a program needs to "
|
"Since these values are evaluated by the native build system, this "
|
||||||
"know the directory it was built in, it can use "
|
"variable is suitable only for use in command lines that will be "
|
||||||
"CMAKE_INTDIR. CMAKE_INTDIR is a C/C++ preprocessor "
|
"evaluated at build time. "
|
||||||
"macro that is defined on the command line of the "
|
"Example of intended usage:\n"
|
||||||
"compiler. If it has a value, it will be the "
|
" add_executable(mytool mytool.c)\n"
|
||||||
"intermediate directory used to build the file. "
|
" add_custom_command(\n"
|
||||||
"This way an executable or a library can find files "
|
" OUTPUT out.txt\n"
|
||||||
"that are located in the build directory.",false,
|
" COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mytool\n"
|
||||||
|
" ${CMAKE_CURRENT_SOURCE_DIR}/in.txt out.txt\n"
|
||||||
|
" DEPENDS mytool in.txt\n"
|
||||||
|
" )\n"
|
||||||
|
" add_custom_target(drive ALL DEPENDS out.txt)\n"
|
||||||
|
"Note that CMAKE_CFG_INTDIR is no longer necessary for this purpose "
|
||||||
|
"but has been left for compatibility with existing projects. "
|
||||||
|
"Instead add_custom_command() recognizes executable target names in "
|
||||||
|
"its COMMAND option, so "
|
||||||
|
"\"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mytool\" can be "
|
||||||
|
"replaced by just \"mytool\"."
|
||||||
|
"\n"
|
||||||
|
"This variable is read-only. Setting it is undefined behavior. "
|
||||||
|
"In multi-configuration build systems the value of this variable "
|
||||||
|
"is passed as the value of preprocessor symbol \"CMAKE_INTDIR\" to "
|
||||||
|
"the compilation of all source files.",false,
|
||||||
"Variables that Provide Information");
|
"Variables that Provide Information");
|
||||||
|
|
||||||
cm->DefineProperty
|
cm->DefineProperty
|
||||||
|
Loading…
x
Reference in New Issue
Block a user