[Cmake-commits] CMake branch, next, updated. v3.0.0-rc3-1811-g1848a77

Stephen Kelly steveire at gmail.com
Thu Apr 3 15:08:34 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  1848a77a3962d4169cb6f04b099c4f37fe281e78 (commit)
       via  70cc84de929d36dfb42144292675df6dd92d8535 (commit)
      from  e1c681ba59f170b4062b02535a564a3a0ff1613e (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=1848a77a3962d4169cb6f04b099c4f37fe281e78
commit 1848a77a3962d4169cb6f04b099c4f37fe281e78
Merge: e1c681b 70cc84d
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Apr 3 15:08:32 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Apr 3 15:08:32 2014 -0400

    Merge topic 'install-prefix-in-interface' into next
    
    70cc84de Export: Disallow exported interface includes in src/build tree (#14592).


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70cc84de929d36dfb42144292675df6dd92d8535
commit 70cc84de929d36dfb42144292675df6dd92d8535
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Mar 31 17:37:02 2014 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Apr 3 21:07:58 2014 +0200

    Export: Disallow exported interface includes in src/build tree (#14592).
    
    Allow directories in the build tree only if they are also
    subdirectories of the install tree.

diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index b763882..4b895fe 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -103,3 +103,4 @@ All Policies
    /policy/CMP0049
    /policy/CMP0050
    /policy/CMP0051
+   /policy/CMP0052
diff --git a/Help/policy/CMP0052.rst b/Help/policy/CMP0052.rst
new file mode 100644
index 0000000..16b32f9f
--- /dev/null
+++ b/Help/policy/CMP0052.rst
@@ -0,0 +1,21 @@
+CMP0052
+-------
+
+Disallow source and binary directories in INTERFACE_INCLUDE_DIRECTORIES.
+
+CMake 3.0 and lower allowed subdirectories of the source directory or build
+directory to be in the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` of
+installed and exported targets, if the directory was also a subdirectory of
+the installation prefix.  This makes the installation depend on the
+existence of the source dir or binary dir, and the installation will be
+broken if either are removed after installation.
+
+The OLD behavior for this policy is to export the content of the
+:prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` with the source or binary
+directory.  The NEW behavior for this
+policy is to issue an error if such a directory is used.
+
+This policy was introduced in CMake version 3.1.
+CMake version |release| warns when the policy is not set and uses
+``OLD`` behavior.  Use the :command:`cmake_policy` command to set it
+to ``OLD`` or ``NEW`` explicitly.
diff --git a/Help/release/dev/CMP0052.rst b/Help/release/dev/CMP0052.rst
new file mode 100644
index 0000000..adb3d44
--- /dev/null
+++ b/Help/release/dev/CMP0052.rst
@@ -0,0 +1,5 @@
+CMP0052
+-------
+
+* Policy :policy:`CMP0052` introduced to control directories in the
+  :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` of exported targets.
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index b38c48b..b2e58ec 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -279,7 +279,37 @@ static bool checkInterfaceDirs(const std::string &prepro,
       }
     if (isSubDirectory(li->c_str(), installDir))
       {
-      continue;
+      bool shouldContinue = isSubDirectory(installDir, topBinaryDir);
+      if (!shouldContinue)
+        {
+        switch(target->GetPolicyStatusCMP0052())
+          {
+          case cmPolicies::WARN:
+            {
+            cmOStringStream s;
+            s << target->GetMakefile()->GetPolicies()
+                      ->GetPolicyWarning(cmPolicies::CMP0052) << "\n";
+            s << "Directory:\n    \"" << *li << "\"\nin "
+              "INTERFACE_INCLUDE_DIRECTORIES of target \""
+              << target->GetName() << "\" is a subdirectory of the install "
+              "directory:\n    \"" << installDir << "\"";
+            target->GetMakefile()->IssueMessage(cmake::AUTHOR_WARNING,
+                                                s.str());
+            }
+          case cmPolicies::OLD:
+            shouldContinue = true;
+            break;
+          case cmPolicies::REQUIRED_ALWAYS:
+          case cmPolicies::REQUIRED_IF_USED:
+          case cmPolicies::NEW:
+            break;
+          }
+        // OLD continue;
+        }
+      if (shouldContinue)
+        {
+        continue;
+        }
       }
     if (isSubDirectory(li->c_str(), topBinaryDir))
       {
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 759df91..3cbd9b1 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -348,6 +348,12 @@ cmPolicies::cmPolicies()
     CMP0051, "CMP0051",
     "List TARGET_OBJECTS in SOURCES target property.",
     3,1,0, cmPolicies::WARN);
+
+  this->DefinePolicy(
+    CMP0052, "CMP0052",
+    "Disallow source and binary directories in "
+    "INTERFACE_INCLUDE_DIRECTORIES.",
+    3,1,0, cmPolicies::WARN);
 }
 
 cmPolicies::~cmPolicies()
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 7a08a34..8947422 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -105,6 +105,8 @@ public:
     CMP0049, ///< Do not expand variables in target source entries
     CMP0050, ///< Disallow add_custom_command SOURCE signatures
     CMP0051, ///< List TARGET_OBJECTS in SOURCES target property
+    CMP0052, ///< Disallow source and binary directories in
+    /// INTERFACE_INCLUDE_DIRECTORIES
 
     /** \brief Always the last entry.
      *
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 055e029..33db768 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -30,7 +30,8 @@
   F(CMP0038) \
   F(CMP0041) \
   F(CMP0042) \
-  F(CMP0046)
+  F(CMP0046) \
+  F(CMP0052)
 
 class cmake;
 class cmMakefile;
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index ed3afc5..4ed2f43 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -25,7 +25,9 @@ function(run_cmake test)
       unset(expect_std${o})
     endif()
   endforeach()
-  set(RunCMake_TEST_SOURCE_DIR "${top_src}")
+  if (NOT RunCMake_TEST_SOURCE_DIR)
+    set(RunCMake_TEST_SOURCE_DIR "${top_src}")
+  endif()
   if(NOT RunCMake_TEST_BINARY_DIR)
     set(RunCMake_TEST_BINARY_DIR "${top_bin}/${test}-build")
   endif()
@@ -36,6 +38,9 @@ function(run_cmake test)
   if(NOT DEFINED RunCMake_TEST_OPTIONS)
     set(RunCMake_TEST_OPTIONS "")
   endif()
+  if (NOT RunCMake_TEST_FILE)
+    set(RunCMake_TEST_FILE "${test}")
+  endif()
   if(APPLE)
     list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0025=NEW)
   endif()
@@ -52,7 +57,7 @@ function(run_cmake test)
       COMMAND ${CMAKE_COMMAND} "${RunCMake_TEST_SOURCE_DIR}"
                 -G "${RunCMake_GENERATOR}"
                 -T "${RunCMake_GENERATOR_TOOLSET}"
-                -DRunCMake_TEST=${test}
+                -DRunCMake_TEST=${RunCMake_TEST_FILE}
                 --no-warn-unused-cli
                 ${RunCMake_TEST_OPTIONS}
       WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}"
diff --git a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt
index f30c9a9..f4b744b 100644
--- a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt
+++ b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt
@@ -16,6 +16,7 @@
    \* CMP0041
    \* CMP0042
    \* CMP0046
+   \* CMP0052
 
 Call Stack \(most recent call first\):
   CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-result.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-stderr.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-stderr.txt
new file mode 100644
index 0000000..f0adc9f
--- /dev/null
+++ b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error in CMakeLists.txt:
+  Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path:
+
+    ".*Tests/RunCMake/include_directories/prefix/BinInInstallPrefix-CMP0052-NEW-build/foo"
+
+  which is prefixed in the build directory.
diff --git a/Tests/RunCMake/set/PARENT_SCOPE-result.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-result.txt
similarity index 100%
copy from Tests/RunCMake/set/PARENT_SCOPE-result.txt
copy to Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-result.txt
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/set/PARENT_SCOPE-result.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-result.txt
similarity index 100%
copy from Tests/RunCMake/set/PARENT_SCOPE-result.txt
copy to Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-result.txt
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-stderr.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-stderr.txt
new file mode 100644
index 0000000..5800dcb
--- /dev/null
+++ b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-stderr.txt
@@ -0,0 +1,15 @@
+CMake Warning \(dev\) in CMakeLists.txt:
+  Policy CMP0052 is not set: Disallow source and binary directories in
+  INTERFACE_INCLUDE_DIRECTORIES.  Run "cmake --help-policy CMP0052" for
+  policy details.  Use the cmake_policy command to set the policy and
+  suppress this warning.
+
+  Directory:
+
+      ".*Tests/RunCMake/include_directories/prefix/BinInInstallPrefix-CMP0052-WARN-build/foo"
+
+  in INTERFACE_INCLUDE_DIRECTORIES of target "testTarget" is a subdirectory
+  of the install directory:
+
+      ".*Tests/RunCMake/include_directories/prefix"
+This warning is for project developers.  Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/include_directories/CMakeLists.txt b/Tests/RunCMake/include_directories/CMakeLists.txt
index f452db1..3482e6b 100644
--- a/Tests/RunCMake/include_directories/CMakeLists.txt
+++ b/Tests/RunCMake/include_directories/CMakeLists.txt
@@ -1,3 +1,3 @@
-cmake_minimum_required(VERSION 2.8.4)
+cmake_minimum_required(VERSION 3.0)
 project(${RunCMake_TEST} CXX)
 include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/include_directories/InstallInBinDir-result.txt b/Tests/RunCMake/include_directories/InstallInBinDir-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/include_directories/InstallInBinDir-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include_directories/InstallInBinDir-stderr.txt b/Tests/RunCMake/include_directories/InstallInBinDir-stderr.txt
new file mode 100644
index 0000000..254fae1
--- /dev/null
+++ b/Tests/RunCMake/include_directories/InstallInBinDir-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error in CMakeLists.txt:
+  Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path:
+
+    ".*Tests/RunCMake/include_directories/InstallInBinDir-build/foo"
+
+  which is prefixed in the build directory.
diff --git a/Tests/RunCMake/include_directories/InstallInSrcDir-result.txt b/Tests/RunCMake/include_directories/InstallInSrcDir-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/include_directories/InstallInSrcDir-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include_directories/InstallInSrcDir-stderr.txt b/Tests/RunCMake/include_directories/InstallInSrcDir-stderr.txt
new file mode 100644
index 0000000..7be3044
--- /dev/null
+++ b/Tests/RunCMake/include_directories/InstallInSrcDir-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error in CMakeLists.txt:
+  Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path:
+
+    ".*Tests/RunCMake/include_directories/copy/foo"
+
+  which is prefixed in the source directory.
diff --git a/Tests/RunCMake/set/PARENT_SCOPE-result.txt b/Tests/RunCMake/include_directories/InstallToPrefixInBinDir-result.txt
similarity index 100%
copy from Tests/RunCMake/set/PARENT_SCOPE-result.txt
copy to Tests/RunCMake/include_directories/InstallToPrefixInBinDir-result.txt
diff --git a/Tests/RunCMake/include_directories/InstallToPrefixInBinDir-stderr.txt b/Tests/RunCMake/include_directories/InstallToPrefixInBinDir-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/include_directories/InstallToPrefixInBinDir-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/include_directories/InstallToPrefixInBinDir.cmake b/Tests/RunCMake/include_directories/InstallToPrefixInBinDir.cmake
new file mode 100644
index 0000000..1cf7088
--- /dev/null
+++ b/Tests/RunCMake/include_directories/InstallToPrefixInBinDir.cmake
@@ -0,0 +1,11 @@
+
+project(InstallToPrefixInBinDir)
+
+add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
+target_include_directories(testTarget INTERFACE "${CMAKE_INSTALL_PREFIX}/foo")
+
+install(TARGETS testTarget EXPORT testTargets
+  DESTINATION lib
+)
+
+install(EXPORT testTargets DESTINATION lib/cmake)
diff --git a/Tests/RunCMake/include_directories/RunCMakeTest.cmake b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
index c00b924..b88a636 100644
--- a/Tests/RunCMake/include_directories/RunCMakeTest.cmake
+++ b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
@@ -12,3 +12,72 @@ run_cmake(CMP0021)
 run_cmake(install_config)
 run_cmake(incomplete-genex)
 run_cmake(export-NOWARN)
+
+configure_file(
+  "${RunCMake_SOURCE_DIR}/CMakeLists.txt"
+  "${RunCMake_BINARY_DIR}/copy/CMakeLists.txt"
+  COPYONLY
+)
+configure_file(
+  "${RunCMake_SOURCE_DIR}/empty.cpp"
+  "${RunCMake_BINARY_DIR}/copy/empty.cpp"
+  COPYONLY
+)
+configure_file(
+  "${RunCMake_SOURCE_DIR}/SourceDirectoryInInterface.cmake"
+  "${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface.cmake"
+  COPYONLY
+)
+set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface/prefix")
+set(RunCMake_TEST_FILE "${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface")
+set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/copy")
+run_cmake(InstallInSrcDir)
+unset(RunCMake_TEST_SOURCE_DIR)
+unset(RunCMake_TEST_FILE)
+
+set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallInBinDir-build/prefix")
+set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/InstallInBinDir-build")
+set(RunCMake_TEST_FILE "${RunCMake_SOURCE_DIR}/BinaryDirectoryInInterface")
+run_cmake(InstallInBinDir)
+unset(RunCMake_TEST_BINARY_DIR)
+unset(RunCMake_TEST_FILE)
+
+configure_file(
+  "${RunCMake_SOURCE_DIR}/CMakeLists.txt"
+  "${RunCMake_BINARY_DIR}/prefix/src/CMakeLists.txt"
+  COPYONLY
+)
+configure_file(
+  "${RunCMake_SOURCE_DIR}/empty.cpp"
+  "${RunCMake_BINARY_DIR}/prefix/src/empty.cpp"
+  COPYONLY
+)
+configure_file(
+  "${RunCMake_SOURCE_DIR}/SourceDirectoryInInterface.cmake"
+  "${RunCMake_BINARY_DIR}/prefix/src/SourceDirectoryInInterface.cmake"
+  COPYONLY
+)
+
+foreach(policyStatus "" NEW OLD)
+  if (NOT "${policyStatus}" STREQUAL "")
+    set(policyOption -DCMAKE_POLICY_DEFAULT_CMP0052=${policyStatus})
+  else()
+    unset(policyOption)
+    set(policyStatus WARN)
+  endif()
+  set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/prefix" ${policyOption})
+  set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/prefix/BinInInstallPrefix-CMP0052-${policyStatus}-build")
+  set(RunCMake_TEST_FILE "${RunCMake_SOURCE_DIR}/BinaryDirectoryInInterface")
+  run_cmake(BinInInstallPrefix-CMP0052-${policyStatus})
+  unset(RunCMake_TEST_BINARY_DIR)
+  unset(RunCMake_TEST_FILE)
+
+  set(RunCMake_TEST_FILE "${RunCMake_BINARY_DIR}/prefix/src/SourceDirectoryInInterface")
+  set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/prefix/src")
+  run_cmake(SrcInInstallPrefix-CMP0052-${policyStatus})
+  unset(RunCMake_TEST_SOURCE_DIR)
+  unset(RunCMake_TEST_FILE)
+endforeach()
+
+set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallToPrefixInBinDir-build/prefix")
+run_cmake(InstallToPrefixInBinDir)
diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-result.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-stderr.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-stderr.txt
new file mode 100644
index 0000000..afa43e0
--- /dev/null
+++ b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-stderr.txt
@@ -0,0 +1,6 @@
+CMake Error in CMakeLists.txt:
+  Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path:
+
+    ".*Tests/RunCMake/include_directories/prefix/src/foo"
+
+  which is prefixed in the source directory.
diff --git a/Tests/RunCMake/set/PARENT_SCOPE-result.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-result.txt
similarity index 100%
copy from Tests/RunCMake/set/PARENT_SCOPE-result.txt
copy to Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-result.txt
diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-stderr.txt
new file mode 100644
index 0000000..10f3293
--- /dev/null
+++ b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-stderr.txt
@@ -0,0 +1 @@
+^$
diff --git a/Tests/RunCMake/set/PARENT_SCOPE-result.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-result.txt
similarity index 100%
copy from Tests/RunCMake/set/PARENT_SCOPE-result.txt
copy to Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-result.txt
diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-stderr.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-stderr.txt
new file mode 100644
index 0000000..6d956bf
--- /dev/null
+++ b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-stderr.txt
@@ -0,0 +1,15 @@
+CMake Warning \(dev\) in CMakeLists.txt:
+  Policy CMP0052 is not set: Disallow source and binary directories in
+  INTERFACE_INCLUDE_DIRECTORIES.  Run "cmake --help-policy CMP0052" for
+  policy details.  Use the cmake_policy command to set the policy and
+  suppress this warning.
+
+  Directory:
+
+      ".*Tests/RunCMake/include_directories/prefix/src/foo"
+
+  in INTERFACE_INCLUDE_DIRECTORIES of target "testTarget" is a subdirectory
+  of the install directory:
+
+      ".*Tests/RunCMake/include_directories/prefix"
+This warning is for project developers.  Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/set/PARENT_SCOPE-result.txt b/Tests/RunCMake/set/ParentScope-result.txt
similarity index 100%
rename from Tests/RunCMake/set/PARENT_SCOPE-result.txt
rename to Tests/RunCMake/set/ParentScope-result.txt
diff --git a/Tests/RunCMake/set/PARENT_SCOPE.cmake b/Tests/RunCMake/set/ParentScope.cmake
similarity index 100%
rename from Tests/RunCMake/set/PARENT_SCOPE.cmake
rename to Tests/RunCMake/set/ParentScope.cmake
diff --git a/Tests/RunCMake/set/RunCMakeTest.cmake b/Tests/RunCMake/set/RunCMakeTest.cmake
index 5d036e3..1b51ea2 100644
--- a/Tests/RunCMake/set/RunCMakeTest.cmake
+++ b/Tests/RunCMake/set/RunCMakeTest.cmake
@@ -1,3 +1,3 @@
 include(RunCMake)
 
-run_cmake(PARENT_SCOPE)
+run_cmake(ParentScope)

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

Summary of changes:
 Help/manual/cmake-policies.7.rst                   |    1 +
 Help/policy/CMP0052.rst                            |   21 ++++++
 Help/release/dev/CMP0052.rst                       |    5 ++
 Source/cmExportFileGenerator.cxx                   |   32 ++++++++-
 Source/cmPolicies.cxx                              |    6 ++
 Source/cmPolicies.h                                |    2 +
 Source/cmTarget.h                                  |    3 +-
 Tests/RunCMake/RunCMake.cmake                      |    9 ++-
 .../RunCMake/TargetPolicies/PolicyList-stderr.txt  |    1 +
 .../BinInInstallPrefix-CMP0052-NEW-result.txt}     |    0
 ...t => BinInInstallPrefix-CMP0052-NEW-stderr.txt} |    2 +-
 .../BinInInstallPrefix-CMP0052-OLD-result.txt}     |    0
 .../BinInInstallPrefix-CMP0052-OLD-stderr.txt}     |    0
 .../BinInInstallPrefix-CMP0052-WARN-result.txt}    |    0
 .../BinInInstallPrefix-CMP0052-WARN-stderr.txt     |   15 +++++
 Tests/RunCMake/include_directories/CMakeLists.txt  |    2 +-
 .../InstallInBinDir-result.txt}                    |    0
 ...rface-stderr.txt => InstallInBinDir-stderr.txt} |    2 +-
 .../InstallInSrcDir-result.txt}                    |    0
 ...rface-stderr.txt => InstallInSrcDir-stderr.txt} |    2 +-
 .../InstallToPrefixInBinDir-result.txt}            |    0
 .../InstallToPrefixInBinDir-stderr.txt}            |    0
 ...terface.cmake => InstallToPrefixInBinDir.cmake} |    4 +-
 .../include_directories/RunCMakeTest.cmake         |   69 ++++++++++++++++++++
 .../SrcInInstallPrefix-CMP0052-NEW-result.txt}     |    0
 ...t => SrcInInstallPrefix-CMP0052-NEW-stderr.txt} |    2 +-
 .../SrcInInstallPrefix-CMP0052-OLD-result.txt}     |    0
 .../SrcInInstallPrefix-CMP0052-OLD-stderr.txt}     |    0
 .../SrcInInstallPrefix-CMP0052-WARN-result.txt}    |    0
 .../SrcInInstallPrefix-CMP0052-WARN-stderr.txt     |   15 +++++
 .../ParentScope-result.txt}                        |    0
 .../set/{PARENT_SCOPE.cmake => ParentScope.cmake}  |    0
 Tests/RunCMake/set/RunCMakeTest.cmake              |    2 +-
 33 files changed, 183 insertions(+), 12 deletions(-)
 create mode 100644 Help/policy/CMP0052.rst
 create mode 100644 Help/release/dev/CMP0052.rst
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => include_directories/BinInInstallPrefix-CMP0052-NEW-result.txt} (100%)
 copy Tests/RunCMake/include_directories/{BinaryDirectoryInInterface-stderr.txt => BinInInstallPrefix-CMP0052-NEW-stderr.txt} (62%)
 rename Tests/RunCMake/{set/PARENT_SCOPE-result.txt => include_directories/BinInInstallPrefix-CMP0052-OLD-result.txt} (100%)
 copy Tests/RunCMake/{CMP0022/CMP0022-NOWARN-exe-stderr.txt => include_directories/BinInInstallPrefix-CMP0052-OLD-stderr.txt} (100%)
 copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => include_directories/BinInInstallPrefix-CMP0052-WARN-result.txt} (100%)
 create mode 100644 Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-stderr.txt
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => include_directories/InstallInBinDir-result.txt} (100%)
 copy Tests/RunCMake/include_directories/{BinaryDirectoryInInterface-stderr.txt => InstallInBinDir-stderr.txt} (67%)
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => include_directories/InstallInSrcDir-result.txt} (100%)
 copy Tests/RunCMake/include_directories/{SourceDirectoryInInterface-stderr.txt => InstallInSrcDir-stderr.txt} (74%)
 copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => include_directories/InstallToPrefixInBinDir-result.txt} (100%)
 copy Tests/RunCMake/{CMP0022/CMP0022-NOWARN-exe-stderr.txt => include_directories/InstallToPrefixInBinDir-stderr.txt} (100%)
 copy Tests/RunCMake/include_directories/{RelativePathInInterface.cmake => InstallToPrefixInBinDir.cmake} (62%)
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => include_directories/SrcInInstallPrefix-CMP0052-NEW-result.txt} (100%)
 copy Tests/RunCMake/include_directories/{SourceDirectoryInInterface-stderr.txt => SrcInInstallPrefix-CMP0052-NEW-stderr.txt} (72%)
 copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => include_directories/SrcInInstallPrefix-CMP0052-OLD-result.txt} (100%)
 copy Tests/RunCMake/{CMP0022/CMP0022-NOWARN-exe-stderr.txt => include_directories/SrcInInstallPrefix-CMP0052-OLD-stderr.txt} (100%)
 copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => include_directories/SrcInInstallPrefix-CMP0052-WARN-result.txt} (100%)
 create mode 100644 Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-stderr.txt
 copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => set/ParentScope-result.txt} (100%)
 rename Tests/RunCMake/set/{PARENT_SCOPE.cmake => ParentScope.cmake} (100%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list