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:
Andrey Pokrovskiy
2015-04-20 23:28:21 -07:00
committed by Brad King
parent 7bd8cfb813
commit 0273ef1469
3 changed files with 15 additions and 5 deletions
+1 -1
View File
@@ -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()