summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-12-10 22:02:46 (GMT)
committerBrad King <brad.king@kitware.com>2013-01-31 14:58:05 (GMT)
commit5b2fba5d402246bebc6d89573fbc4bb6192ccf8b (patch)
treee120426accf8014293d5afd3a4f7170ec7882b61 /Modules/ExternalProject.cmake
parent7ecaa4047bc1517f757f01e34747a0c4fdac4ee4 (diff)
downloadCMake-5b2fba5d402246bebc6d89573fbc4bb6192ccf8b.zip
CMake-5b2fba5d402246bebc6d89573fbc4bb6192ccf8b.tar.gz
CMake-5b2fba5d402246bebc6d89573fbc4bb6192ccf8b.tar.bz2
ExternalProject: Simplify CMake command line generation
Append the source directory to the command line option in a separate step instead of duplicating it with each possible generator.
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r--Modules/ExternalProject.cmake9
1 files changed, 5 insertions, 4 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 2355dac..1ef20d3 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1586,15 +1586,16 @@ function(_ep_add_configure_command name)
get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR)
if(cmake_generator)
- list(APPEND cmd "-G${cmake_generator}" "${source_dir}")
+ list(APPEND cmd "-G${cmake_generator}")
else()
if(CMAKE_EXTRA_GENERATOR)
- list(APPEND cmd "-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}"
- "${source_dir}")
+ list(APPEND cmd "-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}")
else()
- list(APPEND cmd "-G${CMAKE_GENERATOR}" "${source_dir}")
+ list(APPEND cmd "-G${CMAKE_GENERATOR}")
endif()
endif()
+
+ list(APPEND cmd "${source_dir}")
endif()
# If anything about the configure command changes, (command itself, cmake