mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-24 07:08:38 -05:00
ExternalProject: Allow generator expressions with LOG_* options (#15287)
Use file(GENERATE) to write the logging wrapper scripts to evaluate generator expressions. Use a per-config script names in case the content varies by configuration.
This commit is contained in:
committed by
Brad King
parent
7bd8cfb813
commit
0273ef1469
@@ -6,7 +6,7 @@ ExternalProject_Add(Subdir1
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Subdir1
|
||||
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/Subdir1
|
||||
|
||||
CMAKE_ARGS -DNORMAL_VAR=NORMAL_VALUE
|
||||
CMAKE_ARGS -DNORMAL_VAR=NORMAL_VALUE -DGENEX_VAR=$<1:GENEX_VALUE>
|
||||
LOG_CONFIGURE 1
|
||||
|
||||
BUILD_COMMAND ""
|
||||
|
||||
@@ -4,3 +4,7 @@ project(Subdir1 NONE)
|
||||
if(NOT "${NORMAL_VAR}" STREQUAL "NORMAL_VALUE")
|
||||
message(SEND_ERROR "NORMAL_VAR != 'NORMAL_VALUE'")
|
||||
endif()
|
||||
|
||||
if(NOT "${GENEX_VAR}" STREQUAL "GENEX_VALUE")
|
||||
message(SEND_ERROR "GENEX_VAR != 'GENEX_VALUE'")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user