diff --git a/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake b/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake index 9d8ba9ed5..abbcda498 100644 --- a/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake +++ b/Modules/CMakeCheckCompilerFlagCommonPatterns.cmake @@ -32,7 +32,7 @@ macro (CHECK_COMPILER_FLAG_COMMON_PATTERNS _VAR) FAIL_REGEX "[Ww]arning: [Oo]ption" # SunPro FAIL_REGEX "command option .* is not recognized" # XL FAIL_REGEX "command option .* contains an incorrect subargument" # XL - FAIL_REGEX "not supported in this configuration; ignored" # AIX + FAIL_REGEX "not supported in this configuration. ignored" # AIX FAIL_REGEX "File with unknown suffix passed to linker" # PGI FAIL_REGEX "WARNING: unknown flag:" # Open64 FAIL_REGEX "Incorrect command line option:" # Borland diff --git a/Modules/CMakeExpandImportedTargets.cmake b/Modules/CMakeExpandImportedTargets.cmake index 0752e04a3..b6ab7efb5 100644 --- a/Modules/CMakeExpandImportedTargets.cmake +++ b/Modules/CMakeExpandImportedTargets.cmake @@ -71,7 +71,11 @@ function(CMAKE_EXPAND_IMPORTED_TARGETS _RESULT ) set(_CCSR_NEW_REQ_LIBS ) set(_CHECK_FOR_IMPORTED_TARGETS FALSE) foreach(_CURRENT_LIB ${_CCSR_REQ_LIBS}) - get_target_property(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS) + if(TARGET "${_CURRENT_LIB}") + get_target_property(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS) + else() + set(_importedConfigs "") + endif() if (_importedConfigs) # message(STATUS "Detected imported target ${_CURRENT_LIB}") # Ok, so this is an imported target. @@ -123,7 +127,11 @@ function(CMAKE_EXPAND_IMPORTED_TARGETS _RESULT ) # all remaining imported target names (there shouldn't be any left anyway). set(_CCSR_NEW_REQ_LIBS ) foreach(_CURRENT_LIB ${_CCSR_REQ_LIBS}) - get_target_property(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS) + if(TARGET "${_CURRENT_LIB}") + get_target_property(_importedConfigs "${_CURRENT_LIB}" IMPORTED_CONFIGURATIONS) + else() + set(_importedConfigs "") + endif() if (NOT _importedConfigs) list(APPEND _CCSR_NEW_REQ_LIBS "${_CURRENT_LIB}" ) # message(STATUS "final: appending ${_CURRENT_LIB}") diff --git a/Modules/Compiler/QCC-C.cmake b/Modules/Compiler/QCC-C.cmake new file mode 100644 index 000000000..ae4a2f491 --- /dev/null +++ b/Modules/Compiler/QCC-C.cmake @@ -0,0 +1,2 @@ +include(Compiler/QCC) +__compiler_qcc(C) diff --git a/Modules/Compiler/QCC-CXX.cmake b/Modules/Compiler/QCC-CXX.cmake new file mode 100644 index 000000000..a676bbedb --- /dev/null +++ b/Modules/Compiler/QCC-CXX.cmake @@ -0,0 +1,12 @@ +include(Compiler/QCC) +__compiler_qcc(CXX) + +# If the toolchain uses qcc for CMAKE_CXX_COMPILER instead of QCC, the +# default for the driver is not c++. +set(CMAKE_CXX_COMPILE_OBJECT + " -lang-c++ -o -c ") + +set(CMAKE_CXX_LINK_EXECUTABLE + " -lang-c++ -o ") + +set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") diff --git a/Modules/Compiler/QCC.cmake b/Modules/Compiler/QCC.cmake new file mode 100644 index 000000000..76477e4bb --- /dev/null +++ b/Modules/Compiler/QCC.cmake @@ -0,0 +1,24 @@ + +#============================================================================= +# Copyright 2002-2014 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) +include(Compiler/GNU) + +macro(__compiler_qcc lang) + __compiler_gnu(${lang}) + + # http://www.qnx.com/developers/docs/6.4.0/neutrino/utilities/q/qcc.html#examples + set(CMAKE_${lang}_COMPILE_OPTIONS_TARGET "-V") + + set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-Wp,-isystem,") + set(CMAKE_DEPFILE_FLAGS_${lang} "-Wc,-MMD,,-MT,,-MF,") +endmacro() diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index d0515c682..99e574ed4 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -1190,14 +1190,14 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) set( QT_PLUGIN_TYPES accessible bearer codecs decorations designer gfxdrivers graphicssystems iconengines imageformats inputmethods mousedrivers phonon_backend script sqldrivers ) set( QT_ACCESSIBLE_PLUGINS qtaccessiblecompatwidgets qtaccessiblewidgets ) - set( QT_BEARER_PLUGINS qcorewlanbearer qgenericbearer ) + set( QT_BEARER_PLUGINS qcorewlanbearer qgenericbearer qnativewifibearer ) set( QT_CODECS_PLUGINS qcncodecs qjpcodecs qkrcodecs qtwcodecs ) set( QT_DECORATIONS_PLUGINS qdecorationdefault qdecorationwindows ) set( QT_DESIGNER_PLUGINS arthurplugin containerextension customwidgetplugin phononwidgets qdeclarativeview qt3supportwidgets qwebview taskmenuextension worldtimeclockplugin ) set( QT_GRAPHICSDRIVERS_PLUGINS qgfxtransformed qgfxvnc qscreenvfb ) set( QT_GRAPHICSSYSTEMS_PLUGINS qglgraphicssystem qtracegraphicssystem ) set( QT_ICONENGINES_PLUGINS qsvgicon ) - set( QT_IMAGEFORMATS_PLUGINS qgif qjpeg qmng qico qsvg qtiff ) + set( QT_IMAGEFORMATS_PLUGINS qgif qjpeg qmng qico qsvg qtiff qtga ) set( QT_INPUTMETHODS_PLUGINS qimsw_multi ) set( QT_MOUSEDRIVERS_PLUGINS qwstslibmousehandler ) if(APPLE) @@ -1211,7 +1211,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) set( QT_PHONON_PLUGINS ${QT_PHONON_BACKEND_PLUGINS} ) set( QT_QT3SUPPORT_PLUGINS qtaccessiblecompatwidgets ) set( QT_QTCORE_PLUGINS ${QT_BEARER_PLUGINS} ${QT_CODECS_PLUGINS} ) - set( QT_QTGUI_PLUGINS qtaccessiblewidgets qgif qjpeg qmng qico qtiff ${QT_DECORATIONS_PLUGINS} ${QT_GRAPHICSDRIVERS_PLUGINS} ${QT_GRAPHICSSYSTEMS_PLUGINS} ${QT_INPUTMETHODS_PLUGINS} ${QT_MOUSEDRIVERS_PLUGINS} ) + set( QT_QTGUI_PLUGINS qtaccessiblewidgets ${QT_IMAGEFORMATS_PLUGINS} ${QT_DECORATIONS_PLUGINS} ${QT_GRAPHICSDRIVERS_PLUGINS} ${QT_GRAPHICSSYSTEMS_PLUGINS} ${QT_INPUTMETHODS_PLUGINS} ${QT_MOUSEDRIVERS_PLUGINS} ) set( QT_QTSCRIPT_PLUGINS ${QT_SCRIPT_PLUGINS} ) set( QT_QTSQL_PLUGINS ${QT_SQLDRIVERS_PLUGINS} ) set( QT_QTSVG_PLUGINS qsvg qsvgicon ) diff --git a/Modules/Platform/QNX-QCC-C.cmake b/Modules/Platform/QNX-QCC-C.cmake deleted file mode 100644 index e5721a75e..000000000 --- a/Modules/Platform/QNX-QCC-C.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -include(Platform/QNX) - -__compiler_qcc(C) diff --git a/Modules/Platform/QNX-QCC-CXX.cmake b/Modules/Platform/QNX-QCC-CXX.cmake deleted file mode 100644 index e490bbed0..000000000 --- a/Modules/Platform/QNX-QCC-CXX.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -include(Platform/QNX) - -__compiler_qcc(CXX) diff --git a/Modules/Platform/QNX.cmake b/Modules/Platform/QNX.cmake index cc551bdd5..ebc4609a3 100644 --- a/Modules/Platform/QNX.cmake +++ b/Modules/Platform/QNX.cmake @@ -1,5 +1,8 @@ set(QNXNTO 1) +include(Platform/GNU) +unset(CMAKE_LIBRARY_ARCHITECTURE_REGEX) + set(CMAKE_DL_LIBS "") # Shared libraries with no builtin soname may not be linked safely by @@ -14,22 +17,3 @@ foreach(type SHARED_LIBRARY SHARED_MODULE EXE) set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic") set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic") endforeach() - -include(Platform/GNU) -unset(CMAKE_LIBRARY_ARCHITECTURE_REGEX) - -macro(__compiler_qcc lang) - # http://www.qnx.com/developers/docs/6.4.0/neutrino/utilities/q/qcc.html#examples - set(CMAKE_${lang}_COMPILE_OPTIONS_TARGET "-V") - - set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-Wp,-isystem,") - set(CMAKE_DEPFILE_FLAGS_${lang} "-Wc,-MMD,,-MT,,-MF,") - - if (lang STREQUAL CXX) - # If the toolchain uses qcc for CMAKE_CXX_COMPILER instead of QCC, the - # default for the driver is not c++. - set(CMAKE_CXX_COMPILE_OBJECT - " -lang-c++ -o -c ") - endif() - -endmacro() diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index e29aaf41f..cfef53676 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -39,12 +39,14 @@ endif() set(WIN32 1) if(CMAKE_SYSTEM_NAME MATCHES "WindowsCE") - set(CMAKE_CREATE_WIN32_EXE "/subsystem:windowsce /entry:WinMainCRTStartup") - set(CMAKE_CREATE_CONSOLE_EXE "/subsystem:windowsce /entry:mainACRTStartup") + set(CMAKE_CREATE_WIN32_EXE "/entry:WinMainCRTStartup") + set(CMAKE_CREATE_CONSOLE_EXE "/entry:mainACRTStartup") + set(_PLATFORM_LINK_FLAGS " /subsystem:windowsce") set(WINCE 1) else() set(CMAKE_CREATE_WIN32_EXE "/subsystem:windows") set(CMAKE_CREATE_CONSOLE_EXE "/subsystem:console") + set(_PLATFORM_LINK_FLAGS "") endif() if(CMAKE_GENERATOR MATCHES "Visual Studio 6") @@ -235,7 +237,7 @@ macro(__windows_compiler_msvc lang) set(_CMAKE_VS_LINK_EXE " -E vs_link_exe ") endif() set(CMAKE_${lang}_CREATE_SHARED_LIBRARY - "${_CMAKE_VS_LINK_DLL} ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out: /implib: /pdb: /dll /version:. ${CMAKE_END_TEMP_FILE}") + "${_CMAKE_VS_LINK_DLL} ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out: /implib: /pdb: /dll /version:.${_PLATFORM_LINK_FLAGS} ${CMAKE_END_TEMP_FILE}") set(CMAKE_${lang}_CREATE_SHARED_MODULE ${CMAKE_${lang}_CREATE_SHARED_LIBRARY}) set(CMAKE_${lang}_CREATE_STATIC_LIBRARY " /lib ${CMAKE_CL_NOLOGO} /out: ") @@ -249,7 +251,7 @@ macro(__windows_compiler_msvc lang) set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1) set(CMAKE_${lang}_LINK_EXECUTABLE - "${_CMAKE_VS_LINK_EXE} ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out: /implib: /pdb: /version:. ${CMAKE_END_TEMP_FILE}") + "${_CMAKE_VS_LINK_EXE} ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out: /implib: /pdb: /version:.${_PLATFORM_LINK_FLAGS} ${CMAKE_END_TEMP_FILE}") set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3${_FLAGS_${lang}}") set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}") diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index 11ca205e1..f8eeef6cd 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -57,7 +57,7 @@ macro(SWIG_MODULE_INITIALIZE name language) set(SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG "${swig_lowercase_language}") set(SWIG_MODULE_${name}_REAL_NAME "${name}") - if (CMAKE_SWIG_FLAGS MATCHES "-noproxy") + if (";${CMAKE_SWIG_FLAGS};" MATCHES ";-noproxy;") set (SWIG_MODULE_${name}_NOPROXY TRUE) endif () if("${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "UNKNOWN") diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 1937ad489..4caa60865 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 0) -set(CMake_VERSION_PATCH 0) +set(CMake_VERSION_PATCH 1) #set(CMake_VERSION_RC 0) diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index d5472a19c..e4a146c6c 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -765,7 +765,11 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile, const char* compilerId) { /* - gnu: + gnu >= 4.9: + A mod file is an ascii file compressed with gzip. + Compiling twice produces identical modules. + + gnu < 4.9: A mod file is an ascii file. FORTRAN module created from /path/to/foo.f90 on Sun Dec 30 22:47:58 2007 @@ -821,21 +825,30 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile, */ if (strcmp(compilerId, "GNU") == 0 ) { - const char seq[1] = {'\n'}; - const int seqlen = 1; - - if(!cmDependsFortranStreamContainsSequence(finModFile, seq, seqlen)) + // GNU Fortran 4.9 and later compress .mod files with gzip + // but also do not include a date so we can fall through to + // compare them without skipping any prefix. + unsigned char hdr[2]; + bool okay = finModFile.read(reinterpret_cast(hdr), 2)? true:false; + finModFile.seekg(0); + if(!(okay && hdr[0] == 0x1f && hdr[1] == 0x8b)) { - // The module is of unexpected format. Assume it is different. - std::cerr << compilerId << " fortran module " << modFile - << " has unexpected format." << std::endl; - return true; - } + const char seq[1] = {'\n'}; + const int seqlen = 1; - if(!cmDependsFortranStreamContainsSequence(finStampFile, seq, seqlen)) - { - // The stamp must differ if the sequence is not contained. - return true; + if(!cmDependsFortranStreamContainsSequence(finModFile, seq, seqlen)) + { + // The module is of unexpected format. Assume it is different. + std::cerr << compilerId << " fortran module " << modFile + << " has unexpected format." << std::endl; + return true; + } + + if(!cmDependsFortranStreamContainsSequence(finStampFile, seq, seqlen)) + { + // The stamp must differ if the sequence is not contained. + return true; + } } } else if(strcmp(compilerId, "Intel") == 0) diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 731bc00c0..60643acc4 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -972,7 +972,16 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os) { knownDependencies.insert( ng->ConvertToNinjaPath( j->c_str() ) ); } + //get list files which are implicit dependencies as well and will be phony + //for rebuild manifest + std::vector const& lf = (*i)->GetMakefile()->GetListFiles(); + typedef std::vector::const_iterator vect_it; + for(vect_it j = lf.begin(); j != lf.end(); ++j) + { + knownDependencies.insert( ng->ConvertToNinjaPath( j->c_str() ) ); + } } + knownDependencies.insert( "CMakeCache.txt" ); for(std::vector::const_iterator li = this->EvaluationFiles.begin(); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 484b28fe8..3503e19b9 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2298,7 +2298,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, } } - buildSettings->AddAttribute("OTHER_LDFLAGS", + buildSettings->AddAttribute(this->GetTargetLinkFlagsVar(target), this->CreateString(extraLinkOptions.c_str())); buildSettings->AddAttribute("OTHER_REZFLAGS", this->CreateString("")); @@ -2521,6 +2521,22 @@ std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target, return ""; } +//---------------------------------------------------------------------------- +const char* +cmGlobalXCodeGenerator::GetTargetLinkFlagsVar(cmTarget const& cmtarget) const +{ + if(this->XcodeVersion >= 60 && + (cmtarget.GetType() == cmTarget::STATIC_LIBRARY || + cmtarget.GetType() == cmTarget::OBJECT_LIBRARY)) + { + return "OTHER_LIBTOOLFLAGS"; + } + else + { + return "OTHER_LDFLAGS"; + } +} + //---------------------------------------------------------------------------- const char* cmGlobalXCodeGenerator::GetTargetFileType(cmTarget& cmtarget) { @@ -2834,8 +2850,9 @@ void cmGlobalXCodeGenerator sep = " "; linkObjs += this->XCodeEscapePath(oi->c_str()); } - this->AppendBuildSettingAttribute(target, "OTHER_LDFLAGS", - linkObjs.c_str(), configName); + this->AppendBuildSettingAttribute( + target, this->GetTargetLinkFlagsVar(*cmtarget), + linkObjs.c_str(), configName); } // Skip link information for object libraries. @@ -2913,8 +2930,9 @@ void cmGlobalXCodeGenerator target->AddDependTarget(configName, li->Target->GetName()); } } - this->AppendBuildSettingAttribute(target, "OTHER_LDFLAGS", - linkLibs.c_str(), configName); + this->AppendBuildSettingAttribute( + target, this->GetTargetLinkFlagsVar(*cmtarget), + linkLibs.c_str(), configName); } } } diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index c9d20c2e3..a7b54e986 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -141,6 +141,7 @@ private: cmXCodeObject* buildPhases); void ForceLinkerLanguages(); void ForceLinkerLanguage(cmTarget& cmtarget); + const char* GetTargetLinkFlagsVar(cmTarget const& cmtarget) const; const char* GetTargetFileType(cmTarget& cmtarget); const char* GetTargetProductType(cmTarget& cmtarget); std::string AddConfigurations(cmXCodeObject* target, cmTarget& cmtarget); diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 7a39f457d..38d369ea8 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -210,6 +210,20 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os, // Tweaks apply to the binary inside the bundle. std::string to1 = toDir + targetNameReal; + filesFrom.push_back(from1); + filesTo.push_back(to1); + } + else if(this->Target->IsCFBundleOnApple()) + { + // Install the whole app bundle directory. + type = cmInstallType_DIRECTORY; + literal_args += " USE_SOURCE_PERMISSIONS"; + + std::string targetNameBase = targetName.substr(0, targetName.find('/')); + + std::string from1 = fromDirConfig + targetNameBase; + std::string to1 = toDir + targetName; + filesFrom.push_back(from1); filesTo.push_back(to1); } diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index c7acfd09b..575b97373 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2163,6 +2163,11 @@ void cmSystemTools::FindCMakeResources(const char* argv0) cmSystemToolsCMakeCommand = exe_dir; cmSystemToolsCMakeCommand += "/cmake"; cmSystemToolsCMakeCommand += cmSystemTools::GetExecutableExtension(); +#ifndef CMAKE_BUILD_WITH_CMAKE + // The bootstrap cmake does not provide the other tools, + // so use the directory where they are about to be built. + exe_dir = CMAKE_BOOTSTRAP_BINARY_DIR "/bin"; +#endif cmSystemToolsCTestCommand = exe_dir; cmSystemToolsCTestCommand += "/ctest"; cmSystemToolsCTestCommand += cmSystemTools::GetExecutableExtension(); @@ -2215,7 +2220,7 @@ void cmSystemTools::FindCMakeResources(const char* argv0) } #else // Bootstrap build knows its source. - cmSystemToolsCMakeRoot = CMAKE_ROOT_DIR; + cmSystemToolsCMakeRoot = CMAKE_BOOTSTRAP_SOURCE_DIR; #endif } diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 7cbc1dab4..fafcca8d2 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -339,16 +339,24 @@ bool cmake::SetCacheArgs(const std::vector& args) // The value is transformed if it is a filepath for example, so // we can't compare whether the value is already in the cache until // after we call AddCacheEntry. - const char *cachedValue = - this->CacheManager->GetCacheValue(var.c_str()); + bool haveValue = false; + std::string cachedValue; + if(this->WarnUnusedCli) + { + if(const char *v = this->CacheManager->GetCacheValue(var.c_str())) + { + haveValue = true; + cachedValue = v; + } + } this->CacheManager->AddCacheEntry(var.c_str(), value.c_str(), "No help, variable specified on the command line.", type); + if(this->WarnUnusedCli) { - if (!cachedValue - || strcmp(this->CacheManager->GetCacheValue(var.c_str()), - cachedValue) != 0) + if (!haveValue || + cachedValue != this->CacheManager->GetCacheValue(var.c_str())) { this->WatchUnusedCli(var.c_str()); } diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx index ec3a13315..a03b39cce 100644 --- a/Source/kwsys/SystemInformation.cxx +++ b/Source/kwsys/SystemInformation.cxx @@ -3696,7 +3696,10 @@ void SystemInformationImplementation::SetStackTraceOnError(int enable) // install ours struct sigaction sa; sa.sa_sigaction=(SigAction)StacktraceSignalHandler; - sa.sa_flags=SA_SIGINFO|SA_RESTART|SA_RESETHAND; + sa.sa_flags=SA_SIGINFO|SA_RESETHAND; +# ifdef SA_RESTART + sa.sa_flags|=SA_RESTART; +# endif sigemptyset(&sa.sa_mask); sigaction(SIGABRT,&sa,0); diff --git a/Utilities/cmcurl/hostip.c b/Utilities/cmcurl/hostip.c index fd555ef9d..83f1564c8 100644 --- a/Utilities/cmcurl/hostip.c +++ b/Utilities/cmcurl/hostip.c @@ -609,7 +609,7 @@ Curl_addrinfo *Curl_ip2addr(in_addr_t num, const char *hostname, int port) h = &buf->hostentry; h->h_addr_list = &buf->h_addr_list[0]; addrentry = &buf->addrentry; -#ifdef _CRAYC +#ifdef _CRAY /* On UNICOS, s_addr is a bit field and for some reason assigning to it * doesn't work. There must be a better fix than this ugly hack. */ diff --git a/bootstrap b/bootstrap index 45f67cf79..da84040cc 100755 --- a/bootstrap +++ b/bootstrap @@ -1474,9 +1474,11 @@ fi # When bootstrapping on MinGW with MSYS we must convert the source # directory to a windows path. if ${cmake_system_mingw}; then - cmake_root_dir=`cd "${cmake_source_dir}"; pwd -W` + CMAKE_BOOTSTRAP_SOURCE_DIR=`cd "${cmake_source_dir}"; pwd -W` + CMAKE_BOOTSTRAP_BINARY_DIR=`cd "${cmake_binary_dir}"; pwd -W` else - cmake_root_dir="${cmake_source_dir}" + CMAKE_BOOTSTRAP_SOURCE_DIR="${cmake_source_dir}" + CMAKE_BOOTSTRAP_BINARY_DIR="${cmake_binary_dir}" fi # Write CMake version @@ -1484,7 +1486,8 @@ cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_MAJOR ${cmake_versi cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_MINOR ${cmake_version_minor}" cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION_PATCH ${cmake_version_patch}" cmake_report cmVersionConfig.h${_tmp} "#define CMake_VERSION \"${cmake_version}\"" -cmake_report cmConfigure.h${_tmp} "#define CMAKE_ROOT_DIR \"${cmake_root_dir}\"" +cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP_SOURCE_DIR \"${CMAKE_BOOTSTRAP_SOURCE_DIR}\"" +cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP_BINARY_DIR \"${CMAKE_BOOTSTRAP_BINARY_DIR}\"" cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"/bootstrap-not-insalled\"" cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP"