mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-13 01:29:02 -05:00
Fix build warnings for unused functions
This commit addresses two sources of build errors when using the warning flag -Werror=unused-function for GCC in the default compiler flags. The affected functions are not used when building in bootstrap mode and therefore should be ifdefed out. No functional changes.
This commit is contained in:
@@ -138,6 +138,7 @@ using JsonValueMapType = std::unordered_map<std::string, Json::Value>;
|
||||
static bool cmakeCheckStampFile(const std::string& stampName);
|
||||
static bool cmakeCheckStampList(const std::string& stampList);
|
||||
|
||||
#ifndef CMAKE_BOOTSTRAP
|
||||
static void cmWarnUnusedCliWarning(const std::string& variable, int /*unused*/,
|
||||
void* ctx, const char* /*unused*/,
|
||||
const cmMakefile* /*unused*/)
|
||||
@@ -145,6 +146,7 @@ static void cmWarnUnusedCliWarning(const std::string& variable, int /*unused*/,
|
||||
cmake* cm = reinterpret_cast<cmake*>(ctx);
|
||||
cm->MarkCliAsUsed(variable);
|
||||
}
|
||||
#endif
|
||||
|
||||
cmake::cmake(Role role, cmState::Mode mode)
|
||||
: FileTimeCache(cm::make_unique<cmFileTimeCache>())
|
||||
|
||||
@@ -318,6 +318,7 @@ int do_cmake(int ac, char const* const* av)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef CMAKE_BOOTSTRAP
|
||||
int extract_job_number(int& index, char const* current, char const* next,
|
||||
int len_of_flag)
|
||||
{
|
||||
@@ -347,6 +348,7 @@ int extract_job_number(int& index, char const* current, char const* next,
|
||||
}
|
||||
return jobs;
|
||||
}
|
||||
#endif
|
||||
|
||||
int do_build(int ac, char const* const* av)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user