Merge topic 'export-try-compile-crash'

29c7546a61 cmGlobalGenerator: Only compute build files for all targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7472
This commit is contained in:
Kyle Edwards
2022-07-14 13:55:54 +00:00
committed by Kitware Robot
3 changed files with 13 additions and 1 deletions

View File

@@ -1399,7 +1399,9 @@ void cmGlobalGenerator::CreateGenerationObjects(TargetTypes targetTypes)
this->CheckTargetProperties();
}
this->CreateGeneratorTargets(targetTypes);
this->ComputeBuildFileGenerators();
if (targetTypes == TargetTypes::AllTargets) {
this->ComputeBuildFileGenerators();
}
}
void cmGlobalGenerator::CreateImportedGenerationObjects(

View File

@@ -18,3 +18,4 @@ run_cmake(DependOnDoubleExport)
run_cmake(UnknownExport)
run_cmake(NamelinkOnlyExport)
run_cmake(SeparateNamelinkExport)
run_cmake(TryCompileExport)

View File

@@ -0,0 +1,9 @@
enable_language(CXX)
add_library(interface INTERFACE)
install(TARGETS interface EXPORT export)
export(EXPORT export)
add_library(imported IMPORTED INTERFACE)
try_compile(tc "${CMAKE_CURRENT_BINARY_DIR}/tc" "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" LINK_LIBRARIES imported)