mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
prop_sf/OBJECT_NAME: no-op for the FASTBuild and Xcode generators
There's no control over the object base name implemented in the FASTBuild generator. Rather than expecting some half-supported behavior, just ignore it completely there. Similarly, Xcode ends up making its own object paths internally regardless of what CMake would like.
This commit is contained in:
@@ -24,3 +24,7 @@ allow for context-sensitive (i.e., configuration-dependent) expressions.
|
|||||||
* Generated PCH source files (``cmake_pch``)
|
* Generated PCH source files (``cmake_pch``)
|
||||||
* Generated Unity compilation files (``unity_``)
|
* Generated Unity compilation files (``unity_``)
|
||||||
* Qt autogen sources (``moc_compilations.cpp``)
|
* Qt autogen sources (``moc_compilations.cpp``)
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
The :generator:`FASTBuild` and :generator:`Xcode` generators do not support
|
||||||
|
this property and it is ignored.
|
||||||
|
@@ -356,6 +356,8 @@ public:
|
|||||||
|
|
||||||
bool IsMultiConfig() const override { return false; }
|
bool IsMultiConfig() const override { return false; }
|
||||||
|
|
||||||
|
bool SupportsCustomObjectNames() const override { return false; }
|
||||||
|
|
||||||
void ComputeTargetObjectDirectory(cmGeneratorTarget*) const override;
|
void ComputeTargetObjectDirectory(cmGeneratorTarget*) const override;
|
||||||
void AppendDirectoryForConfig(std::string const& prefix,
|
void AppendDirectoryForConfig(std::string const& prefix,
|
||||||
std::string const& config,
|
std::string const& config,
|
||||||
|
@@ -174,6 +174,8 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual bool SupportsCustomObjectNames() const { return true; }
|
||||||
|
|
||||||
virtual bool SupportsBuildDatabase() const { return false; }
|
virtual bool SupportsBuildDatabase() const { return false; }
|
||||||
bool AddBuildDatabaseTargets();
|
bool AddBuildDatabaseTargets();
|
||||||
void AddBuildDatabaseFile(std::string const& lang, std::string const& config,
|
void AddBuildDatabaseFile(std::string const& lang, std::string const& config,
|
||||||
|
@@ -116,6 +116,8 @@ public:
|
|||||||
|
|
||||||
bool ShouldStripResourcePath(cmMakefile*) const override;
|
bool ShouldStripResourcePath(cmMakefile*) const override;
|
||||||
|
|
||||||
|
bool SupportsCustomObjectNames() const override { return false; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to determine if this generator supports DEPFILE option.
|
* Used to determine if this generator supports DEPFILE option.
|
||||||
*/
|
*/
|
||||||
|
@@ -4336,7 +4336,8 @@ std::string cmLocalGenerator::GetObjectFileNameWithoutTarget(
|
|||||||
useShortObjectNames = *forceShortObjectName;
|
useShortObjectNames = *forceShortObjectName;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!useShortObjectNames) {
|
if (!useShortObjectNames &&
|
||||||
|
this->GetGlobalGenerator()->SupportsCustomObjectNames()) {
|
||||||
auto customName = this->GetCustomObjectFileName(source);
|
auto customName = this->GetCustomObjectFileName(source);
|
||||||
if (!customName.empty()) {
|
if (!customName.empty()) {
|
||||||
auto ext = this->GlobalGenerator->GetLanguageOutputExtension(source);
|
auto ext = this->GlobalGenerator->GetLanguageOutputExtension(source);
|
||||||
|
@@ -8,6 +8,18 @@ if (RunCMake_GENERATOR STREQUAL "Xcode" AND "$ENV{CMAKE_OSX_ARCHITECTURES}" MATC
|
|||||||
return ()
|
return ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (RunCMake_GENERATOR STREQUAL "FASTBuild")
|
||||||
|
# FASTBuild does not offer full control over object paths. Just skip all
|
||||||
|
# tests rather than expecting some half-supported behavior.
|
||||||
|
return ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (RunCMake_GENERATOR STREQUAL "Xcode")
|
||||||
|
# Xcode does not offer full control over object paths. Just skip all tests
|
||||||
|
# rather than expecting some half-supported behavior.
|
||||||
|
return ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
function(run_build_test case)
|
function(run_build_test case)
|
||||||
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build)
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build)
|
||||||
set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE:STRING=Debug)
|
set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE:STRING=Debug)
|
||||||
|
Reference in New Issue
Block a user