summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/include_directories
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-11-30 12:20:32 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-09 18:23:47 (GMT)
commitcc1520947608f5224a4fdfa94b5cb07e19e23600 (patch)
tree747fd80f92718d130a12ed8b1309ac4b3fc3f637 /Tests/RunCMake/include_directories
parentc0d8e715915f65196353c09d86d4d34fe100437f (diff)
downloadCMake-cc1520947608f5224a4fdfa94b5cb07e19e23600.zip
CMake-cc1520947608f5224a4fdfa94b5cb07e19e23600.tar.gz
CMake-cc1520947608f5224a4fdfa94b5cb07e19e23600.tar.bz2
Tests: Split part of include_directories test to a generic location.
The moved tests are related to paths in INTERFACE_INCLUDE_DIRECTORIES in general, and when exporting, and covering cases of the install location being within the build or source prefix etc. Other build properties containing paths should have similar tests, so this allows some parameterization while keeping the preparation of the various directory structures.
Diffstat (limited to 'Tests/RunCMake/include_directories')
-rw-r--r--Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-stderr.txt6
-rw-r--r--Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-stderr.txt20
-rw-r--r--Tests/RunCMake/include_directories/BinaryDirectoryInInterface-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/BinaryDirectoryInInterface-stderr.txt6
-rw-r--r--Tests/RunCMake/include_directories/BinaryDirectoryInInterface.cmake11
-rw-r--r--Tests/RunCMake/include_directories/CMakeLists.txt5
-rw-r--r--Tests/RunCMake/include_directories/DirInInstallPrefix-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/DirInInstallPrefix.cmake9
-rw-r--r--Tests/RunCMake/include_directories/InstallInBinDir-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/InstallInBinDir-stderr.txt6
-rw-r--r--Tests/RunCMake/include_directories/InstallInSrcDir-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/InstallInSrcDir-stderr.txt6
-rw-r--r--Tests/RunCMake/include_directories/InstallPrefixInInterface-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/InstallPrefixInInterface.cmake11
-rw-r--r--Tests/RunCMake/include_directories/InstallToPrefixInSrcDirInSource-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/InstallToPrefixInSrcDirOutOfSource-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/RelativePathInGenex-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/RelativePathInGenex-stderr.txt5
-rw-r--r--Tests/RunCMake/include_directories/RelativePathInGenex.cmake8
-rw-r--r--Tests/RunCMake/include_directories/RelativePathInInterface-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/RelativePathInInterface-stderr.txt5
-rw-r--r--Tests/RunCMake/include_directories/RelativePathInInterface.cmake11
-rw-r--r--Tests/RunCMake/include_directories/RunCMakeTest.cmake141
-rw-r--r--Tests/RunCMake/include_directories/SourceDirectoryInInterface-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/SourceDirectoryInInterface-stderr.txt6
-rw-r--r--Tests/RunCMake/include_directories/SourceDirectoryInInterface.cmake11
-rw-r--r--Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-stderr.txt6
-rw-r--r--Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-stderr.txt20
-rw-r--r--Tests/RunCMake/include_directories/export-NOWARN-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/export-NOWARN.cmake62
36 files changed, 1 insertions, 371 deletions
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-result.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-stderr.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-stderr.txt
deleted file mode 100644
index f0adc9f..0000000
--- a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-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/include_directories/BinInInstallPrefix-CMP0052-OLD-result.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-result.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-stderr.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-stderr.txt
deleted file mode 100644
index 054bff5..0000000
--- a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-stderr.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-CMake Warning \(dev\) in CMakeLists.txt:
- Policy CMP0052 is not set: Reject source and build dirs in installed
- 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"
-
- however it is also a subdirectory of the build tree:
-
- ".*Tests/RunCMake/include_directories/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/include_directories/BinaryDirectoryInInterface-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/include_directories/BinaryDirectoryInInterface-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/include_directories/BinaryDirectoryInInterface-stderr.txt b/Tests/RunCMake/include_directories/BinaryDirectoryInInterface-stderr.txt
deleted file mode 100644
index 0d4379e..0000000
--- a/Tests/RunCMake/include_directories/BinaryDirectoryInInterface-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CMake Error in CMakeLists.txt:
- Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path:
-
- ".*RunCMake/include_directories/BinaryDirectoryInInterface-build/foo"
-
- which is prefixed in the build directory.
diff --git a/Tests/RunCMake/include_directories/BinaryDirectoryInInterface.cmake b/Tests/RunCMake/include_directories/BinaryDirectoryInInterface.cmake
deleted file mode 100644
index 67ee7de..0000000
--- a/Tests/RunCMake/include_directories/BinaryDirectoryInInterface.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-
-enable_language(CXX)
-
-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/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/DirInInstallPrefix-result.txt b/Tests/RunCMake/include_directories/DirInInstallPrefix-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/include_directories/DirInInstallPrefix-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/include_directories/DirInInstallPrefix.cmake b/Tests/RunCMake/include_directories/DirInInstallPrefix.cmake
deleted file mode 100644
index fab7717..0000000
--- a/Tests/RunCMake/include_directories/DirInInstallPrefix.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
-enable_language(CXX)
-add_library(testTarget empty.cpp)
-target_include_directories(testTarget INTERFACE "${CMAKE_INSTALL_PREFIX}/dir")
-
-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
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/include_directories/InstallInBinDir-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/include_directories/InstallInBinDir-stderr.txt b/Tests/RunCMake/include_directories/InstallInBinDir-stderr.txt
deleted file mode 100644
index 254fae1..0000000
--- a/Tests/RunCMake/include_directories/InstallInBinDir-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-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
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/include_directories/InstallInSrcDir-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/include_directories/InstallInSrcDir-stderr.txt b/Tests/RunCMake/include_directories/InstallInSrcDir-stderr.txt
deleted file mode 100644
index 7be3044..0000000
--- a/Tests/RunCMake/include_directories/InstallInSrcDir-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-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/InstallPrefixInInterface-result.txt b/Tests/RunCMake/include_directories/InstallPrefixInInterface-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/include_directories/InstallPrefixInInterface-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/include_directories/InstallPrefixInInterface.cmake b/Tests/RunCMake/include_directories/InstallPrefixInInterface.cmake
deleted file mode 100644
index 8d777f5..0000000
--- a/Tests/RunCMake/include_directories/InstallPrefixInInterface.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-
-enable_language(CXX)
-
-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/InstallToPrefixInSrcDirInSource-result.txt b/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirInSource-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirInSource-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirOutOfSource-result.txt b/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirOutOfSource-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirOutOfSource-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/include_directories/RelativePathInGenex-result.txt b/Tests/RunCMake/include_directories/RelativePathInGenex-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/include_directories/RelativePathInGenex-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/include_directories/RelativePathInGenex-stderr.txt b/Tests/RunCMake/include_directories/RelativePathInGenex-stderr.txt
deleted file mode 100644
index 490c700..0000000
--- a/Tests/RunCMake/include_directories/RelativePathInGenex-stderr.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-CMake Error in CMakeLists.txt:
- Target "testTarget" contains relative path in its
- INTERFACE_INCLUDE_DIRECTORIES:
-
- "foo"
diff --git a/Tests/RunCMake/include_directories/RelativePathInGenex.cmake b/Tests/RunCMake/include_directories/RelativePathInGenex.cmake
deleted file mode 100644
index 070a381..0000000
--- a/Tests/RunCMake/include_directories/RelativePathInGenex.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-
-enable_language(CXX)
-
-add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
-set_property(TARGET testTarget PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$<1:foo>")
-
-add_library(userTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
-target_link_libraries(userTarget testTarget)
diff --git a/Tests/RunCMake/include_directories/RelativePathInInterface-result.txt b/Tests/RunCMake/include_directories/RelativePathInInterface-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/include_directories/RelativePathInInterface-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/include_directories/RelativePathInInterface-stderr.txt b/Tests/RunCMake/include_directories/RelativePathInInterface-stderr.txt
deleted file mode 100644
index f6cdb53..0000000
--- a/Tests/RunCMake/include_directories/RelativePathInInterface-stderr.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-CMake Error in CMakeLists.txt:
- Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains
- relative path:
-
- "foo"
diff --git a/Tests/RunCMake/include_directories/RelativePathInInterface.cmake b/Tests/RunCMake/include_directories/RelativePathInInterface.cmake
deleted file mode 100644
index 4c4727d..0000000
--- a/Tests/RunCMake/include_directories/RelativePathInInterface.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-
-enable_language(CXX)
-
-add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
-set_property(TARGET testTarget PROPERTY INTERFACE_INCLUDE_DIRECTORIES "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 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)
diff --git a/Tests/RunCMake/include_directories/SourceDirectoryInInterface-result.txt b/Tests/RunCMake/include_directories/SourceDirectoryInInterface-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/include_directories/SourceDirectoryInInterface-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/include_directories/SourceDirectoryInInterface-stderr.txt b/Tests/RunCMake/include_directories/SourceDirectoryInInterface-stderr.txt
deleted file mode 100644
index 9346b99..0000000
--- a/Tests/RunCMake/include_directories/SourceDirectoryInInterface-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-CMake Error in CMakeLists.txt:
- Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path:
-
- ".*RunCMake/include_directories/foo"
-
- which is prefixed in the source directory.
diff --git a/Tests/RunCMake/include_directories/SourceDirectoryInInterface.cmake b/Tests/RunCMake/include_directories/SourceDirectoryInInterface.cmake
deleted file mode 100644
index f814a3c..0000000
--- a/Tests/RunCMake/include_directories/SourceDirectoryInInterface.cmake
+++ /dev/null
@@ -1,11 +0,0 @@
-
-enable_language(CXX)
-
-add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp")
-target_include_directories(testTarget INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/foo")
-
-install(TARGETS testTarget EXPORT testTargets
- DESTINATION lib
-)
-
-install(EXPORT testTargets DESTINATION lib/cmake)
diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-result.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-result.txt
deleted file mode 100644
index d00491f..0000000
--- a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-stderr.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-stderr.txt
deleted file mode 100644
index afa43e0..0000000
--- a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-stderr.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-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/include_directories/SrcInInstallPrefix-CMP0052-OLD-result.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-result.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-stderr.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-stderr.txt
deleted file mode 100644
index 0b13fd8..0000000
--- a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-stderr.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-CMake Warning \(dev\) in CMakeLists.txt:
- Policy CMP0052 is not set: Reject source and build dirs in installed
- 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"
-
- however it is also a subdirectory of the source tree:
-
- ".*Tests/RunCMake/include_directories/prefix/src"
-
-This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/include_directories/export-NOWARN-result.txt b/Tests/RunCMake/include_directories/export-NOWARN-result.txt
deleted file mode 100644
index 573541a..0000000
--- a/Tests/RunCMake/include_directories/export-NOWARN-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-0
diff --git a/Tests/RunCMake/include_directories/export-NOWARN.cmake b/Tests/RunCMake/include_directories/export-NOWARN.cmake
deleted file mode 100644
index 50720a0..0000000
--- a/Tests/RunCMake/include_directories/export-NOWARN.cmake
+++ /dev/null
@@ -1,62 +0,0 @@
-enable_language(CXX)
-add_library(foo empty.cpp)
-set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<0:>/include/subdir)
-set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<INSTALL_PREFIX>/include/subdir)
-
-set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/subdir>)
-set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<INSTALL_INTERFACE:include/subdir>)
-set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<INSTALL_INTERFACE:include/$<0:>>)
-set_property(TARGET foo APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES $<INSTALL_INTERFACE:$<0:>/include>)
-
-# target_include_directories(foo INTERFACE include/subdir) # Does and should warn. INSTALL_INTERFACE must not list src dir paths.
-target_include_directories(foo INTERFACE $<0:>/include/subdir) # Does not and should not should warn, because it starts with a genex.
-target_include_directories(foo INTERFACE $<INSTALL_PREFIX>/include/subdir)
-
-target_include_directories(foo INTERFACE $<INSTALL_INTERFACE:include/subdir>)
-target_include_directories(foo INTERFACE $<INSTALL_INTERFACE:include/$<0:>>)
-
-install(TARGETS foo EXPORT FooTargets DESTINATION lib)
-install(EXPORT FooTargets DESTINATION lib/cmake)
-
-install(TARGETS foo EXPORT FooTargets2
- DESTINATION lib
- INCLUDES DESTINATION include # No warning. Implicit install prefix.
-)
-install(EXPORT FooTargets2 DESTINATION lib/cmake)
-
-install(TARGETS foo EXPORT FooTargets3
- DESTINATION lib
- INCLUDES DESTINATION $<INSTALL_PREFIX>include
-)
-install(EXPORT FooTargets3 DESTINATION lib/cmake)
-
-install(TARGETS foo EXPORT FooTargets4
- DESTINATION lib
- INCLUDES DESTINATION $<INSTALL_INTERFACE:include>
-)
-install(EXPORT FooTargets4 DESTINATION lib/cmake)
-
-install(TARGETS foo EXPORT FooTargets5
- DESTINATION lib
- # The $<0:> is evaluated at export time, leaving 'include' behind, which should be treated as above.
- INCLUDES DESTINATION $<INSTALL_INTERFACE:$<0:>include>
-)
-install(EXPORT FooTargets5 DESTINATION lib/cmake)
-
-install(TARGETS foo EXPORT FooTargets6
- DESTINATION lib
- INCLUDES DESTINATION $<INSTALL_INTERFACE:include$<0:>>
-)
-install(EXPORT FooTargets6 DESTINATION lib/cmake)
-
-install(TARGETS foo EXPORT FooTargets7
- DESTINATION lib
- INCLUDES DESTINATION include$<0:>
-)
-install(EXPORT FooTargets7 DESTINATION lib/cmake)
-
-install(TARGETS foo EXPORT FooTargets8
- DESTINATION lib
- INCLUDES DESTINATION $<0:>include
-)
-install(EXPORT FooTargets8 DESTINATION lib/cmake)