diff options
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 30626f1..30176bb 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}) |