summaryrefslogtreecommitdiffstats
path: root/Tests/ExportImport/Import
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-11-28 17:58:38 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-10 23:51:34 (GMT)
commit6da65b3907419df28484c570f24d0da3593a0e5a (patch)
treeae814193dd7306ad6aa369dca4d489f9f8f6eaf9 /Tests/ExportImport/Import
parent736bcb9664b714b91e8a2a573451e0453716f4da (diff)
downloadCMake-6da65b3907419df28484c570f24d0da3593a0e5a.zip
CMake-6da65b3907419df28484c570f24d0da3593a0e5a.tar.gz
CMake-6da65b3907419df28484c570f24d0da3593a0e5a.tar.bz2
Allow export of targets with INTERFACE_SOURCES.
Use the same rules for paths in source and binary dirs in installed INTERFACE_SOURCES as are used for INTERFACE_INCLUDE_DIRECTORIES.
Diffstat (limited to 'Tests/ExportImport/Import')
-rw-r--r--Tests/ExportImport/Import/Interface/CMakeLists.txt8
-rw-r--r--Tests/ExportImport/Import/Interface/source_target_test.cpp7
2 files changed, 15 insertions, 0 deletions
diff --git a/Tests/ExportImport/Import/Interface/CMakeLists.txt b/Tests/ExportImport/Import/Interface/CMakeLists.txt
index 4028405..51d518e 100644
--- a/Tests/ExportImport/Import/Interface/CMakeLists.txt
+++ b/Tests/ExportImport/Import/Interface/CMakeLists.txt
@@ -82,6 +82,14 @@ endmacro()
do_try_compile(bld)
+add_executable(source_target_test_bld source_target_test.cpp)
+target_link_libraries(source_target_test_bld bld::source_target)
+target_compile_definitions(source_target_test_bld PRIVATE USE_FROM_BUILD_DIR)
+
+add_executable(source_target_test_exp source_target_test.cpp)
+target_link_libraries(source_target_test_exp exp::source_target)
+target_compile_definitions(source_target_test_exp PRIVATE USE_FROM_INSTALL_DIR)
+
add_executable(headeronlytest_exp headeronlytest.cpp)
target_link_libraries(headeronlytest_exp exp::headeronly)
diff --git a/Tests/ExportImport/Import/Interface/source_target_test.cpp b/Tests/ExportImport/Import/Interface/source_target_test.cpp
new file mode 100644
index 0000000..0e8ec5f
--- /dev/null
+++ b/Tests/ExportImport/Import/Interface/source_target_test.cpp
@@ -0,0 +1,7 @@
+
+extern int source_symbol();
+
+int main()
+{
+ return source_symbol() - 42;
+}