summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/include_directories/RunCMakeTest.cmake
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/RunCMakeTest.cmake
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/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/include_directories/RunCMakeTest.cmake141
1 files changed, 0 insertions, 141 deletions
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)