diff options
author | Brad King <brad.king@kitware.com> | 2016-01-21 18:55:44 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-01-21 18:55:44 (GMT) |
commit | 071c94eeac9811c8dbe7b6e627899051f1a18ec4 (patch) | |
tree | ef6fbf2392377cc8cdcee763498cceb0e3029675 /Modules | |
parent | 184676532c8192a520b4db8380efbddc13272289 (diff) | |
parent | ec00e89e83eeb91633affd662870b7a6955dbf5a (diff) | |
download | CMake-071c94eeac9811c8dbe7b6e627899051f1a18ec4.zip CMake-071c94eeac9811c8dbe7b6e627899051f1a18ec4.tar.gz CMake-071c94eeac9811c8dbe7b6e627899051f1a18ec4.tar.bz2 |
Merge topic 'ExternalProject-ctest-config'
ec00e89e ExternalProject: Fix TEST_BEFORE_INSTALL for multi-config generators
5d739a3c ExternalProject: Simplify `cmake --build` configuration passing
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/ExternalProject.cmake | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 5c5c54a..7070dc4 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() @@ -1240,6 +1240,9 @@ 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) + list(APPEND args -C $<CONFIG>) + endif() endif() endif() else() |