summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CPackRPM.cmake5
-rw-r--r--Modules/FindBZip2.cmake10
-rw-r--r--Modules/FindPythonLibs.cmake10
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmArchiveWrite.cxx1
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx6
-rw-r--r--Source/cmLocalNinjaGenerator.cxx4
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx51
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx6
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx6
-rw-r--r--Source/cmNinjaTargetGenerator.cxx4
-rw-r--r--Source/cmQtAutomoc.cxx5
-rw-r--r--Source/kwsys/hashtable.hxx.in2
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_endian.h3
14 files changed, 74 insertions, 41 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index cba746f..ae93512 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -488,7 +488,10 @@ FOREACH(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLIC
MESSAGE("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
ENDIF(CPACK_RPM_PACKAGE_DEBUG)
SET(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}")
-ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
+ ELSE(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
+ # Do not forget to unset previously set header (from previous component)
+ UNSET(TMP_RPM_${_RPM_SPEC_HEADER})
+ ENDIF(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP)
ENDFOREACH(_RPM_SPEC_HEADER)
# CPACK_RPM_SPEC_INSTALL_POST
diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake
index 7130192..ce7f255 100644
--- a/Modules/FindBZip2.cmake
+++ b/Modules/FindBZip2.cmake
@@ -22,11 +22,15 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h )
+SET(_BZIP2_PATHS PATHS
+ "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Bzip2;InstallPath]"
+ )
+
+FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h ${_BZIP2_PATHS} PATH_SUFFIXES include)
IF (NOT BZIP2_LIBRARIES)
- FIND_LIBRARY(BZIP2_LIBRARY_RELEASE NAMES bz2 bzip2 )
- FIND_LIBRARY(BZIP2_LIBRARY_DEBUG NAMES bzip2d )
+ FIND_LIBRARY(BZIP2_LIBRARY_RELEASE NAMES bz2 bzip2 ${_BZIP2_PATHS} PATH_SUFFIXES lib)
+ FIND_LIBRARY(BZIP2_LIBRARY_DEBUG NAMES bzip2d ${_BZIP2_PATHS} PATH_SUFFIXES lib)
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
SELECT_LIBRARY_CONFIGURATIONS(BZIP2)
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 478ebcb..11ff196 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -45,13 +45,19 @@ IF(PythonLibs_FIND_VERSION)
STRING(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION}")
STRING(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}")
UNSET(_PYTHON_FIND_OTHER_VERSIONS)
- IF(NOT PythonLibs_FIND_VERSION_EXACT)
+ IF(PythonLibs_FIND_VERSION_EXACT)
+ IF(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
+ SET(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}")
+ ELSE(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
+ SET(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}" "${_PYTHON_FIND_MAJ_MIN}")
+ ENDIF(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION)
+ ELSE(PythonLibs_FIND_VERSION_EXACT)
FOREACH(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS})
IF(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
LIST(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
ENDIF()
ENDFOREACH()
- ENDIF(NOT PythonLibs_FIND_VERSION_EXACT)
+ ENDIF(PythonLibs_FIND_VERSION_EXACT)
UNSET(_PYTHON_FIND_MAJ_MIN)
UNSET(_PYTHON_FIND_MAJ)
ELSE(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 1fb7bb7..345a56f 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 20120606)
+SET(CMake_VERSION_TWEAK 20120612)
#SET(CMake_VERSION_RC 1)
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx
index dc6b749..b410e44 100644
--- a/Source/cmArchiveWrite.cxx
+++ b/Source/cmArchiveWrite.cxx
@@ -240,6 +240,7 @@ bool cmArchiveWrite::AddFile(const char* file,
// Clear acl and xattr fields not useful for distribution.
archive_entry_acl_clear(e);
archive_entry_xattr_clear(e);
+ archive_entry_set_fflags(e, 0, 0);
if(archive_write_header(this->Archive, e) != ARCHIVE_OK)
{
this->Error = "archive_write_header: ";
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 0e89fab..40348e6 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -66,7 +66,7 @@ std::string cmGlobalNinjaGenerator::EncodeIdent(const std::string &ident,
if (std::find_if(ident.begin(), ident.end(),
std::not1(std::ptr_fun(IsIdentChar))) != ident.end()) {
static unsigned VarNum = 0;
- std::ostringstream names;
+ cmOStringStream names;
names << "ident" << VarNum++;
vars << names.str() << " = " << ident << "\n";
return "$" + names.str();
@@ -123,7 +123,7 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
cmGlobalNinjaGenerator::WriteComment(os, comment);
- std::ostringstream builds;
+ cmOStringStream builds;
// TODO: Better formatting for when there are multiple input/output files.
@@ -825,7 +825,7 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
cmLocalGenerator *lg = this->LocalGenerators[0];
cmMakefile* mfRoot = lg->GetMakefile();
- std::ostringstream cmd;
+ cmOStringStream cmd;
cmd << lg->ConvertToOutputFormat(
mfRoot->GetRequiredDefinition("CMAKE_COMMAND"),
cmLocalGenerator::SHELL)
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 425b219..f6a6bc2 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -280,7 +280,7 @@ std::string cmLocalNinjaGenerator::BuildCommandLine(
// $in variables. A discussion about dealing with multiple commands in
// a rule is started here:
// groups.google.com/group/ninja-build/browse_thread/thread/d515f23a78986008
- std::ostringstream cmd;
+ cmOStringStream cmd;
for (std::vector<std::string>::const_iterator li = cmdLines.begin();
li != cmdLines.end(); ++li) {
if (li != cmdLines.begin())
@@ -299,7 +299,7 @@ void cmLocalNinjaGenerator::AppendCustomCommandLines(const cmCustomCommand *cc,
if (!wd)
wd = this->GetMakefile()->GetStartOutputDirectory();
- std::ostringstream cdCmd;
+ cmOStringStream cdCmd;
cdCmd << "cd " << this->ConvertToOutputFormat(wd, SHELL);
cmdLines.push_back(cdCmd.str());
}
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index a645303..db93529 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -36,6 +36,30 @@
#include <queue>
//----------------------------------------------------------------------------
+// Escape special characters in Makefile dependency lines
+class cmMakeSafe
+{
+public:
+ cmMakeSafe(const char* s): Data(s) {}
+ cmMakeSafe(std::string const& s): Data(s.c_str()) {}
+private:
+ const char* Data;
+ friend std::ostream& operator<<(std::ostream& os,
+ cmMakeSafe const& self)
+ {
+ for(const char* c = self.Data; *c; ++c)
+ {
+ switch (*c)
+ {
+ case '=': os << "$(EQUALS)"; break;
+ default: os << *c; break;
+ }
+ }
+ return os;
+ }
+};
+
+//----------------------------------------------------------------------------
// Helper function used below.
static std::string cmSplitExtension(std::string const& in, std::string& base)
{
@@ -555,28 +579,13 @@ cmLocalUnixMakefileGenerator3
space = " ";
}
- // Warn about paths not supported by Make tools.
- std::string::size_type pos = tgt.find_first_of("=");
- if(pos != std::string::npos)
- {
- cmOStringStream m;
- m <<
- "Make rule for\n"
- " " << tgt << "\n"
- "has '=' on left hand side. "
- "The make tool may not support this.";
- cmListFileBacktrace bt;
- this->GlobalGenerator->GetCMakeInstance()
- ->IssueMessage(cmake::WARNING, m.str(), bt);
- }
-
// Mark the rule as symbolic if requested.
if(symbolic)
{
if(const char* sym =
this->Makefile->GetDefinition("CMAKE_MAKE_SYMBOLIC_RULE"))
{
- os << tgt.c_str() << space << ": " << sym << "\n";
+ os << cmMakeSafe(tgt) << space << ": " << sym << "\n";
}
}
@@ -584,7 +593,7 @@ cmLocalUnixMakefileGenerator3
if(depends.empty())
{
// No dependencies. The commands will always run.
- os << tgt.c_str() << space << ":\n";
+ os << cmMakeSafe(tgt) << space << ":\n";
}
else
{
@@ -595,7 +604,7 @@ cmLocalUnixMakefileGenerator3
{
replace = *dep;
replace = this->Convert(replace.c_str(),HOME_OUTPUT,MAKEFILE);
- os << tgt.c_str() << space << ": " << replace.c_str() << "\n";
+ os << cmMakeSafe(tgt) << space << ": " << cmMakeSafe(replace) << "\n";
}
}
@@ -608,7 +617,7 @@ cmLocalUnixMakefileGenerator3
}
if(symbolic && !this->WatcomWMake)
{
- os << ".PHONY : " << tgt.c_str() << "\n";
+ os << ".PHONY : " << cmMakeSafe(tgt) << "\n";
}
os << "\n";
// Add the output to the local help if requested.
@@ -687,6 +696,10 @@ cmLocalUnixMakefileGenerator3
<< this->ConvertShellCommand(cmakecommand, FULL)
<< " -E remove -f\n"
<< "\n";
+ makefileStream
+ << "# Escaping for special characters.\n"
+ << "EQUALS = =\n"
+ << "\n";
if(const char* edit_cmd =
this->Makefile->GetDefinition("CMAKE_EDIT_COMMAND"))
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 9faf46d..f2ab79d 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1933,9 +1933,11 @@ cmLocalVisualStudio7Generator
vskey += "\\Packages\\" CM_INTEL_PLUGIN_GUID ";ProductVersion";
cmSystemTools::ReadRegistryValue(vskey.c_str(), intelVersion,
cmSystemTools::KeyWOW64_32);
- if (intelVersion.find("12") == 0 || (intelVersion.find("11") == 0))
+ if (intelVersion.find("13") == 0 ||
+ intelVersion.find("12") == 0 ||
+ intelVersion.find("11") == 0)
{
- // Version 11.x and 12.x actually use 11.0 in project files!
+ // Version 11.x, 12.x, and 13.x actually use 11.0 in project files!
intelVersion = "11.0" ;
}
else if(intelVersion.find("10") == 0)
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 8b86a98..1751091 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -215,10 +215,10 @@ cmNinjaNormalTargetGenerator
this->GetLocalGenerator()->BuildCommandLine(linkCmds);
// Write the linker rule.
- std::ostringstream comment;
+ cmOStringStream comment;
comment << "Rule for linking " << this->TargetLinkLanguage << " "
<< this->GetVisibleTypeName() << ".";
- std::ostringstream description;
+ cmOStringStream description;
description << "Linking " << this->TargetLinkLanguage << " "
<< this->GetVisibleTypeName() << " $out";
this->GetGlobalGenerator()->AddRule(ruleName,
@@ -353,7 +353,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
/*implib=*/true).c_str());
// Compute the comment.
- std::ostringstream comment;
+ cmOStringStream comment;
comment << "Link the " << this->GetVisibleTypeName() << " "
<< targetOutputReal;
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index e419a4d..32b8f93 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -365,9 +365,9 @@ cmNinjaTargetGenerator
this->GetLocalGenerator()->BuildCommandLine(compileCmds);
// Write the rule for compiling file of the given language.
- std::ostringstream comment;
+ cmOStringStream comment;
comment << "Rule for compiling " << language << " files.";
- std::ostringstream description;
+ cmOStringStream description;
description << "Building " << language << " object $out";
this->GetGlobalGenerator()->AddRule(this->LanguageCompilerRule(language),
cmdLine,
diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx
index ca27530..113d678 100644
--- a/Source/cmQtAutomoc.cxx
+++ b/Source/cmQtAutomoc.cxx
@@ -18,6 +18,7 @@
#include "cmSystemTools.h"
#include <cmsys/Terminal.h>
+#include <cmsys/ios/sstream>
#include <string.h>
#if defined(__APPLE__)
@@ -549,7 +550,7 @@ bool cmQtAutomoc::RunAutomoc()
this->GenerateMoc(it->first, it->second);
}
- std::stringstream outStream(std::stringstream::out);
+ cmsys_ios::stringstream outStream;
outStream << "/* This file is autogenerated, do not edit*/\n";
bool automocCppChanged = false;
@@ -1077,7 +1078,7 @@ bool cmQtAutomoc::EndsWith(const std::string& str, const std::string& with)
std::string cmQtAutomoc::ReadAll(const std::string& filename)
{
std::ifstream file(filename.c_str());
- std::stringstream stream;
+ cmsys_ios::stringstream stream;
stream << file.rdbuf();
file.close();
return stream.str();
diff --git a/Source/kwsys/hashtable.hxx.in b/Source/kwsys/hashtable.hxx.in
index db52fc8..c835503 100644
--- a/Source/kwsys/hashtable.hxx.in
+++ b/Source/kwsys/hashtable.hxx.in
@@ -394,7 +394,7 @@ enum { _stl_num_primes = 31 };
// create a function with a static local to that function that returns
// the static
-inline const unsigned long* get_stl_prime_list() {
+static inline const unsigned long* get_stl_prime_list() {
static const unsigned long _stl_prime_list[_stl_num_primes] =
{
diff --git a/Utilities/cmlibarchive/libarchive/archive_endian.h b/Utilities/cmlibarchive/libarchive/archive_endian.h
index c3c78b3..bbf58fd 100644
--- a/Utilities/cmlibarchive/libarchive/archive_endian.h
+++ b/Utilities/cmlibarchive/libarchive/archive_endian.h
@@ -45,11 +45,14 @@
* - SGI MIPSpro
* - Microsoft Visual C++ 6.0 (supposedly newer versions too)
* - IBM VisualAge 6 (XL v6)
+ * - Sun WorkShop C (SunPro) before 5.9
*/
#if defined(__WATCOMC__) || defined(__sgi) || defined(__hpux) || defined(__BORLANDC__)
#define inline
#elif defined(__IBMC__) && __IBMC__ < 700
#define inline
+#elif defined(__SUNPRO_C) && __SUNPRO_C < 0x590
+#define inline
#elif defined(_MSC_VER) || defined(__osf__)
#define inline __inline
#endif