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>
This commit is contained in:
Brad King 2016-01-19 16:09:29 -05:00
parent 5d739a3c84
commit ec00e89e83
1 changed files with 3 additions and 0 deletions

View File

@ -1240,6 +1240,9 @@ function(_ep_get_build_command name step cmd_var)
if("x${step}x" STREQUAL "xTESTx") if("x${step}x" STREQUAL "xTESTx")
string(REGEX REPLACE "^(.*/)cmake([^/]*)$" "\\1ctest\\2" cmd "${cmd}") string(REGEX REPLACE "^(.*/)cmake([^/]*)$" "\\1ctest\\2" cmd "${cmd}")
set(args "") set(args "")
if(CMAKE_CONFIGURATION_TYPES)
list(APPEND args -C $<CONFIG>)
endif()
endif() endif()
endif() endif()
else() else()