[Cmake-commits] CMake branch, master, updated. v3.8.2-1396-gc6ea3f0
Kitware Robot
kwrobot at kitware.com
Mon Jun 5 09:45:08 EDT 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via c6ea3f01c3e78145b8fd3dd534d8803d8f7e7bd7 (commit)
via 8a68a2ceb355621da21983c2571ead15d2b98dea (commit)
via 00639f2d5d41bb44f6ead5165b249bcd9e2b95b3 (commit)
via 5875140c57bc3160970d640070ae1e9ab19111db (commit)
via b1ec5deaf15be459658b8fb0392e4d4a4ec1a0dd (commit)
via 8d7b3ef5d42c07dffe1f84af14b0055d288e4376 (commit)
via 0068224fdd7569f02dffe9fd8de2e6ce0c7abc28 (commit)
via 913736f17dfb2e51423861c9a74be3a9be3211c8 (commit)
via f59d729c7cb03babafac0cee792b9a3127e51d4d (commit)
from 1fa165359fd7ed3989b1a8350726038a55deab5c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6ea3f01c3e78145b8fd3dd534d8803d8f7e7bd7
commit c6ea3f01c3e78145b8fd3dd534d8803d8f7e7bd7
Merge: 8a68a2c b1ec5de
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jun 5 13:44:21 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jun 5 09:44:24 2017 -0400
Merge topic 'lint-function-args'
b1ec5dea Pass large types by const&, small types by value
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !927
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8a68a2ceb355621da21983c2571ead15d2b98dea
commit 8a68a2ceb355621da21983c2571ead15d2b98dea
Merge: 00639f2 8d7b3ef
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jun 5 13:43:47 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jun 5 09:43:51 2017 -0400
Merge topic 'cm_fallthrough'
8d7b3ef5 Provide and use CM_FALLTHROUGH
0068224f C++ feature checks: check output for '[Ww]arning'
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !924
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=00639f2d5d41bb44f6ead5165b249bcd9e2b95b3
commit 00639f2d5d41bb44f6ead5165b249bcd9e2b95b3
Merge: 5875140 913736f
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jun 5 13:41:05 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jun 5 09:42:36 2017 -0400
Merge topic 'test-GNUInstallDirs-FreeBSD'
913736f1 Tests: Fix RunCMake.GNUInstallDirs on BSD platforms
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !921
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5875140c57bc3160970d640070ae1e9ab19111db
commit 5875140c57bc3160970d640070ae1e9ab19111db
Merge: 1fa1653 f59d729
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jun 5 13:40:58 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jun 5 09:41:53 2017 -0400
Merge topic 'display-ctest-disabled'
f59d729c ctest: Display disabled status when ctest -N is called
Acked-by: Kitware Robot <kwrobot at kitware.com>
Reviewed-by: Craig Scott <craig.scott at crascit.com>
Merge-request: !923
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b1ec5deaf15be459658b8fb0392e4d4a4ec1a0dd
commit b1ec5deaf15be459658b8fb0392e4d4a4ec1a0dd
Author: Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Fri Jun 2 21:01:01 2017 +0200
Commit: Daniel Pfeifer <daniel at pfeifer-mail.de>
CommitDate: Sun Jun 4 00:48:21 2017 +0200
Pass large types by const&, small types by value
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 224cf47..0b025ab 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -205,8 +205,7 @@ bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey,
return false;
}
-void cmCacheManager::WritePropertyEntries(std::ostream& os,
- CacheIterator const& i)
+void cmCacheManager::WritePropertyEntries(std::ostream& os, CacheIterator i)
{
for (const char** p = this->PersistentProperties; *p; ++p) {
if (const char* value = i.GetProperty(*p)) {
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h
index a72d6cb..c464311 100644
--- a/Source/cmCacheManager.h
+++ b/Source/cmCacheManager.h
@@ -228,7 +228,7 @@ private:
static const char* PersistentProperties[];
bool ReadPropertyEntry(std::string const& key, CacheEntry& e);
- void WritePropertyEntries(std::ostream& os, CacheIterator const& i);
+ void WritePropertyEntries(std::ostream& os, CacheIterator i);
CacheEntryMap Cache;
// Only cmake and cmState should be able to add cache values
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx
index 3e2cf18..9c516ee 100644
--- a/Source/cmComputeLinkDepends.cxx
+++ b/Source/cmComputeLinkDepends.cxx
@@ -333,7 +333,7 @@ int cmComputeLinkDepends::AddLinkEntry(cmLinkItem const& item)
return index;
}
-void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe)
+void cmComputeLinkDepends::FollowLinkEntry(BFSEntry qe)
{
// Get this entry representation.
int depender_index = qe.Index;
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h
index 195b544..84ee916 100644
--- a/Source/cmComputeLinkDepends.h
+++ b/Source/cmComputeLinkDepends.h
@@ -93,7 +93,7 @@ private:
const char* LibDepends;
};
std::queue<BFSEntry> BFSQueue;
- void FollowLinkEntry(BFSEntry const&);
+ void FollowLinkEntry(BFSEntry qe);
// Shared libraries that are included only because they are
// dependencies of other shared libraries, not because they are part
diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx
index f530ba7..7fbe75c 100644
--- a/Source/cmDynamicLoader.cxx
+++ b/Source/cmDynamicLoader.cxx
@@ -10,8 +10,7 @@ class cmDynamicLoaderCache
{
public:
~cmDynamicLoaderCache();
- void CacheFile(const char* path,
- const cmsys::DynamicLoader::LibraryHandle& /*p*/);
+ void CacheFile(const char* path, cmsys::DynamicLoader::LibraryHandle /*p*/);
bool GetCacheFile(const char* path,
cmsys::DynamicLoader::LibraryHandle& /*p*/);
bool FlushCache(const char* path);
@@ -29,8 +28,8 @@ cmDynamicLoaderCache::~cmDynamicLoaderCache()
{
}
-void cmDynamicLoaderCache::CacheFile(
- const char* path, const cmsys::DynamicLoader::LibraryHandle& p)
+void cmDynamicLoaderCache::CacheFile(const char* path,
+ cmsys::DynamicLoader::LibraryHandle p)
{
cmsys::DynamicLoader::LibraryHandle h;
if (this->GetCacheFile(path, h)) {
diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
index d23abec..fc97bf3 100644
--- a/Source/cmELF.cxx
+++ b/Source/cmELF.cxx
@@ -53,17 +53,17 @@ template <size_t s>
struct cmELFByteSwapSize
{
};
-void cmELFByteSwap(char* /*unused*/, cmELFByteSwapSize<1> const& /*unused*/)
+void cmELFByteSwap(char* /*unused*/, cmELFByteSwapSize<1> /*unused*/)
{
}
-void cmELFByteSwap(char* data, cmELFByteSwapSize<2> const& /*unused*/)
+void cmELFByteSwap(char* data, cmELFByteSwapSize<2> /*unused*/)
{
char one_byte;
one_byte = data[0];
data[0] = data[1];
data[1] = one_byte;
}
-void cmELFByteSwap(char* data, cmELFByteSwapSize<4> const& /*unused*/)
+void cmELFByteSwap(char* data, cmELFByteSwapSize<4> /*unused*/)
{
char one_byte;
one_byte = data[0];
@@ -73,7 +73,7 @@ void cmELFByteSwap(char* data, cmELFByteSwapSize<4> const& /*unused*/)
data[1] = data[2];
data[2] = one_byte;
}
-void cmELFByteSwap(char* data, cmELFByteSwapSize<8> const& /*unused*/)
+void cmELFByteSwap(char* data, cmELFByteSwapSize<8> /*unused*/)
{
char one_byte;
one_byte = data[0];
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 32a539c..77b0d13 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -1121,9 +1121,9 @@ protected:
bool InstallSymlink(const char* fromFile, const char* toFile);
bool InstallFile(const char* fromFile, const char* toFile,
- MatchProperties const& match_properties);
+ MatchProperties match_properties);
bool InstallDirectory(const char* source, const char* destination,
- MatchProperties const& match_properties);
+ MatchProperties match_properties);
virtual bool Install(const char* fromFile, const char* toFile);
virtual std::string const& ToName(std::string const& fromName)
{
@@ -1542,7 +1542,7 @@ bool cmFileCopier::InstallSymlink(const char* fromFile, const char* toFile)
}
bool cmFileCopier::InstallFile(const char* fromFile, const char* toFile,
- MatchProperties const& match_properties)
+ MatchProperties match_properties)
{
// Determine whether we will copy the file.
bool copy = true;
@@ -1596,7 +1596,7 @@ bool cmFileCopier::InstallFile(const char* fromFile, const char* toFile,
bool cmFileCopier::InstallDirectory(const char* source,
const char* destination,
- MatchProperties const& match_properties)
+ MatchProperties match_properties)
{
// Inform the user about this directory installation.
this->ReportCopy(destination, TypeDir,
diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx
index ea031cf..9327c18 100644
--- a/Source/cmFindProgramCommand.cxx
+++ b/Source/cmFindProgramCommand.cxx
@@ -212,7 +212,8 @@ std::string cmFindProgramCommand::FindAppBundle()
return "";
}
-std::string cmFindProgramCommand::GetBundleExecutable(std::string bundlePath)
+std::string cmFindProgramCommand::GetBundleExecutable(
+ std::string const& bundlePath)
{
std::string executable;
(void)bundlePath;
diff --git a/Source/cmFindProgramCommand.h b/Source/cmFindProgramCommand.h
index a0d6af9..b0cd420 100644
--- a/Source/cmFindProgramCommand.h
+++ b/Source/cmFindProgramCommand.h
@@ -43,7 +43,7 @@ private:
std::string FindNormalProgramDirsPerName();
std::string FindNormalProgramNamesPerDir();
std::string FindAppBundle();
- std::string GetBundleExecutable(std::string bundlePath);
+ std::string GetBundleExecutable(std::string const& bundlePath);
};
#endif
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 9a33bec..24decea 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -76,7 +76,7 @@ public:
cmLinkImplItem cmGeneratorTarget::TargetPropertyEntry::NoLinkImplItem;
void CreatePropertyGeneratorExpressions(
- cmStringRange const& entries, cmBacktraceRange const& backtraces,
+ cmStringRange entries, cmBacktraceRange backtraces,
std::vector<cmGeneratorTarget::TargetPropertyEntry*>& items,
bool evaluateForBuildsystem = false)
{
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 67e272d..b32f4e4 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1482,13 +1482,13 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets()
}
cmLinkLineComputer* cmGlobalGenerator::CreateLinkLineComputer(
- cmOutputConverter* outputConverter, cmStateDirectory stateDir) const
+ cmOutputConverter* outputConverter, cmStateDirectory const& stateDir) const
{
return new cmLinkLineComputer(outputConverter, stateDir);
}
cmLinkLineComputer* cmGlobalGenerator::CreateMSVC60LinkLineComputer(
- cmOutputConverter* outputConverter, cmStateDirectory stateDir) const
+ cmOutputConverter* outputConverter, cmStateDirectory const& stateDir) const
{
return new cmMSVC60LinkLineComputer(outputConverter, stateDir);
}
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index cc7ffed..871178b 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -105,10 +105,12 @@ public:
virtual void Generate();
virtual cmLinkLineComputer* CreateLinkLineComputer(
- cmOutputConverter* outputConverter, cmStateDirectory stateDir) const;
+ cmOutputConverter* outputConverter,
+ cmStateDirectory const& stateDir) const;
cmLinkLineComputer* CreateMSVC60LinkLineComputer(
- cmOutputConverter* outputConverter, cmStateDirectory stateDir) const;
+ cmOutputConverter* outputConverter,
+ cmStateDirectory const& stateDir) const;
/**
* Set/Get and Clear the enabled languages.
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index bb0b83a..2eef9e4 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -77,7 +77,8 @@ void cmGlobalNinjaGenerator::WriteComment(std::ostream& os,
}
cmLinkLineComputer* cmGlobalNinjaGenerator::CreateLinkLineComputer(
- cmOutputConverter* outputConverter, cmStateDirectory /* stateDir */) const
+ cmOutputConverter* outputConverter,
+ cmStateDirectory const& /* stateDir */) const
{
return new cmNinjaLinkLineComputer(
outputConverter,
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 41c5175..b0008f7 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -78,7 +78,7 @@ public:
cmLinkLineComputer* CreateLinkLineComputer(
cmOutputConverter* outputConverter,
- cmStateDirectory stateDir) const CM_OVERRIDE;
+ cmStateDirectory const& stateDir) const CM_OVERRIDE;
/**
* Write the given @a comment to the output stream @a os. It
diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx
index 120d1b3..13b588e 100644
--- a/Source/cmInstallGenerator.cxx
+++ b/Source/cmInstallGenerator.cxx
@@ -27,7 +27,7 @@ void cmInstallGenerator::AddInstallRule(
std::vector<std::string> const& files, bool optional /* = false */,
const char* permissions_file /* = 0 */,
const char* permissions_dir /* = 0 */, const char* rename /* = 0 */,
- const char* literal_args /* = 0 */, Indent const& indent)
+ const char* literal_args /* = 0 */, Indent indent)
{
// Use the FILE command to install the file.
std::string stype;
diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h
index de19f98..8f8701f 100644
--- a/Source/cmInstallGenerator.h
+++ b/Source/cmInstallGenerator.h
@@ -43,7 +43,7 @@ public:
std::vector<std::string> const& files, bool optional = false,
const char* permissions_file = CM_NULLPTR,
const char* permissions_dir = CM_NULLPTR, const char* rename = CM_NULLPTR,
- const char* literal_args = CM_NULLPTR, Indent const& indent = Indent());
+ const char* literal_args = CM_NULLPTR, Indent indent = Indent());
/** Get the install destination as it should appear in the
installation script. */
diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx
index e728632..c0f702e 100644
--- a/Source/cmLinkLineComputer.cxx
+++ b/Source/cmLinkLineComputer.cxx
@@ -13,7 +13,7 @@
#include "cmStateTypes.h"
cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter,
- cmStateDirectory stateDir)
+ cmStateDirectory const& stateDir)
: StateDir(stateDir)
, OutputConverter(outputConverter)
, ForResponse(false)
diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h
index 27b8adb..d33e8d1 100644
--- a/Source/cmLinkLineComputer.h
+++ b/Source/cmLinkLineComputer.h
@@ -20,7 +20,7 @@ class cmLinkLineComputer
public:
cmLinkLineComputer(cmOutputConverter* outputConverter,
- cmStateDirectory stateDir);
+ cmStateDirectory const& stateDir);
virtual ~cmLinkLineComputer();
void SetUseWatcomQuote(bool useWatcomQuote);
diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx
index bf30b39..942e9b9 100644
--- a/Source/cmLinkLineDeviceComputer.cxx
+++ b/Source/cmLinkLineDeviceComputer.cxx
@@ -10,13 +10,12 @@
#include "cmComputeLinkInformation.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalNinjaGenerator.h"
-#include "cmStateDirectory.h"
#include "cmStateTypes.h"
class cmOutputConverter;
cmLinkLineDeviceComputer::cmLinkLineDeviceComputer(
- cmOutputConverter* outputConverter, cmStateDirectory stateDir)
+ cmOutputConverter* outputConverter, cmStateDirectory const& stateDir)
: cmLinkLineComputer(outputConverter, stateDir)
{
}
@@ -89,7 +88,7 @@ std::string cmLinkLineDeviceComputer::GetLinkerLanguage(cmGeneratorTarget*,
}
cmNinjaLinkLineDeviceComputer::cmNinjaLinkLineDeviceComputer(
- cmOutputConverter* outputConverter, cmStateDirectory stateDir,
+ cmOutputConverter* outputConverter, cmStateDirectory const& stateDir,
cmGlobalNinjaGenerator const* gg)
: cmLinkLineDeviceComputer(outputConverter, stateDir)
, GG(gg)
diff --git a/Source/cmLinkLineDeviceComputer.h b/Source/cmLinkLineDeviceComputer.h
index e9e98ac..c3fac61 100644
--- a/Source/cmLinkLineDeviceComputer.h
+++ b/Source/cmLinkLineDeviceComputer.h
@@ -22,7 +22,7 @@ class cmLinkLineDeviceComputer : public cmLinkLineComputer
public:
cmLinkLineDeviceComputer(cmOutputConverter* outputConverter,
- cmStateDirectory stateDir);
+ cmStateDirectory const& stateDir);
~cmLinkLineDeviceComputer() CM_OVERRIDE;
std::string ComputeLinkLibraries(cmComputeLinkInformation& cli,
@@ -39,7 +39,7 @@ class cmNinjaLinkLineDeviceComputer : public cmLinkLineDeviceComputer
public:
cmNinjaLinkLineDeviceComputer(cmOutputConverter* outputConverter,
- cmStateDirectory stateDir,
+ cmStateDirectory const& stateDir,
cmGlobalNinjaGenerator const* gg);
std::string ConvertToLinkReference(std::string const& input) const
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 929b1cd..0c73cd7 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -307,7 +307,8 @@ struct cmListFileBacktrace::Entry : public cmListFileContext
unsigned int RefCount;
};
-cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot bottom, Entry* up,
+cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot const& bottom,
+ Entry* up,
cmListFileContext const& lfc)
: Bottom(bottom)
, Cur(new Entry(lfc, up))
@@ -316,7 +317,8 @@ cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot bottom, Entry* up,
this->Cur->Ref();
}
-cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot bottom, Entry* cur)
+cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot const& bottom,
+ Entry* cur)
: Bottom(bottom)
, Cur(cur)
{
@@ -332,7 +334,7 @@ cmListFileBacktrace::cmListFileBacktrace()
{
}
-cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot snapshot)
+cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot const& snapshot)
: Bottom(snapshot.GetCallStackBottom())
, Cur(CM_NULLPTR)
{
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index aa11ba7..349ddef 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -107,7 +107,7 @@ public:
// Construct an empty backtrace whose bottom sits in the directory
// indicated by the given valid snapshot.
- cmListFileBacktrace(cmStateSnapshot snapshot);
+ cmListFileBacktrace(cmStateSnapshot const& snapshot);
// Backtraces may be copied and assigned as values.
cmListFileBacktrace(cmListFileBacktrace const& r);
@@ -143,9 +143,9 @@ private:
cmStateSnapshot Bottom;
Entry* Cur;
- cmListFileBacktrace(cmStateSnapshot bottom, Entry* up,
+ cmListFileBacktrace(cmStateSnapshot const& bottom, Entry* up,
cmListFileContext const& lfc);
- cmListFileBacktrace(cmStateSnapshot bottom, Entry* cur);
+ cmListFileBacktrace(cmStateSnapshot const& bottom, Entry* cur);
};
struct cmListFile
diff --git a/Source/cmMSVC60LinkLineComputer.cxx b/Source/cmMSVC60LinkLineComputer.cxx
index b5e8511..5298d1a 100644
--- a/Source/cmMSVC60LinkLineComputer.cxx
+++ b/Source/cmMSVC60LinkLineComputer.cxx
@@ -3,8 +3,6 @@
#include "cmMSVC60LinkLineComputer.h"
-#include "cmStateDirectory.h"
-
#if defined(_WIN32) && !defined(__CYGWIN__)
#include "cmSystemTools.h"
#endif
@@ -12,7 +10,7 @@
class cmOutputConverter;
cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer(
- cmOutputConverter* outputConverter, cmStateDirectory stateDir)
+ cmOutputConverter* outputConverter, cmStateDirectory const& stateDir)
: cmLinkLineComputer(outputConverter, stateDir)
{
}
diff --git a/Source/cmMSVC60LinkLineComputer.h b/Source/cmMSVC60LinkLineComputer.h
index e494060..f2892d5 100644
--- a/Source/cmMSVC60LinkLineComputer.h
+++ b/Source/cmMSVC60LinkLineComputer.h
@@ -19,7 +19,7 @@ class cmMSVC60LinkLineComputer : public cmLinkLineComputer
public:
cmMSVC60LinkLineComputer(cmOutputConverter* outputConverter,
- cmStateDirectory stateDir);
+ cmStateDirectory const& stateDir);
std::string ConvertToLinkReference(std::string const& input) const
CM_OVERRIDE;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 51d8980..11814b0 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3463,7 +3463,7 @@ void cmMakefile::ConfigureString(const std::string& input, std::string& output,
int cmMakefile::ConfigureFile(const char* infile, const char* outfile,
bool copyonly, bool atOnly, bool escapeQuotes,
- const cmNewLineStyle& newLine)
+ cmNewLineStyle newLine)
{
int res = 1;
if (!this->CanIWriteThisFile(outfile)) {
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 6dc30ce..e65ba46 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -548,7 +548,7 @@ public:
*/
int ConfigureFile(const char* infile, const char* outfile, bool copyonly,
bool atOnly, bool escapeQuotes,
- const cmNewLineStyle& = cmNewLineStyle());
+ cmNewLineStyle = cmNewLineStyle());
#if defined(CMAKE_BUILD_WITH_CMAKE)
/**
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 1aeeb7d..a4511b6 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1255,7 +1255,7 @@ class cmMakefileTargetGeneratorObjectStrings
public:
cmMakefileTargetGeneratorObjectStrings(std::vector<std::string>& strings,
cmOutputConverter* outputConverter,
- cmStateDirectory stateDir,
+ cmStateDirectory const& stateDir,
std::string::size_type limit)
: Strings(strings)
, OutputConverter(outputConverter)
@@ -1574,7 +1574,7 @@ std::string cmMakefileTargetGenerator::CreateResponseFile(
}
cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer(
- cmOutputConverter* outputConverter, cmStateDirectory stateDir)
+ cmOutputConverter* outputConverter, cmStateDirectory const& stateDir)
{
if (this->Makefile->IsOn("MSVC60")) {
return this->GlobalGenerator->CreateMSVC60LinkLineComputer(outputConverter,
diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h
index 32b1fee..92c9f60 100644
--- a/Source/cmMakefileTargetGenerator.h
+++ b/Source/cmMakefileTargetGenerator.h
@@ -143,7 +143,7 @@ protected:
std::vector<std::string>& makefile_depends);
cmLinkLineComputer* CreateLinkLineComputer(
- cmOutputConverter* outputConverter, cmStateDirectory stateDir);
+ cmOutputConverter* outputConverter, cmStateDirectory const& stateDir);
/** Create a response file with the given set of options. Returns
the relative path from the target build working directory to the
diff --git a/Source/cmNinjaLinkLineComputer.cxx b/Source/cmNinjaLinkLineComputer.cxx
index 2546b55..7fbeeea 100644
--- a/Source/cmNinjaLinkLineComputer.cxx
+++ b/Source/cmNinjaLinkLineComputer.cxx
@@ -4,12 +4,11 @@
#include "cmNinjaLinkLineComputer.h"
#include "cmGlobalNinjaGenerator.h"
-#include "cmStateDirectory.h"
class cmOutputConverter;
cmNinjaLinkLineComputer::cmNinjaLinkLineComputer(
- cmOutputConverter* outputConverter, cmStateDirectory stateDir,
+ cmOutputConverter* outputConverter, cmStateDirectory const& stateDir,
cmGlobalNinjaGenerator const* gg)
: cmLinkLineComputer(outputConverter, stateDir)
, GG(gg)
diff --git a/Source/cmNinjaLinkLineComputer.h b/Source/cmNinjaLinkLineComputer.h
index e612e88..13f05a8 100644
--- a/Source/cmNinjaLinkLineComputer.h
+++ b/Source/cmNinjaLinkLineComputer.h
@@ -20,7 +20,7 @@ class cmNinjaLinkLineComputer : public cmLinkLineComputer
public:
cmNinjaLinkLineComputer(cmOutputConverter* outputConverter,
- cmStateDirectory stateDir,
+ cmStateDirectory const& stateDir,
cmGlobalNinjaGenerator const* gg);
std::string ConvertToLinkReference(std::string const& input) const
diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx
index d48eb53..333e313 100644
--- a/Source/cmOrderDirectories.cxx
+++ b/Source/cmOrderDirectories.cxx
@@ -424,7 +424,7 @@ struct cmOrderDirectoriesCompare
// The conflict pair is unique based on just the directory
// (first). The second element is only used for displaying
// information about why the entry is present.
- bool operator()(ConflictPair const& l, ConflictPair const& r)
+ bool operator()(ConflictPair l, ConflictPair r)
{
return l.first == r.first;
}
diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx
index d6864a6..14c986d 100644
--- a/Source/cmOutputConverter.cxx
+++ b/Source/cmOutputConverter.cxx
@@ -14,7 +14,7 @@
#include "cmStateDirectory.h"
#include "cmSystemTools.h"
-cmOutputConverter::cmOutputConverter(cmStateSnapshot snapshot)
+cmOutputConverter::cmOutputConverter(cmStateSnapshot const& snapshot)
: StateSnapshot(snapshot)
, LinkScriptShell(false)
{
@@ -81,7 +81,7 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b)
bool cmOutputConverter::ContainedInDirectory(std::string const& local_path,
std::string const& remote_path,
- cmStateDirectory directory)
+ cmStateDirectory const& directory)
{
const std::string relativePathTopBinary =
directory.GetRelativePathTopBinary();
diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h
index 12a1773..ae15055 100644
--- a/Source/cmOutputConverter.h
+++ b/Source/cmOutputConverter.h
@@ -15,7 +15,7 @@ class cmStateDirectory;
class cmOutputConverter
{
public:
- cmOutputConverter(cmStateSnapshot snapshot);
+ cmOutputConverter(cmStateSnapshot const& snapshot);
enum OutputFormat
{
@@ -94,7 +94,7 @@ public:
static bool ContainedInDirectory(std::string const& local_path,
std::string const& remote_path,
- cmStateDirectory directory);
+ cmStateDirectory const& directory);
/**
* Convert the given remote path to a relative path with respect to
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index ce9f470..92e47f7 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -633,7 +633,7 @@ cmStateSnapshot cmState::CreateBaseSnapshot()
}
cmStateSnapshot cmState::CreateBuildsystemDirectorySnapshot(
- cmStateSnapshot originSnapshot)
+ cmStateSnapshot const& originSnapshot)
{
assert(originSnapshot.IsValid());
cmStateDetail::PositionType pos =
@@ -667,7 +667,7 @@ cmStateSnapshot cmState::CreateBuildsystemDirectorySnapshot(
}
cmStateSnapshot cmState::CreateFunctionCallSnapshot(
- cmStateSnapshot originSnapshot, std::string const& fileName)
+ cmStateSnapshot const& originSnapshot, std::string const& fileName)
{
cmStateDetail::PositionType pos =
this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position);
@@ -686,7 +686,7 @@ cmStateSnapshot cmState::CreateFunctionCallSnapshot(
}
cmStateSnapshot cmState::CreateMacroCallSnapshot(
- cmStateSnapshot originSnapshot, std::string const& fileName)
+ cmStateSnapshot const& originSnapshot, std::string const& fileName)
{
cmStateDetail::PositionType pos =
this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position);
@@ -701,7 +701,7 @@ cmStateSnapshot cmState::CreateMacroCallSnapshot(
}
cmStateSnapshot cmState::CreateIncludeFileSnapshot(
- cmStateSnapshot originSnapshot, const std::string& fileName)
+ cmStateSnapshot const& originSnapshot, std::string const& fileName)
{
cmStateDetail::PositionType pos =
this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position);
@@ -716,7 +716,7 @@ cmStateSnapshot cmState::CreateIncludeFileSnapshot(
}
cmStateSnapshot cmState::CreateVariableScopeSnapshot(
- cmStateSnapshot originSnapshot)
+ cmStateSnapshot const& originSnapshot)
{
cmStateDetail::PositionType pos =
this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position);
@@ -734,7 +734,7 @@ cmStateSnapshot cmState::CreateVariableScopeSnapshot(
}
cmStateSnapshot cmState::CreateInlineListFileSnapshot(
- cmStateSnapshot originSnapshot, const std::string& fileName)
+ cmStateSnapshot const& originSnapshot, std::string const& fileName)
{
cmStateDetail::PositionType pos =
this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position);
@@ -748,7 +748,7 @@ cmStateSnapshot cmState::CreateInlineListFileSnapshot(
}
cmStateSnapshot cmState::CreatePolicyScopeSnapshot(
- cmStateSnapshot originSnapshot)
+ cmStateSnapshot const& originSnapshot)
{
cmStateDetail::PositionType pos =
this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position);
@@ -759,7 +759,7 @@ cmStateSnapshot cmState::CreatePolicyScopeSnapshot(
return cmStateSnapshot(this, pos);
}
-cmStateSnapshot cmState::Pop(cmStateSnapshot originSnapshot)
+cmStateSnapshot cmState::Pop(cmStateSnapshot const& originSnapshot)
{
cmStateDetail::PositionType pos = originSnapshot.Position;
cmStateDetail::PositionType prevPos = pos;
diff --git a/Source/cmState.h b/Source/cmState.h
index 1a5738f..e03ad89 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -36,18 +36,20 @@ public:
cmStateSnapshot CreateBaseSnapshot();
cmStateSnapshot CreateBuildsystemDirectorySnapshot(
- cmStateSnapshot originSnapshot);
- cmStateSnapshot CreateFunctionCallSnapshot(cmStateSnapshot originSnapshot,
- std::string const& fileName);
- cmStateSnapshot CreateMacroCallSnapshot(cmStateSnapshot originSnapshot,
- std::string const& fileName);
- cmStateSnapshot CreateIncludeFileSnapshot(cmStateSnapshot originSnapshot,
- std::string const& fileName);
- cmStateSnapshot CreateVariableScopeSnapshot(cmStateSnapshot originSnapshot);
- cmStateSnapshot CreateInlineListFileSnapshot(cmStateSnapshot originSnapshot,
- std::string const& fileName);
- cmStateSnapshot CreatePolicyScopeSnapshot(cmStateSnapshot originSnapshot);
- cmStateSnapshot Pop(cmStateSnapshot originSnapshot);
+ cmStateSnapshot const& originSnapshot);
+ cmStateSnapshot CreateFunctionCallSnapshot(
+ cmStateSnapshot const& originSnapshot, std::string const& fileName);
+ cmStateSnapshot CreateMacroCallSnapshot(
+ cmStateSnapshot const& originSnapshot, std::string const& fileName);
+ cmStateSnapshot CreateIncludeFileSnapshot(
+ cmStateSnapshot const& originSnapshot, std::string const& fileName);
+ cmStateSnapshot CreateVariableScopeSnapshot(
+ cmStateSnapshot const& originSnapshot);
+ cmStateSnapshot CreateInlineListFileSnapshot(
+ cmStateSnapshot const& originSnapshot, std::string const& fileName);
+ cmStateSnapshot CreatePolicyScopeSnapshot(
+ cmStateSnapshot const& originSnapshot);
+ cmStateSnapshot Pop(cmStateSnapshot const& originSnapshot);
static cmStateEnums::CacheEntryType StringToCacheEntryType(const char*);
static const char* CacheEntryTypeToString(cmStateEnums::CacheEntryType);
diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx
index d2c9d73..77413c7 100644
--- a/Source/cmStateSnapshot.cxx
+++ b/Source/cmStateSnapshot.cxx
@@ -125,7 +125,7 @@ cmStateSnapshot cmStateSnapshot::GetCallStackBottom() const
return cmStateSnapshot(this->State, pos);
}
-void cmStateSnapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak)
+void cmStateSnapshot::PushPolicy(cmPolicies::PolicyMap const& entry, bool weak)
{
cmStateDetail::PositionType pos = this->Position;
pos->Policies = this->State->PolicyStack.Push(
diff --git a/Source/cmStateSnapshot.h b/Source/cmStateSnapshot.h
index 2e82ef4..6293803 100644
--- a/Source/cmStateSnapshot.h
+++ b/Source/cmStateSnapshot.h
@@ -45,7 +45,7 @@ public:
void SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status);
cmPolicies::PolicyStatus GetPolicy(cmPolicies::PolicyID id) const;
bool HasDefinedPolicyCMP0011();
- void PushPolicy(cmPolicies::PolicyMap entry, bool weak);
+ void PushPolicy(cmPolicies::PolicyMap const& entry, bool weak);
bool PopPolicy();
bool CanPopPolicyScope();
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d7b3ef5d42c07dffe1f84af14b0055d288e4376
commit 8d7b3ef5d42c07dffe1f84af14b0055d288e4376
Author: Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Fri Jun 2 20:32:58 2017 +0200
Commit: Daniel Pfeifer <daniel at pfeifer-mail.de>
CommitDate: Sat Jun 3 08:38:51 2017 +0200
Provide and use CM_FALLTHROUGH
diff --git a/Source/Checks/cm_cxx_attribute_fallthrough.cxx b/Source/Checks/cm_cxx_attribute_fallthrough.cxx
new file mode 100644
index 0000000..df43625
--- /dev/null
+++ b/Source/Checks/cm_cxx_attribute_fallthrough.cxx
@@ -0,0 +1,11 @@
+int main(int argc, char* argv[])
+{
+ int i = 3;
+ switch (argc) {
+ case 1:
+ i = 0;
+ __attribute__((fallthrough));
+ default:
+ return i;
+ }
+}
diff --git a/Source/Checks/cm_cxx_fallthrough.cxx b/Source/Checks/cm_cxx_fallthrough.cxx
new file mode 100644
index 0000000..7b35a5f
--- /dev/null
+++ b/Source/Checks/cm_cxx_fallthrough.cxx
@@ -0,0 +1,11 @@
+int main(int argc, char* argv[])
+{
+ int i = 3;
+ switch (argc) {
+ case 1:
+ i = 0;
+ [[fallthrough]];
+ default:
+ return i;
+ }
+}
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index 76c823c..c3835c3 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -38,6 +38,13 @@ endfunction()
cm_check_cxx_feature(auto_ptr)
cm_check_cxx_feature(eq_delete)
+cm_check_cxx_feature(fallthrough)
+if(NOT CMake_HAVE_CXX_FALLTHROUGH)
+ cm_check_cxx_feature(gnu_fallthrough)
+ if(NOT CMake_HAVE_CXX_GNU_FALLTHROUGH)
+ cm_check_cxx_feature(attribute_fallthrough)
+ endif()
+endif()
cm_check_cxx_feature(make_unique)
if(CMake_HAVE_CXX_MAKE_UNIQUE)
set(CMake_HAVE_CXX_UNIQUE_PTR 1)
diff --git a/Source/Checks/cm_cxx_gnu_fallthrough.cxx b/Source/Checks/cm_cxx_gnu_fallthrough.cxx
new file mode 100644
index 0000000..6021094
--- /dev/null
+++ b/Source/Checks/cm_cxx_gnu_fallthrough.cxx
@@ -0,0 +1,11 @@
+int main(int argc, char* argv[])
+{
+ int i = 3;
+ switch (argc) {
+ case 1:
+ i = 0;
+ [[gnu::fallthrough]];
+ default:
+ return i;
+ }
+}
diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx
index bcfbfbe..2bacf73 100644
--- a/Source/cmConditionEvaluator.cxx
+++ b/Source/cmConditionEvaluator.cxx
@@ -285,12 +285,12 @@ bool cmConditionEvaluator::GetBooleanValueWithAutoDereference(
bool oldResult = this->GetBooleanValueOld(newArg, oneArg);
if (newResult != oldResult) {
switch (this->Policy12Status) {
- case cmPolicies::WARN: {
+ case cmPolicies::WARN:
errorString = "An argument named \"" + newArg.GetValue() +
"\" appears in a conditional statement. " +
cmPolicies::GetPolicyWarning(cmPolicies::CMP0012);
status = cmake::AUTHOR_WARNING;
- }
+ CM_FALLTHROUGH;
case cmPolicies::OLD:
return oldResult;
case cmPolicies::REQUIRED_IF_USED:
diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in
index 970fde5..524fdf8 100644
--- a/Source/cmConfigure.cmake.h.in
+++ b/Source/cmConfigure.cmake.h.in
@@ -22,6 +22,9 @@
#cmakedefine CMAKE_USE_LIBUV
#cmakedefine CMake_HAVE_CXX_AUTO_PTR
#cmakedefine CMake_HAVE_CXX_EQ_DELETE
+#cmakedefine CMake_HAVE_CXX_FALLTHROUGH
+#cmakedefine CMake_HAVE_CXX_GNU_FALLTHROUGH
+#cmakedefine CMake_HAVE_CXX_ATTRIBUTE_FALLTHROUGH
#cmakedefine CMake_HAVE_CXX_MAKE_UNIQUE
#cmakedefine CMake_HAVE_CXX_NULLPTR
#cmakedefine CMake_HAVE_CXX_OVERRIDE
@@ -37,6 +40,16 @@
#define CM_EQ_DELETE
#endif
+#if defined(CMake_HAVE_CXX_FALLTHROUGH)
+#define CM_FALLTHROUGH [[fallthrough]]
+#elif defined(CMake_HAVE_CXX_GNU_FALLTHROUGH)
+#define CM_FALLTHROUGH [[gnu::fallthrough]]
+elif defined(CMake_HAVE_CXX_ATTRIBUTE_FALLTHROUGH)
+#define CM_FALLTHROUGH __attribute__((fallthrough))
+#else
+#define CM_FALLTHROUGH
+#endif
+
#ifdef CMake_HAVE_CXX_NULLPTR
#define CM_NULLPTR nullptr
#else
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index c461739..9a4abf3 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -219,6 +219,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
if (tgt->IsExecutableWithExports()) {
break;
}
+ CM_FALLTHROUGH;
default:
this->Makefile->IssueMessage(
cmake::FATAL_ERROR,
@@ -516,6 +517,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
this->Makefile->IssueMessage(
cmake::FATAL_ERROR,
cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0066));
+ CM_FALLTHROUGH;
case cmPolicies::NEW: {
// NEW behavior is to pass config-specific compiler flags.
static std::string const cfgDefault = "DEBUG";
@@ -553,6 +555,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
this->Makefile->IssueMessage(
cmake::FATAL_ERROR,
cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0056));
+ CM_FALLTHROUGH;
case cmPolicies::NEW:
// NEW behavior is to pass linker flags.
{
@@ -693,6 +696,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
case cmPolicies::WARN:
warnCMP0067 = this->Makefile->PolicyOptionalWarningEnabled(
"CMAKE_POLICY_WARNING_CMP0067");
+ CM_FALLTHROUGH;
case cmPolicies::OLD:
// OLD behavior is to not honor the language standard variables.
honorStandard = false;
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 565b84d..972f4b9 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -273,6 +273,7 @@ static bool checkInterfaceDirs(const std::string& prepro,
<< std::endl;
target->GetLocalGenerator()->IssueMessage(cmake::AUTHOR_WARNING,
s.str());
+ CM_FALLTHROUGH;
}
case cmPolicies::OLD:
shouldContinue = true;
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index adab061..b478f34 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -141,6 +141,7 @@ std::vector<std::string> cmExtraCodeLiteGenerator::CreateProjectsByTarget(
case cmStateEnums::STATIC_LIBRARY:
case cmStateEnums::MODULE_LIBRARY:
visualname = "lib" + visualname;
+ CM_FALLTHROUGH;
case cmStateEnums::EXECUTABLE:
xml->StartElement("Project");
xml->Attribute("Name", visualname);
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 32a539c..c37f5a2 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -1770,6 +1770,7 @@ protected:
if (this->Makefile->IsOn("CMAKE_INSTALL_SO_NO_EXE")) {
break;
}
+ CM_FALLTHROUGH;
case cmInstallType_EXECUTABLE:
case cmInstallType_PROGRAMS:
this->FilePermissions |= mode_owner_execute;
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 21ca347..65670e5 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -423,13 +423,17 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args,
&parsed_minor, &parsed_patch, &parsed_tweak);
switch (this->VersionCount) {
case 4:
- this->VersionTweak = parsed_tweak; // no break!
+ this->VersionTweak = parsed_tweak;
+ CM_FALLTHROUGH;
case 3:
- this->VersionPatch = parsed_patch; // no break!
+ this->VersionPatch = parsed_patch;
+ CM_FALLTHROUGH;
case 2:
- this->VersionMinor = parsed_minor; // no break!
+ this->VersionMinor = parsed_minor;
+ CM_FALLTHROUGH;
case 1:
- this->VersionMajor = parsed_major; // no break!
+ this->VersionMajor = parsed_major;
+ CM_FALLTHROUGH;
default:
break;
}
@@ -1542,13 +1546,17 @@ bool cmFindPackageCommand::CheckVersionFile(std::string const& version_file,
&parsed_minor, &parsed_patch, &parsed_tweak);
switch (this->VersionFoundCount) {
case 4:
- this->VersionFoundTweak = parsed_tweak; // no break!
+ this->VersionFoundTweak = parsed_tweak;
+ CM_FALLTHROUGH;
case 3:
- this->VersionFoundPatch = parsed_patch; // no break!
+ this->VersionFoundPatch = parsed_patch;
+ CM_FALLTHROUGH;
case 2:
- this->VersionFoundMinor = parsed_minor; // no break!
+ this->VersionFoundMinor = parsed_minor;
+ CM_FALLTHROUGH;
case 1:
- this->VersionFoundMajor = parsed_major; // no break!
+ this->VersionFoundMajor = parsed_major;
+ CM_FALLTHROUGH;
default:
break;
}
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index e065a74..a57d2a0 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -410,6 +410,7 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0044);
context->LG->GetCMakeInstance()->IssueMessage(
cmake::AUTHOR_WARNING, e.str(), context->Backtrace);
+ CM_FALLTHROUGH;
}
case cmPolicies::OLD:
return "1";
@@ -1459,6 +1460,7 @@ static const struct TargetPolicyNode : public cmGeneratorExpressionNode
lg->IssueMessage(
cmake::AUTHOR_WARNING,
cmPolicies::GetPolicyWarning(policyForString(policy)));
+ CM_FALLTHROUGH;
case cmPolicies::REQUIRED_IF_USED:
case cmPolicies::REQUIRED_ALWAYS:
case cmPolicies::OLD:
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 9a33bec..6a1e28c 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -2481,6 +2481,7 @@ static void processIncludeDirectories(
switch (tgt->GetPolicyStatusCMP0027()) {
case cmPolicies::WARN:
e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0027) << "\n";
+ CM_FALLTHROUGH;
case cmPolicies::OLD:
messageType = cmake::AUTHOR_WARNING;
break;
@@ -2837,6 +2838,7 @@ void cmGeneratorTarget::GetCompileDefinitions(
std::ostringstream e;
e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0043);
this->LocalGenerator->IssueMessage(cmake::AUTHOR_WARNING, e.str());
+ CM_FALLTHROUGH;
}
case cmPolicies::OLD: {
cmGeneratorExpression ge;
@@ -4132,11 +4134,14 @@ void cmGeneratorTarget::GetTargetVersion(bool soversion, int& major,
switch (sscanf(version, "%d.%d.%d", &parsed_major, &parsed_minor,
&parsed_patch)) {
case 3:
- patch = parsed_patch; // no break!
+ patch = parsed_patch;
+ CM_FALLTHROUGH;
case 2:
- minor = parsed_minor; // no break!
+ minor = parsed_minor;
+ CM_FALLTHROUGH;
case 1:
- major = parsed_major; // no break!
+ major = parsed_major;
+ CM_FALLTHROUGH;
default:
break;
}
diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx
index 6cb8e19..1005b15 100644
--- a/Source/cmGetDirectoryPropertyCommand.cxx
+++ b/Source/cmGetDirectoryPropertyCommand.cxx
@@ -78,6 +78,7 @@ bool cmGetDirectoryPropertyCommand::InitialPass(
this->Makefile->IssueMessage(
cmake::AUTHOR_WARNING,
cmPolicies::GetPolicyWarning(cmPolicies::CMP0059));
+ CM_FALLTHROUGH;
case cmPolicies::OLD:
this->StoreResult(variable, this->Makefile->GetDefineFlagsCMP0059());
return true;
diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx
index d2056d2..ddecdf6 100644
--- a/Source/cmGetPropertyCommand.cxx
+++ b/Source/cmGetPropertyCommand.cxx
@@ -232,6 +232,7 @@ bool cmGetPropertyCommand::HandleDirectoryMode()
case cmPolicies::WARN:
mf->IssueMessage(cmake::AUTHOR_WARNING,
cmPolicies::GetPolicyWarning(cmPolicies::CMP0059));
+ CM_FALLTHROUGH;
case cmPolicies::OLD:
return this->StoreResult(mf->GetDefineFlagsCMP0059());
case cmPolicies::NEW:
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 67e272d..608ac02 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -838,6 +838,7 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(
/* clang-format on */
mf->IssueMessage(cmake::AUTHOR_WARNING, w.str());
}
+ CM_FALLTHROUGH;
case cmPolicies::OLD:
// OLD behavior is to convert AppleClang to Clang.
mf->AddDefinition(compilerIdVar, "Clang");
@@ -867,6 +868,7 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(
/* clang-format on */
mf->IssueMessage(cmake::AUTHOR_WARNING, w.str());
}
+ CM_FALLTHROUGH;
case cmPolicies::OLD:
// OLD behavior is to convert QCC to GNU.
mf->AddDefinition(compilerIdVar, "GNU");
@@ -881,6 +883,7 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(
mf->IssueMessage(
cmake::FATAL_ERROR,
cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0047));
+ CM_FALLTHROUGH;
case cmPolicies::NEW:
// NEW behavior is to keep QCC.
break;
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index f499924..294fb17 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -1406,11 +1406,11 @@ bool cmInstallCommand::MakeFilesFullPath(
bool cmInstallCommand::CheckCMP0006(bool& failure)
{
switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0006)) {
- case cmPolicies::WARN: {
+ case cmPolicies::WARN:
this->Makefile->IssueMessage(
cmake::AUTHOR_WARNING,
cmPolicies::GetPolicyWarning(cmPolicies::CMP0006));
- }
+ CM_FALLTHROUGH;
case cmPolicies::OLD:
// OLD behavior is to allow compatibility
return true;
diff --git a/Source/cmLinkDirectoriesCommand.cxx b/Source/cmLinkDirectoriesCommand.cxx
index f863292..9b0c288 100644
--- a/Source/cmLinkDirectoriesCommand.cxx
+++ b/Source/cmLinkDirectoriesCommand.cxx
@@ -49,6 +49,7 @@ void cmLinkDirectoriesCommand::AddLinkDir(std::string const& dir)
case cmPolicies::REQUIRED_ALWAYS:
e << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0015);
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str());
+ CM_FALLTHROUGH;
case cmPolicies::NEW:
// NEW behavior converts
convertToAbsolute = true;
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 0418521..bc886b6 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -960,6 +960,7 @@ void cmLocalGenerator::GetTargetFlags(
break;
case cmStateEnums::MODULE_LIBRARY:
libraryLinkVariable = "CMAKE_MODULE_LINKER_FLAGS";
+ CM_FALLTHROUGH;
case cmStateEnums::SHARED_LIBRARY: {
linkFlags = this->Makefile->GetSafeDefinition(libraryLinkVariable);
linkFlags += " ";
@@ -1248,6 +1249,7 @@ std::string cmLocalGenerator::GetLinkLibsCMP0065(
/* clang-format on */
this->IssueMessage(cmake::AUTHOR_WARNING, w.str());
}
+ CM_FALLTHROUGH;
case cmPolicies::OLD:
// OLD behavior is to always add the flags
add_shlib_flags = true;
@@ -1257,6 +1259,7 @@ std::string cmLocalGenerator::GetLinkLibsCMP0065(
this->IssueMessage(
cmake::FATAL_ERROR,
cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0065));
+ CM_FALLTHROUGH;
case cmPolicies::NEW:
// NEW behavior is to only add the flags if ENABLE_EXPORTS is on
add_shlib_flags = tgt.GetPropertyAsBool("ENABLE_EXPORTS");
@@ -1747,7 +1750,7 @@ bool cmLocalGenerator::GetShouldUseOldFlags(bool shared,
<< cmPolicies::GetPolicyWarning(cmPolicies::CMP0018);
this->IssueMessage(cmake::AUTHOR_WARNING, e.str());
- // fall through to OLD behaviour
+ CM_FALLTHROUGH;
}
case cmPolicies::OLD:
return true;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 51d8980..756179b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -360,6 +360,7 @@ cmMakefile::IncludeScope::IncludeScope(cmMakefile* mf,
// We should never make this policy required, but we handle it
// here just in case.
this->CheckCMP0011 = true;
+ CM_FALLTHROUGH;
case cmPolicies::NEW:
// NEW behavior is to push a (strong) scope.
this->Makefile->PushPolicy();
@@ -1161,6 +1162,7 @@ bool cmMakefile::ParseDefineFlag(std::string const& def, bool remove)
case cmPolicies::WARN:
this->IssueMessage(cmake::AUTHOR_WARNING,
cmPolicies::GetPolicyWarning(cmPolicies::CMP0005));
+ CM_FALLTHROUGH;
case cmPolicies::OLD:
// OLD behavior is to not escape the value. We should not
// convert the definition to use the property.
@@ -1511,6 +1513,7 @@ void cmMakefile::ConfigureSubDirectory(cmMakefile* mf)
case cmPolicies::REQUIRED_IF_USED:
case cmPolicies::REQUIRED_ALWAYS:
e << "\n" << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0014);
+ CM_FALLTHROUGH;
case cmPolicies::NEW:
// NEW behavior prints the error.
this->IssueMessage(cmake::FATAL_ERROR, e.str());
@@ -2340,6 +2343,7 @@ const char* cmMakefile::ExpandVariablesInString(
newErrorstr, newResult, escapeQuotes, noEscapes, atOnly, filename,
line, removeEmpty, replaceAt);
this->SuppressWatches = false;
+ CM_FALLTHROUGH;
}
case cmPolicies::OLD:
mtype =
@@ -2496,6 +2500,7 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringOld(
switch (this->GetPolicyStatus(cmPolicies::CMP0010)) {
case cmPolicies::WARN:
error << "\n" << cmPolicies::GetPolicyWarning(cmPolicies::CMP0010);
+ CM_FALLTHROUGH;
case cmPolicies::OLD:
// OLD behavior is to just warn and continue.
mtype = cmake::AUTHOR_WARNING;
@@ -2649,6 +2654,7 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew(
}
break;
}
+ CM_FALLTHROUGH;
case '\\':
if (!noEscapes) {
const char* next = in + 1;
@@ -3386,7 +3392,7 @@ std::string cmMakefile::GetModulesFile(const char* filename) const
/* clang-format on */
this->IssueMessage(cmake::AUTHOR_WARNING, e.str());
- // break; // fall through to OLD behaviour
+ CM_FALLTHROUGH;
}
case cmPolicies::OLD:
result = moduleInCMakeModulePath;
@@ -3779,6 +3785,7 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg,
case cmPolicies::WARN:
this->IssueMessage(cmake::AUTHOR_WARNING,
cmPolicies::GetPolicyWarning(cmPolicies::CMP0002));
+ CM_FALLTHROUGH;
case cmPolicies::OLD:
return true;
case cmPolicies::REQUIRED_IF_USED:
@@ -3864,12 +3871,14 @@ bool cmMakefile::EnforceUniqueDir(const std::string& srcPath,
<< "compatibility.";
/* clang-format on */
this->IssueMessage(cmake::AUTHOR_WARNING, e.str());
+ CM_FALLTHROUGH;
case cmPolicies::OLD:
// OLD behavior does not warn.
return true;
case cmPolicies::REQUIRED_IF_USED:
case cmPolicies::REQUIRED_ALWAYS:
e << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0013) << "\n";
+ CM_FALLTHROUGH;
case cmPolicies::NEW:
// NEW behavior prints the error.
/* clang-format off */
diff --git a/bootstrap b/bootstrap
index 84285a8..84df54a 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1307,6 +1307,7 @@ cmake_report cmConfigure.h${_tmp} "#define CMAKE_BIN_DIR \"/bootstrap-not-insall
cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"/bootstrap-not-insalled\""
cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP"
cmake_report cmConfigure.h${_tmp} "#define CM_EQ_DELETE"
+cmake_report cmConfigure.h${_tmp} "#define CM_FALLTHROUGH"
cmake_report cmConfigure.h${_tmp} "#define CM_NULLPTR 0"
cmake_report cmConfigure.h${_tmp} "#define CM_OVERRIDE"
cmake_report cmConfigure.h${_tmp} "#define CM_DISABLE_COPY(Class)"
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0068224fdd7569f02dffe9fd8de2e6ce0c7abc28
commit 0068224fdd7569f02dffe9fd8de2e6ce0c7abc28
Author: Daniel Pfeifer <daniel at pfeifer-mail.de>
AuthorDate: Sat Jun 3 08:38:31 2017 +0200
Commit: Daniel Pfeifer <daniel at pfeifer-mail.de>
CommitDate: Sat Jun 3 08:38:51 2017 +0200
C++ feature checks: check output for '[Ww]arning'
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index 458901e..76c823c 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -15,7 +15,7 @@ function(cm_check_cxx_feature name)
OUTPUT_VARIABLE OUTPUT
)
# If using the feature causes warnings, treat it as broken/unavailable.
- if(OUTPUT MATCHES "warning")
+ if(OUTPUT MATCHES "[Ww]arning")
set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE)
endif()
if(CMake_HAVE_CXX_${FEATURE})
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=913736f17dfb2e51423861c9a74be3a9be3211c8
commit 913736f17dfb2e51423861c9a74be3a9be3211c8
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 1 13:55:35 2017 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Jun 2 16:26:30 2017 -0400
Tests: Fix RunCMake.GNUInstallDirs on BSD platforms
The `GNUInstallDirs` module has different defaults on BSD platforms.
Update the test expected output to account for the difference.
Fixes: #16887
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 75d4e29..79f487d 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -147,7 +147,7 @@ endif()
add_RunCMake_test(GeneratorExpression)
add_RunCMake_test(GeneratorPlatform)
add_RunCMake_test(GeneratorToolset)
-add_RunCMake_test(GNUInstallDirs)
+add_RunCMake_test(GNUInstallDirs -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME})
add_RunCMake_test(TargetPropertyGeneratorExpressions)
add_RunCMake_test(Languages)
add_RunCMake_test(LinkStatic)
diff --git a/Tests/RunCMake/GNUInstallDirs/Common.cmake b/Tests/RunCMake/GNUInstallDirs/Common.cmake
index 5f119af..919cd91 100644
--- a/Tests/RunCMake/GNUInstallDirs/Common.cmake
+++ b/Tests/RunCMake/GNUInstallDirs/Common.cmake
@@ -1,8 +1,5 @@
set(CMAKE_SIZEOF_VOID_P 8)
set(CMAKE_LIBRARY_ARCHITECTURE "arch")
-if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
- set(CMAKE_SYSTEM_NAME "OpenBSD-Fake")
-endif()
include(GNUInstallDirs)
set(dirs
BINDIR
diff --git a/Tests/RunCMake/GNUInstallDirs/Opt-BSD-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Opt-BSD-stderr.txt
new file mode 100644
index 0000000..09ae303
--- /dev/null
+++ b/Tests/RunCMake/GNUInstallDirs/Opt-BSD-stderr.txt
@@ -0,0 +1,30 @@
+^CMAKE_INSTALL_BINDIR='bin'
+CMAKE_INSTALL_DATADIR='share'
+CMAKE_INSTALL_DATAROOTDIR='share'
+CMAKE_INSTALL_DOCDIR='share/doc/Opt'
+CMAKE_INSTALL_INCLUDEDIR='include'
+CMAKE_INSTALL_INFODIR='info'
+CMAKE_INSTALL_LIBDIR='(lib|lib64)'
+CMAKE_INSTALL_LIBEXECDIR='libexec'
+CMAKE_INSTALL_LOCALEDIR='share/locale'
+CMAKE_INSTALL_LOCALSTATEDIR='var'
+CMAKE_INSTALL_RUNSTATEDIR='var/run'
+CMAKE_INSTALL_MANDIR='man'
+CMAKE_INSTALL_SBINDIR='sbin'
+CMAKE_INSTALL_SHAREDSTATEDIR='com'
+CMAKE_INSTALL_SYSCONFDIR='etc'
+CMAKE_INSTALL_FULL_BINDIR='/opt/Opt/bin'
+CMAKE_INSTALL_FULL_DATADIR='/opt/Opt/share'
+CMAKE_INSTALL_FULL_DATAROOTDIR='/opt/Opt/share'
+CMAKE_INSTALL_FULL_DOCDIR='/opt/Opt/share/doc/Opt'
+CMAKE_INSTALL_FULL_INCLUDEDIR='/opt/Opt/include'
+CMAKE_INSTALL_FULL_INFODIR='/opt/Opt/info'
+CMAKE_INSTALL_FULL_LIBDIR='/opt/Opt/(lib|lib64)'
+CMAKE_INSTALL_FULL_LIBEXECDIR='/opt/Opt/libexec'
+CMAKE_INSTALL_FULL_LOCALEDIR='/opt/Opt/share/locale'
+CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var/opt/Opt'
+CMAKE_INSTALL_FULL_RUNSTATEDIR='/var/run/opt/Opt'
+CMAKE_INSTALL_FULL_MANDIR='/opt/Opt/man'
+CMAKE_INSTALL_FULL_SBINDIR='/opt/Opt/sbin'
+CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/opt/Opt/com'
+CMAKE_INSTALL_FULL_SYSCONFDIR='/etc/opt/Opt'$
diff --git a/Tests/RunCMake/GNUInstallDirs/Root-BSD-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Root-BSD-stderr.txt
new file mode 100644
index 0000000..4be66bc
--- /dev/null
+++ b/Tests/RunCMake/GNUInstallDirs/Root-BSD-stderr.txt
@@ -0,0 +1,30 @@
+^CMAKE_INSTALL_BINDIR='usr/bin'
+CMAKE_INSTALL_DATADIR='usr/share'
+CMAKE_INSTALL_DATAROOTDIR='usr/share'
+CMAKE_INSTALL_DOCDIR='usr/share/doc/Root'
+CMAKE_INSTALL_INCLUDEDIR='usr/include'
+CMAKE_INSTALL_INFODIR='usr/info'
+CMAKE_INSTALL_LIBDIR='usr/(lib|lib64)'
+CMAKE_INSTALL_LIBEXECDIR='usr/libexec'
+CMAKE_INSTALL_LOCALEDIR='usr/share/locale'
+CMAKE_INSTALL_LOCALSTATEDIR='var'
+CMAKE_INSTALL_RUNSTATEDIR='var/run'
+CMAKE_INSTALL_MANDIR='usr/man'
+CMAKE_INSTALL_SBINDIR='usr/sbin'
+CMAKE_INSTALL_SHAREDSTATEDIR='usr/com'
+CMAKE_INSTALL_SYSCONFDIR='etc'
+CMAKE_INSTALL_FULL_BINDIR='/usr/bin'
+CMAKE_INSTALL_FULL_DATADIR='/usr/share'
+CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/share'
+CMAKE_INSTALL_FULL_DOCDIR='/usr/share/doc/Root'
+CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/include'
+CMAKE_INSTALL_FULL_INFODIR='/usr/info'
+CMAKE_INSTALL_FULL_LIBDIR='/usr/(lib|lib64)'
+CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/libexec'
+CMAKE_INSTALL_FULL_LOCALEDIR='/usr/share/locale'
+CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var'
+CMAKE_INSTALL_FULL_RUNSTATEDIR='/var/run'
+CMAKE_INSTALL_FULL_MANDIR='/usr/man'
+CMAKE_INSTALL_FULL_SBINDIR='/usr/sbin'
+CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/com'
+CMAKE_INSTALL_FULL_SYSCONFDIR='/etc'$
diff --git a/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake b/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake
index f88569a..b544ba6 100644
--- a/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake
@@ -1,6 +1,17 @@
include(RunCMake)
-run_cmake(Opt)
-run_cmake(Root)
-run_cmake(Usr)
-run_cmake(UsrLocal)
+if(SYSTEM_NAME MATCHES "^(.*BSD|DragonFly)$")
+ set(EXPECT_BSD 1)
+endif()
+
+foreach(case
+ Opt
+ Root
+ Usr
+ UsrLocal
+ )
+ if(EXPECT_BSD)
+ set(RunCMake-stderr-file ${case}-BSD-stderr.txt)
+ endif()
+ run_cmake(${case})
+endforeach()
diff --git a/Tests/RunCMake/GNUInstallDirs/Usr-BSD-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Usr-BSD-stderr.txt
new file mode 100644
index 0000000..3d7b4c8
--- /dev/null
+++ b/Tests/RunCMake/GNUInstallDirs/Usr-BSD-stderr.txt
@@ -0,0 +1,30 @@
+^CMAKE_INSTALL_BINDIR='bin'
+CMAKE_INSTALL_DATADIR='share'
+CMAKE_INSTALL_DATAROOTDIR='share'
+CMAKE_INSTALL_DOCDIR='share/doc/Usr'
+CMAKE_INSTALL_INCLUDEDIR='include'
+CMAKE_INSTALL_INFODIR='info'
+CMAKE_INSTALL_LIBDIR='(lib|lib64|lib/arch)'
+CMAKE_INSTALL_LIBEXECDIR='libexec'
+CMAKE_INSTALL_LOCALEDIR='share/locale'
+CMAKE_INSTALL_LOCALSTATEDIR='var'
+CMAKE_INSTALL_RUNSTATEDIR='var/run'
+CMAKE_INSTALL_MANDIR='man'
+CMAKE_INSTALL_SBINDIR='sbin'
+CMAKE_INSTALL_SHAREDSTATEDIR='com'
+CMAKE_INSTALL_SYSCONFDIR='etc'
+CMAKE_INSTALL_FULL_BINDIR='/usr/bin'
+CMAKE_INSTALL_FULL_DATADIR='/usr/share'
+CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/share'
+CMAKE_INSTALL_FULL_DOCDIR='/usr/share/doc/Usr'
+CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/include'
+CMAKE_INSTALL_FULL_INFODIR='/usr/info'
+CMAKE_INSTALL_FULL_LIBDIR='/usr/(lib|lib64|lib/arch)'
+CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/libexec'
+CMAKE_INSTALL_FULL_LOCALEDIR='/usr/share/locale'
+CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var'
+CMAKE_INSTALL_FULL_RUNSTATEDIR='/var/run'
+CMAKE_INSTALL_FULL_MANDIR='/usr/man'
+CMAKE_INSTALL_FULL_SBINDIR='/usr/sbin'
+CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/com'
+CMAKE_INSTALL_FULL_SYSCONFDIR='/etc'$
diff --git a/Tests/RunCMake/GNUInstallDirs/UsrLocal-BSD-stderr.txt b/Tests/RunCMake/GNUInstallDirs/UsrLocal-BSD-stderr.txt
new file mode 100644
index 0000000..e1425d5
--- /dev/null
+++ b/Tests/RunCMake/GNUInstallDirs/UsrLocal-BSD-stderr.txt
@@ -0,0 +1,30 @@
+^CMAKE_INSTALL_BINDIR='bin'
+CMAKE_INSTALL_DATADIR='share'
+CMAKE_INSTALL_DATAROOTDIR='share'
+CMAKE_INSTALL_DOCDIR='share/doc/UsrLocal'
+CMAKE_INSTALL_INCLUDEDIR='include'
+CMAKE_INSTALL_INFODIR='info'
+CMAKE_INSTALL_LIBDIR='(lib|lib64)'
+CMAKE_INSTALL_LIBEXECDIR='libexec'
+CMAKE_INSTALL_LOCALEDIR='share/locale'
+CMAKE_INSTALL_LOCALSTATEDIR='var'
+CMAKE_INSTALL_RUNSTATEDIR='var/run'
+CMAKE_INSTALL_MANDIR='man'
+CMAKE_INSTALL_SBINDIR='sbin'
+CMAKE_INSTALL_SHAREDSTATEDIR='com'
+CMAKE_INSTALL_SYSCONFDIR='etc'
+CMAKE_INSTALL_FULL_BINDIR='/usr/local/bin'
+CMAKE_INSTALL_FULL_DATADIR='/usr/local/share'
+CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/local/share'
+CMAKE_INSTALL_FULL_DOCDIR='/usr/local/share/doc/UsrLocal'
+CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/local/include'
+CMAKE_INSTALL_FULL_INFODIR='/usr/local/info'
+CMAKE_INSTALL_FULL_LIBDIR='/usr/local/(lib|lib64)'
+CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/local/libexec'
+CMAKE_INSTALL_FULL_LOCALEDIR='/usr/local/share/locale'
+CMAKE_INSTALL_FULL_LOCALSTATEDIR='/usr/local/var'
+CMAKE_INSTALL_FULL_RUNSTATEDIR='/usr/local/var/run'
+CMAKE_INSTALL_FULL_MANDIR='/usr/local/man'
+CMAKE_INSTALL_FULL_SBINDIR='/usr/local/sbin'
+CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/local/com'
+CMAKE_INSTALL_FULL_SYSCONFDIR='/usr/local/etc'$
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f59d729c7cb03babafac0cee792b9a3127e51d4d
commit f59d729c7cb03babafac0cee792b9a3127e51d4d
Author: Chuck Atkins <chuck.atkins at kitware.com>
AuthorDate: Fri Jun 2 12:56:31 2017 -0400
Commit: Chuck Atkins <chuck.atkins at kitware.com>
CommitDate: Fri Jun 2 12:56:31 2017 -0400
ctest: Display disabled status when ctest -N is called
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 2d4726c..a9ed713 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -720,9 +720,13 @@ void cmCTestMultiProcessHandler::PrintTestList()
std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex()))
<< indexStr.str(),
this->Quiet);
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " ", this->Quiet);
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, p.Name << std::endl,
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " " << p.Name,
this->Quiet);
+ if (p.Disabled) {
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " (Disabled)",
+ this->Quiet);
+ }
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, std::endl, this->Quiet);
}
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, std::endl
-----------------------------------------------------------------------
Summary of changes:
Source/CTest/cmCTestMultiProcessHandler.cxx | 8 ++++--
Source/Checks/cm_cxx_attribute_fallthrough.cxx | 11 +++++++++
Source/Checks/cm_cxx_fallthrough.cxx | 11 +++++++++
Source/Checks/cm_cxx_features.cmake | 9 ++++++-
Source/Checks/cm_cxx_gnu_fallthrough.cxx | 11 +++++++++
Source/cmCacheManager.cxx | 3 +--
Source/cmCacheManager.h | 2 +-
Source/cmComputeLinkDepends.cxx | 2 +-
Source/cmComputeLinkDepends.h | 2 +-
Source/cmConditionEvaluator.cxx | 4 +--
Source/cmConfigure.cmake.h.in | 13 ++++++++++
Source/cmCoreTryCompile.cxx | 4 +++
Source/cmDynamicLoader.cxx | 7 +++---
Source/cmELF.cxx | 8 +++---
Source/cmExportFileGenerator.cxx | 1 +
Source/cmExtraCodeLiteGenerator.cxx | 1 +
Source/cmFileCommand.cxx | 9 ++++---
Source/cmFindPackageCommand.cxx | 24 ++++++++++++------
Source/cmFindProgramCommand.cxx | 3 ++-
Source/cmFindProgramCommand.h | 2 +-
Source/cmGeneratorExpressionNode.cxx | 2 ++
Source/cmGeneratorTarget.cxx | 13 +++++++---
Source/cmGetDirectoryPropertyCommand.cxx | 1 +
Source/cmGetPropertyCommand.cxx | 1 +
Source/cmGlobalGenerator.cxx | 7 ++++--
Source/cmGlobalGenerator.h | 6 +++--
Source/cmGlobalNinjaGenerator.cxx | 3 ++-
Source/cmGlobalNinjaGenerator.h | 2 +-
Source/cmInstallCommand.cxx | 4 +--
Source/cmInstallGenerator.cxx | 2 +-
Source/cmInstallGenerator.h | 2 +-
Source/cmLinkDirectoriesCommand.cxx | 1 +
Source/cmLinkLineComputer.cxx | 2 +-
Source/cmLinkLineComputer.h | 2 +-
Source/cmLinkLineDeviceComputer.cxx | 5 ++--
Source/cmLinkLineDeviceComputer.h | 4 +--
Source/cmListFileCache.cxx | 8 +++---
Source/cmListFileCache.h | 6 ++---
Source/cmLocalGenerator.cxx | 5 +++-
Source/cmMSVC60LinkLineComputer.cxx | 4 +--
Source/cmMSVC60LinkLineComputer.h | 2 +-
Source/cmMakefile.cxx | 13 ++++++++--
Source/cmMakefile.h | 2 +-
Source/cmMakefileTargetGenerator.cxx | 4 +--
Source/cmMakefileTargetGenerator.h | 2 +-
Source/cmNinjaLinkLineComputer.cxx | 3 +--
Source/cmNinjaLinkLineComputer.h | 2 +-
Source/cmOrderDirectories.cxx | 2 +-
Source/cmOutputConverter.cxx | 4 +--
Source/cmOutputConverter.h | 4 +--
Source/cmState.cxx | 16 ++++++------
Source/cmState.h | 26 +++++++++++---------
Source/cmStateSnapshot.cxx | 2 +-
Source/cmStateSnapshot.h | 2 +-
Tests/RunCMake/CMakeLists.txt | 2 +-
Tests/RunCMake/GNUInstallDirs/Common.cmake | 3 ---
.../{Opt-stderr.txt => Opt-BSD-stderr.txt} | 8 +++---
.../{Root-stderr.txt => Root-BSD-stderr.txt} | 8 +++---
Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake | 19 +++++++++++---
.../{Usr-stderr.txt => Usr-BSD-stderr.txt} | 8 +++---
...UsrLocal-stderr.txt => UsrLocal-BSD-stderr.txt} | 8 +++---
bootstrap | 1 +
62 files changed, 232 insertions(+), 124 deletions(-)
create mode 100644 Source/Checks/cm_cxx_attribute_fallthrough.cxx
create mode 100644 Source/Checks/cm_cxx_fallthrough.cxx
create mode 100644 Source/Checks/cm_cxx_gnu_fallthrough.cxx
copy Tests/RunCMake/GNUInstallDirs/{Opt-stderr.txt => Opt-BSD-stderr.txt} (86%)
copy Tests/RunCMake/GNUInstallDirs/{Root-stderr.txt => Root-BSD-stderr.txt} (86%)
copy Tests/RunCMake/GNUInstallDirs/{Usr-stderr.txt => Usr-BSD-stderr.txt} (86%)
copy Tests/RunCMake/GNUInstallDirs/{UsrLocal-stderr.txt => UsrLocal-BSD-stderr.txt} (86%)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list