summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/Compiler/GNU-Fortran.cmake3
-rw-r--r--Modules/CompilerId/Xcode-3.pbxproj.in1
-rw-r--r--Modules/ExternalProject.cmake5
-rw-r--r--Modules/FindMFC.cmake2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx2
-rw-r--r--Source/CPack/WiX/cmWIXPatchParser.cxx4
-rw-r--r--Source/CPack/WiX/cmWIXSourceWriter.cxx10
-rw-r--r--Source/CPack/WiX/cmWIXSourceWriter.h2
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx5
-rw-r--r--Source/QtDialog/CMakeLists.txt4
-rw-r--r--Source/cmCTest.cxx27
-rw-r--r--Source/cmFileCommand.cxx1
-rw-r--r--Source/cmFindPackageCommand.cxx2
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx61
-rw-r--r--Source/cmMakefile.cxx8
-rw-r--r--Source/cmSetTargetPropertiesCommand.cxx10
-rw-r--r--Source/cmSetTestsPropertiesCommand.cxx11
-rw-r--r--Utilities/cmcurl/CMakeLists.txt10
19 files changed, 85 insertions, 85 deletions
diff --git a/Modules/Compiler/GNU-Fortran.cmake b/Modules/Compiler/GNU-Fortran.cmake
index dfd7927..e9c8a59 100644
--- a/Modules/Compiler/GNU-Fortran.cmake
+++ b/Modules/Compiler/GNU-Fortran.cmake
@@ -8,5 +8,8 @@ set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
set(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os")
set(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3")
+# No -isystem for Fortran because it will not find .mod files.
+unset(CMAKE_INCLUDE_SYSTEM_FLAG_Fortran)
+
# Fortran-specific feature flags.
set(CMAKE_Fortran_MODDIR_FLAG -J)
diff --git a/Modules/CompilerId/Xcode-3.pbxproj.in b/Modules/CompilerId/Xcode-3.pbxproj.in
index 7f686a2..20f3da3 100644
--- a/Modules/CompilerId/Xcode-3.pbxproj.in
+++ b/Modules/CompilerId/Xcode-3.pbxproj.in
@@ -79,7 +79,6 @@
1DEB928A08733DD80010E9CD = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
ONLY_ACTIVE_ARCH = YES;
CODE_SIGNING_REQUIRED = NO;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index d7b985d..0c73d41 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1197,7 +1197,10 @@ function(_ep_get_build_command name step cmd_var)
else()
set(cmd "${CMAKE_COMMAND}")
endif()
- set(args --build ${binary_dir} --config ${CMAKE_CFG_INTDIR})
+ set(args --build ".")
+ if (CMAKE_CFG_INTDIR AND NOT CMAKE_CFG_INTDIR STREQUAL ".")
+ list(APPEND args --config "${CMAKE_CFG_INTDIR}")
+ endif ()
if(step STREQUAL "INSTALL")
list(APPEND args --target install)
endif()
diff --git a/Modules/FindMFC.cmake b/Modules/FindMFC.cmake
index 261ebdb..3547628 100644
--- a/Modules/FindMFC.cmake
+++ b/Modules/FindMFC.cmake
@@ -36,7 +36,7 @@ if(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW)
endif()
if(MFC_ATTEMPT_TRY_COMPILE)
- if("MFC_HAVE_MFC" MATCHES "^MFC_HAVE_MFC$")
+ if(NOT DEFINED MFC_HAVE_MFC)
set(CHECK_INCLUDE_FILE_VAR "afxwin.h")
configure_file(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx)
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 8f0e54c..ef2842a 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 2)
-set(CMake_VERSION_PATCH 20150325)
+set(CMake_VERSION_PATCH 20150330)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index 257ce7a..99eabf2 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -430,7 +430,7 @@ void cmCPackWIXGenerator::AddDefinition(cmWIXSourceWriter& source,
tmp << name << "=\"" << value << '"';
source.AddProcessingInstruction("define",
- cmWIXSourceWriter::WindowsCodepageToUtf8(tmp.str()));
+ cmWIXSourceWriter::CMakeEncodingToUtf8(tmp.str()));
}
bool cmCPackWIXGenerator::CreateWiXSourceFiles()
diff --git a/Source/CPack/WiX/cmWIXPatchParser.cxx b/Source/CPack/WiX/cmWIXPatchParser.cxx
index ef67b23..e066c28 100644
--- a/Source/CPack/WiX/cmWIXPatchParser.cxx
+++ b/Source/CPack/WiX/cmWIXPatchParser.cxx
@@ -132,8 +132,8 @@ void cmWIXPatchParser::ReportError(int line, int column, const char* msg)
void cmWIXPatchParser::ReportValidationError(std::string const& message)
{
- ReportError(XML_GetCurrentLineNumber(Parser),
- XML_GetCurrentColumnNumber(Parser),
+ ReportError(XML_GetCurrentLineNumber(static_cast<XML_Parser>(this->Parser)),
+ XML_GetCurrentColumnNumber(static_cast<XML_Parser>(this->Parser)),
message.c_str());
}
diff --git a/Source/CPack/WiX/cmWIXSourceWriter.cxx b/Source/CPack/WiX/cmWIXSourceWriter.cxx
index aad19da..219fca8 100644
--- a/Source/CPack/WiX/cmWIXSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXSourceWriter.cxx
@@ -10,6 +10,8 @@
See the License for more information.
============================================================================*/
+#include "cmStandardIncludes.h"
+
#include "cmWIXSourceWriter.h"
#include <CPack/cmCPackGenerator.h>
@@ -118,7 +120,7 @@ void cmWIXSourceWriter::AddProcessingInstruction(
void cmWIXSourceWriter::AddAttribute(
std::string const& key, std::string const& value)
{
- std::string utf8 = WindowsCodepageToUtf8(value);
+ std::string utf8 = CMakeEncodingToUtf8(value);
File << " " << key << "=\"" << EscapeAttributeValue(utf8) << '"';
}
@@ -132,8 +134,11 @@ void cmWIXSourceWriter::AddAttributeUnlessEmpty(
}
}
-std::string cmWIXSourceWriter::WindowsCodepageToUtf8(std::string const& value)
+std::string cmWIXSourceWriter::CMakeEncodingToUtf8(std::string const& value)
{
+#ifdef CMAKE_ENCODING_UTF8
+ return value;
+#else
if(value.empty())
{
return std::string();
@@ -167,6 +172,7 @@ std::string cmWIXSourceWriter::WindowsCodepageToUtf8(std::string const& value)
&utf8[0], static_cast<int>(utf8.size()), 0, 0);
return std::string(&utf8[0], utf8.size());
+#endif
}
diff --git a/Source/CPack/WiX/cmWIXSourceWriter.h b/Source/CPack/WiX/cmWIXSourceWriter.h
index 3957d96..3b9999c 100644
--- a/Source/CPack/WiX/cmWIXSourceWriter.h
+++ b/Source/CPack/WiX/cmWIXSourceWriter.h
@@ -43,7 +43,7 @@ public:
void AddAttributeUnlessEmpty(
std::string const& key, std::string const& value);
- static std::string WindowsCodepageToUtf8(std::string const& value);
+ static std::string CMakeEncodingToUtf8(std::string const& value);
protected:
cmCPackLog* Logger;
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 0a64bd5..87764e1 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -507,6 +507,11 @@ int cmCPackDebGenerator::createDeb()
//int retVal = -1;
res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output,
&retval, toplevel.c_str(), this->GeneratorVerbose, 0);
+ if ( !res || retval )
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running cmake -E md5sum "
+ << cmd << std::endl);
+ }
// debian md5sums entries are like this:
// 014f3604694729f3bf19263bac599765 usr/bin/ccmake
// thus strip the full path (with the trailing slash)
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index b59af94..9cc993a 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -45,11 +45,11 @@ if (Qt5Widgets_FOUND)
get_filename_component(_qt_plugin_file "${_qt_plugin_path}" NAME)
get_filename_component(_qt_plugin_type "${_qt_plugin_path}" PATH)
get_filename_component(_qt_plugin_type "${_qt_plugin_type}" NAME)
- set(_qt_plugin_dest "${CMAKE_INSTALL_PREFIX}/PlugIns/${_qt_plugin_type}")
+ set(_qt_plugin_dest "PlugIns/${_qt_plugin_type}")
install(FILES "${_qt_plugin_path}"
DESTINATION "${_qt_plugin_dest}")
set(${_qt_plugins_var}
- "${${_qt_plugins_var}};${_qt_plugin_dest}/${_qt_plugin_file}")
+ "${${_qt_plugins_var}};\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${_qt_plugin_dest}/${_qt_plugin_file}")
else()
message(FATAL_ERROR "QT plugin ${_qt_plugin_name} not found")
endif()
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 0026fd7..df61fe6 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1343,16 +1343,21 @@ int cmCTest::RunTest(std::vector<const char*> argv,
}
*retVal = inst.Run(args, output);
- *output += oss.str();
- if ( log )
+ if(output)
+ {
+ *output += oss.str();
+ }
+ if ( log && output)
{
*log << *output;
}
cmSystemTools::ChangeDirectory(oldpath);
-
- cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
- "Internal cmCTest object used to run test." << std::endl
- << *output << std::endl);
+ if(output)
+ {
+ cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
+ "Internal cmCTest object used to run test." << std::endl
+ << *output << std::endl);
+ }
return cmsysProcess_State_Exited;
}
@@ -1422,7 +1427,10 @@ int cmCTest::RunTest(std::vector<const char*> argv,
*retVal = cmsysProcess_GetExitException(cp);
std::string outerr = "\n*** Exception executing: ";
outerr += cmsysProcess_GetExceptionString(cp);
- *output += outerr;
+ if(output)
+ {
+ *output += outerr;
+ }
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr.c_str() << std::endl
<< std::flush);
}
@@ -1430,7 +1438,10 @@ int cmCTest::RunTest(std::vector<const char*> argv,
{
std::string outerr = "\n*** ERROR executing: ";
outerr += cmsysProcess_GetErrorString(cp);
- *output += outerr;
+ if(output)
+ {
+ *output += outerr;
+ }
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr.c_str() << std::endl
<< std::flush);
}
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index ae9099e..93e3ac4 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -3422,6 +3422,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
// enable HTTP ERROR parsing
::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
+ check_curl_result(res, "UPLOAD cannot set fail on error flag: ");
// enable uploading
res = ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1);
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 87f9037..4d7fd60 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -679,7 +679,6 @@ bool cmFindPackageCommand::HandlePackageMode()
if(cmSystemTools::IsOff(def) || !fileFound)
{
fileFound = this->FindConfig();
- def = this->Makefile->GetDefinition(this->Variable);
}
// Sanity check.
@@ -1598,7 +1597,6 @@ bool cmFindPackageCommand::CheckVersion(std::string const& config_file)
if ((haveResult == false) && (this->Version.empty()))
{
result = true;
- haveResult = true;
}
ConfigFileInfo configFileInfo;
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index d340e72..f139ad1 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -21,6 +21,7 @@
#include "cmCustomCommandGenerator.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGeneratorFactory.h"
+#include "cmAlgorithms.h"
#include <cmsys/auto_ptr.hxx>
@@ -3380,53 +3381,33 @@ bool cmGlobalXCodeGenerator
this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
const char* osxArch =
this->CurrentMakefile->GetDefinition("CMAKE_OSX_ARCHITECTURES");
- if(!osxArch || strlen(osxArch) == 0)
- {
- if(this->XcodeVersion >= 32)
- {
- osxArch = "$(ARCHS_STANDARD_32_64_BIT)";
- }
- else if(this->XcodeVersion == 31)
- {
- osxArch = "$(ARCHS_STANDARD_32_BIT)";
- }
- else if(this->XcodeVersion <= 30)
- {
-#ifdef __ppc__
- osxArch = "ppc";
-#endif
-#ifdef __i386
- osxArch = "i386";
-#endif
- }
- buildSettings->AddAttribute("ONLY_ACTIVE_ARCH",
- this->CreateString("YES"));
- }
-
const char* sysroot =
this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT");
const char* deploymentTarget =
this->CurrentMakefile->GetDefinition("CMAKE_OSX_DEPLOYMENT_TARGET");
- if(osxArch && sysroot)
+ std::string archs;
+ if(sysroot)
{
- // recompute this as it may have been changed since enable language
- this->Architectures.clear();
- cmSystemTools::ExpandListArgument(std::string(osxArch),
- this->Architectures);
- buildSettings->AddAttribute("SDKROOT",
- this->CreateString(sysroot));
- std::string archString;
- const char* sep = "";
- for( std::vector<std::string>::iterator i =
- this->Architectures.begin();
- i != this->Architectures.end(); ++i)
+ if(osxArch)
{
- archString += sep;
- archString += *i;
- sep = " ";
+ // recompute this as it may have been changed since enable language
+ this->Architectures.clear();
+ cmSystemTools::ExpandListArgument(std::string(osxArch),
+ this->Architectures);
+ archs = cmJoin(this->Architectures, " ");
}
- buildSettings->AddAttribute("ARCHS",
- this->CreateString(archString.c_str()));
+ buildSettings->AddAttribute("SDKROOT",
+ this->CreateString(sysroot));
+ }
+ if (archs.empty())
+ {
+ // Tell Xcode to use NATIVE_ARCH instead of ARCHS.
+ buildSettings->AddAttribute("ONLY_ACTIVE_ARCH", this->CreateString("YES"));
+ }
+ else
+ {
+ // Tell Xcode to use ARCHS (ONLY_ACTIVE_ARCH defaults to NO).
+ buildSettings->AddAttribute("ARCHS", this->CreateString(archs.c_str()));
}
if(deploymentTarget && *deploymentTarget)
{
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index eeb9c72..7f355a6 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2208,7 +2208,7 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name,
if(i==lastElement)
{
// group already exists, replace its regular expression
- if ( regex )
+ if ( regex && sg)
{
// We only want to set the regular expression. If there are already
// source files in the group, we don't want to remove them.
@@ -2224,7 +2224,11 @@ void cmMakefile::AddSourceGroup(const std::vector<std::string>& name,
sg = this->GetSourceGroup(currentName);
i = 0; // last component found
}
-
+ if(!sg)
+ {
+ cmSystemTools::Error("Could not create source group ");
+ return;
+ }
// build the whole source group path
const char* fullname = sg->GetFullName();
cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator();
diff --git a/Source/cmSetTargetPropertiesCommand.cxx b/Source/cmSetTargetPropertiesCommand.cxx
index e41a0ca..06217bb 100644
--- a/Source/cmSetTargetPropertiesCommand.cxx
+++ b/Source/cmSetTargetPropertiesCommand.cxx
@@ -25,14 +25,12 @@ bool cmSetTargetPropertiesCommand
// first collect up the list of files
std::vector<std::string> propertyPairs;
- bool doingFiles = true;
int numFiles = 0;
std::vector<std::string>::const_iterator j;
for(j= args.begin(); j != args.end();++j)
{
if(*j == "PROPERTIES")
{
- doingFiles = false;
// now loop through the rest of the arguments, new style
++j;
if (std::distance(j, args.end()) % 2 != 0)
@@ -43,15 +41,9 @@ bool cmSetTargetPropertiesCommand
propertyPairs.insert(propertyPairs.end(), j, args.end());
break;
}
- else if (doingFiles)
- {
- numFiles++;
- }
else
{
- this->SetError("called with illegal arguments, maybe missing "
- "a PROPERTIES specifier?");
- return false;
+ numFiles++;
}
}
if(propertyPairs.empty())
diff --git a/Source/cmSetTestsPropertiesCommand.cxx b/Source/cmSetTestsPropertiesCommand.cxx
index d079a19..e9cfacc 100644
--- a/Source/cmSetTestsPropertiesCommand.cxx
+++ b/Source/cmSetTestsPropertiesCommand.cxx
@@ -26,14 +26,12 @@ bool cmSetTestsPropertiesCommand
// first collect up the list of files
std::vector<std::string> propertyPairs;
- bool doingFiles = true;
int numFiles = 0;
std::vector<std::string>::const_iterator j;
for(j= args.begin(); j != args.end();++j)
{
if(*j == "PROPERTIES")
{
- doingFiles = false;
// now loop through the rest of the arguments, new style
++j;
if (std::distance(j, args.end()) % 2 != 0)
@@ -44,15 +42,9 @@ bool cmSetTestsPropertiesCommand
propertyPairs.insert(propertyPairs.end(), j, args.end());
break;
}
- else if (doingFiles)
- {
- numFiles++;
- }
else
{
- this->SetError("called with illegal arguments, maybe "
- "missing a PROPERTIES specifier?");
- return false;
+ numFiles++;
}
}
if(propertyPairs.empty())
@@ -62,7 +54,6 @@ bool cmSetTestsPropertiesCommand
return false;
}
-
// now loop over all the targets
int i;
for(i = 0; i < numFiles; ++i)
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index 08bdff5..32e4561 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -524,12 +524,18 @@ check_include_file("features.h" HAVE_FEATURES_H)
if(NOT UNIX)
check_include_file_concat("ws2tcpip.h" HAVE_WS2TCPIP_H)
check_include_file_concat("winsock2.h" HAVE_WINSOCK2_H)
-endif(NOT UNIX)
+else()
+ set(HAVE_WS2TCPIP_H 0)
+ set(HAVE_WINSOCK2_H 0)
+endif()
check_include_file_concat("stdio.h" HAVE_STDIO_H)
if(NOT UNIX)
check_include_file_concat("windows.h" HAVE_WINDOWS_H)
check_include_file_concat("winsock.h" HAVE_WINSOCK_H)
-endif(NOT UNIX)
+else()
+ set(HAVE_WINDOWS_H 0)
+ set(HAVE_WINSOCK_H 0)
+endif()
check_include_file_concat("inttypes.h" HAVE_INTTYPES_H)
check_include_file_concat("sys/filio.h" HAVE_SYS_FILIO_H)