Merge topic 'cmLocalGenerator-generator-target-storage'
a4bbdc5e
cmLocalGenerator: Remove cmGeneratorTargetsType from setter API.04b6bb16
cmLocalGenerator: Simplify semantic of adding generator targets.400e3d19
cmLocalGenerator: Don't store imported generator targets726e461b
CMP0063: Split unit test by target type.
This commit is contained in:
commit
740f85a204
|
@ -969,10 +969,6 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
|||
for (cmGeneratorTargetsType::iterator l = targets.begin();
|
||||
l != targets.end(); ++l)
|
||||
{
|
||||
if (l->first->IsImported())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
std::vector<std::string> includeDirs;
|
||||
std::string config = mf->GetSafeDefinition("CMAKE_BUILD_TYPE");
|
||||
(*it)->GetIncludeDirectories(includeDirs, l->second, "C", config);
|
||||
|
|
|
@ -1574,7 +1574,6 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo()
|
|||
void cmGlobalGenerator::CreateGeneratorTargets(TargetTypes targetTypes,
|
||||
cmLocalGenerator *lg)
|
||||
{
|
||||
cmGeneratorTargetsType generatorTargets;
|
||||
cmMakefile* mf = lg->GetMakefile();
|
||||
if (targetTypes == AllTargets)
|
||||
{
|
||||
|
@ -1585,7 +1584,7 @@ void cmGlobalGenerator::CreateGeneratorTargets(TargetTypes targetTypes,
|
|||
cmTarget* t = &ti->second;
|
||||
cmGeneratorTarget* gt = new cmGeneratorTarget(t, lg);
|
||||
this->GeneratorTargets[t] = gt;
|
||||
generatorTargets[t] = gt;
|
||||
lg->AddGeneratorTarget(t, gt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1595,9 +1594,7 @@ void cmGlobalGenerator::CreateGeneratorTargets(TargetTypes targetTypes,
|
|||
{
|
||||
cmGeneratorTarget* gt = new cmGeneratorTarget(*j, lg);
|
||||
this->GeneratorTargets[*j] = gt;
|
||||
generatorTargets[*j] = gt;
|
||||
}
|
||||
lg->SetGeneratorTargets(generatorTargets);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
|
@ -473,10 +473,6 @@ cmGlobalUnixMakefileGenerator3
|
|||
(type == cmState::OBJECT_LIBRARY) ||
|
||||
(type == cmState::UTILITY))
|
||||
{
|
||||
if(gtarget->IsImported())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// Add this to the list of depends rules in this directory.
|
||||
if((!check_all || !gtarget->GetPropertyAsBool("EXCLUDE_FROM_ALL")) &&
|
||||
(!check_relink ||
|
||||
|
@ -632,10 +628,6 @@ cmGlobalUnixMakefileGenerator3
|
|||
t != targets.end(); ++t)
|
||||
{
|
||||
cmGeneratorTarget* gtarget = t->second;
|
||||
if(gtarget->IsImported())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// Don't emit the same rule twice (e.g. two targets with the same
|
||||
// simple name)
|
||||
int type = gtarget->GetType();
|
||||
|
@ -733,10 +725,6 @@ cmGlobalUnixMakefileGenerator3
|
|||
t != targets.end(); ++t)
|
||||
{
|
||||
cmGeneratorTarget* gtarget = t->second;
|
||||
if(gtarget->IsImported())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
int type = gtarget->GetType();
|
||||
std::string name = gtarget->GetName();
|
||||
if (!name.empty()
|
||||
|
|
|
@ -257,6 +257,7 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
|
|||
|
||||
cmGeneratorTarget* gt = new cmGeneratorTarget(tgt, lg);
|
||||
lg->AddGeneratorTarget(tgt, gt);
|
||||
this->AddGeneratorTarget(tgt, gt);
|
||||
|
||||
// Organize in the "predefined targets" folder:
|
||||
//
|
||||
|
|
|
@ -88,6 +88,7 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets()
|
|||
|
||||
cmGeneratorTarget* gt = new cmGeneratorTarget(allBuild, gen[0]);
|
||||
gen[0]->AddGeneratorTarget(allBuild, gt);
|
||||
this->AddGeneratorTarget(allBuild, gt);
|
||||
|
||||
#if 0
|
||||
// Can't activate this code because we want ALL_BUILD
|
||||
|
|
|
@ -460,6 +460,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
|||
|
||||
cmGeneratorTarget* allBuildGt = new cmGeneratorTarget(allbuild, root);
|
||||
root->AddGeneratorTarget(allbuild, allBuildGt);
|
||||
root->GetGlobalGenerator()->AddGeneratorTarget(allbuild, allBuildGt);
|
||||
|
||||
// Refer to the main build configuration file for easy editing.
|
||||
std::string listfile = root->GetCurrentSourceDirectory();
|
||||
|
@ -495,6 +496,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
|
|||
|
||||
cmGeneratorTarget* checkGt = new cmGeneratorTarget(check, root);
|
||||
root->AddGeneratorTarget(check, checkGt);
|
||||
root->GetGlobalGenerator()->AddGeneratorTarget(check, checkGt);
|
||||
}
|
||||
|
||||
// now make the allbuild depend on all the non-utility targets
|
||||
|
|
|
@ -136,8 +136,7 @@ void cmLocalGenerator::TraceDependencies()
|
|||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||
t != targets.end(); ++t)
|
||||
{
|
||||
if (t->second->Target->IsImported()
|
||||
|| t->second->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
if (t->second->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -452,7 +451,6 @@ void cmLocalGenerator::GenerateInstallRules()
|
|||
void cmLocalGenerator::AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt)
|
||||
{
|
||||
this->GeneratorTargets[t] = gt;
|
||||
this->GetGlobalGenerator()->AddGeneratorTarget(t, gt);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -476,10 +474,6 @@ void cmLocalGenerator::ComputeTargetManifest()
|
|||
{
|
||||
continue;
|
||||
}
|
||||
if (target.IsImported())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
for(std::vector<std::string>::iterator ci = configNames.begin();
|
||||
ci != configNames.end(); ++ci)
|
||||
{
|
||||
|
|
|
@ -118,10 +118,6 @@ public:
|
|||
return this->GeneratorTargets;
|
||||
}
|
||||
|
||||
void SetGeneratorTargets(const cmGeneratorTargetsType &targets)
|
||||
{
|
||||
this->GeneratorTargets = targets;
|
||||
}
|
||||
void AddGeneratorTarget(cmTarget* t, cmGeneratorTarget* gt);
|
||||
|
||||
cmGeneratorTarget* FindGeneratorTargetToUse(const std::string& name) const;
|
||||
|
|
|
@ -31,8 +31,7 @@ void cmLocalGhsMultiGenerator::Generate()
|
|||
for (cmGeneratorTargetsType::iterator l = tgts.begin(); l != tgts.end();
|
||||
++l)
|
||||
{
|
||||
if (l->second->GetType() == cmState::INTERFACE_LIBRARY
|
||||
|| l->second->IsImported())
|
||||
if (l->second->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -77,8 +77,7 @@ void cmLocalNinjaGenerator::Generate()
|
|||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||
t != targets.end(); ++t)
|
||||
{
|
||||
if (t->second->GetType() == cmState::INTERFACE_LIBRARY
|
||||
|| t->second->Target->IsImported())
|
||||
if (t->second->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -119,8 +119,7 @@ void cmLocalUnixMakefileGenerator3::Generate()
|
|||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||
t != targets.end(); ++t)
|
||||
{
|
||||
if (t->second->GetType() == cmState::INTERFACE_LIBRARY
|
||||
|| t->second->Target->IsImported())
|
||||
if (t->second->GetType() == cmState::INTERFACE_LIBRARY)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -430,11 +429,6 @@ void cmLocalUnixMakefileGenerator3
|
|||
(t->second->GetType() == cmState::OBJECT_LIBRARY) ||
|
||||
(t->second->GetType() == cmState::UTILITY))
|
||||
{
|
||||
if (t->second->Target->IsImported())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
emitted.insert(t->second->GetName());
|
||||
|
||||
// for subdirs add a rule to build this specific target by name.
|
||||
|
|
|
@ -896,6 +896,7 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget(
|
|||
|
||||
cmGeneratorTarget* gt = new cmGeneratorTarget(autogenTarget, lg);
|
||||
lg->AddGeneratorTarget(autogenTarget, gt);
|
||||
lg->GetGlobalGenerator()->AddGeneratorTarget(autogenTarget, gt);
|
||||
|
||||
// Set target folder
|
||||
const char* autogenFolder = makefile->GetState()
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
CMake Warning \(dev\) at CMP0063-WARN-exe.cmake:[0-9]+ \(add_executable\):
|
||||
Policy CMP0063 is not set: Honor visibility properties for all target
|
||||
types. Run "cmake --help-policy CMP0063" for policy details. Use the
|
||||
cmake_policy command to set the policy and suppress this warning.
|
||||
|
||||
Target "myexe" of type "EXECUTABLE" has the following visibility properties
|
||||
set for CXX:
|
||||
|
||||
CXX_VISIBILITY_PRESET
|
||||
VISIBILITY_INLINES_HIDDEN
|
||||
|
||||
For compatibility CMake is not honoring them for this target.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
|
@ -5,4 +5,7 @@ enable_language(CXX)
|
|||
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
|
||||
|
||||
include(CMP0063-Common.cmake)
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
add_executable(myexe lib.cpp)
|
|
@ -0,0 +1,15 @@
|
|||
CMake Warning \(dev\) at CMP0063-WARN-obj.cmake:[0-9]+ \(add_library\):
|
||||
Policy CMP0063 is not set: Honor visibility properties for all target
|
||||
types. Run "cmake --help-policy CMP0063" for policy details. Use the
|
||||
cmake_policy command to set the policy and suppress this warning.
|
||||
|
||||
Target "myobject" of type "OBJECT_LIBRARY" has the following visibility
|
||||
properties set for CXX:
|
||||
|
||||
CXX_VISIBILITY_PRESET
|
||||
VISIBILITY_INLINES_HIDDEN
|
||||
|
||||
For compatibility CMake is not honoring them for this target.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
enable_language(CXX)
|
||||
|
||||
# Ensure CMake warns even if toolchain does not really have these flags.
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
|
||||
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
add_library(myobject OBJECT lib.cpp)
|
|
@ -0,0 +1,15 @@
|
|||
CMake Warning \(dev\) at CMP0063-WARN-sta.cmake:[0-9]+ \(add_library\):
|
||||
Policy CMP0063 is not set: Honor visibility properties for all target
|
||||
types. Run "cmake --help-policy CMP0063" for policy details. Use the
|
||||
cmake_policy command to set the policy and suppress this warning.
|
||||
|
||||
Target "mystatic" of type "STATIC_LIBRARY" has the following visibility
|
||||
properties set for CXX:
|
||||
|
||||
CXX_VISIBILITY_PRESET
|
||||
VISIBILITY_INLINES_HIDDEN
|
||||
|
||||
For compatibility CMake is not honoring them for this target.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
enable_language(CXX)
|
||||
|
||||
# Ensure CMake warns even if toolchain does not really have these flags.
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
|
||||
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
||||
|
||||
add_library(mystatic STATIC lib.cpp)
|
|
@ -1,50 +0,0 @@
|
|||
^CMake Warning \(dev\) at CMP0063-Common.cmake:[0-9]+ \(add_executable\):
|
||||
Policy CMP0063 is not set: Honor visibility properties for all target
|
||||
types. Run "cmake --help-policy CMP0063" for policy details. Use the
|
||||
cmake_policy command to set the policy and suppress this warning.
|
||||
|
||||
Target "myexe" of type "EXECUTABLE" has the following visibility properties
|
||||
set for CXX:
|
||||
|
||||
CXX_VISIBILITY_PRESET
|
||||
VISIBILITY_INLINES_HIDDEN
|
||||
|
||||
For compatibility CMake is not honoring them for this target.
|
||||
Call Stack \(most recent call first\):
|
||||
CMP0063-WARN-yes.cmake:[0-9]+ \(include\)
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
+
|
||||
CMake Warning \(dev\) at CMP0063-Common.cmake:[0-9]+ \(add_library\):
|
||||
Policy CMP0063 is not set: Honor visibility properties for all target
|
||||
types. Run "cmake --help-policy CMP0063" for policy details. Use the
|
||||
cmake_policy command to set the policy and suppress this warning.
|
||||
|
||||
Target "myobject" of type "OBJECT_LIBRARY" has the following visibility
|
||||
properties set for CXX:
|
||||
|
||||
CXX_VISIBILITY_PRESET
|
||||
VISIBILITY_INLINES_HIDDEN
|
||||
|
||||
For compatibility CMake is not honoring them for this target.
|
||||
Call Stack \(most recent call first\):
|
||||
CMP0063-WARN-yes.cmake:[0-9]+ \(include\)
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
+
|
||||
CMake Warning \(dev\) at CMP0063-Common.cmake:[0-9]+ \(add_library\):
|
||||
Policy CMP0063 is not set: Honor visibility properties for all target
|
||||
types. Run "cmake --help-policy CMP0063" for policy details. Use the
|
||||
cmake_policy command to set the policy and suppress this warning.
|
||||
|
||||
Target "mystatic" of type "STATIC_LIBRARY" has the following visibility
|
||||
properties set for CXX:
|
||||
|
||||
CXX_VISIBILITY_PRESET
|
||||
VISIBILITY_INLINES_HIDDEN
|
||||
|
||||
For compatibility CMake is not honoring them for this target.
|
||||
Call Stack \(most recent call first\):
|
||||
CMP0063-WARN-yes.cmake:[0-9]+ \(include\)
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.$
|
|
@ -2,6 +2,8 @@ include(RunCMake)
|
|||
|
||||
run_cmake(PropertyTypo)
|
||||
run_cmake(CMP0063-OLD)
|
||||
run_cmake(CMP0063-WARN-yes)
|
||||
run_cmake(CMP0063-WARN-exe)
|
||||
run_cmake(CMP0063-WARN-obj)
|
||||
run_cmake(CMP0063-WARN-sta)
|
||||
run_cmake(CMP0063-WARN-no)
|
||||
run_cmake(CMP0063-NEW)
|
||||
|
|
Loading…
Reference in New Issue