summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2015-03-26 22:12:04 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2015-03-26 22:12:04 (GMT)
commita704098de83460e8e9bae02434a6c31e7fc3ffd7 (patch)
tree9c409a84d6392057d8233ca04bed90382e2b3aa3 /Modules/ExternalProject.cmake
parent5d1d995bb7a982b13d691f7a926e497f4c44d6f1 (diff)
downloadCMake-a704098de83460e8e9bae02434a6c31e7fc3ffd7.zip
CMake-a704098de83460e8e9bae02434a6c31e7fc3ffd7.tar.gz
CMake-a704098de83460e8e9bae02434a6c31e7fc3ffd7.tar.bz2
ExternalProject: fix the build command for generator overrides
The `binary_dir` variable is never set, so this is invalid. Instead, use "." which all the other build commands use anyways. Also only set the --config option if it is meaningful.
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r--Modules/ExternalProject.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index d7b985d..0c73d41 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1197,7 +1197,10 @@ function(_ep_get_build_command name step cmd_var)
else()
set(cmd "${CMAKE_COMMAND}")
endif()
- set(args --build ${binary_dir} --config ${CMAKE_CFG_INTDIR})
+ set(args --build ".")
+ if (CMAKE_CFG_INTDIR AND NOT CMAKE_CFG_INTDIR STREQUAL ".")
+ list(APPEND args --config "${CMAKE_CFG_INTDIR}")
+ endif ()
if(step STREQUAL "INSTALL")
list(APPEND args --target install)
endif()