diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-08-29 08:28:09 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-09-24 18:00:31 (GMT) |
commit | a63fcbcb9f6c09294dfbeb8480be822f42529755 (patch) | |
tree | 7d24cffa66390814152293270a126ad030da2a39 /Tests/ExportImport/Export | |
parent | 9bcf6adc388c2306033c65270357eb1a1da83d76 (diff) | |
download | CMake-a63fcbcb9f6c09294dfbeb8480be822f42529755.zip CMake-a63fcbcb9f6c09294dfbeb8480be822f42529755.tar.gz CMake-a63fcbcb9f6c09294dfbeb8480be822f42529755.tar.bz2 |
Always consider includes from IMPORTED targets to be SYSTEM.
Introduce a target property to control this behavior variable
to set the default value for the target property.
This does not affect try_compile runs.
Diffstat (limited to 'Tests/ExportImport/Export')
-rw-r--r-- | Tests/ExportImport/Export/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/ExportImport/Export/systemlib.cpp | 7 | ||||
-rw-r--r-- | Tests/ExportImport/Export/systemlib.h | 22 |
3 files changed, 39 insertions, 0 deletions
diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index 1f23b2a..06238a4 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -298,6 +298,14 @@ set_property(TARGET cmp0022OLD APPEND PROPERTY LINK_INTERFACE_LIBRARIES testLib3 add_library(noIncludesInterface empty.cpp) +add_library(systemlib SHARED systemlib.cpp) +install(FILES systemlib.h DESTINATION include/systemlib) +target_include_directories(systemlib + INTERFACE + $<INSTALL_INTERFACE:include/systemlib> + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> +) + install(TARGETS testLibRequired EXPORT RequiredExp DESTINATION lib INCLUDES DESTINATION @@ -366,6 +374,7 @@ install( testLib6 testLibCycleA testLibCycleB cmp0022NEW cmp0022OLD + systemlib EXPORT exp RUNTIME DESTINATION bin LIBRARY DESTINATION lib NAMELINK_SKIP @@ -417,6 +426,7 @@ export(TARGETS testExe1 testLib1 testLib2 testLib3 testSharedLibRequired testSharedLibRequiredUser testSharedLibRequiredUser2 testSharedLibDepends renamed_on_export cmp0022NEW cmp0022OLD + systemlib NAMESPACE bld_ FILE ExportBuildTree.cmake ) diff --git a/Tests/ExportImport/Export/systemlib.cpp b/Tests/ExportImport/Export/systemlib.cpp new file mode 100644 index 0000000..ec45148 --- /dev/null +++ b/Tests/ExportImport/Export/systemlib.cpp @@ -0,0 +1,7 @@ + +#include "systemlib.h" + +SystemStruct::SystemStruct() +{ + +} diff --git a/Tests/ExportImport/Export/systemlib.h b/Tests/ExportImport/Export/systemlib.h new file mode 100644 index 0000000..f7900c0 --- /dev/null +++ b/Tests/ExportImport/Export/systemlib.h @@ -0,0 +1,22 @@ + +#ifndef SYSTEMLIB_H +#define SYSTEMLIB_H + +#if defined(_WIN32) || defined(__CYGWIN__) +# define systemlib_EXPORT __declspec(dllexport) +#else +# define systemlib_EXPORT +#endif + +struct systemlib_EXPORT SystemStruct +{ + SystemStruct(); + + void someMethod() + { + int unused; + // unused warning not issued when this header is used as a system header. + } +}; + +#endif |