mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
The ExternalProject module has long used the generator-specific
placeholder in the `${CMAKE_CFG_INTDIR}` variable to express per-config
stamp file paths in multi-config generators. Now that most generators
support generator expressions in custom command outputs, we can use
the `$<CONFIG>` genex instead.
In particular, this fixes cross-config `BUILD_BYPRODUCTS` with the Ninja
Multi-Config generator.
Fixes: #23595
10 lines
328 B
CMake
10 lines
328 B
CMake
include(ExternalProject)
|
|
ExternalProject_Add(proj1
|
|
DOWNLOAD_COMMAND ""
|
|
SOURCE_DIR ""
|
|
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo "Configure proj1"
|
|
BUILD_COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/out-$<CONFIG>.txt
|
|
BUILD_BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/out-$<CONFIG>.txt
|
|
INSTALL_COMMAND ""
|
|
)
|