diff options
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake | 9 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0022/RunCMakeTest.cmake | 1 |
4 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index a30c5e4..14be5cd 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -185,6 +185,10 @@ bool cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty( ImportPropertyMap &properties, std::vector<std::string> &missingTargets) { + if(!target->IsLinkable()) + { + return false; + } const char *input = target->GetProperty("INTERFACE_LINK_LIBRARIES"); if (input) { diff --git a/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt b/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake b/Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake new file mode 100644 index 0000000..d832fac --- /dev/null +++ b/Tests/RunCMake/CMP0022/CMP0022-export-exe.cmake @@ -0,0 +1,9 @@ +enable_language(CXX) + +cmake_policy(SET CMP0022 NEW) + +add_library(testLib empty_vs6_1.cpp) +add_executable(testExe empty_vs6_2.cpp) +target_link_libraries(testExe testLib) + +export(TARGETS testExe FILE "${CMAKE_CURRENT_BINARY_DIR}/cmp0022NEW-exe.cmake") diff --git a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake index 9123f6d..45b56e4 100644 --- a/Tests/RunCMake/CMP0022/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0022/RunCMakeTest.cmake @@ -8,4 +8,5 @@ run_cmake(CMP0022-NOWARN-shared) run_cmake(CMP0022-NOWARN-static) run_cmake(CMP0022-NOWARN-static-link_libraries) run_cmake(CMP0022-export) +run_cmake(CMP0022-export-exe) run_cmake(CMP0022-install-export) |