Commit 9e9766d8 authored by Kyle Edwards's avatar Kyle Edwards Committed by Kitware Robot

Merge topic 'cmake-bootstrap-def'

d4d5053c Refactor: Finish replacing CMAKE_BUILD_WITH_CMAKE with CMAKE_BOOTSTRAP
fe921edd Utilities/Scripts: Remove temporary CMAKE_BOOTSTRAP conversion script
54e9d38c Refactor: Convert all instances of CMAKE_BUILD_WITH_CMAKE to CMAKE_BOOTSTRAP
ad0e44a1 Utilities/Scripts: Add temporary CMAKE_BOOTSTRAP conversion script
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3662
parents 7d194f7d d4d5053c
Pipeline #143694 passed with stage
in 0 seconds
......@@ -95,9 +95,6 @@ include_directories(
${CMake_HAIKU_INCLUDE_DIRS}
)
# let cmake know it is supposed to use it
add_definitions(-DCMAKE_BUILD_WITH_CMAKE)
# Check if we can build the ELF parser.
if(CMAKE_USE_ELF_PARSER)
set(ELF_SRCS cmELF.h cmELF.cxx)
......
......@@ -11,7 +11,7 @@
#include <utility>
#include <vector>
#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE)
#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
# include "cmsys/ConsoleBuf.hxx"
#endif
......@@ -100,7 +100,7 @@ void cpackProgressCallback(const std::string& message, float /*unused*/)
int main(int argc, char const* const* argv)
{
cmSystemTools::EnsureStdPipes();
#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE)
#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
// Replace streambuf so we can output Unicode to console
cmsys::ConsoleBuf::Manager consoleOut(std::cout);
consoleOut.SetUTF8Pipes();
......
......@@ -689,7 +689,7 @@ bool cmCTestRunTest::ForkProcess(cmDuration testTimeOut, bool explicitTimeout,
this->TestProcess->SetTimeout(timeout);
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
cmSystemTools::SaveRestoreEnvironment sre;
#endif
......
......@@ -495,7 +495,7 @@ void cmCTestScriptHandler::SleepInSeconds(unsigned int secondsToWait)
int cmCTestScriptHandler::RunConfigurationScript(
const std::string& total_script_arg, bool pscope)
{
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
cmSystemTools::SaveRestoreEnvironment sre;
#endif
......
......@@ -9,7 +9,7 @@
#include <stddef.h>
#include <string>
#if !defined(CMAKE_BUILD_WITH_CMAKE)
#if defined(CMAKE_BOOTSTRAP)
# error "cmArchiveWrite not allowed during bootstrap build!"
#endif
......
......@@ -2423,7 +2423,7 @@ int cmCTest::RunCMakeAndTest(std::string* output)
cmCTestBuildAndTestHandler* handler = this->GetBuildAndTestHandler();
int retv = handler->ProcessHandler();
*output = handler->GetOutput();
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
cmDynamicLoader::FlushCache();
#endif
if (retv != 0) {
......
......@@ -84,7 +84,7 @@
#include "cmUnsetCommand.h"
#include "cmWhileCommand.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
# include "cmAddCompileOptionsCommand.h"
# include "cmAddLinkOptionsCommand.h"
# include "cmAuxSourceDirectoryCommand.h"
......@@ -210,7 +210,7 @@ void GetScriptingCommands(cmState* state)
"WHILE ENDWHILE structure. Or its arguments did not "
"match the opening WHILE command.");
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
state->AddBuiltinCommand(
"cmake_host_system_information",
cm::make_unique<cmCMakeHostSystemInformationCommand>());
......@@ -301,7 +301,7 @@ void GetProjectCommands(cmState* state)
cm::make_unique<cmTryCompileCommand>());
state->AddBuiltinCommand("try_run", cm::make_unique<cmTryRunCommand>());
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
state->AddBuiltinCommand("add_compile_definitions",
cm::make_unique<cmAddCompileDefinitionsCommand>());
state->AddBuiltinCommand("add_compile_options",
......
......@@ -47,7 +47,7 @@
#include "cm_sys_stat.h"
#include "cmake.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
# include "cmCurl.h"
# include "cmFileLockResult.h"
# include "cm_curl.h"
......@@ -275,7 +275,7 @@ bool HandleReadCommand(std::vector<std::string> const& args,
bool HandleHashCommand(std::vector<std::string> const& args,
cmExecutionStatus& status)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
if (args.size() != 3) {
std::ostringstream e;
e << args[0] << " requires a file name and output variable";
......@@ -1426,7 +1426,7 @@ bool HandleNativePathCommand(std::vector<std::string> const& args,
return HandlePathCommand(args, ToNativePath, status);
}
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
// Stuff for curl download/upload
typedef std::vector<char> cmFileCommandVectorOfChar;
......@@ -1592,7 +1592,7 @@ private:
bool HandleDownloadCommand(std::vector<std::string> const& args,
cmExecutionStatus& status)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
std::vector<std::string>::const_iterator i = args.begin();
if (args.size() < 3) {
status.SetError("DOWNLOAD must be called with at least three arguments.");
......@@ -1961,7 +1961,7 @@ bool HandleDownloadCommand(std::vector<std::string> const& args,
bool HandleUploadCommand(std::vector<std::string> const& args,
cmExecutionStatus& status)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
if (args.size() < 3) {
status.SetError("UPLOAD must be called with at least three arguments.");
return false;
......@@ -2292,7 +2292,7 @@ bool HandleGenerateCommand(std::vector<std::string> const& args,
bool HandleLockCommand(std::vector<std::string> const& args,
cmExecutionStatus& status)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
// Default values
bool directory = false;
bool release = false;
......
......@@ -6,14 +6,14 @@
#include "cmSystemTools.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
# include "cm_codecvt.hxx"
# include "cm_zlib.h"
#endif
cmGeneratedFileStream::cmGeneratedFileStream(Encoding encoding)
{
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
if (encoding != codecvt::None) {
imbue(std::locale(getloc(), new codecvt(encoding)));
}
......@@ -32,7 +32,7 @@ cmGeneratedFileStream::cmGeneratedFileStream(std::string const& name,
cmSystemTools::Error("Cannot open file for write: " + this->TempName);
cmSystemTools::ReportLastSystemError("");
}
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
if (encoding != codecvt::None) {
imbue(std::locale(getloc(), new codecvt(encoding)));
}
......@@ -169,7 +169,7 @@ bool cmGeneratedFileStreamBase::Close()
return replaced;
}
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
int cmGeneratedFileStreamBase::CompressFile(std::string const& oldname,
std::string const& newname)
{
......
......@@ -2526,7 +2526,7 @@ void cmGeneratorTarget::ComputeModuleDefinitionInfo(
info.WindowsExportAllSymbols =
this->Makefile->IsOn("CMAKE_SUPPORT_WINDOWS_EXPORT_ALL_SYMBOLS") &&
this->GetPropertyAsBool("WINDOWS_EXPORT_ALL_SYMBOLS");
#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE)
#if defined(_WIN32) && !defined(CMAKE_BOOTSTRAP)
info.DefFileGenerated =
info.WindowsExportAllSymbols || info.Sources.size() > 1;
#else
......
......@@ -44,7 +44,7 @@
#include "cmWorkingDirectory.h"
#include "cmake.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
# include "cmCryptoHash.h"
# include "cmQtAutoGenGlobalInitializer.h"
# include "cm_jsoncpp_value.h"
......@@ -114,7 +114,7 @@ cmGlobalGenerator::~cmGlobalGenerator()
this->ClearGeneratorMembers();
}
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
Json::Value cmGlobalGenerator::GetJson() const
{
Json::Value generator = Json::objectValue;
......@@ -1547,7 +1547,7 @@ bool cmGlobalGenerator::ComputeTargetDepends()
bool cmGlobalGenerator::QtAutoGen()
{
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
cmQtAutoGenGlobalInitializer initializer(this->LocalGenerators);
return initializer.generate();
#else
......@@ -2829,7 +2829,7 @@ std::set<std::string> const& cmGlobalGenerator::GetDirectoryContent(
void cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
std::string const& content)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
// Ignore if there are no outputs.
if (outputs.empty()) {
return;
......@@ -2859,7 +2859,7 @@ void cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
void cmGlobalGenerator::CheckRuleHashes()
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
std::string home = this->GetCMakeInstance()->GetHomeOutputDirectory();
std::string pfile = home;
pfile += "/CMakeFiles";
......@@ -2963,7 +2963,7 @@ void cmGlobalGenerator::WriteSummary(cmGeneratorTarget* target)
file += "/Labels.txt";
std::string json_file = dir + "/Labels.json";
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
// Check whether labels are enabled for this target.
const char* targetLabels = target->GetProperty("LABELS");
const char* directoryLabels =
......
......@@ -25,7 +25,7 @@
#include "cmTargetDepend.h"
#include "cm_codecvt.hxx"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
# include "cmFileLockPool.h"
# include "cm_jsoncpp_value.h"
#endif
......@@ -109,7 +109,7 @@ public:
return codecvt::None;
}
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
/** Get a JSON object describing the generator. */
virtual Json::Value GetJson() const;
#endif
......@@ -462,7 +462,7 @@ public:
const std::set<const cmGeneratorTarget*>& GetFilenameTargetDepends(
cmSourceFile* sf) const;
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
cmFileLockPool& GetFileLockPool() { return FileLockPool; }
#endif
......@@ -665,7 +665,7 @@ private:
mutable std::map<cmSourceFile*, std::set<cmGeneratorTarget const*>>
FilenameTargetDepends;
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
// Pool of file locks
cmFileLockPool FileLockPool;
#endif
......
......@@ -256,7 +256,7 @@ cmLocalGenerator* cmGlobalVisualStudio7Generator::CreateLocalGenerator(
return lg;
}
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
Json::Value cmGlobalVisualStudio7Generator::GetJson() const
{
Json::Value generator = this->cmGlobalVisualStudioGenerator::GetJson();
......
......@@ -23,7 +23,7 @@ public:
//! Create a local generator appropriate to this Global Generator
cmLocalGenerator* CreateLocalGenerator(cmMakefile* mf) override;
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
Json::Value GetJson() const override;
#endif
......
......@@ -38,12 +38,12 @@
struct cmLinkImplementation;
#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(__APPLE__)
#if !defined(CMAKE_BOOTSTRAP) && defined(__APPLE__)
# define HAVE_APPLICATION_SERVICES
# include <ApplicationServices/ApplicationServices.h>
#endif
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
# include "cmXMLParser.h"
// parse the xml file storing the installed version of Xcode on
......@@ -188,7 +188,7 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::Factory::CreateGlobalGenerator(
if (name != GetActualName()) {
return nullptr;
}
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
cmXcodeVersionParser parser;
std::string versionFile;
{
......
......@@ -21,7 +21,7 @@ enum IncludeGuardScope
std::string GetIncludeGuardVariableName(std::string const& filePath)
{
std::string result = "__INCGUARD_";
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
result += cmSystemTools::ComputeStringMD5(filePath);
#else
result += cmSystemTools::MakeCidentifier(filePath);
......
......@@ -1268,7 +1268,7 @@ bool cmInstallCommand::HandleDirectoryMode(
bool cmInstallCommand::HandleExportAndroidMKMode(
std::vector<std::string> const& args)
{
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
// This is the EXPORT mode.
cmInstallCommandArguments ica(this->DefaultComponentName);
......
......@@ -7,7 +7,7 @@
#include <sstream>
#include <utility>
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
# include "cmExportInstallAndroidMKGenerator.h"
#endif
#include "cmExportInstallFileGenerator.h"
......@@ -31,7 +31,7 @@ cmInstallExportGenerator::cmInstallExportGenerator(
, LocalGenerator(nullptr)
{
if (android) {
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
this->EFGen = new cmExportInstallAndroidMKGenerator(this);
#endif
} else {
......
......@@ -29,7 +29,7 @@
#include "cmake.h"
#include "cmsys/RegularExpression.hxx"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
# define CM_LG_ENCODE_OBJECT_NAMES
# include "cmCryptoHash.h"
#endif
......
......@@ -461,7 +461,7 @@ private:
void ComputeObjectMaxPath();
};
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
bool cmLocalGeneratorCheckObjectName(std::string& objName,
std::string::size_type dir_len,
std::string::size_type max_total_len);
......
......@@ -40,7 +40,7 @@
// Include dependency scanners for supported languages. Only the
// C/C++ scanner is needed for bootstrapping CMake.
#include "cmDependsC.h"
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
# include "cmDependsFortran.h"
# include "cmDependsJava.h"
#endif
......@@ -1477,7 +1477,7 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies(
// TODO: Handle RC (resource files) dependencies correctly.
scanner = cm::make_unique<cmDependsC>(this, targetDir, lang, &validDeps);
}
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
else if (lang == "Fortran") {
ruleFileStream << "# Note that incremental build could trigger "
<< "a call to cmake_copy_f90_mod on each re-build\n";
......
......@@ -47,7 +47,7 @@
#include "cmConfigure.h" // IWYU pragma: keep
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
# include "cmVariableWatch.h"
#endif
......@@ -97,7 +97,7 @@ cmMakefile::cmMakefile(cmGlobalGenerator* globalGenerator,
// cmListFileCache in the top level if necessary.
this->CheckCMP0000 = false;
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
this->AddSourceGroup("", "^.*$");
this->AddSourceGroup("Source Files", CM_SOURCE_REGEX);
this->AddSourceGroup("Header Files", CM_HEADER_REGEX);
......@@ -1425,7 +1425,7 @@ void cmMakefile::PushFunctionScope(std::string const& fileName,
this->PushLoopBlockBarrier();
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
this->GetGlobalGenerator()->GetFileLockPool().PushFunctionScope();
#endif
......@@ -1442,7 +1442,7 @@ void cmMakefile::PopFunctionScope(bool reportError)
this->PopFunctionBlockerBarrier(reportError);
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
this->GetGlobalGenerator()->GetFileLockPool().PopFunctionScope();
#endif
......@@ -1497,7 +1497,7 @@ public:
this->Snapshot = this->GG->GetCMakeInstance()->GetCurrentSnapshot();
this->GG->GetCMakeInstance()->SetCurrentSnapshot(this->Snapshot);
this->GG->SetCurrentMakefile(mf);
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
this->GG->GetFileLockPool().PushFileScope();
#endif
}
......@@ -1506,7 +1506,7 @@ public:
{
this->Makefile->PopFunctionBlockerBarrier(this->ReportError);
this->Makefile->PopSnapshot(this->ReportError);
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
this->GG->GetFileLockPool().PopFileScope();
#endif
this->GG->SetCurrentMakefile(this->CurrentMakefile);
......@@ -1800,7 +1800,7 @@ void cmMakefile::AddDefinition(const std::string& name, cm::string_view value)
}
this->StateSnapshot.SetDefinition(name, value);
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
cmVariableWatch* vv = this->GetVariableWatch();
if (vv) {
vv->VariableAccessed(name, cmVariableWatch::VARIABLE_MODIFIED_ACCESS,
......@@ -1921,7 +1921,7 @@ void cmMakefile::RemoveDefinition(const std::string& name)
this->LogUnused("unsetting", name);
}
this->StateSnapshot.RemoveDefinition(name);
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
cmVariableWatch* vv = this->GetVariableWatch();
if (vv) {
vv->VariableAccessed(name, cmVariableWatch::VARIABLE_REMOVED_ACCESS,
......@@ -2079,7 +2079,7 @@ cmSourceFile* cmMakefile::GetSourceFileWithOutput(
return nullptr;
}
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
cmSourceGroup* cmMakefile::GetSourceGroup(
const std::vector<std::string>& name) const
{
......@@ -2460,7 +2460,7 @@ bool cmMakefile::IsDefinitionSet(const std::string& name) const
if (!def) {
def = this->GetState()->GetInitializedCacheValue(name);
}
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
if (cmVariableWatch* vv = this->GetVariableWatch()) {
if (!def) {
vv->VariableAccessed(
......@@ -2477,7 +2477,7 @@ const std::string* cmMakefile::GetDef(const std::string& name) const
if (!def) {
def = this->GetState()->GetInitializedCacheValue(name);
}
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
cmVariableWatch* vv = this->GetVariableWatch();
if (vv && !this->SuppressSideEffects) {
bool const watch_function_executed =
......@@ -3327,7 +3327,7 @@ void cmMakefile::AddTargetObject(std::string const& tgtName,
cmSourceFile* sf = this->GetOrCreateSource(objFile, true);
sf->SetObjectLibrary(tgtName);
sf->SetProperty("EXTERNAL_OBJECT", "1");
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
this->SourceGroups[this->ObjectLibrariesSourceGroupIndex].AddGroupFile(
sf->GetFullPath());
#endif
......@@ -3509,7 +3509,7 @@ cmGlobalGenerator* cmMakefile::GetGlobalGenerator() const
return this->GlobalGenerator;
}
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
cmVariableWatch* cmMakefile::GetVariableWatch() const
{
if (this->GetCMakeInstance() &&
......@@ -3931,14 +3931,14 @@ void cmMakefile::PushScope()
this->GetState()->CreateVariableScopeSnapshot(this->StateSnapshot);
this->PushLoopBlockBarrier();
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
this->GetGlobalGenerator()->GetFileLockPool().PushFunctionScope();
#endif
}
void cmMakefile::PopScope()
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
this->GetGlobalGenerator()->GetFileLockPool().PopFunctionScope();
#endif
......@@ -3962,7 +3962,7 @@ void cmMakefile::RaiseScope(const std::string& var, const char* varDef)
return;
}
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
cmVariableWatch* vv = this->GetVariableWatch();
if (vv) {
vv->VariableAccessed(var, cmVariableWatch::VARIABLE_MODIFIED_ACCESS,
......
......@@ -30,7 +30,7 @@
#include "cmStringAlgorithms.h"
#include "cmTarget.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
# include "cmSourceGroup.h"
#endif
......@@ -503,7 +503,7 @@ public:
*/
bool CanIWriteThisFile(std::string const& fileName) const;
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
/**
* Get the vector source groups.
*/
......@@ -649,7 +649,7 @@ public:
* Get the variable watch. This is used to determine when certain variables
* are accessed.
*/
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
cmVariableWatch* GetVariableWatch() const;
#endif
......@@ -945,7 +945,7 @@ protected:
// Track the value of the computed DEFINITIONS property.
std::string DefineFlagsOrig;
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
std::vector<cmSourceGroup> SourceGroups;
size_t ObjectLibrariesSourceGroupIndex;
#endif
......
......@@ -83,7 +83,7 @@ void cmMakefileExecutableTargetGenerator::WriteRuleFiles()
void cmMakefileExecutableTargetGenerator::WriteDeviceExecutableRule(
bool relink)
{
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
const bool requiresDeviceLinking = requireDeviceLinking(
*this->GeneratorTarget, *this->LocalGenerator, this->ConfigName);
if (!requiresDeviceLinking) {
......
......@@ -236,7 +236,7 @@ void cmMakefileLibraryTargetGenerator::WriteFrameworkRules(bool relink)
void cmMakefileLibraryTargetGenerator::WriteDeviceLibraryRules(
const std::string& linkRuleVar, bool relink)
{
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
// TODO: Merge the methods that call this method to avoid
// code duplication.
std::vector<std::string> commands;
......
......@@ -6,7 +6,7 @@
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
# include "cmsys/SystemInformation.hxx"
#endif
......@@ -106,7 +106,7 @@ void displayMessage(MessageType t, std::ostringstream& msg)
// Add a terminating blank line.
msg << "\n";
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
// Add a C++ stack trace to internal errors.
if (t == MessageType::INTERNAL_ERROR) {
std::string stack = cmsys::SystemInformation::GetProgramStack(0, 0);
......
......@@ -13,7 +13,7 @@
#if defined(_WIN32)
# include "cmGlobalGenerator.h"
# ifdef CMAKE_BUILD_WITH_CMAKE
# ifndef CMAKE_BOOTSTRAP
# include "cmGlobalVisualStudioVersionedGenerator.h"
# endif
# include "cmVSSetupHelper.h"
......@@ -36,7 +36,7 @@ static void AddVisualStudioPath(std::vector<std::string>& paths,
// If generating for the VS IDE, use the same instance.
std::string vsloc;
bool found = false;
# ifdef CMAKE_BUILD_WITH_CMAKE
# ifndef CMAKE_BOOTSTRAP
if (gg->GetName().find(prefix) == 0) {
cmGlobalVisualStudioVersionedGenerator* vsgen =
static_cast<cmGlobalVisualStudioVersionedGenerator*>(gg);
......
......@@ -113,7 +113,7 @@ bool cmStringCommand::InitialPass(std::vector<std::string> const& args,
bool cmStringCommand::HandleHashCommand(std::vector<std::string> const& args)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
if (args.size() != 3) {
std::ostringstream e;
e << args[0] << " requires an output variable and an input string";
......@@ -878,7 +878,7 @@ bool cmStringCommand::HandleTimestampCommand(
bool cmStringCommand::HandleUuidCommand(std::vector<std::string> const& args)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
unsigned int argsIndex = 1;
if (args.size() < 2) {
......
......@@ -9,7 +9,7 @@
#include "cmStringAlgorithms.h"
#include "cm_uv.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
# include "cmArchiveWrite.h"
# include "cmLocale.h"
# include "cm_libarchive.h"
......@@ -21,7 +21,7 @@
# endif
#endif
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
# include "cmCryptoHash.h"
#endif
......@@ -93,7 +93,7 @@ extern char** environ;
# endif
#endif
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
static std::string cm_archive_entry_pathname(struct archive_entry* entry)
{
# if cmsys_STL_HAS_WSTRING
......@@ -944,7 +944,7 @@ bool cmSystemTools::RenameFile(const std::string& oldname,
std::string cmSystemTools::ComputeFileHash(const std::string& source,
cmCryptoHash::Algo algo)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
cmCryptoHash hash(algo);
return hash.HashFile(source);
#else
......@@ -957,7 +957,7 @@ std::string cmSystemTools::ComputeFileHash(const std::string& source,
std::string cmSystemTools::ComputeStringMD5(const std::string& input)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
cmCryptoHash md5(cmCryptoHash::AlgoMD5);
return md5.HashString(input);
#else
......@@ -973,7 +973,7 @@ std::string cmSystemTools::ComputeCertificateThumbprint(
{
std::string thumbprint;
#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(_WIN32)
#if !defined(CMAKE_BOOTSTRAP) && defined(_WIN32)
BYTE* certData = NULL;
CRYPT_INTEGER_BLOB cryptBlob;
HCERTSTORE certStore = NULL;
......@@ -1331,7 +1331,7 @@ std::string cmSystemTools::ForceToRelativePath(std::string const& local_path,
return relative;
}
#ifdef CMAKE_BUILD_WITH_CMAKE
#ifndef CMAKE_BOOTSTRAP
bool cmSystemTools::UnsetEnv(const char* value)
{
# if !defined(HAVE_UNSETENV)
......@@ -1396,7 +1396,7 @@ void cmSystemTools::EnableVSConsoleOutput()
// output and allow it to be captured on the fly.
cmSystemTools::PutEnv("vsconsoleoutput=1");
# ifdef CMAKE_BUILD_WITH_CMAKE
# ifndef CMAKE_BOOTSTRAP
// VS sets an environment variable to tell MS tools like "cl" to report
// output through a backdoor pipe instead of stdout/stderr. Unset the
// environment variable to close this backdoor for any path of process
......@@ -1418,7 +1418,7 @@ bool cmSystemTools::CreateTar(const std::string& outFileName,
std::string const& mtime,
std::string const& format)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
cmsys::ofstream fout(outFileName.c_str(), std::ios::out | std::ios::binary);
if (!fout) {
......@@ -1472,7 +1472,7 @@ bool cmSystemTools::CreateTar(const std::string& outFileName,
#endif
}
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
namespace {
# define BSDTAR_FILESIZE_PRINTF "%lu"
# define BSDTAR_FILESIZE_TYPE unsigned long
......@@ -1768,7 +1768,7 @@ bool cmSystemTools::ExtractTar(const std::string& outFileName,
const std::vector<std::string>& files,
bool verbose)
{
#if defined(CMAKE_BUILD_WITH_CMAKE)
#if !defined(CMAKE_BOOTSTRAP)
return extract_tar(outFileName, files, verbose, true);
#else
(void)outFileName;
......@@ -1782,7 +1782,7 @@ bool cmSystemTools::ListTar(const std::string& outFileName,
const std::vector<std::string>& files,
bool verbose)