diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCTest.cxx | 36 | ||||
-rw-r--r-- | Source/cmDocumentVariables.cxx | 2 | ||||
-rw-r--r-- | Source/cmLinkDirectoriesCommand.h | 7 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 7 | ||||
-rw-r--r-- | Source/cmQtAutomoc.cxx | 4 | ||||
-rw-r--r-- | Source/cmSetTargetPropertiesCommand.h | 3 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 7 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 10 | ||||
-rw-r--r-- | Source/kwsys/CommandLineArguments.cxx | 2 | ||||
-rw-r--r-- | Source/kwsys/SystemInformation.cxx | 45 | ||||
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 8 | ||||
-rw-r--r-- | Source/kwsys/kwsysDateStamp.cmake | 4 |
12 files changed, 93 insertions, 42 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 702ba10..7bb8b27 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -655,10 +655,26 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command) } cmMakefile* mf = command->GetMakefile(); - std::string fname = src_dir; - fname += "/CTestConfig.cmake"; - cmSystemTools::ConvertToUnixSlashes(fname); - if ( cmSystemTools::FileExists(fname.c_str()) ) + std::string fname; + + std::string src_dir_fname = src_dir; + src_dir_fname += "/CTestConfig.cmake"; + cmSystemTools::ConvertToUnixSlashes(src_dir_fname); + + std::string bld_dir_fname = bld_dir; + bld_dir_fname += "/CTestConfig.cmake"; + cmSystemTools::ConvertToUnixSlashes(bld_dir_fname); + + if ( cmSystemTools::FileExists(bld_dir_fname.c_str()) ) + { + fname = bld_dir_fname; + } + else if ( cmSystemTools::FileExists(src_dir_fname.c_str()) ) + { + fname = src_dir_fname; + } + + if ( !fname.empty() ) { cmCTestLog(this, OUTPUT, " Reading ctest configuration file: " << fname.c_str() << std::endl); @@ -674,8 +690,12 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command) } else { - cmCTestLog(this, WARNING, "Cannot locate CTest configuration: " - << fname.c_str() << std::endl); + cmCTestLog(this, WARNING, + "Cannot locate CTest configuration: in BuildDirectory: " + << bld_dir_fname.c_str() << std::endl); + cmCTestLog(this, WARNING, + "Cannot locate CTest configuration: in SourceDirectory: " + << src_dir_fname.c_str() << std::endl); } this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime", @@ -2526,6 +2546,8 @@ void cmCTest::PopulateCustomVector(cmMakefile* mf, const char* def, cmSystemTools::ExpandListArgument(dval, slist); std::vector<std::string>::iterator it; + vec.clear(); + for ( it = slist.begin(); it != slist.end(); ++it ) { cmCTestLog(this, DEBUG, " -- " << it->c_str() << std::endl); @@ -2801,7 +2823,7 @@ bool cmCTest::SetCTestConfigurationFromCMakeVariable(cmMakefile* mf, } cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "SetCTestConfigurationFromCMakeVariable:" - << dconfig << ":" << cmake_var); + << dconfig << ":" << cmake_var << std::endl); this->SetCTestConfiguration(dconfig, ctvar); return true; } diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx index f4d4e7c..f46e1ce 100644 --- a/Source/cmDocumentVariables.cxx +++ b/Source/cmDocumentVariables.cxx @@ -126,7 +126,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "This variable is set to the program that will be" " needed to build the output of CMake. If the " "generator selected was Visual Studio 6, the " - "CMAKE_MAKE_PROGRAM will be set to msdev, for " + "CMAKE_BUILD_TOOL will be set to msdev, for " "Unix makefiles it will be set to make or gmake, " "and for Visual Studio 7 it set to devenv. For " "Nmake Makefiles the value is nmake. This can be " diff --git a/Source/cmLinkDirectoriesCommand.h b/Source/cmLinkDirectoriesCommand.h index e5ff4f0..aa13589 100644 --- a/Source/cmLinkDirectoriesCommand.h +++ b/Source/cmLinkDirectoriesCommand.h @@ -65,7 +65,12 @@ public: "For historical reasons, relative paths given to this command are " "passed to the linker unchanged " "(unlike many CMake commands which interpret them relative to the " - "current source directory)." + "current source directory).\n" + "Note that this command is rarely necessary. Library locations " + "returned by find_package() and find_library() are absolute paths. " + "Pass these absolute library file paths directly to the " + "target_link_libraries() command. CMake will ensure the linker finds " + "them." ; } diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index d9b2772..ae70759 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1811,11 +1811,18 @@ void cmLocalVisualStudio7Generator::WriteProjectSCC(std::ostream& fout, const char* vsProjectname = target.GetProperty("VS_SCC_PROJECTNAME"); const char* vsLocalpath = target.GetProperty("VS_SCC_LOCALPATH"); const char* vsProvider = target.GetProperty("VS_SCC_PROVIDER"); + if(vsProvider && vsLocalpath && vsProjectname) { fout << "\tSccProjectName=\"" << vsProjectname << "\"\n" << "\tSccLocalPath=\"" << vsLocalpath << "\"\n" << "\tSccProvider=\"" << vsProvider << "\"\n"; + + const char* vsAuxPath = target.GetProperty("VS_SCC_AUXPATH"); + if(vsAuxPath) + { + fout << "\tSccAuxPath=\"" << vsAuxPath << "\"\n"; + } } } diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx index e9cc9d1..0f74437 100644 --- a/Source/cmQtAutomoc.cxx +++ b/Source/cmQtAutomoc.cxx @@ -51,7 +51,7 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) const char* targetName = target->GetName(); // don't do anything if there is no Qt4: std::string qtMajorVersion = makefile->GetSafeDefinition("QT_VERSION_MAJOR"); - if (qtMajorVersion != "4") + if (qtMajorVersion != "4" && qtMajorVersion != "5") { return; } @@ -174,7 +174,7 @@ bool cmQtAutomoc::Run(const char* targetDirectory) this->Init(); - if (this->QtMajorVersion == "4") + if (this->QtMajorVersion == "4" || this->QtMajorVersion == "5") { this->RunAutomocQt4(); } diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h index 320378d..f001a11 100644 --- a/Source/cmSetTargetPropertiesCommand.h +++ b/Source/cmSetTargetPropertiesCommand.h @@ -140,7 +140,8 @@ public: "the target in an IDE like visual studio. VS_KEYWORD can be set " "to change the visual studio keyword, for example QT integration " "works better if this is set to Qt4VSv1.0.\n" - "VS_SCC_PROJECTNAME, VS_SCC_LOCALPATH, VS_SCC_PROVIDER can be set " + "VS_SCC_PROJECTNAME, VS_SCC_LOCALPATH, VS_SCC_PROVIDER and " + "VS_SCC_AUXPATH can be set " "to add support for source control bindings in a Visual Studio " "project file.\n" "VS_GLOBAL_<variable> can be set to add a Visual Studio " diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index f7d3ba9..6bf7ec9 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1011,7 +1011,7 @@ void cmTarget::DefineProperties(cmake *cm) "provider property."); cm->DefineProperty ("VS_SCC_LOCALPATH", cmProperty::TARGET, - "Visual Studio Source Code Control Provider.", + "Visual Studio Source Code Control Local Path.", "Can be set to change the visual studio source code control " "local path property."); cm->DefineProperty @@ -1020,6 +1020,11 @@ void cmTarget::DefineProperties(cmake *cm) "Can be set to change the visual studio source code control " "project name property."); cm->DefineProperty + ("VS_SCC_AUXPATH", cmProperty::TARGET, + "Visual Studio Source Code Control Aux Path.", + "Can be set to change the visual studio source code control " + "auxpath property."); + cm->DefineProperty ("VS_GLOBAL_<variable>", cmProperty::TARGET, "Visual Studio project-specific global variable.", "Tell the Visual Studio generator to set the global variable " diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 551b0ad..45a79c8 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -182,7 +182,7 @@ void cmVisualStudio10TargetGenerator::Generate() const char* vsLocalPath = this->Target->GetProperty("VS_SCC_LOCALPATH"); const char* vsProvider = this->Target->GetProperty("VS_SCC_PROVIDER"); - if ( vsProjectName && vsLocalPath && vsProvider) + if( vsProjectName && vsLocalPath && vsProvider ) { this->WriteString("<SccProjectName>", 2); (*this->BuildFileStream) << cmVS10EscapeXML(vsProjectName) << @@ -193,6 +193,14 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString("<SccProvider>", 2); (*this->BuildFileStream) << cmVS10EscapeXML(vsProvider) << "</SccProvider>\n"; + + const char* vsAuxPath = this->Target->GetProperty("VS_SCC_AUXPATH"); + if( vsAuxPath ) + { + this->WriteString("<SccAuxPath>", 2); + (*this->BuildFileStream) << cmVS10EscapeXML(vsAuxPath) << + "</SccAuxPath>\n"; + } } this->WriteString("<Keyword>Win32Proj</Keyword>\n", 2); diff --git a/Source/kwsys/CommandLineArguments.cxx b/Source/kwsys/CommandLineArguments.cxx index 9f43a47..ece88ae 100644 --- a/Source/kwsys/CommandLineArguments.cxx +++ b/Source/kwsys/CommandLineArguments.cxx @@ -592,7 +592,7 @@ void CommandLineArguments::GenerateHelp() // Create format for that string char format[80]; - sprintf(format, " %%-%ds ", static_cast<unsigned int>(maxlen)); + sprintf(format, " %%-%us ", static_cast<unsigned int>(maxlen)); maxlen += 4; // For the space before and after the option diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx index 9bc659e..d49c0d7 100644 --- a/Source/kwsys/SystemInformation.cxx +++ b/Source/kwsys/SystemInformation.cxx @@ -72,7 +72,7 @@ # include <ctype.h> // int isdigit(int c); # include <errno.h> // extern int errno; # include <sys/time.h> -#elif __hpux +#elif defined( __hpux ) # include <sys/param.h> # include <sys/pstat.h> #endif @@ -1454,7 +1454,7 @@ bool SystemInformationImplementation::RetrieveCPUClockSpeed() { bool retrieved = false; -#if _WIN32 +#if defined(_WIN32) // First of all we check to see if the RDTSC (0x0F, 0x31) instruction is // supported. If not, we fallback to trying to read this value from the // registry: @@ -2389,7 +2389,7 @@ int SystemInformationImplementation::QueryMemory() this->AvailablePhysicalMemory = 0; #ifdef __CYGWIN__ return 0; -#elif _WIN32 +#elif defined(_WIN32) #if _MSC_VER < 1300 MEMORYSTATUS ms; unsigned long tv, tp, av, ap; @@ -2415,7 +2415,7 @@ int SystemInformationImplementation::QueryMemory() this->AvailableVirtualMemory = av>>10>>10; this->AvailablePhysicalMemory = ap>>10>>10; return 1; -#elif __linux +#elif defined(__linux) unsigned long tv=0; unsigned long tp=0; unsigned long av=0; @@ -2532,7 +2532,7 @@ int SystemInformationImplementation::QueryMemory() } fclose( fd ); return 1; -#elif __hpux +#elif defined(__hpux) unsigned long tv=0; unsigned long tp=0; unsigned long av=0; @@ -2639,7 +2639,7 @@ LongLong SystemInformationImplementation::GetCyclesDifference (DELAY_FUNC DelayF /** Compute the delay overhead */ void SystemInformationImplementation::DelayOverhead(unsigned int uiMS) { -#if _WIN32 +#if defined(_WIN32) LARGE_INTEGER Frequency, StartCounter, EndCounter; __int64 x; @@ -2664,10 +2664,19 @@ void SystemInformationImplementation::DelayOverhead(unsigned int uiMS) /** Return the number of logical CPU per physical CPUs Works only for windows */ unsigned char SystemInformationImplementation::LogicalCPUPerPhysicalCPU(void) { +#ifdef __APPLE__ + size_t len = 4; + int cores_per_package = 0; + int err = sysctlbyname("machdep.cpu.cores_per_package", &cores_per_package, &len, NULL, 0); + if (err != 0) + { + return 1; // That name was not found, default to 1 + } + return static_cast<unsigned char>(cores_per_package); +#else unsigned int Regebx = 0; - #if USE_ASM_INSTRUCTIONS - if (!this->IsHyperThreadingSupported()) + if (!this->IsHyperThreadingSupported()) { return static_cast<unsigned char>(1); // HT not supported } @@ -2678,22 +2687,8 @@ unsigned char SystemInformationImplementation::LogicalCPUPerPhysicalCPU(void) mov Regebx, ebx } #endif - -#ifdef __APPLE__ - size_t len = 4; - int cores_per_package = 0; - int err = sysctlbyname("machdep.cpu.cores_per_package", &cores_per_package, &len, NULL, 0); - if (err != 0) - { - return 1; // That name was not found, default to 1 - } - else - { - return static_cast<unsigned char>(cores_per_package); - } -#endif - return static_cast<unsigned char> ((Regebx & NUM_LOGICAL_BITS) >> 16); +#endif } @@ -2769,7 +2764,7 @@ unsigned char SystemInformationImplementation::GetAPICId() /** Count the number of CPUs. Works only on windows. */ int SystemInformationImplementation::CPUCount() { -#if _WIN32 +#if defined(_WIN32) unsigned char StatusFlag = 0; SYSTEM_INFO info; @@ -3359,7 +3354,7 @@ bool SystemInformationImplementation::QueryQNXProcessor() /** Query the operating system information */ bool SystemInformationImplementation::QueryOSInformation() { -#if _WIN32 +#if defined(_WIN32) this->OSName = "Windows"; diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 695949a..1bf19c0 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -371,6 +371,10 @@ bool SystemTools::GetEnv(const char* key, kwsys_stl::string& result) } } +#ifdef INTEL_COMPILER +#pragma warning disable 444 +#endif + class kwsysDeletingCharVector : public kwsys_stl::vector<char*> { public: @@ -399,6 +403,10 @@ bool SystemTools::PutEnv(const char* value) return ret == 0; } +#ifdef INTEL_COMPILER +#pragma warning restore 444 +#endif + const char* SystemTools::GetExecutableExtension() { diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index 6c57464..38b9719 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -15,7 +15,7 @@ SET(KWSYS_DATE_STAMP_YEAR 2011) # KWSys version date month component. Format is MM. -SET(KWSYS_DATE_STAMP_MONTH 10) +SET(KWSYS_DATE_STAMP_MONTH 11) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 31) +SET(KWSYS_DATE_STAMP_DAY 08) |