summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/IfacePaths
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/IfacePaths')
-rw-r--r--Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-NEW-stderr.txt2
-rw-r--r--Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-WARN-stderr.txt6
-rw-r--r--Tests/RunCMake/IfacePaths/BinaryDirectoryInInterface-stderr.txt2
-rw-r--r--Tests/RunCMake/IfacePaths/InstallInBinDir-stderr.txt2
-rw-r--r--Tests/RunCMake/IfacePaths/InstallInSrcDir-stderr.txt2
-rw-r--r--Tests/RunCMake/IfacePaths/RunCMakeTest.cmake30
-rw-r--r--Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-NEW-stderr.txt2
-rw-r--r--Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-WARN-stderr.txt6
8 files changed, 32 insertions, 20 deletions
diff --git a/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-NEW-stderr.txt b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-NEW-stderr.txt
index 09d225f..f2d749b 100644
--- a/Tests/RunCMake/IfacePaths/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/IfacePaths/prefix/BinInInstallPrefix-CMP0052-NEW-build/foo"
+ ".*Tests/RunCMake/IfacePaths_INCLUDE_DIRECTORIES/prefix/BinInInstallPrefix-CMP0052-NEW-build/foo"
which is prefixed in the build directory.
diff --git a/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-WARN-stderr.txt b/Tests/RunCMake/IfacePaths/BinInInstallPrefix-CMP0052-WARN-stderr.txt
index 6c3a122..3d83892 100644
--- a/Tests/RunCMake/IfacePaths/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/IfacePaths/prefix/BinInInstallPrefix-CMP0052-WARN-build/foo"
+ ".*Tests/RunCMake/IfacePaths_INCLUDE_DIRECTORIES/prefix/BinInInstallPrefix-CMP0052-WARN-build/foo"
in INTERFACE_INCLUDE_DIRECTORIES of target "testTarget" is a subdirectory
of the install directory:
- ".*Tests/RunCMake/IfacePaths/prefix"
+ ".*Tests/RunCMake/IfacePaths_INCLUDE_DIRECTORIES/prefix"
however it is also a subdirectory of the build tree:
- ".*Tests/RunCMake/IfacePaths/prefix/BinInInstallPrefix-CMP0052-WARN-build"
+ ".*Tests/RunCMake/IfacePaths_INCLUDE_DIRECTORIES/prefix/BinInInstallPrefix-CMP0052-WARN-build"
This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/IfacePaths/BinaryDirectoryInInterface-stderr.txt b/Tests/RunCMake/IfacePaths/BinaryDirectoryInInterface-stderr.txt
index cb2cba4..ed7cd58 100644
--- a/Tests/RunCMake/IfacePaths/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/IfacePaths/BinaryDirectoryInInterface-build/foo"
+ ".*RunCMake/IfacePaths_INCLUDE_DIRECTORIES/BinaryDirectoryInInterface-build/foo"
which is prefixed in the build directory.
diff --git a/Tests/RunCMake/IfacePaths/InstallInBinDir-stderr.txt b/Tests/RunCMake/IfacePaths/InstallInBinDir-stderr.txt
index c71b375..3d60831 100644
--- a/Tests/RunCMake/IfacePaths/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/IfacePaths/InstallInBinDir-build/foo"
+ ".*Tests/RunCMake/IfacePaths_INCLUDE_DIRECTORIES/InstallInBinDir-build/foo"
which is prefixed in the build directory.
diff --git a/Tests/RunCMake/IfacePaths/InstallInSrcDir-stderr.txt b/Tests/RunCMake/IfacePaths/InstallInSrcDir-stderr.txt
index 526ef61..11994dd 100644
--- a/Tests/RunCMake/IfacePaths/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/IfacePaths/copy/foo"
+ ".*Tests/RunCMake/IfacePaths_INCLUDE_DIRECTORIES/copy/foo"
which is prefixed in the source directory.
diff --git a/Tests/RunCMake/IfacePaths/RunCMakeTest.cmake b/Tests/RunCMake/IfacePaths/RunCMakeTest.cmake
index 4c9a703..8febf18 100644
--- a/Tests/RunCMake/IfacePaths/RunCMakeTest.cmake
+++ b/Tests/RunCMake/IfacePaths/RunCMakeTest.cmake
@@ -1,5 +1,10 @@
include(RunCMake)
+macro(run_cmake test)
+ list(APPEND RunCMake_TEST_OPTIONS -DTEST_PROP=${TEST_PROP})
+ _run_cmake(${test})
+endmacro()
+
run_cmake(RelativePathInInterface)
run_cmake(RelativePathInGenex)
run_cmake(export-NOWARN)
@@ -57,12 +62,15 @@ configure_file(
COPYONLY
)
-foreach(policyStatus "" NEW OLD)
- if (NOT "${policyStatus}" STREQUAL "")
- set(policyOption -DCMAKE_POLICY_DEFAULT_CMP0052=${policyStatus})
- else()
- unset(policyOption)
- set(policyStatus WARN)
+foreach(policyStatus NEW OLD "")
+ if (TEST_PROP STREQUAL INCLUDE_DIRECTORIES)
+ if (NOT "${policyStatus}" STREQUAL "")
+ set(policyOption -DCMAKE_POLICY_DEFAULT_CMP0052=${policyStatus})
+ else()
+ unset(policyOption)
+ set(policyStatus WARN)
+ endif()
+ set(policySuffix -CMP0052-${policyStatus})
endif()
set(RunCMake_TEST_OPTIONS
"-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/prefix" ${policyOption}
@@ -73,16 +81,20 @@ foreach(policyStatus "" NEW OLD)
# 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})
+ set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/prefix/BinInInstallPrefix${policySuffix}-build")
+ run_cmake(BinInInstallPrefix${policySuffix})
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})
+ run_cmake(SrcInInstallPrefix${policySuffix})
unset(RunCMake_TEST_SOURCE_DIR)
+
+ if (NOT TEST_PROP STREQUAL INCLUDE_DIRECTORIES)
+ break()
+ endif()
endforeach()
set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallPrefixInInterface-build/prefix")
diff --git a/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-NEW-stderr.txt b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-NEW-stderr.txt
index ab95537..ed5df34 100644
--- a/Tests/RunCMake/IfacePaths/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/IfacePaths/prefix/src/foo"
+ ".*Tests/RunCMake/IfacePaths_INCLUDE_DIRECTORIES/prefix/src/foo"
which is prefixed in the source directory.
diff --git a/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-WARN-stderr.txt b/Tests/RunCMake/IfacePaths/SrcInInstallPrefix-CMP0052-WARN-stderr.txt
index 23683e8..cb5a51c 100644
--- a/Tests/RunCMake/IfacePaths/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/IfacePaths/prefix/src/foo"
+ ".*Tests/RunCMake/IfacePaths_INCLUDE_DIRECTORIES/prefix/src/foo"
in INTERFACE_INCLUDE_DIRECTORIES of target "testTarget" is a subdirectory
of the install directory:
- ".*Tests/RunCMake/IfacePaths/prefix"
+ ".*Tests/RunCMake/IfacePaths_INCLUDE_DIRECTORIES/prefix"
however it is also a subdirectory of the source tree:
- ".*Tests/RunCMake/IfacePaths/prefix/src"
+ ".*Tests/RunCMake/IfacePaths_INCLUDE_DIRECTORIES/prefix/src"
This warning is for project developers. Use -Wno-dev to suppress it.