summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-03-18 15:00:30 (GMT)
committerBrad King <brad.king@kitware.com>2009-03-18 15:00:30 (GMT)
commit6ae0ff626a67a2a81481bf127d07543d1f0cca16 (patch)
treed7435acb45ba2c15a855e07b56f28af4f70e9e2b /Tests
parent431c456cf5a7bfcad506cb312774a494c6708323 (diff)
downloadCMake-6ae0ff626a67a2a81481bf127d07543d1f0cca16.zip
CMake-6ae0ff626a67a2a81481bf127d07543d1f0cca16.tar.gz
CMake-6ae0ff626a67a2a81481bf127d07543d1f0cca16.tar.bz2
ENH: Improve add_external_project interface
This rewrites the keyword/argument parsing and handling in the AddExternalProject module to use arguments more literally: - The strict keyword-value pairing is gone in favor of keywords with arbitrary non-keyword values. This avoids requiring users to escape spaces and quotes in command lines. - Customized step command lines are now specified with a single keyword <step>_COMMAND instead of putting the arguments in a separate entry (previously called <step>_ARGS). - Build step custom commands now use VERBATIM mode so that arguments are correctly escaped on the command line during builds.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/ExternalProject/CMakeLists.txt34
1 files changed, 16 insertions, 18 deletions
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index 091e41b..856a713 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -79,7 +79,7 @@ set(proj EmptyNoOpProject)
add_external_project(${proj}
BUILD_ARGS ""
BUILD_COMMAND ""
- CONFIGURE_ARGS ""
+ CMAKE_ARGS ""
CONFIGURE_COMMAND ""
CONFIGURE_DIR ""
CVS_REPOSITORY ""
@@ -87,7 +87,6 @@ add_external_project(${proj}
CVS_TAG ""
DEPENDS "MinimalNoOpProject"
DIR ""
- DOWNLOAD_ARGS ""
DOWNLOAD_COMMAND ""
INSTALL_ARGS ""
INSTALL_COMMAND ""
@@ -97,7 +96,6 @@ add_external_project(${proj}
TAR_URL ""
TGZ ""
TGZ_URL ""
- UPDATE_ARGS ""
UPDATE_COMMAND ""
)
@@ -108,7 +106,7 @@ if(can_build_tutorial_step5)
set(proj TutorialStep5-Local)
add_external_project(${proj}
DIR "${CMAKE_CURRENT_SOURCE_DIR}/../Tutorial/Step5"
- CONFIGURE_ARGS "\"-DCMAKE_INSTALL_PREFIX:PATH=${prefix}\" -G \"${CMAKE_GENERATOR}\" \"${source_dir}/${proj}\""
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${prefix} -G ${CMAKE_GENERATOR} ${source_dir}/${proj}
)
endif()
@@ -119,14 +117,14 @@ set(proj TutorialStep1-LocalTAR)
add_external_project(${proj}
TAR "${CMAKE_CURRENT_SOURCE_DIR}/Step1.tar"
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
- CONFIGURE_ARGS "\"-DCMAKE_INSTALL_PREFIX:PATH=${prefix}\""
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${prefix}
INSTALL_COMMAND ""
)
set(proj TutorialStep1-LocalNoDirTAR)
add_external_project(${proj}
TAR "${CMAKE_CURRENT_SOURCE_DIR}/Step1NoDir.tar"
- CONFIGURE_ARGS "\"-DCMAKE_INSTALL_PREFIX:PATH=${prefix}\" -G \"${CMAKE_GENERATOR}\" \"${source_dir}/${proj}\""
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${prefix} -G ${CMAKE_GENERATOR} ${source_dir}/${proj}
INSTALL_COMMAND ""
)
@@ -136,7 +134,7 @@ add_external_project(${proj}
set(proj TutorialStep1-LocalTGZ)
add_external_project(${proj}
TGZ "${CMAKE_CURRENT_SOURCE_DIR}/Step1.tgz"
- CONFIGURE_ARGS "\"-DCMAKE_INSTALL_PREFIX:PATH=${prefix}\" -G \"${CMAKE_GENERATOR}\" \"${source_dir}/${proj}\""
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${prefix} -G ${CMAKE_GENERATOR} ${source_dir}/${proj}
INSTALL_COMMAND ""
)
@@ -144,7 +142,7 @@ set(proj TutorialStep1-LocalNoDirTGZ)
add_external_project(${proj}
TGZ "${CMAKE_CURRENT_SOURCE_DIR}/Step1NoDir.tgz"
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
- CONFIGURE_ARGS "\"-DCMAKE_INSTALL_PREFIX:PATH=${prefix}\""
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${prefix}
INSTALL_COMMAND ""
)
@@ -168,9 +166,9 @@ if(can_use_cvs)
add_external_project(${proj}
CVS_REPOSITORY ":pserver:anonymous:cmake@www.cmake.org:/cvsroot/CMake"
CVS_MODULE "CMake/Tests/Tutorial/Step1"
- CVS_TAG "-D\;2008-12-01 01:00:00 UTC"
+ CVS_TAG "-D2008-12-01 01:00:00 UTC"
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
- CONFIGURE_ARGS "\"-DCMAKE_INSTALL_PREFIX:PATH=${prefix}\""
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${prefix}
INSTALL_COMMAND ""
)
@@ -180,9 +178,9 @@ if(can_use_cvs)
add_external_project(${proj}
CVS_REPOSITORY ":pserver:anonymous:cmake@www.cmake.org:/cvsroot/CMake"
CVS_MODULE "CMake/Source/kwsys"
- CVS_TAG "-r\;CMake-2-6-2"
+ CVS_TAG -rCMake-2-6-2
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
- CONFIGURE_ARGS "\"-DCMAKE_INSTALL_PREFIX:PATH=${prefix}\""
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${prefix}
INSTALL_COMMAND ""
)
@@ -194,7 +192,7 @@ if(can_use_cvs)
CVS_REPOSITORY ":pserver:anoncvs@public.kitware.com:/cvsroot/KWStyle"
CVS_MODULE "KWStyle"
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
- CONFIGURE_ARGS "\"-DCMAKE_INSTALL_PREFIX:PATH=${prefix}\""
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${prefix}
DEPENDS "EmptyNoOpProject"
DEPENDS "TutorialStep1-LocalTAR"
DEPENDS "TutorialStep1-LocalNoDirTAR"
@@ -215,9 +213,9 @@ if(can_use_svn)
set(proj gdcm-md5-20081204)
add_external_project(${proj}
SVN_REPOSITORY "http://gdcm.svn.sourceforge.net/svnroot/gdcm/trunk/Utilities/gdcmmd5"
- SVN_TAG "-r\;{2008-12-04 01:00:00 +0000}"
+ SVN_TAG "-r{2008-12-04 01:00:00 +0000}"
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
- CONFIGURE_ARGS "\"-DCMAKE_INSTALL_PREFIX:PATH=${prefix}\""
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${prefix}
)
# SVN by revision number:
@@ -225,9 +223,9 @@ if(can_use_svn)
set(proj gdcm-md5-r4824)
add_external_project(${proj}
SVN_REPOSITORY "http://gdcm.svn.sourceforge.net/svnroot/gdcm/trunk/Utilities/gdcmmd5"
- SVN_TAG "-r\;4824"
+ SVN_TAG "-r4824"
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
- CONFIGURE_ARGS "\"-DCMAKE_INSTALL_PREFIX:PATH=${prefix}\""
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${prefix}
INSTALL_COMMAND ""
)
@@ -237,7 +235,7 @@ if(can_use_svn)
add_external_project(${proj}
SVN_REPOSITORY "http://gdcm.svn.sourceforge.net/svnroot/gdcm/trunk/Utilities/gdcmmd5"
CMAKE_GENERATOR "${CMAKE_GENERATOR}"
- CONFIGURE_ARGS "\"-DCMAKE_INSTALL_PREFIX:PATH=${prefix}\""
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${prefix}
INSTALL_COMMAND ""
)
endif()