[Cmake-commits] [cmake-commits] king committed AddExternalProject.cmake 1.21 1.22

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Apr 9 13:56:10 EDT 2009


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv22615/Modules

Modified Files:
	AddExternalProject.cmake 
Log Message:
ENH: Allow lists in AddExternalProject arguments

The add_external_project function separates its arguments with ';'
separators, so previously no command line argument could contain one.
When specifying CMAKE_ARGS, some -D argument values may need to contain
a semicolon to form lists in the external project cache.

This adds add_external_project argument LIST_SEPARATOR to specify a list
separator string.  The separator is replaced by ';' in arguments to any
command created to drive the external project.  For example:

  add_external_project(...
    LIST_SEPARATOR ::
    CMAKE_ARGS -DSOME_LIST:STRING=A::B::C
    ...)

passes "-DSOME_LIST:STRING=A;B;C" to CMake for the external project.


Index: AddExternalProject.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/AddExternalProject.cmake,v
retrieving revision 1.21
retrieving revision 1.22
diff -C 2 -d -r1.21 -r1.22
*** AddExternalProject.cmake	31 Mar 2009 14:13:01 -0000	1.21
--- AddExternalProject.cmake	9 Apr 2009 17:56:08 -0000	1.22
***************
*** 212,215 ****
--- 212,221 ----
    get_property(work_dir TARGET ${name} PROPERTY AEP_${step}_WORKING_DIRECTORY)
  
+   # Replace list separators.
+   get_property(sep TARGET ${name} PROPERTY AEP_LIST_SEPARATOR)
+   if(sep AND command)
+     string(REPLACE "${sep}" "\\;" command "${command}")
+   endif()
+ 
    # Custom comment?
    get_property(comment_set TARGET ${name} PROPERTY AEP_${step}_COMMENT SET)
***************
*** 595,598 ****
--- 601,605 ----
      INSTALL_ARGS
      INSTALL_COMMAND
+     LIST_SEPARATOR
      PATCH_COMMAND
      SVN_REPOSITORY



More information about the Cmake-commits mailing list