[Cmake-commits] CMake branch, next, updated. v3.1.0-rc1-208-g9bbd621

Ben Boeckel ben.boeckel at kitware.com
Wed Oct 29 16:47:47 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  9bbd6210e900046e2dd8f80b6380afa2bca25cd8 (commit)
       via  aee7e4a03b8b410212e2eae23d1ecc182c8da817 (commit)
       via  368e8de4cd5a5d97c9b5e81489bf014579211bda (commit)
      from  3e00a76c4ee11f3721d602e1bbcd2d4363c03cf6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9bbd6210e900046e2dd8f80b6380afa2bca25cd8
commit 9bbd6210e900046e2dd8f80b6380afa2bca25cd8
Merge: 3e00a76 aee7e4a
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Wed Oct 29 16:47:46 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Oct 29 16:47:46 2014 -0400

    Merge topic 'fix--D-command-line-parsing' into next
    
    aee7e4a0 cmCacheManager: parse -D flags more strictly
    368e8de4 Tests: test -D parsing on the command line


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aee7e4a03b8b410212e2eae23d1ecc182c8da817
commit aee7e4a03b8b410212e2eae23d1ecc182c8da817
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Mon Oct 20 12:17:19 2014 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Mon Oct 20 12:17:19 2014 -0400

    cmCacheManager: parse -D flags more strictly
    
    In the case of:
    
        -DCACHE_VARS=-DEXTERNAL_PROJECT_CMAKE_ARG:BOOL=TRUE
    
    the variable is parsed out as:
    
        CACHE_VARS=-DEXTERNAL_PROJECT_CMAKE_ARG
    
    because the parser allows '=' in the variable name. Disallow such a name
    on the command line.

diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index d6b84a0..17bfe4b 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -139,7 +139,7 @@ bool cmCacheManager::ParseEntry(const std::string& entry,
 {
   // input line is:         key:type=value
   static cmsys::RegularExpression reg(
-    "^([^:]*):([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$");
+    "^([^=:]*):([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$");
   // input line is:         "key":type=value
   static cmsys::RegularExpression regQuoted(
     "^\"([^\"]*)\":([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$");
diff --git a/Tests/RunCMake/CommandLine/D_nested_cache-stderr.txt b/Tests/RunCMake/CommandLine/D_nested_cache-stderr.txt
index a1cc8d3..bba64bc 100644
--- a/Tests/RunCMake/CommandLine/D_nested_cache-stderr.txt
+++ b/Tests/RunCMake/CommandLine/D_nested_cache-stderr.txt
@@ -1 +1 @@
-^--><--$
+^-->-DBAR:BOOL=BAZ<--$

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=368e8de4cd5a5d97c9b5e81489bf014579211bda
commit 368e8de4cd5a5d97c9b5e81489bf014579211bda
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Mon Oct 20 12:17:03 2014 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Mon Oct 20 12:17:03 2014 -0400

    Tests: test -D parsing on the command line

diff --git a/Tests/RunCMake/CommandLine/CMakeLists.txt b/Tests/RunCMake/CommandLine/CMakeLists.txt
new file mode 100644
index 0000000..2897109
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/CMakeLists.txt
@@ -0,0 +1,3 @@
+cmake_minimum_required(VERSION 3.0)
+project(${RunCMake_TEST} NONE)
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/CommandLine/D_nested_cache-stderr.txt b/Tests/RunCMake/CommandLine/D_nested_cache-stderr.txt
new file mode 100644
index 0000000..a1cc8d3
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/D_nested_cache-stderr.txt
@@ -0,0 +1 @@
+^--><--$
diff --git a/Tests/RunCMake/CommandLine/D_nested_cache.cmake b/Tests/RunCMake/CommandLine/D_nested_cache.cmake
new file mode 100644
index 0000000..9b57284
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/D_nested_cache.cmake
@@ -0,0 +1 @@
+message("-->${FOO}<--")
diff --git a/Tests/RunCMake/CommandLine/D_typed_nested_cache-stderr.txt b/Tests/RunCMake/CommandLine/D_typed_nested_cache-stderr.txt
new file mode 100644
index 0000000..bba64bc
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/D_typed_nested_cache-stderr.txt
@@ -0,0 +1 @@
+^-->-DBAR:BOOL=BAZ<--$
diff --git a/Tests/RunCMake/CommandLine/D_typed_nested_cache.cmake b/Tests/RunCMake/CommandLine/D_typed_nested_cache.cmake
new file mode 100644
index 0000000..9b57284
--- /dev/null
+++ b/Tests/RunCMake/CommandLine/D_typed_nested_cache.cmake
@@ -0,0 +1 @@
+message("-->${FOO}<--")
diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
index 5622a5b..84e3614 100644
--- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake
@@ -43,3 +43,11 @@ run_cmake_command(E_sleep-bad-arg2 ${CMAKE_COMMAND} -E sleep 1 -1)
 run_cmake_command(E_sleep-one-tenth ${CMAKE_COMMAND} -E sleep 0.1)
 
 run_cmake_command(P_directory ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR})
+
+set(RunCMake_TEST_OPTIONS
+  "-DFOO=-DBAR:BOOL=BAZ")
+run_cmake(D_nested_cache)
+
+set(RunCMake_TEST_OPTIONS
+  "-DFOO:STRING=-DBAR:BOOL=BAZ")
+run_cmake(D_typed_nested_cache)

-----------------------------------------------------------------------

Summary of changes:
 Source/cmCacheManager.cxx                                  |    2 +-
 Tests/RunCMake/{CMP0054 => CommandLine}/CMakeLists.txt     |    0
 Tests/RunCMake/CommandLine/D_nested_cache-stderr.txt       |    1 +
 Tests/RunCMake/CommandLine/D_nested_cache.cmake            |    1 +
 Tests/RunCMake/CommandLine/D_typed_nested_cache-stderr.txt |    1 +
 Tests/RunCMake/CommandLine/D_typed_nested_cache.cmake      |    1 +
 Tests/RunCMake/CommandLine/RunCMakeTest.cmake              |    8 ++++++++
 7 files changed, 13 insertions(+), 1 deletion(-)
 copy Tests/RunCMake/{CMP0054 => CommandLine}/CMakeLists.txt (100%)
 create mode 100644 Tests/RunCMake/CommandLine/D_nested_cache-stderr.txt
 create mode 100644 Tests/RunCMake/CommandLine/D_nested_cache.cmake
 create mode 100644 Tests/RunCMake/CommandLine/D_typed_nested_cache-stderr.txt
 create mode 100644 Tests/RunCMake/CommandLine/D_typed_nested_cache.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list