mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 12:49:36 -06:00
find_package: Add support for default GLOBAL imported targets
Allow find package to promote scope of imported targets by specifying
an argument to `find_package` or by specifying a CMake variable.
* Add support for CMAKE_GLOBAL_IMPORT_SCOPE variable
* Add support for GLOBAL argument to find_package
Additionally add testing for above features.
This commit is contained in:
@@ -54,6 +54,10 @@ bool cmAddExecutableCommand(std::vector<std::string> const& args,
|
||||
}
|
||||
}
|
||||
|
||||
if (importTarget && !importGlobal) {
|
||||
importGlobal = mf.IsImportedTargetGlobalScope();
|
||||
}
|
||||
|
||||
bool nameOk = cmGeneratorExpression::IsValidTargetName(exename) &&
|
||||
!cmGlobalGenerator::IsReservedTarget(exename);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user