diff options
author | Brad King <brad.king@kitware.com> | 2016-01-19 21:09:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-01-20 13:36:30 (GMT) |
commit | ec00e89e83eeb91633affd662870b7a6955dbf5a (patch) | |
tree | 4d3c1653e34be1e2453587244b42ef433f8e4a05 /Modules/ExternalProject.cmake | |
parent | 5d739a3c843c95aec6c5c8df4d7e87e606c0c8ea (diff) | |
download | CMake-ec00e89e83eeb91633affd662870b7a6955dbf5a.zip CMake-ec00e89e83eeb91633affd662870b7a6955dbf5a.tar.gz CMake-ec00e89e83eeb91633affd662870b7a6955dbf5a.tar.bz2 |
ExternalProject: Fix TEST_BEFORE_INSTALL for multi-config generators
In multi-config generators we must tell `ctest` what configuration to
test.
Reported-by: Taylor Braun-Jones <taylor@braun-jones.org>
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r-- | Modules/ExternalProject.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 085aa0d..7070dc4 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -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() |