diff options
author | Craig Scott <craig.scott@crascit.com> | 2017-12-29 20:33:11 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2017-12-29 22:35:56 (GMT) |
commit | 3c413e2a31b4fcb6a99dba04669c6a6517b97832 (patch) | |
tree | 0e3f6f6776b682f43654f948886e34d482441aa2 /Modules/ExternalProject.cmake | |
parent | c267ea1c3e54626e4ab2283dc7529ed8aa8beac8 (diff) | |
download | CMake-3c413e2a31b4fcb6a99dba04669c6a6517b97832.zip CMake-3c413e2a31b4fcb6a99dba04669c6a6517b97832.tar.gz CMake-3c413e2a31b4fcb6a99dba04669c6a6517b97832.tar.bz2 |
GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Modules
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r-- | Modules/ExternalProject.cmake | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index d284e27..4eea0fb 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1790,7 +1790,8 @@ function(_ep_get_build_command name step cmd_var) set(cmd "${CMAKE_COMMAND}") endif() set(args --build ".") - if(CMAKE_CONFIGURATION_TYPES) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) if (CMAKE_CFG_INTDIR AND NOT CMAKE_CFG_INTDIR STREQUAL "." AND NOT CMAKE_CFG_INTDIR MATCHES "\\$") @@ -1815,7 +1816,7 @@ function(_ep_get_build_command name step cmd_var) if("x${step}x" STREQUAL "xTESTx") string(REGEX REPLACE "^(.*/)cmake([^/]*)$" "\\1ctest\\2" cmd "${cmd}") set(args "") - if(CMAKE_CONFIGURATION_TYPES) + if(_isMultiConfig) list(APPEND args -C ${config}) endif() endif() @@ -1955,7 +1956,8 @@ endfunction() # function(_ep_get_configuration_subdir_suffix suffix_var) set(suffix "") - if(CMAKE_CONFIGURATION_TYPES) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) set(suffix "/${CMAKE_CFG_INTDIR}") endif() set(${suffix_var} "${suffix}" PARENT_SCOPE) @@ -2085,7 +2087,8 @@ function(ExternalProject_Add_Step name step) set_property(SOURCE ${stamp_file} PROPERTY SYMBOLIC 1) set(touch) # Remove any existing stamp in case the option changed in an existing tree. - if(CMAKE_CONFIGURATION_TYPES) + get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(_isMultiConfig) foreach(cfg ${CMAKE_CONFIGURATION_TYPES}) string(REPLACE "/${CMAKE_CFG_INTDIR}" "/${cfg}" stamp_file_config "${stamp_file}") file(REMOVE ${stamp_file_config}) |