summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-01-19 21:07:28 (GMT)
committerBrad King <brad.king@kitware.com>2016-01-20 13:36:09 (GMT)
commit5d739a3c843c95aec6c5c8df4d7e87e606c0c8ea (patch)
treef22721f32b38207691cb07933467a46a6aad4343 /Modules
parentc13ed964012bcdf3765ada195db66930d6a0fcf9 (diff)
downloadCMake-5d739a3c843c95aec6c5c8df4d7e87e606c0c8ea.zip
CMake-5d739a3c843c95aec6c5c8df4d7e87e606c0c8ea.tar.gz
CMake-5d739a3c843c95aec6c5c8df4d7e87e606c0c8ea.tar.bz2
ExternalProject: Simplify `cmake --build` configuration passing
Check CMAKE_CONFIGURATION_TYPES instead of CMAKE_CFG_INTDIR in order to recognize multi-config generators. Then use $<CONFIG> to pass the configuration value.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/ExternalProject.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 5c5c54a..085aa0d 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1230,9 +1230,9 @@ function(_ep_get_build_command name step cmd_var)
set(cmd "${CMAKE_COMMAND}")
endif()
set(args --build ".")
- if (CMAKE_CFG_INTDIR AND NOT CMAKE_CFG_INTDIR STREQUAL ".")
- list(APPEND args --config "${CMAKE_CFG_INTDIR}")
- endif ()
+ if(CMAKE_CONFIGURATION_TYPES)
+ list(APPEND args --config $<CONFIG>)
+ endif()
if(step STREQUAL "INSTALL")
list(APPEND args --target install)
endif()