Browse Source

CMP0052: Test that include dirs in install locations cause no warnings.

Stephen Kelly 11 years ago
parent
commit
5baa81592b

+ 1 - 0
Tests/RunCMake/include_directories/DirInInstallPrefix-result.txt

@@ -0,0 +1 @@
+0

+ 1 - 0
Tests/RunCMake/include_directories/DirInInstallPrefix-stderr.txt

@@ -0,0 +1 @@
+^$

+ 9 - 0
Tests/RunCMake/include_directories/DirInInstallPrefix.cmake

@@ -0,0 +1,9 @@
+
+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)

+ 3 - 0
Tests/RunCMake/include_directories/RunCMakeTest.cmake

@@ -13,6 +13,9 @@ 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"