summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Tests/RunCMake/CMakeLists.txt1
-rw-r--r--Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-NEW-result.txt (renamed from Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-NEW-stderr.txt (renamed from Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-stderr.txt)2
-rw-r--r--Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-result.txt (renamed from Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-WARN-result.txt (renamed from Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-WARN-stderr.txt (renamed from Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-stderr.txt)6
-rw-r--r--Tests/RunCMake/IfacePaths/BinaryDirectoryInInterface-result.txt (renamed from Tests/RunCMake/include_directories/BinaryDirectoryInInterface-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/BinaryDirectoryInInterface-stderr.txt (renamed from Tests/RunCMake/include_directories/BinaryDirectoryInInterface-stderr.txt)2
-rw-r--r--Tests/RunCMake/IfacePaths/BinaryDirectoryInInterface.cmake (renamed from Tests/RunCMake/include_directories/BinaryDirectoryInInterface.cmake)0
-rw-r--r--Tests/RunCMake/IfacePaths/CMakeLists.txt6
-rw-r--r--Tests/RunCMake/IfacePaths/DirInInstallPrefix-result.txt (renamed from Tests/RunCMake/include_directories/DirInInstallPrefix-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/DirInInstallPrefix.cmake (renamed from Tests/RunCMake/include_directories/DirInInstallPrefix.cmake)0
-rw-r--r--Tests/RunCMake/IfacePaths/InstallInBinDir-result.txt (renamed from Tests/RunCMake/include_directories/InstallInBinDir-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/InstallInBinDir-stderr.txt (renamed from Tests/RunCMake/include_directories/InstallInBinDir-stderr.txt)2
-rw-r--r--Tests/RunCMake/IfacePaths/InstallInSrcDir-result.txt (renamed from Tests/RunCMake/include_directories/InstallInSrcDir-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/InstallInSrcDir-stderr.txt (renamed from Tests/RunCMake/include_directories/InstallInSrcDir-stderr.txt)2
-rw-r--r--Tests/RunCMake/IfacePaths/InstallPrefixInInterface-result.txt (renamed from Tests/RunCMake/include_directories/InstallPrefixInInterface-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/InstallPrefixInInterface.cmake (renamed from Tests/RunCMake/include_directories/InstallPrefixInInterface.cmake)0
-rw-r--r--Tests/RunCMake/IfacePaths/InstallToPrefixInSrcDirInSource-result.txt (renamed from Tests/RunCMake/include_directories/InstallToPrefixInSrcDirInSource-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/InstallToPrefixInSrcDirOutOfSource-result.txt (renamed from Tests/RunCMake/include_directories/InstallToPrefixInSrcDirOutOfSource-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/RelativePathInGenex-result.txt (renamed from Tests/RunCMake/include_directories/RelativePathInGenex-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/RelativePathInGenex-stderr.txt (renamed from Tests/RunCMake/include_directories/RelativePathInGenex-stderr.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/RelativePathInGenex.cmake (renamed from Tests/RunCMake/include_directories/RelativePathInGenex.cmake)0
-rw-r--r--Tests/RunCMake/IfacePaths/RelativePathInInterface-result.txt (renamed from Tests/RunCMake/include_directories/RelativePathInInterface-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/RelativePathInInterface-stderr.txt (renamed from Tests/RunCMake/include_directories/RelativePathInInterface-stderr.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/RelativePathInInterface.cmake (renamed from Tests/RunCMake/include_directories/RelativePathInInterface.cmake)0
-rw-r--r--Tests/RunCMake/IfacePaths/RunCMakeTest.cmake143
-rw-r--r--Tests/RunCMake/IfacePaths/SourceDirectoryInInterface-result.txt (renamed from Tests/RunCMake/include_directories/SourceDirectoryInInterface-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/SourceDirectoryInInterface-stderr.txt (renamed from Tests/RunCMake/include_directories/SourceDirectoryInInterface-stderr.txt)2
-rw-r--r--Tests/RunCMake/IfacePaths/SourceDirectoryInInterface.cmake (renamed from Tests/RunCMake/include_directories/SourceDirectoryInInterface.cmake)0
-rw-r--r--Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-NEW-result.txt (renamed from Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-NEW-stderr.txt (renamed from Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-stderr.txt)2
-rw-r--r--Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-result.txt (renamed from Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-WARN-result.txt (renamed from Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-WARN-stderr.txt (renamed from Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-stderr.txt)6
-rw-r--r--Tests/RunCMake/IfacePaths/empty.cpp0
-rw-r--r--Tests/RunCMake/IfacePaths/export-NOWARN-result.txt (renamed from Tests/RunCMake/include_directories/export-NOWARN-result.txt)0
-rw-r--r--Tests/RunCMake/IfacePaths/export-NOWARN.cmake (renamed from Tests/RunCMake/include_directories/export-NOWARN.cmake)0
-rw-r--r--Tests/RunCMake/include_directories/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/include_directories/RunCMakeTest.cmake141
40 files changed, 163 insertions, 157 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 2973fe9..3645735 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -188,6 +188,7 @@ add_RunCMake_test(CommandLine)
add_RunCMake_test(install)
add_RunCMake_test(CPackInstallProperties)
add_RunCMake_test(ExternalProject)
+add_RunCMake_test(IfacePaths)
if(RPMBUILD)
add_RunCMake_test(CPackRPM)
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-result.txt b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-NEW-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-result.txt
+++ b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-NEW-result.txt
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-stderr.txt b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-NEW-stderr.txt
index f0adc9f..09d225f 100644
--- a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-stderr.txt
+++ b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-NEW-stderr.txt
@@ -1,6 +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"
+ ".*Tests/RunCMake/IfacePaths/prefix/BinInInstallPrefix-CMP0052-NEW-build/foo"
which is prefixed in the build directory.
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-result.txt b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-result.txt
index 573541a..573541a 100644
--- a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-result.txt
+++ b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-OLD-result.txt
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-result.txt b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-WARN-result.txt
index 573541a..573541a 100644
--- a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-result.txt
+++ b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-WARN-result.txt
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-stderr.txt b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-WARN-stderr.txt
index 054bff5..6c3a122 100644
--- a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-stderr.txt
+++ b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-WARN-stderr.txt
@@ -6,15 +6,15 @@ CMake Warning \(dev\) in CMakeLists.txt:
Directory:
- ".*Tests/RunCMake/include_directories/prefix/BinInInstallPrefix-CMP0052-WARN-build/foo"
+ ".*Tests/RunCMake/IfacePaths/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"
+ ".*Tests/RunCMake/IfacePaths/prefix"
however it is also a subdirectory of the build tree:
- ".*Tests/RunCMake/include_directories/prefix/BinInInstallPrefix-CMP0052-WARN-build"
+ ".*Tests/RunCMake/IfacePaths/prefix/BinInInstallPrefix-CMP0052-WARN-build"
This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/include_directories/BinaryDirectoryInInterface-result.txt b/Tests/RunCMake/IfacePaths/BinaryDirectoryInInterface-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/include_directories/BinaryDirectoryInInterface-result.txt
+++ b/Tests/RunCMake/IfacePaths/BinaryDirectoryInInterface-result.txt
diff --git a/Tests/RunCMake/include_directories/BinaryDirectoryInInterface-stderr.txt b/Tests/RunCMake/IfacePaths/BinaryDirectoryInInterface-stderr.txt
index 0d4379e..cb2cba4 100644
--- a/Tests/RunCMake/include_directories/BinaryDirectoryInInterface-stderr.txt
+++ b/Tests/RunCMake/IfacePaths/BinaryDirectoryInInterface-stderr.txt
@@ -1,6 +1,6 @@
CMake Error in CMakeLists.txt:
Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path:
- ".*RunCMake/include_directories/BinaryDirectoryInInterface-build/foo"
+ ".*RunCMake/IfacePaths/BinaryDirectoryInInterface-build/foo"
which is prefixed in the build directory.
diff --git a/Tests/RunCMake/include_directories/BinaryDirectoryInInterface.cmake b/Tests/RunCMake/IfacePaths/BinaryDirectoryInInterface.cmake
index 67ee7de..67ee7de 100644
--- a/Tests/RunCMake/include_directories/BinaryDirectoryInInterface.cmake
+++ b/Tests/RunCMake/IfacePaths/BinaryDirectoryInInterface.cmake
diff --git a/Tests/RunCMake/IfacePaths/CMakeLists.txt b/Tests/RunCMake/IfacePaths/CMakeLists.txt
new file mode 100644
index 0000000..5cd4825
--- /dev/null
+++ b/Tests/RunCMake/IfacePaths/CMakeLists.txt
@@ -0,0 +1,6 @@
+cmake_minimum_required(VERSION 3.0)
+project(${RunCMake_TEST} NONE)
+if(NOT TEST_FILE)
+ set(TEST_FILE ${RunCMake_TEST}.cmake)
+endif()
+include(${TEST_FILE})
diff --git a/Tests/RunCMake/include_directories/DirInInstallPrefix-result.txt b/Tests/RunCMake/IfacePaths/DirInInstallPrefix-result.txt
index 573541a..573541a 100644
--- a/Tests/RunCMake/include_directories/DirInInstallPrefix-result.txt
+++ b/Tests/RunCMake/IfacePaths/DirInInstallPrefix-result.txt
diff --git a/Tests/RunCMake/include_directories/DirInInstallPrefix.cmake b/Tests/RunCMake/IfacePaths/DirInInstallPrefix.cmake
index fab7717..fab7717 100644
--- a/Tests/RunCMake/include_directories/DirInInstallPrefix.cmake
+++ b/Tests/RunCMake/IfacePaths/DirInInstallPrefix.cmake
diff --git a/Tests/RunCMake/include_directories/InstallInBinDir-result.txt b/Tests/RunCMake/IfacePaths/InstallInBinDir-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/include_directories/InstallInBinDir-result.txt
+++ b/Tests/RunCMake/IfacePaths/InstallInBinDir-result.txt
diff --git a/Tests/RunCMake/include_directories/InstallInBinDir-stderr.txt b/Tests/RunCMake/IfacePaths/InstallInBinDir-stderr.txt
index 254fae1..c71b375 100644
--- a/Tests/RunCMake/include_directories/InstallInBinDir-stderr.txt
+++ b/Tests/RunCMake/IfacePaths/InstallInBinDir-stderr.txt
@@ -1,6 +1,6 @@
CMake Error in CMakeLists.txt:
Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path:
- ".*Tests/RunCMake/include_directories/InstallInBinDir-build/foo"
+ ".*Tests/RunCMake/IfacePaths/InstallInBinDir-build/foo"
which is prefixed in the build directory.
diff --git a/Tests/RunCMake/include_directories/InstallInSrcDir-result.txt b/Tests/RunCMake/IfacePaths/InstallInSrcDir-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/include_directories/InstallInSrcDir-result.txt
+++ b/Tests/RunCMake/IfacePaths/InstallInSrcDir-result.txt
diff --git a/Tests/RunCMake/include_directories/InstallInSrcDir-stderr.txt b/Tests/RunCMake/IfacePaths/InstallInSrcDir-stderr.txt
index 7be3044..526ef61 100644
--- a/Tests/RunCMake/include_directories/InstallInSrcDir-stderr.txt
+++ b/Tests/RunCMake/IfacePaths/InstallInSrcDir-stderr.txt
@@ -1,6 +1,6 @@
CMake Error in CMakeLists.txt:
Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path:
- ".*Tests/RunCMake/include_directories/copy/foo"
+ ".*Tests/RunCMake/IfacePaths/copy/foo"
which is prefixed in the source directory.
diff --git a/Tests/RunCMake/include_directories/InstallPrefixInInterface-result.txt b/Tests/RunCMake/IfacePaths/InstallPrefixInInterface-result.txt
index 573541a..573541a 100644
--- a/Tests/RunCMake/include_directories/InstallPrefixInInterface-result.txt
+++ b/Tests/RunCMake/IfacePaths/InstallPrefixInInterface-result.txt
diff --git a/Tests/RunCMake/include_directories/InstallPrefixInInterface.cmake b/Tests/RunCMake/IfacePaths/InstallPrefixInInterface.cmake
index 8d777f5..8d777f5 100644
--- a/Tests/RunCMake/include_directories/InstallPrefixInInterface.cmake
+++ b/Tests/RunCMake/IfacePaths/InstallPrefixInInterface.cmake
diff --git a/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirInSource-result.txt b/Tests/RunCMake/IfacePaths/InstallToPrefixInSrcDirInSource-result.txt
index 573541a..573541a 100644
--- a/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirInSource-result.txt
+++ b/Tests/RunCMake/IfacePaths/InstallToPrefixInSrcDirInSource-result.txt
diff --git a/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirOutOfSource-result.txt b/Tests/RunCMake/IfacePaths/InstallToPrefixInSrcDirOutOfSource-result.txt
index 573541a..573541a 100644
--- a/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirOutOfSource-result.txt
+++ b/Tests/RunCMake/IfacePaths/InstallToPrefixInSrcDirOutOfSource-result.txt
diff --git a/Tests/RunCMake/include_directories/RelativePathInGenex-result.txt b/Tests/RunCMake/IfacePaths/RelativePathInGenex-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/include_directories/RelativePathInGenex-result.txt
+++ b/Tests/RunCMake/IfacePaths/RelativePathInGenex-result.txt
diff --git a/Tests/RunCMake/include_directories/RelativePathInGenex-stderr.txt b/Tests/RunCMake/IfacePaths/RelativePathInGenex-stderr.txt
index 490c700..490c700 100644
--- a/Tests/RunCMake/include_directories/RelativePathInGenex-stderr.txt
+++ b/Tests/RunCMake/IfacePaths/RelativePathInGenex-stderr.txt
diff --git a/Tests/RunCMake/include_directories/RelativePathInGenex.cmake b/Tests/RunCMake/IfacePaths/RelativePathInGenex.cmake
index 070a381..070a381 100644
--- a/Tests/RunCMake/include_directories/RelativePathInGenex.cmake
+++ b/Tests/RunCMake/IfacePaths/RelativePathInGenex.cmake
diff --git a/Tests/RunCMake/include_directories/RelativePathInInterface-result.txt b/Tests/RunCMake/IfacePaths/RelativePathInInterface-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/include_directories/RelativePathInInterface-result.txt
+++ b/Tests/RunCMake/IfacePaths/RelativePathInInterface-result.txt
diff --git a/Tests/RunCMake/include_directories/RelativePathInInterface-stderr.txt b/Tests/RunCMake/IfacePaths/RelativePathInInterface-stderr.txt
index f6cdb53..f6cdb53 100644
--- a/Tests/RunCMake/include_directories/RelativePathInInterface-stderr.txt
+++ b/Tests/RunCMake/IfacePaths/RelativePathInInterface-stderr.txt
diff --git a/Tests/RunCMake/include_directories/RelativePathInInterface.cmake b/Tests/RunCMake/IfacePaths/RelativePathInInterface.cmake
index 4c4727d..4c4727d 100644
--- a/Tests/RunCMake/include_directories/RelativePathInInterface.cmake
+++ b/Tests/RunCMake/IfacePaths/RelativePathInInterface.cmake
diff --git a/Tests/RunCMake/IfacePaths/RunCMakeTest.cmake b/Tests/RunCMake/IfacePaths/RunCMakeTest.cmake
new file mode 100644
index 0000000..4c9a703
--- /dev/null
+++ b/Tests/RunCMake/IfacePaths/RunCMakeTest.cmake
@@ -0,0 +1,143 @@
+include(RunCMake)
+
+run_cmake(RelativePathInInterface)
+run_cmake(RelativePathInGenex)
+run_cmake(export-NOWARN)
+run_cmake(SourceDirectoryInInterface)
+run_cmake(BinaryDirectoryInInterface)
+
+set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/DirInInstallPrefix/prefix")
+run_cmake(DirInInstallPrefix)
+
+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"
+ "-DTEST_FILE=${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface.cmake"
+ )
+set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/copy")
+run_cmake(InstallInSrcDir)
+unset(RunCMake_TEST_SOURCE_DIR)
+
+set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallInBinDir-build/prefix")
+set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallInBinDir-build/prefix"
+ "-DTEST_FILE=${RunCMake_SOURCE_DIR}/BinaryDirectoryInInterface.cmake"
+ )
+set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/InstallInBinDir-build")
+run_cmake(InstallInBinDir)
+unset(RunCMake_TEST_BINARY_DIR)
+
+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}
+ "-DTEST_FILE=${RunCMake_SOURCE_DIR}/BinaryDirectoryInInterface.cmake"
+ )
+ # Set the RunCMake_TEST_SOURCE_DIR here to the copy too. This is needed to run
+ # the test suite in-source properly. Otherwise the install directory would be
+ # a subdirectory or the source directory, which is allowed and tested separately
+ # below.
+ set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/prefix/src")
+ set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/prefix/BinInInstallPrefix-CMP0052-${policyStatus}-build")
+ run_cmake(BinInInstallPrefix-CMP0052-${policyStatus})
+ unset(RunCMake_TEST_BINARY_DIR)
+
+ set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/prefix" ${policyOption}
+ "-DTEST_FILE=${RunCMake_BINARY_DIR}/prefix/src/SourceDirectoryInInterface.cmake"
+ )
+ run_cmake(SrcInInstallPrefix-CMP0052-${policyStatus})
+ unset(RunCMake_TEST_SOURCE_DIR)
+endforeach()
+
+set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallPrefixInInterface-build/prefix")
+run_cmake(InstallPrefixInInterface)
+
+configure_file(
+ "${RunCMake_SOURCE_DIR}/CMakeLists.txt"
+ "${RunCMake_BINARY_DIR}/installToSrc/CMakeLists.txt"
+ COPYONLY
+)
+configure_file(
+ "${RunCMake_SOURCE_DIR}/empty.cpp"
+ "${RunCMake_BINARY_DIR}/installToSrc/empty.cpp"
+ COPYONLY
+)
+configure_file(
+ "${RunCMake_SOURCE_DIR}/InstallPrefixInInterface.cmake"
+ "${RunCMake_BINARY_DIR}/installToSrc/InstallPrefixInInterface.cmake"
+ COPYONLY
+)
+set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/installToSrc/InstallPrefixInInterface/prefix"
+ "-DTEST_FILE=${RunCMake_BINARY_DIR}/installToSrc/InstallPrefixInInterface.cmake"
+ )
+set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/installToSrc")
+run_cmake(InstallToPrefixInSrcDirOutOfSource)
+unset(RunCMake_TEST_SOURCE_DIR)
+
+
+file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}/installToSrcInSrc")
+set(RunCMake_TEST_NO_CLEAN ON)
+
+configure_file(
+ "${RunCMake_SOURCE_DIR}/CMakeLists.txt"
+ "${RunCMake_BINARY_DIR}/installToSrcInSrc/CMakeLists.txt"
+ COPYONLY
+)
+configure_file(
+ "${RunCMake_SOURCE_DIR}/empty.cpp"
+ "${RunCMake_BINARY_DIR}/installToSrcInSrc/empty.cpp"
+ COPYONLY
+)
+configure_file(
+ "${RunCMake_SOURCE_DIR}/InstallPrefixInInterface.cmake"
+ "${RunCMake_BINARY_DIR}/installToSrcInSrc/InstallPrefixInInterface.cmake"
+ COPYONLY
+)
+
+set(RunCMake_TEST_OPTIONS
+ "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/installToSrcInSrc/InstallPrefixInInterface/prefix"
+ "-DTEST_FILE=${RunCMake_BINARY_DIR}/installToSrcInSrc/InstallPrefixInInterface.cmake"
+ )
+set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/installToSrcInSrc")
+set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/installToSrcInSrc")
+run_cmake(InstallToPrefixInSrcDirInSource)
+unset(RunCMake_TEST_SOURCE_DIR)
+unset(RunCMake_TEST_BINARY_DIR)
+unset(RunCMake_TEST_NO_CLEAN)
diff --git a/Tests/RunCMake/include_directories/SourceDirectoryInInterface-result.txt b/Tests/RunCMake/IfacePaths/SourceDirectoryInInterface-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/include_directories/SourceDirectoryInInterface-result.txt
+++ b/Tests/RunCMake/IfacePaths/SourceDirectoryInInterface-result.txt
diff --git a/Tests/RunCMake/include_directories/SourceDirectoryInInterface-stderr.txt b/Tests/RunCMake/IfacePaths/SourceDirectoryInInterface-stderr.txt
index 9346b99..97a94b1 100644
--- a/Tests/RunCMake/include_directories/SourceDirectoryInInterface-stderr.txt
+++ b/Tests/RunCMake/IfacePaths/SourceDirectoryInInterface-stderr.txt
@@ -1,6 +1,6 @@
CMake Error in CMakeLists.txt:
Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path:
- ".*RunCMake/include_directories/foo"
+ ".*RunCMake/IfacePaths/foo"
which is prefixed in the source directory.
diff --git a/Tests/RunCMake/include_directories/SourceDirectoryInInterface.cmake b/Tests/RunCMake/IfacePaths/SourceDirectoryInInterface.cmake
index f814a3c..f814a3c 100644
--- a/Tests/RunCMake/include_directories/SourceDirectoryInInterface.cmake
+++ b/Tests/RunCMake/IfacePaths/SourceDirectoryInInterface.cmake
diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-result.txt b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-NEW-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-result.txt
+++ b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-NEW-result.txt
diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-stderr.txt b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-NEW-stderr.txt
index afa43e0..ab95537 100644
--- a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-stderr.txt
+++ b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-NEW-stderr.txt
@@ -1,6 +1,6 @@
CMake Error in CMakeLists.txt:
Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path:
- ".*Tests/RunCMake/include_directories/prefix/src/foo"
+ ".*Tests/RunCMake/IfacePaths/prefix/src/foo"
which is prefixed in the source directory.
diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-result.txt b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-result.txt
index 573541a..573541a 100644
--- a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-result.txt
+++ b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-OLD-result.txt
diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-result.txt b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-WARN-result.txt
index 573541a..573541a 100644
--- a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-result.txt
+++ b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-WARN-result.txt
diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-stderr.txt b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-WARN-stderr.txt
index 0b13fd8..23683e8 100644
--- a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-stderr.txt
+++ b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-WARN-stderr.txt
@@ -6,15 +6,15 @@ CMake Warning \(dev\) in CMakeLists.txt:
Directory:
- ".*Tests/RunCMake/include_directories/prefix/src/foo"
+ ".*Tests/RunCMake/IfacePaths/prefix/src/foo"
in INTERFACE_INCLUDE_DIRECTORIES of target "testTarget" is a subdirectory
of the install directory:
- ".*Tests/RunCMake/include_directories/prefix"
+ ".*Tests/RunCMake/IfacePaths/prefix"
however it is also a subdirectory of the source tree:
- ".*Tests/RunCMake/include_directories/prefix/src"
+ ".*Tests/RunCMake/IfacePaths/prefix/src"
This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/IfacePaths/empty.cpp b/Tests/RunCMake/IfacePaths/empty.cpp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Tests/RunCMake/IfacePaths/empty.cpp
diff --git a/Tests/RunCMake/include_directories/export-NOWARN-result.txt b/Tests/RunCMake/IfacePaths/export-NOWARN-result.txt
index 573541a..573541a 100644
--- a/Tests/RunCMake/include_directories/export-NOWARN-result.txt
+++ b/Tests/RunCMake/IfacePaths/export-NOWARN-result.txt
diff --git a/Tests/RunCMake/include_directories/export-NOWARN.cmake b/Tests/RunCMake/IfacePaths/export-NOWARN.cmake
index 50720a0..50720a0 100644
--- a/Tests/RunCMake/include_directories/export-NOWARN.cmake
+++ b/Tests/RunCMake/IfacePaths/export-NOWARN.cmake
diff --git a/Tests/RunCMake/include_directories/CMakeLists.txt b/Tests/RunCMake/include_directories/CMakeLists.txt
index 5cd4825..2897109 100644
--- a/Tests/RunCMake/include_directories/CMakeLists.txt
+++ b/Tests/RunCMake/include_directories/CMakeLists.txt
@@ -1,6 +1,3 @@
cmake_minimum_required(VERSION 3.0)
project(${RunCMake_TEST} NONE)
-if(NOT TEST_FILE)
- set(TEST_FILE ${RunCMake_TEST}.cmake)
-endif()
-include(${TEST_FILE})
+include(${RunCMake_TEST}.cmake)
diff --git a/Tests/RunCMake/include_directories/RunCMakeTest.cmake b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
index fa76f24..3f624f8 100644
--- a/Tests/RunCMake/include_directories/RunCMakeTest.cmake
+++ b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
@@ -3,148 +3,7 @@ include(RunCMake)
run_cmake(NotFoundContent)
run_cmake(DebugIncludes)
run_cmake(TID-bad-target)
-run_cmake(SourceDirectoryInInterface)
-run_cmake(BinaryDirectoryInInterface)
-run_cmake(RelativePathInInterface)
run_cmake(ImportedTarget)
-run_cmake(RelativePathInGenex)
run_cmake(CMP0021)
run_cmake(install_config)
run_cmake(incomplete-genex)
-run_cmake(export-NOWARN)
-
-set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/DirInInstallPrefix/prefix")
-run_cmake(DirInInstallPrefix)
-
-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"
- "-DTEST_FILE=${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface.cmake"
- )
-set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/copy")
-run_cmake(InstallInSrcDir)
-unset(RunCMake_TEST_SOURCE_DIR)
-
-set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallInBinDir-build/prefix")
-set(RunCMake_TEST_OPTIONS
- "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallInBinDir-build/prefix"
- "-DTEST_FILE=${RunCMake_SOURCE_DIR}/BinaryDirectoryInInterface.cmake"
- )
-set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/InstallInBinDir-build")
-run_cmake(InstallInBinDir)
-unset(RunCMake_TEST_BINARY_DIR)
-
-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}
- "-DTEST_FILE=${RunCMake_SOURCE_DIR}/BinaryDirectoryInInterface.cmake"
- )
- # Set the RunCMake_TEST_SOURCE_DIR here to the copy too. This is needed to run
- # the test suite in-source properly. Otherwise the install directory would be
- # a subdirectory or the source directory, which is allowed and tested separately
- # below.
- set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/prefix/src")
- set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/prefix/BinInInstallPrefix-CMP0052-${policyStatus}-build")
- run_cmake(BinInInstallPrefix-CMP0052-${policyStatus})
- unset(RunCMake_TEST_BINARY_DIR)
-
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/prefix" ${policyOption}
- "-DTEST_FILE=${RunCMake_BINARY_DIR}/prefix/src/SourceDirectoryInInterface.cmake"
- )
- run_cmake(SrcInInstallPrefix-CMP0052-${policyStatus})
- unset(RunCMake_TEST_SOURCE_DIR)
-endforeach()
-
-set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallPrefixInInterface-build/prefix")
-run_cmake(InstallPrefixInInterface)
-
-configure_file(
- "${RunCMake_SOURCE_DIR}/CMakeLists.txt"
- "${RunCMake_BINARY_DIR}/installToSrc/CMakeLists.txt"
- COPYONLY
-)
-configure_file(
- "${RunCMake_SOURCE_DIR}/empty.cpp"
- "${RunCMake_BINARY_DIR}/installToSrc/empty.cpp"
- COPYONLY
-)
-configure_file(
- "${RunCMake_SOURCE_DIR}/InstallPrefixInInterface.cmake"
- "${RunCMake_BINARY_DIR}/installToSrc/InstallPrefixInInterface.cmake"
- COPYONLY
-)
-set(RunCMake_TEST_OPTIONS
- "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/installToSrc/InstallPrefixInInterface/prefix"
- "-DTEST_FILE=${RunCMake_BINARY_DIR}/installToSrc/InstallPrefixInInterface.cmake"
- )
-set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/installToSrc")
-run_cmake(InstallToPrefixInSrcDirOutOfSource)
-unset(RunCMake_TEST_SOURCE_DIR)
-
-
-file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}/installToSrcInSrc")
-set(RunCMake_TEST_NO_CLEAN ON)
-
-configure_file(
- "${RunCMake_SOURCE_DIR}/CMakeLists.txt"
- "${RunCMake_BINARY_DIR}/installToSrcInSrc/CMakeLists.txt"
- COPYONLY
-)
-configure_file(
- "${RunCMake_SOURCE_DIR}/empty.cpp"
- "${RunCMake_BINARY_DIR}/installToSrcInSrc/empty.cpp"
- COPYONLY
-)
-configure_file(
- "${RunCMake_SOURCE_DIR}/InstallPrefixInInterface.cmake"
- "${RunCMake_BINARY_DIR}/installToSrcInSrc/InstallPrefixInInterface.cmake"
- COPYONLY
-)
-
-set(RunCMake_TEST_OPTIONS
- "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/installToSrcInSrc/InstallPrefixInInterface/prefix"
- "-DTEST_FILE=${RunCMake_BINARY_DIR}/installToSrcInSrc/InstallPrefixInInterface.cmake"
- )
-set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/installToSrcInSrc")
-set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/installToSrcInSrc")
-run_cmake(InstallToPrefixInSrcDirInSource)
-unset(RunCMake_TEST_SOURCE_DIR)
-unset(RunCMake_TEST_BINARY_DIR)
-unset(RunCMake_TEST_NO_CLEAN)