mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
cmLocalGenerator: always support shortening filenames
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmComputeLinkInformation.h"
|
||||
#include "cmCryptoHash.h"
|
||||
#include "cmCustomCommand.h"
|
||||
#include "cmCustomCommandGenerator.h"
|
||||
#include "cmCustomCommandLines.h"
|
||||
@@ -59,11 +60,6 @@
|
||||
#include "cmVersion.h"
|
||||
#include "cmake.h"
|
||||
|
||||
#if !defined(CMAKE_BOOTSTRAP)
|
||||
# define CM_LG_ENCODE_OBJECT_NAMES
|
||||
# include "cmCryptoHash.h"
|
||||
#endif
|
||||
|
||||
#if defined(__HAIKU__)
|
||||
# include <FindDirectory.h>
|
||||
# include <StorageDefs.h>
|
||||
@@ -3698,9 +3694,9 @@ void cmLocalGenerator::GenerateTargetInstallRules(
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(CM_LG_ENCODE_OBJECT_NAMES)
|
||||
static bool cmLocalGeneratorShortenObjectName(std::string& objName,
|
||||
std::string::size_type max_len)
|
||||
namespace {
|
||||
bool cmLocalGeneratorShortenObjectName(std::string& objName,
|
||||
std::string::size_type max_len)
|
||||
{
|
||||
// Check if the path can be shortened using an md5 sum replacement for
|
||||
// a portion of the path.
|
||||
@@ -3744,7 +3740,7 @@ bool cmLocalGeneratorCheckObjectName(std::string& objName,
|
||||
// already too deep.
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string& cmLocalGenerator::CreateSafeUniqueObjectFileName(
|
||||
const std::string& sin, std::string const& dir_max)
|
||||
@@ -3794,7 +3790,6 @@ std::string& cmLocalGenerator::CreateSafeUniqueObjectFileName(
|
||||
} while (!done);
|
||||
}
|
||||
|
||||
#if defined(CM_LG_ENCODE_OBJECT_NAMES)
|
||||
if (!cmLocalGeneratorCheckObjectName(ssin, dir_max.size(),
|
||||
this->ObjectPathMax)) {
|
||||
// Warn if this is the first time the path has been seen.
|
||||
@@ -3815,9 +3810,6 @@ std::string& cmLocalGenerator::CreateSafeUniqueObjectFileName(
|
||||
this->IssueMessage(MessageType::WARNING, m.str());
|
||||
}
|
||||
}
|
||||
#else
|
||||
(void)dir_max;
|
||||
#endif
|
||||
|
||||
// Insert the newly mapped object file name.
|
||||
std::map<std::string, std::string>::value_type e(sin, ssin);
|
||||
|
||||
@@ -701,12 +701,6 @@ private:
|
||||
std::string const& filename_base);
|
||||
};
|
||||
|
||||
#if !defined(CMAKE_BOOTSTRAP)
|
||||
bool cmLocalGeneratorCheckObjectName(std::string& objName,
|
||||
std::string::size_type dir_len,
|
||||
std::string::size_type max_total_len);
|
||||
#endif
|
||||
|
||||
namespace detail {
|
||||
void AddCustomCommandToTarget(cmLocalGenerator& lg, cmCommandOrigin origin,
|
||||
cmTarget* target, cmCustomCommandType type,
|
||||
|
||||
Reference in New Issue
Block a user