[Cmake-commits] CMake branch, next, updated. v3.0.0-rc3-1644-g8ead6f4

Stephen Kelly steveire at gmail.com
Mon Mar 31 13:13:07 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  8ead6f4f89d2c9e9b4dee34de399438d0f61c4a9 (commit)
       via  daf3c29144cc4e214e120ec53c5384157832c816 (commit)
       via  63873f705a71e133bfa2cb6fb1714e7aeaec6281 (commit)
      from  6f97563b0db7f51a6b59414d9750f325fdf3ec6c (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=8ead6f4f89d2c9e9b4dee34de399438d0f61c4a9
commit 8ead6f4f89d2c9e9b4dee34de399438d0f61c4a9
Merge: 6f97563 daf3c29
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Mar 31 13:13:06 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Mar 31 13:13:06 2014 -0400

    Merge topic 'install-prefix-in-interface' into next
    
    daf3c291 Merge remote-tracking branch 'origin/master' into install-prefix-in-interface
    63873f70 Export: Allow install tree inside build tree, but disallow inside src tree.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=daf3c29144cc4e214e120ec53c5384157832c816
commit daf3c29144cc4e214e120ec53c5384157832c816
Merge: 63873f7 521b930
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Mar 31 19:12:28 2014 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Mar 31 19:12:28 2014 +0200

    Merge remote-tracking branch 'origin/master' into install-prefix-in-interface
    
    Conflicts:
    	Tests/RunCMake/RunCMake.cmake

diff --cc Source/cmExportFileGenerator.cxx
index 2ac6381,b38c48b..81b2080
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@@ -273,10 -275,9 +275,10 @@@ static bool checkInterfaceDirs(const st
        e << "Target \"" << target->GetName() << "\" "
             "INTERFACE_INCLUDE_DIRECTORIES property contains relative path:\n"
             "  \"" << *li << "\"";
-       target->GetMakefile()->IssueMessage(messageType, e.str().c_str());
+       target->GetMakefile()->IssueMessage(messageType, e.str());
        }
 -    if (isSubDirectory(li->c_str(), installDir))
 +    if (isSubDirectory(li->c_str(), installDir)
 +        && isSubDirectory(installDir, topBinaryDir))
        {
        continue;
        }
diff --cc Tests/RunCMake/RunCMake.cmake
index 08a807e,ed3afc5..4ed2f43
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@@ -57,7 -52,8 +57,8 @@@ 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}"
        OUTPUT_VARIABLE actual_stdout

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63873f705a71e133bfa2cb6fb1714e7aeaec6281
commit 63873f705a71e133bfa2cb6fb1714e7aeaec6281
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Mon Mar 31 17:37:02 2014 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Mon Mar 31 19:11:27 2014 +0200

    Export: Allow install tree inside build tree, but disallow inside src tree.
    
    Disallow other combinations too.

diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 4a161ee..2ac6381 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -275,7 +275,8 @@ static bool checkInterfaceDirs(const std::string &prepro,
            "  \"" << *li << "\"";
       target->GetMakefile()->IssueMessage(messageType, e.str().c_str());
       }
-    if (isSubDirectory(li->c_str(), installDir))
+    if (isSubDirectory(li->c_str(), installDir)
+        && isSubDirectory(installDir, topBinaryDir))
       {
       continue;
       }
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 1d1c523..08a807e 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}
                 ${RunCMake_TEST_OPTIONS}
       WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}"
       OUTPUT_VARIABLE actual_stdout
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-result.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/include_directories/BinInInstallPrefix-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-stderr.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-stderr.txt
new file mode 100644
index 0000000..2044b84
--- /dev/null
+++ b/Tests/RunCMake/include_directories/BinInInstallPrefix-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-build/foo"
+
+  which is prefixed in the build directory.
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix.cmake b/Tests/RunCMake/include_directories/BinInInstallPrefix.cmake
new file mode 100644
index 0000000..bdca929
--- /dev/null
+++ b/Tests/RunCMake/include_directories/BinInInstallPrefix.cmake
@@ -0,0 +1,11 @@
+
+project(BinInInstallPrefix)
+
+add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
+target_include_directories(testTarget INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/foo")
+
+install(TARGETS testTarget EXPORT testTargets
+  DESTINATION lib
+)
+
+install(EXPORT testTargets DESTINATION lib/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/include_directories/InstallToPrefixInBinDir-result.txt b/Tests/RunCMake/include_directories/InstallToPrefixInBinDir-result.txt
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/Tests/RunCMake/include_directories/InstallToPrefixInBinDir-result.txt
@@ -0,0 +1 @@
+0
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..eeac0a7 100644
--- a/Tests/RunCMake/include_directories/RunCMakeTest.cmake
+++ b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
@@ -12,3 +12,63 @@ 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)
+
+set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/prefix")
+set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/prefix/BinInInstallPrefix-build")
+set(RunCMake_TEST_FILE "${RunCMake_SOURCE_DIR}/BinaryDirectoryInInterface")
+run_cmake(BinInInstallPrefix)
+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
+)
+set(RunCMake_TEST_FILE "${RunCMake_BINARY_DIR}/prefix/src/SourceDirectoryInInterface")
+set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/prefix/src")
+run_cmake(SrcInInstallPrefix)
+unset(RunCMake_TEST_SOURCE_DIR)
+unset(RunCMake_TEST_FILE)
+
+set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallToPrefixInBinDir-build/prefix")
+run_cmake(InstallToPrefixInBinDir)
diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-result.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/include_directories/SrcInInstallPrefix-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-stderr.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-stderr.txt
new file mode 100644
index 0000000..afa43e0
--- /dev/null
+++ b/Tests/RunCMake/include_directories/SrcInInstallPrefix-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.

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

Summary of changes:
 Source/cmExportFileGenerator.cxx                   |    3 +-
 Tests/RunCMake/RunCMake.cmake                      |    9 ++-
 .../BinInInstallPrefix-result.txt}                 |    0
 ...ce-stderr.txt => BinInInstallPrefix-stderr.txt} |    2 +-
 ...yInInterface.cmake => BinInInstallPrefix.cmake} |    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         |   60 ++++++++++++++++++++
 .../SrcInInstallPrefix-result.txt}                 |    0
 ...ce-stderr.txt => SrcInInstallPrefix-stderr.txt} |    2 +-
 15 files changed, 76 insertions(+), 10 deletions(-)
 copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => include_directories/BinInInstallPrefix-result.txt} (100%)
 copy Tests/RunCMake/include_directories/{BinaryDirectoryInInterface-stderr.txt => BinInInstallPrefix-stderr.txt} (65%)
 copy Tests/RunCMake/include_directories/{BinaryDirectoryInInterface.cmake => BinInInstallPrefix.cmake} (88%)
 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-result.txt} (100%)
 copy Tests/RunCMake/include_directories/{SourceDirectoryInInterface-stderr.txt => SrcInInstallPrefix-stderr.txt} (72%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list