[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-1064-gb004605

Stephen Kelly steveire at gmail.com
Sat Mar 15 04:19:31 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  b0046054c62ef8e8e22703670d1df3e24d369526 (commit)
       via  e29447f1015ff9ae615ab00166345d4901959555 (commit)
      from  efbcf83a7fae0cf29133de33345fe58357f3eb81 (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=b0046054c62ef8e8e22703670d1df3e24d369526
commit b0046054c62ef8e8e22703670d1df3e24d369526
Merge: efbcf83 e29447f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Mar 15 04:19:29 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Mar 15 04:19:29 2014 -0400

    Merge topic 'CONFIG-LOCATION-CMP0026' into next
    
    e29447f1 cmTarget: Control <CONFIG>_LOCATION with CMP0026 (#14808)

diff --cc Source/cmTarget.cxx
index ca34aea,0c89656..c07fd0f
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@@ -2665,13 -2725,28 +2665,28 @@@ const char *cmTarget::GetProperty(cons
          {
          return 0;
          }
 -      std::string configName = prop+9;
 +      const char* configName = prop.c_str() + 9;
        this->Properties.SetProperty(prop,
 -                                   this->GetLocation(configName.c_str()),
 +                                   this->GetLocation(configName),
                                     cmProperty::TARGET);
        }
+     // Support "<CONFIG>_LOCATION".
+     if(cmHasLiteralSuffix(prop, "_LOCATION"))
+       {
+       std::string configName(prop, strlen(prop) - 9);
+       if(configName != "IMPORTED")
+         {
+         if (!this->HandleLocationPropertyPolicy())
+           {
+           return 0;
+           }
+         this->Properties.SetProperty(prop,
+                                      this->GetLocation(configName.c_str()),
+                                      cmProperty::TARGET);
+         }
+       }
      }
 -  if(strcmp(prop,"INCLUDE_DIRECTORIES") == 0)
 +  if(prop == "INCLUDE_DIRECTORIES")
      {
      static std::string output;
      output = "";

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e29447f1015ff9ae615ab00166345d4901959555
commit e29447f1015ff9ae615ab00166345d4901959555
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Mar 15 09:18:39 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Mar 15 09:18:39 2014 +0100

    cmTarget: Control <CONFIG>_LOCATION with CMP0026 (#14808)

diff --git a/Help/policy/CMP0026.rst b/Help/policy/CMP0026.rst
index 460d2d1..177b655 100644
--- a/Help/policy/CMP0026.rst
+++ b/Help/policy/CMP0026.rst
@@ -3,7 +3,8 @@ CMP0026
 
 Disallow use of the LOCATION target property.
 
-CMake 2.8.12 and lower allowed reading the LOCATION target property to
+CMake 2.8.12 and lower allowed reading the LOCATION target
+property (and configuration-specific variants) to
 determine the eventual location of build targets.  This relies on the
 assumption that all necessary information is available at
 configure-time to determine the final location and filename of the
@@ -17,8 +18,8 @@ $<TARGET_FILE> generator expression together with the file(GENERATE)
 subcommand to generate a file containing the target location.
 
 The OLD behavior for this policy is to allow reading the LOCATION
-property from build-targets.  The NEW behavior for this policy is to
-not to allow reading the LOCATION property from build-targets.
+properties from build-targets.  The NEW behavior for this policy is to
+not to allow reading the LOCATION properties from build-targets.
 
 This policy was introduced in CMake version 3.0.  CMake version
 |release| warns when the policy is not set and uses OLD behavior.  Use
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 3fb79d8..0c89656 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2730,6 +2730,21 @@ const char *cmTarget::GetProperty(const char* prop,
                                    this->GetLocation(configName.c_str()),
                                    cmProperty::TARGET);
       }
+    // Support "<CONFIG>_LOCATION".
+    if(cmHasLiteralSuffix(prop, "_LOCATION"))
+      {
+      std::string configName(prop, strlen(prop) - 9);
+      if(configName != "IMPORTED")
+        {
+        if (!this->HandleLocationPropertyPolicy())
+          {
+          return 0;
+          }
+        this->Properties.SetProperty(prop,
+                                     this->GetLocation(configName.c_str()),
+                                     cmProperty::TARGET);
+        }
+      }
     }
   if(strcmp(prop,"INCLUDE_DIRECTORIES") == 0)
     {
diff --git a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-result.txt b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-stderr.txt
new file mode 100644
index 0000000..07982bd
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-stderr.txt
@@ -0,0 +1,11 @@
+CMake Error at CMP0026-CONFIG-LOCATION-NEW.cmake:7 \(get_target_property\):
+  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
+  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
+  command to set the policy and suppress this warning.
+
+  The LOCATION property may not be read from target "somelib".  Use the
+  target name directly with add_custom_command, or use the generator
+  expression \$<TARGET_FILE>, as appropriate.
+
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW.cmake b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW.cmake
new file mode 100644
index 0000000..1b373e7
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW.cmake
@@ -0,0 +1,7 @@
+
+enable_language(CXX)
+
+cmake_policy(SET CMP0026 NEW)
+
+add_library(somelib empty.cpp)
+get_target_property(_loc somelib Debug_LOCATION)
diff --git a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-result.txt b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD.cmake b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD.cmake
new file mode 100644
index 0000000..4166828
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD.cmake
@@ -0,0 +1,7 @@
+
+enable_language(CXX)
+
+cmake_policy(SET CMP0026 OLD)
+
+add_library(somelib empty.cpp)
+get_target_property(_loc somelib Debug_LOCATION)
diff --git a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-result.txt b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-stderr.txt
new file mode 100644
index 0000000..d44dcb4
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-stderr.txt
@@ -0,0 +1,12 @@
+CMake Warning \(dev\) at CMP0026-CONFIG-LOCATION-WARN.cmake:5 \(get_target_property\):
+  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
+  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
+  command to set the policy and suppress this warning.
+
+  The LOCATION property should not be read from target "somelib".  Use the
+  target name directly with add_custom_command, or use the generator
+  expression \$<TARGET_FILE>, as appropriate.
+
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
+This warning is for project developers.  Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN.cmake b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN.cmake
new file mode 100644
index 0000000..511056f
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN.cmake
@@ -0,0 +1,5 @@
+
+enable_language(CXX)
+
+add_library(somelib empty.cpp)
+get_target_property(_loc somelib Debug_LOCATION)
diff --git a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-result.txt b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-stderr.txt
new file mode 100644
index 0000000..0e90f96
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-stderr.txt
@@ -0,0 +1,11 @@
+CMake Error at CMP0026-LOCATION-CONFIG-NEW.cmake:7 \(get_target_property\):
+  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
+  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
+  command to set the policy and suppress this warning.
+
+  The LOCATION property may not be read from target "somelib".  Use the
+  target name directly with add_custom_command, or use the generator
+  expression \$<TARGET_FILE>, as appropriate.
+
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW.cmake b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW.cmake
new file mode 100644
index 0000000..e6aa509
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW.cmake
@@ -0,0 +1,7 @@
+
+enable_language(CXX)
+
+cmake_policy(SET CMP0026 NEW)
+
+add_library(somelib empty.cpp)
+get_target_property(_loc somelib LOCATION_Debug)
diff --git a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-result.txt b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD.cmake b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD.cmake
new file mode 100644
index 0000000..482373d
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD.cmake
@@ -0,0 +1,7 @@
+
+enable_language(CXX)
+
+cmake_policy(SET CMP0026 OLD)
+
+add_library(somelib empty.cpp)
+get_target_property(_loc somelib LOCATION_Debug)
diff --git a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-result.txt b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-result.txt
@@ -0,0 +1 @@
+0
diff --git a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-stderr.txt
new file mode 100644
index 0000000..cd6f3d0
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-stderr.txt
@@ -0,0 +1,12 @@
+CMake Warning \(dev\) at CMP0026-LOCATION-CONFIG-WARN.cmake:5 \(get_target_property\):
+  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
+  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
+  command to set the policy and suppress this warning.
+
+  The LOCATION property should not be read from target "somelib".  Use the
+  target name directly with add_custom_command, or use the generator
+  expression \$<TARGET_FILE>, as appropriate.
+
+Call Stack \(most recent call first\):
+  CMakeLists.txt:3 \(include\)
+This warning is for project developers.  Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN.cmake b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN.cmake
new file mode 100644
index 0000000..85711c3
--- /dev/null
+++ b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN.cmake
@@ -0,0 +1,5 @@
+
+enable_language(CXX)
+
+add_library(somelib empty.cpp)
+get_target_property(_loc somelib LOCATION_Debug)
diff --git a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake
index 68000a6..1824cc6 100644
--- a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake
@@ -3,3 +3,9 @@ include(RunCMake)
 run_cmake(CMP0026-WARN)
 run_cmake(CMP0026-NEW)
 run_cmake(CMP0026-IMPORTED)
+run_cmake(CMP0026-CONFIG-LOCATION-NEW)
+run_cmake(CMP0026-CONFIG-LOCATION-OLD)
+run_cmake(CMP0026-CONFIG-LOCATION-WARN)
+run_cmake(CMP0026-LOCATION-CONFIG-NEW)
+run_cmake(CMP0026-LOCATION-CONFIG-OLD)
+run_cmake(CMP0026-LOCATION-CONFIG-WARN)

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

Summary of changes:
 Help/policy/CMP0026.rst                                 |    7 ++++---
 Source/cmTarget.cxx                                     |   15 +++++++++++++++
 .../CMP0026-CONFIG-LOCATION-NEW-result.txt}             |    0
 ...tderr.txt => CMP0026-CONFIG-LOCATION-NEW-stderr.txt} |    2 +-
 ...0026-NEW.cmake => CMP0026-CONFIG-LOCATION-NEW.cmake} |    2 +-
 .../CMP0026-CONFIG-LOCATION-OLD-result.txt}             |    0
 .../CMP0026-CONFIG-LOCATION-OLD-stderr.txt}             |    0
 .../RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD.cmake  |    7 +++++++
 .../CMP0026-CONFIG-LOCATION-WARN-result.txt}            |    0
 ...derr.txt => CMP0026-CONFIG-LOCATION-WARN-stderr.txt} |    2 +-
 ...26-WARN.cmake => CMP0026-CONFIG-LOCATION-WARN.cmake} |    2 +-
 .../CMP0026-LOCATION-CONFIG-NEW-result.txt}             |    0
 ...tderr.txt => CMP0026-LOCATION-CONFIG-NEW-stderr.txt} |    2 +-
 ...0026-NEW.cmake => CMP0026-LOCATION-CONFIG-NEW.cmake} |    2 +-
 .../CMP0026-LOCATION-CONFIG-OLD-result.txt}             |    0
 .../CMP0026-LOCATION-CONFIG-OLD-stderr.txt}             |    0
 .../RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD.cmake  |    7 +++++++
 .../CMP0026-LOCATION-CONFIG-WARN-result.txt}            |    0
 ...derr.txt => CMP0026-LOCATION-CONFIG-WARN-stderr.txt} |    2 +-
 ...26-WARN.cmake => CMP0026-LOCATION-CONFIG-WARN.cmake} |    2 +-
 Tests/RunCMake/CMP0026/RunCMakeTest.cmake               |    6 ++++++
 21 files changed, 47 insertions(+), 11 deletions(-)
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CMP0026/CMP0026-CONFIG-LOCATION-NEW-result.txt} (100%)
 copy Tests/RunCMake/CMP0026/{CMP0026-NEW-stderr.txt => CMP0026-CONFIG-LOCATION-NEW-stderr.txt} (86%)
 copy Tests/RunCMake/CMP0026/{CMP0026-NEW.cmake => CMP0026-CONFIG-LOCATION-NEW.cmake} (63%)
 copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CMP0026/CMP0026-CONFIG-LOCATION-OLD-result.txt} (100%)
 copy Tests/RunCMake/{CMP0022/CMP0022-NOWARN-exe-stderr.txt => CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt} (100%)
 create mode 100644 Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD.cmake
 copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CMP0026/CMP0026-CONFIG-LOCATION-WARN-result.txt} (100%)
 copy Tests/RunCMake/CMP0026/{CMP0026-WARN-stderr.txt => CMP0026-CONFIG-LOCATION-WARN-stderr.txt} (86%)
 copy Tests/RunCMake/CMP0026/{CMP0026-WARN.cmake => CMP0026-CONFIG-LOCATION-WARN.cmake} (52%)
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => CMP0026/CMP0026-LOCATION-CONFIG-NEW-result.txt} (100%)
 copy Tests/RunCMake/CMP0026/{CMP0026-NEW-stderr.txt => CMP0026-LOCATION-CONFIG-NEW-stderr.txt} (86%)
 copy Tests/RunCMake/CMP0026/{CMP0026-NEW.cmake => CMP0026-LOCATION-CONFIG-NEW.cmake} (63%)
 copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CMP0026/CMP0026-LOCATION-CONFIG-OLD-result.txt} (100%)
 copy Tests/RunCMake/{CMP0022/CMP0022-NOWARN-exe-stderr.txt => CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt} (100%)
 create mode 100644 Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD.cmake
 copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CMP0026/CMP0026-LOCATION-CONFIG-WARN-result.txt} (100%)
 copy Tests/RunCMake/CMP0026/{CMP0026-WARN-stderr.txt => CMP0026-LOCATION-CONFIG-WARN-stderr.txt} (86%)
 copy Tests/RunCMake/CMP0026/{CMP0026-WARN.cmake => CMP0026-LOCATION-CONFIG-WARN.cmake} (52%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list