[Cmake-commits] CMake branch, master, updated. v3.8.1-1303-gfa0a321
Kitware Robot
kwrobot at kitware.com
Fri May 26 11:15:04 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 fa0a3210ee95f5a683cab60f05731fe7bbfe2389 (commit)
via 256481499d56589e98659bd069d7f8a2fd653546 (commit)
via 867b17428a02b3cfb337624988206ed9500aa646 (commit)
via 402c6c121c924e68c17ce04de8dc5d28dac6fa6e (commit)
via 30675ec49bf960d58f75030a6ccaad771ea10b0f (commit)
from 83e4a8e63713c3e99f81aac2973763c6252846bc (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=fa0a3210ee95f5a683cab60f05731fe7bbfe2389
commit fa0a3210ee95f5a683cab60f05731fe7bbfe2389
Merge: 2564814 30675ec
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri May 26 15:13:27 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri May 26 11:14:33 2017 -0400
Merge topic 'vs-vcxproj-indent'
30675ec4 VS: Fix indentation of .vcxproj files
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !884
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=256481499d56589e98659bd069d7f8a2fd653546
commit 256481499d56589e98659bd069d7f8a2fd653546
Merge: 83e4a8e 867b174
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri May 26 15:12:57 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri May 26 11:13:45 2017 -0400
Merge topic 'update-kwsys'
867b1742 Merge branch 'upstream-KWSys' into update-kwsys
402c6c12 KWSys 2017-05-25 (160bed45)
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !890
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=867b17428a02b3cfb337624988206ed9500aa646
commit 867b17428a02b3cfb337624988206ed9500aa646
Merge: bc2cfd7 402c6c1
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu May 25 09:40:59 2017 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu May 25 09:40:59 2017 -0400
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
KWSys 2017-05-25 (160bed45)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=402c6c121c924e68c17ce04de8dc5d28dac6fa6e
commit 402c6c121c924e68c17ce04de8dc5d28dac6fa6e
Author: KWSys Upstream <kwrobot at kitware.com>
AuthorDate: Thu May 25 09:40:27 2017 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu May 25 09:40:58 2017 -0400
KWSys 2017-05-25 (160bed45)
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit 160bed451833380e9f6ddc60e709ab6800bf2129 (master).
Upstream Shortlog
-----------------
Brad King (1):
51859eab CONTRIBUTING: Specify clang-format version used for code style
Florian Maushart (2):
684bcda6 SystemInformation: Expose CPU feature flags publicly
70b8332f SystemInformation: Add CPU_FEATURE_FPU flag
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index d71832a..70a313e 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -27,10 +27,12 @@ copies of KWSys within dependent projects can be updated to get the changes.
Code Style
==========
-We use `clang-format`_ to define our style for C++ code in the KWSys source
-tree. See the `.clang-format`_ configuration file for our style settings.
-Use ``clang-format`` version 3.8 or higher to format source files.
-See also the `clang-format.bash`_ script.
+We use `clang-format`_ version **3.8** to define our style for C++ code in
+the KWSys source tree. See the `.clang-format`_ configuration file for
+our style settings. Use the `clang-format.bash`_ script to format source
+code. It automatically runs ``clang-format`` on the set of source files
+for which we enforce style. The script also has options to format only
+a subset of files, such as those that are locally modified.
.. _`clang-format`: http://clang.llvm.org/docs/ClangFormat.html
.. _`.clang-format`: .clang-format
diff --git a/SystemInformation.cxx b/SystemInformation.cxx
index 6b00fc6..bfc895e 100644
--- a/SystemInformation.cxx
+++ b/SystemInformation.cxx
@@ -845,30 +845,6 @@ void SystemInformation::RunMemoryCheck()
#define CLASSICAL_CPU_FREQ_LOOP 10000000
#define RDTSC_INSTRUCTION _asm _emit 0x0f _asm _emit 0x31
-#define MMX_FEATURE 0x00000001
-#define MMX_PLUS_FEATURE 0x00000002
-#define SSE_FEATURE 0x00000004
-#define SSE2_FEATURE 0x00000008
-#define AMD_3DNOW_FEATURE 0x00000010
-#define AMD_3DNOW_PLUS_FEATURE 0x00000020
-#define IA64_FEATURE 0x00000040
-#define MP_CAPABLE 0x00000080
-#define HYPERTHREAD_FEATURE 0x00000100
-#define SERIALNUMBER_FEATURE 0x00000200
-#define APIC_FEATURE 0x00000400
-#define SSE_FP_FEATURE 0x00000800
-#define SSE_MMX_FEATURE 0x00001000
-#define CMOV_FEATURE 0x00002000
-#define MTRR_FEATURE 0x00004000
-#define L1CACHE_FEATURE 0x00008000
-#define L2CACHE_FEATURE 0x00010000
-#define L3CACHE_FEATURE 0x00020000
-#define ACPI_FEATURE 0x00040000
-#define THERMALMONITOR_FEATURE 0x00080000
-#define TEMPSENSEDIODE_FEATURE 0x00100000
-#define FREQUENCYID_FEATURE 0x00200000
-#define VOLTAGEID_FREQUENCY 0x00400000
-
// Status Flag
#define HT_NOT_CAPABLE 0
#define HT_ENABLED 1
@@ -1867,11 +1843,11 @@ int SystemInformationImplementation::GetProcessorCacheSize()
int SystemInformationImplementation::GetProcessorCacheXSize(long int dwCacheID)
{
switch (dwCacheID) {
- case L1CACHE_FEATURE:
+ case SystemInformation::CPU_FEATURE_L1CACHE:
return this->Features.L1CacheSize;
- case L2CACHE_FEATURE:
+ case SystemInformation::CPU_FEATURE_L2CACHE:
return this->Features.L2CacheSize;
- case L3CACHE_FEATURE:
+ case SystemInformation::CPU_FEATURE_L3CACHE:
return this->Features.L3CacheSize;
}
return -1;
@@ -1882,104 +1858,121 @@ bool SystemInformationImplementation::DoesCPUSupportFeature(long int dwFeature)
bool bHasFeature = false;
// Check for MMX instructions.
- if (((dwFeature & MMX_FEATURE) != 0) && this->Features.HasMMX)
+ if (((dwFeature & SystemInformation::CPU_FEATURE_MMX) != 0) &&
+ this->Features.HasMMX)
bHasFeature = true;
// Check for MMX+ instructions.
- if (((dwFeature & MMX_PLUS_FEATURE) != 0) &&
+ if (((dwFeature & SystemInformation::CPU_FEATURE_MMX_PLUS) != 0) &&
this->Features.ExtendedFeatures.HasMMXPlus)
bHasFeature = true;
// Check for SSE FP instructions.
- if (((dwFeature & SSE_FEATURE) != 0) && this->Features.HasSSE)
+ if (((dwFeature & SystemInformation::CPU_FEATURE_SSE) != 0) &&
+ this->Features.HasSSE)
bHasFeature = true;
// Check for SSE FP instructions.
- if (((dwFeature & SSE_FP_FEATURE) != 0) && this->Features.HasSSEFP)
+ if (((dwFeature & SystemInformation::CPU_FEATURE_SSE_FP) != 0) &&
+ this->Features.HasSSEFP)
bHasFeature = true;
// Check for SSE MMX instructions.
- if (((dwFeature & SSE_MMX_FEATURE) != 0) &&
+ if (((dwFeature & SystemInformation::CPU_FEATURE_SSE_MMX) != 0) &&
this->Features.ExtendedFeatures.HasSSEMMX)
bHasFeature = true;
// Check for SSE2 instructions.
- if (((dwFeature & SSE2_FEATURE) != 0) && this->Features.HasSSE2)
+ if (((dwFeature & SystemInformation::CPU_FEATURE_SSE2) != 0) &&
+ this->Features.HasSSE2)
bHasFeature = true;
// Check for 3DNow! instructions.
- if (((dwFeature & AMD_3DNOW_FEATURE) != 0) &&
+ if (((dwFeature & SystemInformation::CPU_FEATURE_AMD_3DNOW) != 0) &&
this->Features.ExtendedFeatures.Has3DNow)
bHasFeature = true;
// Check for 3DNow+ instructions.
- if (((dwFeature & AMD_3DNOW_PLUS_FEATURE) != 0) &&
+ if (((dwFeature & SystemInformation::CPU_FEATURE_AMD_3DNOW_PLUS) != 0) &&
this->Features.ExtendedFeatures.Has3DNowPlus)
bHasFeature = true;
// Check for IA64 instructions.
- if (((dwFeature & IA64_FEATURE) != 0) && this->Features.HasIA64)
+ if (((dwFeature & SystemInformation::CPU_FEATURE_IA64) != 0) &&
+ this->Features.HasIA64)
bHasFeature = true;
// Check for MP capable.
- if (((dwFeature & MP_CAPABLE) != 0) &&
+ if (((dwFeature & SystemInformation::CPU_FEATURE_MP_CAPABLE) != 0) &&
this->Features.ExtendedFeatures.SupportsMP)
bHasFeature = true;
// Check for a serial number for the processor.
- if (((dwFeature & SERIALNUMBER_FEATURE) != 0) && this->Features.HasSerial)
+ if (((dwFeature & SystemInformation::CPU_FEATURE_SERIALNUMBER) != 0) &&
+ this->Features.HasSerial)
bHasFeature = true;
// Check for a local APIC in the processor.
- if (((dwFeature & APIC_FEATURE) != 0) && this->Features.HasAPIC)
+ if (((dwFeature & SystemInformation::CPU_FEATURE_APIC) != 0) &&
+ this->Features.HasAPIC)
bHasFeature = true;
// Check for CMOV instructions.
- if (((dwFeature & CMOV_FEATURE) != 0) && this->Features.HasCMOV)
+ if (((dwFeature & SystemInformation::CPU_FEATURE_CMOV) != 0) &&
+ this->Features.HasCMOV)
bHasFeature = true;
// Check for MTRR instructions.
- if (((dwFeature & MTRR_FEATURE) != 0) && this->Features.HasMTRR)
+ if (((dwFeature & SystemInformation::CPU_FEATURE_MTRR) != 0) &&
+ this->Features.HasMTRR)
bHasFeature = true;
// Check for L1 cache size.
- if (((dwFeature & L1CACHE_FEATURE) != 0) &&
+ if (((dwFeature & SystemInformation::CPU_FEATURE_L1CACHE) != 0) &&
(this->Features.L1CacheSize != -1))
bHasFeature = true;
// Check for L2 cache size.
- if (((dwFeature & L2CACHE_FEATURE) != 0) &&
+ if (((dwFeature & SystemInformation::CPU_FEATURE_L2CACHE) != 0) &&
(this->Features.L2CacheSize != -1))
bHasFeature = true;
// Check for L3 cache size.
- if (((dwFeature & L3CACHE_FEATURE) != 0) &&
+ if (((dwFeature & SystemInformation::CPU_FEATURE_L3CACHE) != 0) &&
(this->Features.L3CacheSize != -1))
bHasFeature = true;
// Check for ACPI capability.
- if (((dwFeature & ACPI_FEATURE) != 0) && this->Features.HasACPI)
+ if (((dwFeature & SystemInformation::CPU_FEATURE_ACPI) != 0) &&
+ this->Features.HasACPI)
bHasFeature = true;
// Check for thermal monitor support.
- if (((dwFeature & THERMALMONITOR_FEATURE) != 0) && this->Features.HasThermal)
+ if (((dwFeature & SystemInformation::CPU_FEATURE_THERMALMONITOR) != 0) &&
+ this->Features.HasThermal)
bHasFeature = true;
// Check for temperature sensing diode support.
- if (((dwFeature & TEMPSENSEDIODE_FEATURE) != 0) &&
+ if (((dwFeature & SystemInformation::CPU_FEATURE_TEMPSENSEDIODE) != 0) &&
this->Features.ExtendedFeatures.PowerManagement.HasTempSenseDiode)
bHasFeature = true;
// Check for frequency ID support.
- if (((dwFeature & FREQUENCYID_FEATURE) != 0) &&
+ if (((dwFeature & SystemInformation::CPU_FEATURE_FREQUENCYID) != 0) &&
this->Features.ExtendedFeatures.PowerManagement.HasFrequencyID)
bHasFeature = true;
// Check for voltage ID support.
- if (((dwFeature & VOLTAGEID_FREQUENCY) != 0) &&
+ if (((dwFeature & SystemInformation::CPU_FEATURE_VOLTAGEID_FREQUENCY) !=
+ 0) &&
this->Features.ExtendedFeatures.PowerManagement.HasVoltageID)
bHasFeature = true;
+ // Check for FPU support.
+ if (((dwFeature & SystemInformation::CPU_FEATURE_FPU) != 0) &&
+ this->Features.HasFPU)
+ bHasFeature = true;
+
return bHasFeature;
}
diff --git a/SystemInformation.hxx.in b/SystemInformation.hxx.in
index 54e7fc1..516c505 100644
--- a/SystemInformation.hxx.in
+++ b/SystemInformation.hxx.in
@@ -26,6 +26,33 @@ class @KWSYS_NAMESPACE at _EXPORT SystemInformation
SystemInformationImplementation* Implementation;
public:
+ // possible parameter values for DoesCPUSupportFeature()
+ static const long int CPU_FEATURE_MMX = 1 << 0;
+ static const long int CPU_FEATURE_MMX_PLUS = 1 << 1;
+ static const long int CPU_FEATURE_SSE = 1 << 2;
+ static const long int CPU_FEATURE_SSE2 = 1 << 3;
+ static const long int CPU_FEATURE_AMD_3DNOW = 1 << 4;
+ static const long int CPU_FEATURE_AMD_3DNOW_PLUS = 1 << 5;
+ static const long int CPU_FEATURE_IA64 = 1 << 6;
+ static const long int CPU_FEATURE_MP_CAPABLE = 1 << 7;
+ static const long int CPU_FEATURE_HYPERTHREAD = 1 << 8;
+ static const long int CPU_FEATURE_SERIALNUMBER = 1 << 9;
+ static const long int CPU_FEATURE_APIC = 1 << 10;
+ static const long int CPU_FEATURE_SSE_FP = 1 << 11;
+ static const long int CPU_FEATURE_SSE_MMX = 1 << 12;
+ static const long int CPU_FEATURE_CMOV = 1 << 13;
+ static const long int CPU_FEATURE_MTRR = 1 << 14;
+ static const long int CPU_FEATURE_L1CACHE = 1 << 15;
+ static const long int CPU_FEATURE_L2CACHE = 1 << 16;
+ static const long int CPU_FEATURE_L3CACHE = 1 << 17;
+ static const long int CPU_FEATURE_ACPI = 1 << 18;
+ static const long int CPU_FEATURE_THERMALMONITOR = 1 << 19;
+ static const long int CPU_FEATURE_TEMPSENSEDIODE = 1 << 20;
+ static const long int CPU_FEATURE_FREQUENCYID = 1 << 21;
+ static const long int CPU_FEATURE_VOLTAGEID_FREQUENCY = 1 << 22;
+ static const long int CPU_FEATURE_FPU = 1 << 23;
+
+public:
SystemInformation();
~SystemInformation();
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=30675ec49bf960d58f75030a6ccaad771ea10b0f
commit 30675ec49bf960d58f75030a6ccaad771ea10b0f
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed May 24 11:07:53 2017 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Wed May 24 11:07:53 2017 -0400
VS: Fix indentation of .vcxproj files
Patch-by: vvs31415 on gitlab.kitware.com
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index eef6f37..e174f13 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2074,15 +2074,15 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
return;
}
- this->WriteString("<PropertyGroup>\n", 2);
+ this->WriteString("<PropertyGroup>\n", 1);
this->WriteString("<_ProjectFileVersion>10.0.20506.1"
"</_ProjectFileVersion>\n",
- 3);
+ 2);
for (std::vector<std::string>::const_iterator config =
this->Configurations.begin();
config != this->Configurations.end(); ++config) {
if (ttype >= cmStateEnums::UTILITY) {
- this->WritePlatformConfigTag("IntDir", config->c_str(), 3);
+ this->WritePlatformConfigTag("IntDir", config->c_str(), 2);
*this->BuildFileStream
<< "$(Platform)\\$(Configuration)\\$(ProjectName)\\"
<< "</IntDir>\n";
@@ -2105,24 +2105,24 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
this->ConvertToWindowsSlash(intermediateDir);
this->ConvertToWindowsSlash(outDir);
- this->WritePlatformConfigTag("OutDir", config->c_str(), 3);
+ this->WritePlatformConfigTag("OutDir", config->c_str(), 2);
*this->BuildFileStream << cmVS10EscapeXML(outDir) << "</OutDir>\n";
- this->WritePlatformConfigTag("IntDir", config->c_str(), 3);
+ this->WritePlatformConfigTag("IntDir", config->c_str(), 2);
*this->BuildFileStream << cmVS10EscapeXML(intermediateDir)
<< "</IntDir>\n";
if (const char* workingDir = this->GeneratorTarget->GetProperty(
"VS_DEBUGGER_WORKING_DIRECTORY")) {
this->WritePlatformConfigTag("LocalDebuggerWorkingDirectory",
- config->c_str(), 3);
+ config->c_str(), 2);
*this->BuildFileStream << cmVS10EscapeXML(workingDir)
<< "</LocalDebuggerWorkingDirectory>\n";
}
std::string name =
cmSystemTools::GetFilenameWithoutLastExtension(targetNameFull);
- this->WritePlatformConfigTag("TargetName", config->c_str(), 3);
+ this->WritePlatformConfigTag("TargetName", config->c_str(), 2);
*this->BuildFileStream << cmVS10EscapeXML(name) << "</TargetName>\n";
std::string ext =
@@ -2132,13 +2132,13 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
// A single "." appears to be treated as an empty extension.
ext = ".";
}
- this->WritePlatformConfigTag("TargetExt", config->c_str(), 3);
+ this->WritePlatformConfigTag("TargetExt", config->c_str(), 2);
*this->BuildFileStream << cmVS10EscapeXML(ext) << "</TargetExt>\n";
this->OutputLinkIncremental(*config);
}
}
- this->WriteString("</PropertyGroup>\n", 2);
+ this->WriteString("</PropertyGroup>\n", 1);
}
void cmVisualStudio10TargetGenerator::OutputLinkIncremental(
@@ -2159,13 +2159,13 @@ void cmVisualStudio10TargetGenerator::OutputLinkIncremental(
Options& linkOptions = *(this->LinkOptions[configName]);
const char* incremental = linkOptions.GetFlag("LinkIncremental");
- this->WritePlatformConfigTag("LinkIncremental", configName.c_str(), 3);
+ this->WritePlatformConfigTag("LinkIncremental", configName.c_str(), 2);
*this->BuildFileStream << (incremental ? incremental : "true")
<< "</LinkIncremental>\n";
linkOptions.RemoveFlag("LinkIncremental");
const char* manifest = linkOptions.GetFlag("GenerateManifest");
- this->WritePlatformConfigTag("GenerateManifest", configName.c_str(), 3);
+ this->WritePlatformConfigTag("GenerateManifest", configName.c_str(), 2);
*this->BuildFileStream << (manifest ? manifest : "true")
<< "</GenerateManifest>\n";
linkOptions.RemoveFlag("GenerateManifest");
@@ -2176,7 +2176,7 @@ void cmVisualStudio10TargetGenerator::OutputLinkIncremental(
for (const char** f = flags; *f; ++f) {
const char* flag = *f;
if (const char* value = linkOptions.GetFlag(flag)) {
- this->WritePlatformConfigTag(flag, configName.c_str(), 3);
+ this->WritePlatformConfigTag(flag, configName.c_str(), 2);
*this->BuildFileStream << value << "</" << flag << ">\n";
linkOptions.RemoveFlag(flag);
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmVisualStudio10TargetGenerator.cxx | 24 ++++----
Source/kwsys/CONTRIBUTING.rst | 10 +--
Source/kwsys/SystemInformation.cxx | 91 +++++++++++++---------------
Source/kwsys/SystemInformation.hxx.in | 27 +++++++++
4 files changed, 87 insertions(+), 65 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list