summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-07-30 07:51:56 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-10-21 13:56:31 (GMT)
commitf063c45589e83bf8e4ef61f49b17084debf085a2 (patch)
tree2de4dc557c9360fc134985d4f34bace214d4ec39 /Tests/ExportImport
parent919e1e845361d6e29789f5347d12af3318452843 (diff)
downloadCMake-f063c45589e83bf8e4ef61f49b17084debf085a2.zip
CMake-f063c45589e83bf8e4ef61f49b17084debf085a2.tar.gz
CMake-f063c45589e83bf8e4ef61f49b17084debf085a2.tar.bz2
Consider targets with double colons to be IMPORTED or ALIAS targets.
Introduce a policy to control the behavior. The AliasTargets unit test already tests that using a double-semicolon in the name is not an error. Change the ExportImport test to use a namespace with a double-semicolon too.
Diffstat (limited to 'Tests/ExportImport')
-rw-r--r--Tests/ExportImport/Export/Interface/CMakeLists.txt4
-rw-r--r--Tests/ExportImport/Import/Interface/CMakeLists.txt18
2 files changed, 11 insertions, 11 deletions
diff --git a/Tests/ExportImport/Export/Interface/CMakeLists.txt b/Tests/ExportImport/Export/Interface/CMakeLists.txt
index fc9c0c7..b713262 100644
--- a/Tests/ExportImport/Export/Interface/CMakeLists.txt
+++ b/Tests/ExportImport/Export/Interface/CMakeLists.txt
@@ -24,7 +24,7 @@ add_library(sharediface INTERFACE)
target_link_libraries(sharediface INTERFACE sharedlib)
export(TARGETS sharediface sharedlib headeronly
- NAMESPACE bld_
+ NAMESPACE bld::
FILE ../ExportInterfaceBuildTree.cmake
)
@@ -46,4 +46,4 @@ install(FILES
DESTINATION include/sharedlib
)
-install(EXPORT expInterface NAMESPACE exp_ DESTINATION lib/exp)
+install(EXPORT expInterface NAMESPACE exp:: DESTINATION lib/exp)
diff --git a/Tests/ExportImport/Import/Interface/CMakeLists.txt b/Tests/ExportImport/Import/Interface/CMakeLists.txt
index c7bd13e..cf7e2bc 100644
--- a/Tests/ExportImport/Import/Interface/CMakeLists.txt
+++ b/Tests/ExportImport/Import/Interface/CMakeLists.txt
@@ -10,18 +10,18 @@ set_property(TARGET define_iface PROPERTY
INTERFACE_COMPILE_DEFINITIONS DEFINE_IFACE_DEFINE)
add_executable(headeronlytest_bld headeronlytest.cpp)
-target_link_libraries(headeronlytest_bld bld_headeronly)
+target_link_libraries(headeronlytest_bld bld::headeronly)
-set_property(TARGET bld_sharediface APPEND PROPERTY INTERFACE_LINK_LIBRARIES define_iface)
+set_property(TARGET bld::sharediface APPEND PROPERTY INTERFACE_LINK_LIBRARIES define_iface)
add_executable(interfacetest_bld interfacetest.cpp)
-target_link_libraries(interfacetest_bld bld_sharediface)
+target_link_libraries(interfacetest_bld bld::sharediface)
include(CheckCXXSourceCompiles)
macro(do_try_compile prefix)
- set(CMAKE_REQUIRED_LIBRARIES ${prefix}headeronly)
+ set(CMAKE_REQUIRED_LIBRARIES ${prefix}::headeronly)
check_cxx_source_compiles(
"
#include \"headeronly.h\"
@@ -42,14 +42,14 @@ macro(do_try_compile prefix)
endif()
endmacro()
-do_try_compile(bld_)
+do_try_compile(bld)
add_executable(headeronlytest_exp headeronlytest.cpp)
-target_link_libraries(headeronlytest_exp exp_headeronly)
+target_link_libraries(headeronlytest_exp exp::headeronly)
-set_property(TARGET exp_sharediface APPEND PROPERTY INTERFACE_LINK_LIBRARIES define_iface)
+set_property(TARGET exp::sharediface APPEND PROPERTY INTERFACE_LINK_LIBRARIES define_iface)
add_executable(interfacetest_exp interfacetest.cpp)
-target_link_libraries(interfacetest_exp exp_sharediface)
+target_link_libraries(interfacetest_exp exp::sharediface)
-do_try_compile(exp_)
+do_try_compile(exp)