2013-10-15 19:17:36 +04:00
|
|
|
CMAKE_CFG_INTDIR
|
|
|
|
----------------
|
|
|
|
|
|
|
|
Build-time reference to per-configuration output subdirectory.
|
|
|
|
|
|
|
|
For native build systems supporting multiple configurations in the
|
2015-08-18 08:34:01 +03:00
|
|
|
build tree (such as :ref:`Visual Studio Generators` and :generator:`Xcode`),
|
|
|
|
the value is a reference to a build-time variable specifying the name
|
|
|
|
of the per-configuration output subdirectory. On :ref:`Makefile Generators`
|
|
|
|
this evaluates to `.` because there is only one configuration in a build tree.
|
|
|
|
Example values:
|
2013-10-15 19:17:36 +04:00
|
|
|
|
|
|
|
::
|
|
|
|
|
2015-02-16 19:11:37 +03:00
|
|
|
$(IntDir) = Visual Studio 6
|
|
|
|
$(ConfigurationName) = Visual Studio 7, 8, 9
|
|
|
|
$(Configuration) = Visual Studio 10
|
|
|
|
$(CONFIGURATION) = Xcode
|
|
|
|
. = Make-based tools
|
2013-10-15 19:17:36 +04:00
|
|
|
|
|
|
|
Since these values are evaluated by the native build system, this
|
|
|
|
variable is suitable only for use in command lines that will be
|
|
|
|
evaluated at build time. Example of intended usage:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
add_executable(mytool mytool.c)
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT out.txt
|
|
|
|
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/mytool
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/in.txt out.txt
|
|
|
|
DEPENDS mytool in.txt
|
|
|
|
)
|
|
|
|
add_custom_target(drive ALL DEPENDS out.txt)
|
|
|
|
|
2015-08-18 08:34:01 +03:00
|
|
|
Note that ``CMAKE_CFG_INTDIR`` is no longer necessary for this purpose but
|
2013-10-15 19:17:36 +04:00
|
|
|
has been left for compatibility with existing projects. Instead
|
2015-08-18 08:34:01 +03:00
|
|
|
:command:`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``.
|
2013-10-15 19:17:36 +04:00
|
|
|
|
|
|
|
This variable is read-only. Setting it is undefined behavior. In
|
|
|
|
multi-configuration build systems the value of this variable is passed
|
2015-08-18 08:34:01 +03:00
|
|
|
as the value of preprocessor symbol ``CMAKE_INTDIR`` to the compilation
|
2013-10-15 19:17:36 +04:00
|
|
|
of all source files.
|