diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-01-12 11:11:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-01-15 19:36:22 (GMT) |
commit | 4ee872cb99f49ac5a95768da454f3313ba87182f (patch) | |
tree | caa573a00cb61a298e5c8345be5c9a962753291e /Tests/ExportImport/Import/A | |
parent | 1d47cd94f3748d287f676f3847d42f3674062dcd (diff) | |
download | CMake-4ee872cb99f49ac5a95768da454f3313ba87182f.zip CMake-4ee872cb99f49ac5a95768da454f3313ba87182f.tar.gz CMake-4ee872cb99f49ac5a95768da454f3313ba87182f.tar.bz2 |
Make the BUILD_INTERFACE of export()ed targets work.
The existing BUILD_INTERFACE code is executed at generate time, which
is too late for export().
Diffstat (limited to 'Tests/ExportImport/Import/A')
-rw-r--r-- | Tests/ExportImport/Import/A/CMakeLists.txt | 8 | ||||
-rw-r--r-- | Tests/ExportImport/Import/A/deps_shared_iface.cpp | 14 |
2 files changed, 18 insertions, 4 deletions
diff --git a/Tests/ExportImport/Import/A/CMakeLists.txt b/Tests/ExportImport/Import/A/CMakeLists.txt index 6a2e54c..72d11b6 100644 --- a/Tests/ExportImport/Import/A/CMakeLists.txt +++ b/Tests/ExportImport/Import/A/CMakeLists.txt @@ -172,6 +172,8 @@ target_compile_definitions(deps_shared_iface PRIVATE testSharedLibDepends) # evaluated correctly. The above already tests the same for the install tree. add_executable(deps_shared_iface2 deps_shared_iface.cpp) -target_link_libraries(deps_shared_iface2 bld_testSharedLibDepends) -target_include_directories(deps_shared_iface2 PRIVATE bld_testSharedLibDepends) -target_compile_definitions(deps_shared_iface2 PRIVATE bld_testSharedLibDepends) +target_link_libraries(deps_shared_iface2 bld_testSharedLibDepends bld_subdirlib) +target_include_directories(deps_shared_iface2 PRIVATE bld_testSharedLibDepends bld_subdirlib) +target_compile_definitions(deps_shared_iface2 + PRIVATE bld_testSharedLibDepends TEST_SUBDIR_LIB +) diff --git a/Tests/ExportImport/Import/A/deps_shared_iface.cpp b/Tests/ExportImport/Import/A/deps_shared_iface.cpp index 4f7eb23..14aac0a 100644 --- a/Tests/ExportImport/Import/A/deps_shared_iface.cpp +++ b/Tests/ExportImport/Import/A/deps_shared_iface.cpp @@ -2,10 +2,22 @@ #include "testSharedLibDepends.h" +#ifdef TEST_SUBDIR_LIB +#include "subdir.h" +#endif + int main(int,char **) { TestSharedLibDepends dep; TestSharedLibRequired req; - return dep.foo() + req.foo(); +#ifdef TEST_SUBDIR_LIB + SubDirObject sdo; +#endif + + return dep.foo() + req.foo() +#ifdef TEST_SUBDIR_LIB + + sdo.foo() +#endif + ; } |