diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 2 | ||||
-rw-r--r-- | Source/cmDocumentationFormatterHTML.cxx | 2 | ||||
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 92 | ||||
-rw-r--r-- | Source/cmFindPackageCommand.h | 2 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 2 | ||||
-rw-r--r-- | Source/kwsys/CMakeLists.txt | 70 | ||||
-rw-r--r-- | Source/kwsys/SystemInformation.cxx | 2 | ||||
-rw-r--r-- | Source/kwsys/hash_fun.hxx.in | 5 | ||||
-rw-r--r-- | Source/kwsys/kwsysPlatformTestsCXX.cxx | 9 |
10 files changed, 115 insertions, 73 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 8f614c5..9a31b07 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -2,5 +2,5 @@ SET(CMake_VERSION_MAJOR 2) SET(CMake_VERSION_MINOR 8) SET(CMake_VERSION_PATCH 8) -SET(CMake_VERSION_TWEAK 20120507) +SET(CMake_VERSION_TWEAK 20120508) #SET(CMake_VERSION_RC 1) diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index ae06b0f..15c02b4 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -800,7 +800,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage( std::string st2gcovOutputRex1 = "^File *[`'](.*)'$"; std::string st2gcovOutputRex2 = "Lines executed: *[0-9]+\\.[0-9]+% of [0-9]+$"; - std::string st2gcovOutputRex3 = "^(.*):creating [`'](.*\\.gcov)'"; + std::string st2gcovOutputRex3 = "^(.*)reating [`'](.*\\.gcov)'"; std::string st2gcovOutputRex4 = "^(.*):unexpected EOF *$"; std::string st2gcovOutputRex5 = "^(.*):cannot open source file*$"; std::string st2gcovOutputRex6 diff --git a/Source/cmDocumentationFormatterHTML.cxx b/Source/cmDocumentationFormatterHTML.cxx index ed28b45..cd0077e 100644 --- a/Source/cmDocumentationFormatterHTML.cxx +++ b/Source/cmDocumentationFormatterHTML.cxx @@ -145,7 +145,7 @@ void cmDocumentationFormatterHTML cmDocumentationPrintHTMLId(os, op->Name.c_str()); os << "\"><b><code>"; this->PrintHTMLEscapes(os, op->Name.c_str()); - os << "</code></b></a></li>"; + os << "</code></b></a></li>\n"; } } os << "</ul>\n" ; diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 4f9ba7e..be47f95 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -1368,41 +1368,73 @@ bool cmFindPackageCommand::ReadListFile(const char* f, PolicyScopeRule psr) } //---------------------------------------------------------------------------- -void cmFindPackageCommand::AppendToProperty(const char* propertyName) +void cmFindPackageCommand::AppendToFoundProperty(bool found) { - std::string propertyValue; - const char *prop = - this->Makefile->GetCMakeInstance()->GetProperty(propertyName); - if (prop && *prop) + std::vector<std::string> foundContents; + const char *foundProp = + this->Makefile->GetCMakeInstance()->GetProperty("PACKAGES_FOUND"); + if (foundProp && *foundProp) { - propertyValue = prop; + std::string tmp = foundProp; - std::vector<std::string> contents; - cmSystemTools::ExpandListArgument(propertyValue, contents, false); - - bool alreadyInserted = false; - for(std::vector<std::string>::const_iterator it = contents.begin(); - it != contents.end(); ++ it ) + cmSystemTools::ExpandListArgument(tmp, foundContents, false); + std::vector<std::string>::iterator nameIt = std::find( + foundContents.begin(), foundContents.end(), this->Name); + if(nameIt != foundContents.end()) { - if (*it == this->Name) - { - alreadyInserted = true; - break; - } + foundContents.erase(nameIt); } - if (!alreadyInserted) + } + + std::vector<std::string> notFoundContents; + const char *notFoundProp = + this->Makefile->GetCMakeInstance()->GetProperty("PACKAGES_NOT_FOUND"); + if (notFoundProp && *notFoundProp) + { + std::string tmp = notFoundProp; + + cmSystemTools::ExpandListArgument(tmp, notFoundContents, false); + std::vector<std::string>::iterator nameIt = std::find( + notFoundContents.begin(), notFoundContents.end(), this->Name); + if(nameIt != notFoundContents.end()) { - propertyValue += ";"; - propertyValue += this->Name; + notFoundContents.erase(nameIt); } } + + if(found) + { + foundContents.push_back(this->Name); + } else { - propertyValue = this->Name; + notFoundContents.push_back(this->Name); + } + + + std::string tmp; + const char* sep =""; + for(size_t i=0; i<foundContents.size(); i++) + { + tmp += sep; + tmp += foundContents[i]; + sep = ";"; + } + + this->Makefile->GetCMakeInstance()->SetProperty("PACKAGES_FOUND", + tmp.c_str()); + + tmp = ""; + sep = ""; + for(size_t i=0; i<notFoundContents.size(); i++) + { + tmp += sep; + tmp += notFoundContents[i]; + sep = ";"; } - this->Makefile->GetCMakeInstance()->SetProperty(propertyName, - propertyValue.c_str()); - } + this->Makefile->GetCMakeInstance()->SetProperty("PACKAGES_NOT_FOUND", + tmp.c_str()); +} //---------------------------------------------------------------------------- void cmFindPackageCommand::AppendSuccessInformation() @@ -1413,14 +1445,10 @@ void cmFindPackageCommand::AppendSuccessInformation() const char* upperResult = this->Makefile->GetDefinition(upperFound.c_str()); const char* result = this->Makefile->GetDefinition(found.c_str()); - if ((cmSystemTools::IsOn(result)) || (cmSystemTools::IsOn(upperResult))) - { - this->AppendToProperty("PACKAGES_FOUND"); - } - else - { - this->AppendToProperty("PACKAGES_NOT_FOUND"); - } + bool packageFound = ((cmSystemTools::IsOn(result)) + || (cmSystemTools::IsOn(upperResult))); + + this->AppendToFoundProperty(packageFound); // Record whether the find was quiet or not, so this can be used // e.g. in FeatureSummary.cmake diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h index edb70a6..c380122 100644 --- a/Source/cmFindPackageCommand.h +++ b/Source/cmFindPackageCommand.h @@ -69,7 +69,7 @@ protected: virtual void GenerateDocumentation(); private: void AppendSuccessInformation(); - void AppendToProperty(const char* propertyName); + void AppendToFoundProperty(bool found); void SetModuleVariables(const std::string& components); bool FindModule(bool& found); void AddFindDefinition(const char* var, const char* val); diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 4789197..c9bb006 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -832,7 +832,7 @@ void cmTarget::DefineProperties(cmake *cm) "plugins. If you use it on normal shared libraries which other targets " "link against, on some platforms a linker will insert a full path to " "the library (as specified at link time) into the dynamic section of " - "the dependant binary. Therefore, once installed, dynamic linker may " + "the dependent binary. Therefore, once installed, dynamic loader may " "eventually fail to locate the library for the binary."); cm->DefineProperty diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index 520cafb..a132357 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -141,7 +141,6 @@ IF(KWSYS_USE_Process) SET(KWSYS_USE_System 1) ENDIF(KWSYS_USE_Process) IF(KWSYS_USE_SystemInformation) - SET(KWSYS_USE_FundamentalType 1) SET(KWSYS_USE_Process 1) ENDIF(KWSYS_USE_SystemInformation) @@ -413,6 +412,39 @@ IF(UNIX) "Checking whether struct stat has st_mtim member" DIRECT) ENDIF(UNIX) +# Check existence and uniqueness of long long and __int64. +KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_LONG_LONG + "Checking whether C++ compiler has 'long long'" DIRECT) +KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS___INT64 + "Checking whether C++ compiler has '__int64'" DIRECT) +IF(KWSYS_CXX_HAS___INT64) + KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_SAME_LONG_AND___INT64 + "Checking whether long and __int64 are the same type" DIRECT) + IF(KWSYS_CXX_HAS_LONG_LONG) + KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_SAME_LONG_LONG_AND___INT64 + "Checking whether long long and __int64 are the same type" DIRECT) + ENDIF() +ENDIF() + +# Enable the "long long" type if it is available. It is standard in +# C99 and C++03 but not in earlier standards. +IF(KWSYS_CXX_HAS_LONG_LONG) + SET(KWSYS_USE_LONG_LONG 1) +ELSE() + SET(KWSYS_USE_LONG_LONG 0) +ENDIF() + +# Enable the "__int64" type if it is available and unique. It is not +# standard. +SET(KWSYS_USE___INT64 0) +IF(KWSYS_CXX_HAS___INT64) + IF(NOT KWSYS_CXX_SAME_LONG_AND___INT64) + IF(NOT KWSYS_CXX_SAME_LONG_LONG_AND___INT64) + SET(KWSYS_USE___INT64 1) + ENDIF() + ENDIF() +ENDIF() + IF(KWSYS_USE_FundamentalType) # Look for type size helper macros. KWSYS_PLATFORM_INFO_TEST(C KWSYS_C_TYPE_MACROS @@ -463,34 +495,6 @@ IF(KWSYS_USE_FundamentalType) ENDIF() ENDFOREACH() - # Check uniqueness of types. - IF(KWSYS_SIZEOF___INT64) - KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_SAME_LONG_AND___INT64 - "Checking whether long and __int64 are the same type" DIRECT) - IF(KWSYS_SIZEOF_LONG_LONG) - KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_SAME_LONG_LONG_AND___INT64 - "Checking whether long long and __int64 are the same type" DIRECT) - ENDIF(KWSYS_SIZEOF_LONG_LONG) - ENDIF(KWSYS_SIZEOF___INT64) - - # Enable the "long long" type if it is available. It is standard in - # C99 and C++03 but not in earlier standards. - IF(KWSYS_SIZEOF_LONG_LONG) - SET(KWSYS_USE_LONG_LONG 1) - ELSE(KWSYS_SIZEOF_LONG_LONG) - SET(KWSYS_USE_LONG_LONG 0) - ENDIF(KWSYS_SIZEOF_LONG_LONG) - - # Enable the "__int64" type if it is available and unique. It is not - # standard. - SET(KWSYS_USE___INT64 0) - IF(KWSYS_SIZEOF___INT64) - IF(NOT KWSYS_CXX_SAME_LONG_AND___INT64) - IF(NOT KWSYS_CXX_SAME_LONG_LONG_AND___INT64) - SET(KWSYS_USE___INT64 1) - ENDIF(NOT KWSYS_CXX_SAME_LONG_LONG_AND___INT64) - ENDIF(NOT KWSYS_CXX_SAME_LONG_AND___INT64) - ENDIF(KWSYS_SIZEOF___INT64) IF(KWSYS_USE___INT64) KWSYS_PLATFORM_CXX_TEST(KWSYS_CAN_CONVERT_UI64_TO_DOUBLE "Checking whether unsigned __int64 can convert to double" DIRECT) @@ -505,8 +509,6 @@ ENDIF(KWSYS_USE_FundamentalType) IF(KWSYS_USE_IOStream) # Determine whether iostreams support long long. - KWSYS_PLATFORM_CXX_TEST(KWSYS_CXX_HAS_LONG_LONG - "Checking whether C++ compiler has 'long long'" DIRECT) IF(KWSYS_CXX_HAS_LONG_LONG) SET(KWSYS_PLATFORM_CXX_TEST_DEFINES -DKWSYS_IOS_USE_ANSI=${KWSYS_IOS_USE_ANSI} @@ -563,6 +565,12 @@ IF(KWSYS_USE_SystemTools) COMPILE_FLAGS "-DKWSYS_CXX_HAS_SETENV=${KWSYS_CXX_HAS_SETENV} -DKWSYS_CXX_HAS_UNSETENV=${KWSYS_CXX_HAS_UNSETENV} -DKWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H=${KWSYS_CXX_HAS_ENVIRON_IN_STDLIB_H}") ENDIF() +IF(KWSYS_USE_SystemInformation) + SET_PROPERTY(SOURCE SystemInformation.cxx PROPERTY + COMPILE_DEFINITIONS KWSYS_USE_LONG_LONG=${KWSYS_USE_LONG_LONG} + KWSYS_USE___INT64=${KWSYS_USE___INT64}) +ENDIF() + #----------------------------------------------------------------------------- # Choose a directory for the generated headers. IF(NOT KWSYS_HEADER_ROOT) diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx index d49c0d7..e1ee873 100644 --- a/Source/kwsys/SystemInformation.cxx +++ b/Source/kwsys/SystemInformation.cxx @@ -26,7 +26,6 @@ // http://msdn.microsoft.com/en-us/library/ms683219(VS.85).aspx #include "kwsysPrivate.h" -#include KWSYS_HEADER(FundamentalType.h) #include KWSYS_HEADER(stl/string) #include KWSYS_HEADER(stl/vector) #include KWSYS_HEADER(ios/iosfwd) @@ -38,7 +37,6 @@ // Work-around CMake dependency scanning limitation. This must // duplicate the above list of headers. #if 0 -# include "FundamentalType.h.in" # include "SystemInformation.hxx.in" # include "Process.h.in" # include "Configure.hxx.in" diff --git a/Source/kwsys/hash_fun.hxx.in b/Source/kwsys/hash_fun.hxx.in index 8c5eb6a..6f787dd 100644 --- a/Source/kwsys/hash_fun.hxx.in +++ b/Source/kwsys/hash_fun.hxx.in @@ -38,7 +38,6 @@ #define @KWSYS_NAMESPACE@_hash_fun_hxx #include <@KWSYS_NAMESPACE@/Configure.hxx> -#include <@KWSYS_NAMESPACE@/FundamentalType.h> #include <@KWSYS_NAMESPACE@/cstddef> // size_t #include <@KWSYS_NAMESPACE@/stl/string> // string @@ -124,7 +123,7 @@ struct hash<unsigned long> { }; // use long long or __int64 -#if @KWSYS_NAMESPACE@_USE_LONG_LONG +#if @KWSYS_USE_LONG_LONG@ @KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION struct hash<long long> { size_t operator()(long long __x) const { return __x; } @@ -134,7 +133,7 @@ struct hash<long long> { struct hash<unsigned long long> { size_t operator()(unsigned long long __x) const { return __x; } }; -#elif @KWSYS_NAMESPACE@_USE___INT64 +#elif @KWSYS_USE___INT64@ @KWSYS_NAMESPACE@_CXX_DEFINE_SPECIALIZATION struct hash<__int64> { size_t operator()(__int64 __x) const { return __x; } diff --git a/Source/kwsys/kwsysPlatformTestsCXX.cxx b/Source/kwsys/kwsysPlatformTestsCXX.cxx index 16124d3..7b73d06 100644 --- a/Source/kwsys/kwsysPlatformTestsCXX.cxx +++ b/Source/kwsys/kwsysPlatformTestsCXX.cxx @@ -122,6 +122,15 @@ int main() } #endif +#ifdef TEST_KWSYS_CXX_HAS___INT64 +__int64 f(__int64 n) { return n; } +int main() +{ + __int64 n = 0; + return static_cast<int>(f(n)); +} +#endif + #ifdef TEST_KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS template <class T> class A; template <class T> int f(A<T>&); |