summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-08-01 12:54:15 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-08-01 12:54:15 (GMT)
commitb341bf2178e3923636735ae1df53a33e5857df7d (patch)
treebc38c23e6590d2e5bfd4065e0fd18a08ba90b856 /Tests
parent1a88bbf3f06f0858cf6957d80623d43dcd323a22 (diff)
parent80e652f5cc279715ff57e1c64c6e5c460b201db4 (diff)
downloadCMake-b341bf2178e3923636735ae1df53a33e5857df7d.zip
CMake-b341bf2178e3923636735ae1df53a33e5857df7d.tar.gz
CMake-b341bf2178e3923636735ae1df53a33e5857df7d.tar.bz2
Merge topic 'INCLUDES-DESTINATION-no-config'
80e652f Export: Process generator expressions from INCLUDES DESTINATION. 4355815 cmTarget: Add NAME property
Diffstat (limited to 'Tests')
-rw-r--r--Tests/ExportImport/Export/CMakeLists.txt28
-rw-r--r--Tests/RunCMake/include_directories/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/include_directories/install_config-result.txt1
-rw-r--r--Tests/RunCMake/include_directories/install_config-stderr.txt5
-rw-r--r--Tests/RunCMake/include_directories/install_config.cmake6
5 files changed, 29 insertions, 12 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt
index 1910f8c..b5b2027 100644
--- a/Tests/ExportImport/Export/CMakeLists.txt
+++ b/Tests/ExportImport/Export/CMakeLists.txt
@@ -99,7 +99,6 @@ macro(add_include_lib _libName)
set_property(TARGET ${_libName} APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/${_libName}>"
- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/${_libName}>"
)
if (NOT "${ARGV1}" STREQUAL "NO_HEADER")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${_libName}/${_libName}.h" "// no content\n")
@@ -188,8 +187,7 @@ install(FILES
DESTINATION include/testSharedLibRequired
)
set_property(TARGET testSharedLibRequired APPEND PROPERTY
- INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include/testSharedLibRequired>"
- "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>"
+ INTERFACE_INCLUDE_DIRECTORIES "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>"
)
set_property(TARGET testSharedLibRequired APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS USING_TESTSHAREDLIBREQUIRED
@@ -273,18 +271,24 @@ set_property(TARGET cmp0022OLD APPEND PROPERTY LINK_INTERFACE_LIBRARIES testLib3
add_library(noIncludesInterface empty.cpp)
install(TARGETS testLibRequired
- testLibIncludeRequired1
- testLibIncludeRequired2
- testLibIncludeRequired3
- testLibIncludeRequired4
- testLibIncludeRequired5
- testLibIncludeRequired6
- testSharedLibRequired
- noIncludesInterface
EXPORT RequiredExp DESTINATION lib
INCLUDES DESTINATION
installIncludesTest
- $<INSTALL_PREFIX>/installIncludesTest2)
+ $<INSTALL_PREFIX>/installIncludesTest2
+ )
+install(TARGETS
+ testLibIncludeRequired1
+ testLibIncludeRequired2
+ testLibIncludeRequired3
+ testLibIncludeRequired4
+ testLibIncludeRequired5
+ testLibIncludeRequired6
+ testSharedLibRequired
+ noIncludesInterface
+ EXPORT RequiredExp DESTINATION lib
+ INCLUDES DESTINATION
+ $<INSTALL_PREFIX>/include/$<TARGET_PROPERTY:NAME>
+)
install(EXPORT RequiredExp NAMESPACE Req:: FILE testLibRequiredTargets.cmake DESTINATION lib/cmake/testLibRequired)
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/installIncludesTest")
diff --git a/Tests/RunCMake/include_directories/RunCMakeTest.cmake b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
index 520dd44..f0704f4 100644
--- a/Tests/RunCMake/include_directories/RunCMakeTest.cmake
+++ b/Tests/RunCMake/include_directories/RunCMakeTest.cmake
@@ -9,3 +9,4 @@ run_cmake(RelativePathInInterface)
run_cmake(ImportedTarget)
run_cmake(RelativePathInGenex)
run_cmake(CMP0021)
+run_cmake(install_config)
diff --git a/Tests/RunCMake/include_directories/install_config-result.txt b/Tests/RunCMake/include_directories/install_config-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/include_directories/install_config-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include_directories/install_config-stderr.txt b/Tests/RunCMake/include_directories/install_config-stderr.txt
new file mode 100644
index 0000000..ac7b7b0
--- /dev/null
+++ b/Tests/RunCMake/include_directories/install_config-stderr.txt
@@ -0,0 +1,5 @@
+CMake Error in CMakeLists.txt:
+ Target "foo" is installed with INCLUDES DESTINATION set to a context
+ sensitive path. Paths which depend on the configuration, policy values or
+ the link interface are not supported. Consider using
+ target_include_directories instead.
diff --git a/Tests/RunCMake/include_directories/install_config.cmake b/Tests/RunCMake/include_directories/install_config.cmake
new file mode 100644
index 0000000..46c626c
--- /dev/null
+++ b/Tests/RunCMake/include_directories/install_config.cmake
@@ -0,0 +1,6 @@
+
+enable_language(CXX)
+
+add_executable(foo empty.cpp)
+install(TARGETS foo EXPORT fooTargets DESTINATION . INCLUDES DESTINATION include/$<CONFIGURATION>)
+install(EXPORT fooTargets DESTINATION lib/cmake)