summaryrefslogtreecommitdiff
path: root/Tests/CMakeCommands
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-03-06 17:26:40 +0100
committerBrad King <brad.king@kitware.com>2013-03-12 13:39:11 -0400
commit1bdd1675776e6416b23cc6b308269aeb0831bb2e (patch)
tree3f2209de4cb293a60df3c25ac0c54681b32b8914 /Tests/CMakeCommands
parent254687d31f2f45b0d3ce9085c013ab0e15b360de (diff)
downloadcmake-1bdd1675776e6416b23cc6b308269aeb0831bb2e.tar.gz
Restore support for target names with '+' (#13986)
Extend the range of valid target names with the + sign. This character can commonly be used for target names, such as those containing 'c++'. Add a test but skip it for Borland and Watcom tools which do not support the character. Suggested-By: Benjamin Kloster
Diffstat (limited to 'Tests/CMakeCommands')
-rw-r--r--Tests/CMakeCommands/target_link_libraries/CMakeLists.txt7
-rw-r--r--Tests/CMakeCommands/target_link_libraries/empty.cpp1
2 files changed, 8 insertions, 0 deletions
diff --git a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
index b13c13d058..388164455a 100644
--- a/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
+++ b/Tests/CMakeCommands/target_link_libraries/CMakeLists.txt
@@ -102,7 +102,14 @@ target_compile_definitions(depG INTERFACE
TEST_DEF
)
+
add_executable(targetC targetC.cpp)
+if(NOT BORLAND AND NOT WATCOM)
+ # Linking to a target containing a + should be non-fatal, though it does
+ # not work at all on Borland or watcom
+ add_library(wrapc++ empty.cpp)
+ target_link_libraries(targetC wrapc++)
+endif()
# The TARGET_PROPERTY expression is duplicated below to test that there is no
# shortcutting of the evaluation by returning an empty string.
set(_exe_test $<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>)
diff --git a/Tests/CMakeCommands/target_link_libraries/empty.cpp b/Tests/CMakeCommands/target_link_libraries/empty.cpp
new file mode 100644
index 0000000000..ab32cf6c8a
--- /dev/null
+++ b/Tests/CMakeCommands/target_link_libraries/empty.cpp
@@ -0,0 +1 @@
+// No content