summaryrefslogtreecommitdiffstats
path: root/Tests/IncludeDirectories
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-07-18 10:58:48 (GMT)
committerBrad King <brad.king@kitware.com>2013-07-24 14:40:00 (GMT)
commit4f6bd7022bf670f9516c7b5e67c254d639425ab4 (patch)
tree710881681b38d86aa8801dabcce2895206c6f969 /Tests/IncludeDirectories
parentf82c751d7b3ee3907d780060985a36bdddcabad3 (diff)
downloadCMake-4f6bd7022bf670f9516c7b5e67c254d639425ab4.zip
CMake-4f6bd7022bf670f9516c7b5e67c254d639425ab4.tar.gz
CMake-4f6bd7022bf670f9516c7b5e67c254d639425ab4.tar.bz2
Remove the LINK_LANGUAGE generator expression.
It accepted an optional argument to test for equality, but no way to get the linker language of a particular target. TARGET_PROPERTY provides this flexibility and STREQUAL provides the necessary API for equality test. Extend the CompileDefinitions test to cover accessing the property of another target.
Diffstat (limited to 'Tests/IncludeDirectories')
-rw-r--r--Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt
index 6919261..8e2bd0a 100644
--- a/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt
+++ b/Tests/IncludeDirectories/TargetIncludeDirectories/CMakeLists.txt
@@ -156,15 +156,15 @@ target_include_directories(TargetIncludeDirectories PRIVATE "${CMAKE_CURRENT_BIN
# Test that the language generator expressions work
set_property(TARGET TargetIncludeDirectories
APPEND PROPERTY INCLUDE_DIRECTORIES
- "$<$<LINK_LANGUAGE:C>:${CMAKE_CURRENT_BINARY_DIR}/bad>"
- "$<$<LINK_LANGUAGE:CXX>:${CMAKE_CURRENT_BINARY_DIR}/good>"
- "$<$<STREQUAL:$<LINK_LANGUAGE>,CXX>:${CMAKE_CURRENT_BINARY_DIR}/othergood/>"
+ "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,C>:${CMAKE_CURRENT_BINARY_DIR}/bad>"
+ "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:${CMAKE_CURRENT_BINARY_DIR}/good>"
+ "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:${CMAKE_CURRENT_BINARY_DIR}/othergood/>"
)
add_executable(TargetIncludeDirectories_C main.c)
set_property(TARGET TargetIncludeDirectories_C
APPEND PROPERTY INCLUDE_DIRECTORIES
- "$<$<LINK_LANGUAGE:CXX>:${CMAKE_CURRENT_BINARY_DIR}/bad>"
- "$<$<LINK_LANGUAGE:C>:${CMAKE_CURRENT_BINARY_DIR}/good>"
- "$<$<STREQUAL:$<LINK_LANGUAGE>,C>:${CMAKE_CURRENT_BINARY_DIR}/othergood/>"
+ "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,CXX>:${CMAKE_CURRENT_BINARY_DIR}/bad>"
+ "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,C>:${CMAKE_CURRENT_BINARY_DIR}/good>"
+ "$<$<STREQUAL:$<TARGET_PROPERTY:LINKER_LANGUAGE>,C>:${CMAKE_CURRENT_BINARY_DIR}/othergood/>"
)