diff options
56 files changed, 453 insertions, 478 deletions
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake index 7d2d8cd..b5d3072 100644 --- a/Modules/CMakeGenericSystem.cmake +++ b/Modules/CMakeGenericSystem.cmake @@ -52,6 +52,94 @@ IF(CMAKE_GENERATOR MATCHES "Makefiles") ENDIF(DEFINED CMAKE_RULE_MESSAGES) ENDIF(CMAKE_GENERATOR MATCHES "Makefiles") + +# GetDefaultWindowsPrefixBase +# +# Compute the base directory for CMAKE_INSTALL_PREFIX based on: +# - is this 32-bit or 64-bit Windows +# - is this 32-bit or 64-bit CMake running +# - what architecture targets will be built +# +function(GetDefaultWindowsPrefixBase var) + + # Try to guess what architecture targets will end up being built as, + # even if CMAKE_SIZEOF_VOID_P is not computed yet... We need to know + # the architecture of the targets being built to choose the right + # default value for CMAKE_INSTALL_PREFIX. + # + if("${CMAKE_GENERATOR}" MATCHES "Win64") + set(arch_hint "x64") + elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8") + set(arch_hint "x64") + elseif("$ENV{LIB}" MATCHES "(amd64|ia64)") + set(arch_hint "x64") + endif() + + if(NOT arch_hint) + set(arch_hint "x86") + endif() + + # default env in a 64-bit app on Win64: + # ProgramFiles=C:\Program Files + # ProgramFiles(x86)=C:\Program Files (x86) + # ProgramW6432=C:\Program Files + # + # default env in a 32-bit app on Win64: + # ProgramFiles=C:\Program Files (x86) + # ProgramFiles(x86)=C:\Program Files (x86) + # ProgramW6432=C:\Program Files + # + # default env in a 32-bit app on Win32: + # ProgramFiles=C:\Program Files + # ProgramFiles(x86) NOT DEFINED + # ProgramW6432 NOT DEFINED + + # By default, use the ProgramFiles env var as the base value of + # CMAKE_INSTALL_PREFIX: + # + set(_PREFIX_ENV_VAR "ProgramFiles") + + if ("$ENV{ProgramW6432}" STREQUAL "") + # running on 32-bit Windows + # must be a 32-bit CMake, too... + #message("guess: this is a 32-bit CMake running on 32-bit Windows") + else() + # running on 64-bit Windows + if ("$ENV{ProgramW6432}" STREQUAL "$ENV{ProgramFiles}") + # 64-bit CMake + #message("guess: this is a 64-bit CMake running on 64-bit Windows") + if(NOT "${arch_hint}" STREQUAL "x64") + # building 32-bit targets + set(_PREFIX_ENV_VAR "ProgramFiles(x86)") + endif() + else() + # 32-bit CMake + #message("guess: this is a 32-bit CMake running on 64-bit Windows") + if("${arch_hint}" STREQUAL "x64") + # building 64-bit targets + set(_PREFIX_ENV_VAR "ProgramW6432") + endif() + endif() + endif() + + #if("${arch_hint}" STREQUAL "x64") + # message("guess: you are building a 64-bit app") + #else() + # message("guess: you are building a 32-bit app") + #endif() + + if(NOT "$ENV{${_PREFIX_ENV_VAR}}" STREQUAL "") + file(TO_CMAKE_PATH "$ENV{${_PREFIX_ENV_VAR}}" _base) + elseif(NOT "$ENV{SystemDrive}" STREQUAL "") + set(_base "$ENV{SystemDrive}/Program Files") + else() + set(_base "C:/Program Files") + endif() + + set(${var} "${_base}" PARENT_SCOPE) +endfunction() + + # Set a variable to indicate whether the value of CMAKE_INSTALL_PREFIX # was initialized by the block below. This is useful for user # projects to change the default prefix while still allowing the @@ -65,23 +153,11 @@ IF(CMAKE_HOST_UNIX) SET(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Install path prefix, prepended onto install directories.") ELSE(CMAKE_HOST_UNIX) - IF("$ENV{ProgramFiles}" MATCHES "^$") - IF("$ENV{SystemDrive}" MATCHES "^$") - SET(CMAKE_GENERIC_PROGRAM_FILES "C:/Program Files") - ELSE("$ENV{SystemDrive}" MATCHES "^$") - SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{SystemDrive}/Program Files") - ENDIF("$ENV{SystemDrive}" MATCHES "^$") - ELSE("$ENV{ProgramFiles}" MATCHES "^$") - SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{ProgramFiles}") - ENDIF("$ENV{ProgramFiles}" MATCHES "^$") + GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES) SET(CMAKE_INSTALL_PREFIX "${CMAKE_GENERIC_PROGRAM_FILES}/${PROJECT_NAME}" CACHE PATH "Install path prefix, prepended onto install directories.") SET(CMAKE_GENERIC_PROGRAM_FILES) - - # Make sure the prefix uses forward slashes. - STRING(REGEX REPLACE "\\\\" "/" - CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") ENDIF(CMAKE_HOST_UNIX) MARK_AS_ADVANCED( diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index d9b9d54..dad5709 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -514,11 +514,19 @@ set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE}) macro(FIND_LIBRARY_LOCAL_FIRST _var _names _doc) if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(_cuda_64bit_lib_dir "${CUDA_TOOLKIT_ROOT_DIR}/lib64") + # CUDA 3.2+ on Windows moved the library directoryies, so we need the new + # and old paths. + set(_cuda_64bit_lib_dir + "${CUDA_TOOLKIT_ROOT_DIR}/lib/x64" + "${CUDA_TOOLKIT_ROOT_DIR}/lib64" + ) endif() + # CUDA 3.2+ on Windows moved the library directories, so we need to new + # (lib/Win32) and the old path (lib). find_library(${_var} NAMES ${_names} PATHS ${_cuda_64bit_lib_dir} + "${CUDA_TOOLKIT_ROOT_DIR}/lib/Win32" "${CUDA_TOOLKIT_ROOT_DIR}/lib" ENV CUDA_LIB_PATH DOC ${_doc} @@ -578,9 +586,20 @@ macro(FIND_CUDA_HELPER_LIBS _name) mark_as_advanced(CUDA_${_name}_LIBRARY) endmacro(FIND_CUDA_HELPER_LIBS) +####################### +# Disable emulation for v3.1 onward +if(CUDA_VERSION VERSION_GREATER "3.0") + if(CUDA_BUILD_EMULATION) + message(FATAL_ERROR "CUDA_BUILD_EMULATION is not supported in version 3.1 and onwards. You must disable it to proceed. You have version ${CUDA_VERSION}.") + endif() +endif() + # Search for cufft and cublas libraries. -find_cuda_helper_libs(cufftemu) -find_cuda_helper_libs(cublasemu) +if(CUDA_VERSION VERSION_LESS "3.1") + # Emulation libraries aren't available in version 3.1 onward. + find_cuda_helper_libs(cufftemu) + find_cuda_helper_libs(cublasemu) +endif() find_cuda_helper_libs(cufft) find_cuda_helper_libs(cublas) diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake index 55b5639..d42e514 100644 --- a/Modules/FindFLEX.cmake +++ b/Modules/FindFLEX.cmake @@ -78,7 +78,11 @@ IF(FLEX_EXECUTABLE) RESULT_VARIABLE FLEX_version_result OUTPUT_STRIP_TRAILING_WHITESPACE) IF(NOT ${FLEX_version_result} EQUAL 0) - MESSAGE(SEND_ERROR "Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_error}") + IF(FLEX_FIND_REQUIRED) + MESSAGE(SEND_ERROR "Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_output}\n${FLEX_version_error}") + ELSE() + MESSAGE("Command \"${FLEX_EXECUTABLE} --version\" failed with output:\n${FLEX_version_output}\n${FLEX_version_error}\nFLEX_VERSION will not be available") + ENDIF() ELSE() STRING(REGEX REPLACE "^flex (.*)$" "\\1" FLEX_VERSION "${FLEX_version_output}") diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index 45d6bff..9fef8f9 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -188,7 +188,7 @@ if (MPI_INCLUDE_PATH AND MPI_LIBRARY) # the cache, and we don't want to override those settings. elseif (MPI_COMPILE_CMDLINE) # Extract compile flags from the compile command line. - string(REGEX MATCHALL "(^| )-D([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}") + string(REGEX MATCHALL "(^| )-[Df]([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}") set(MPI_COMPILE_FLAGS_WORK) foreach(FLAG ${MPI_ALL_COMPILE_FLAGS}) if (MPI_COMPILE_FLAGS_WORK) diff --git a/Modules/FindSubversion.cmake b/Modules/FindSubversion.cmake index 9bad3b1..daf3d87 100644 --- a/Modules/FindSubversion.cmake +++ b/Modules/FindSubversion.cmake @@ -8,18 +8,22 @@ # The minimum required version of Subversion can be specified using the # standard syntax, e.g. FIND_PACKAGE(Subversion 1.4) # -# If the command line client executable is found the macro +# If the command line client executable is found two macros are defined: # Subversion_WC_INFO(<dir> <var-prefix>) -# is defined to extract information of a subversion working copy at -# a given location. The macro defines the following variables: +# Subversion_WC_LOG(<dir> <var-prefix>) +# Subversion_WC_INFO extracts information of a subversion working copy at +# a given location. This macro defines the following variables: # <var-prefix>_WC_URL - url of the repository (at <dir>) # <var-prefix>_WC_ROOT - root url of the repository # <var-prefix>_WC_REVISION - current revision # <var-prefix>_WC_LAST_CHANGED_AUTHOR - author of last commit # <var-prefix>_WC_LAST_CHANGED_DATE - date of last commit # <var-prefix>_WC_LAST_CHANGED_REV - revision of last commit -# <var-prefix>_WC_LAST_CHANGED_LOG - last log of base revision # <var-prefix>_WC_INFO - output of command `svn info <dir>' +# Subversion_WC_LOG retrieves the log message of the base revision of a +# subversion working copy at a given location. This macro defines the +# variable: +# <var-prefix>_LAST_CHANGED_LOG - last log of base revision # Example usage: # FIND_PACKAGE(Subversion) # IF(SUBVERSION_FOUND) @@ -74,6 +78,8 @@ IF(Subversion_SVN_EXECUTABLE) STRING(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*" "\\2" ${prefix}_WC_URL "${${prefix}_WC_INFO}") + STRING(REGEX REPLACE "^(.*\n)?Repository Root: ([^\n]+).*" + "\\2" ${prefix}_WC_ROOT "${${prefix}_WC_INFO}") STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*" "\\2" ${prefix}_WC_REVISION "${${prefix}_WC_INFO}") STRING(REGEX REPLACE "^(.*\n)?Last Changed Author: ([^\n]+).*" diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index 25d48d1..4cb7451 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -6,7 +6,7 @@ # CMAKE_USE_PTHREADS_INIT - are we using pthreads # CMAKE_HP_PTHREADS_INIT - are we using hp pthreads # For systems with multiple thread libraries, caller can set -# CMAKE_THREAD_PREFER_PTHREADS +# CMAKE_THREAD_PREFER_PTHREAD #============================================================================= # Copyright 2002-2009 Kitware, Inc. diff --git a/Modules/Platform/Windows-df.cmake b/Modules/Platform/Windows-df.cmake index 753b198..f5046bf 100644 --- a/Modules/Platform/Windows-df.cmake +++ b/Modules/Platform/Windows-df.cmake @@ -10,6 +10,8 @@ ELSE(CMAKE_VERBOSE_MAKEFILE) SET(CMAKE_CL_NOLOGO "/nologo") ENDIF(CMAKE_VERBOSE_MAKEFILE) +SET(CMAKE_Fortran_MODDIR_FLAG "-module:") + SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY "link ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out:<TARGET> /dll <LINK_FLAGS> <OBJECTS> <LINK_LIBRARIES> ${CMAKE_END_TEMP_FILE}") diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index 79ccdd9..c86434e 100644 --- a/Source/CPack/cmCPackArchiveGenerator.cxx +++ b/Source/CPack/cmCPackArchiveGenerator.cxx @@ -58,9 +58,11 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(cmArchiveWrite& archive, // Change to local toplevel cmSystemTools::ChangeDirectory(localToplevel.c_str()); std::vector<std::string>::const_iterator fileIt; - for (fileIt = component->Files.begin(); fileIt != component->Files.end(); ++fileIt ) + for (fileIt = component->Files.begin(); fileIt != component->Files.end(); + ++fileIt ) { - cmCPackLogger(cmCPackLog::LOG_DEBUG,"Adding file: " << (*fileIt) << std::endl); + cmCPackLogger(cmCPackLog::LOG_DEBUG,"Adding file: " + << (*fileIt) << std::endl); archive.Add(*fileIt); if (!archive) { @@ -85,7 +87,8 @@ cmGeneratedFileStream gf; \ gf.Open(filename.c_str(), false, true); \ if (!GenerateHeader(&gf)) \ { \ - cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem to generate Header for archive < " \ + cmCPackLogger(cmCPackLog::LOG_ERROR, \ + "Problem to generate Header for archive < " \ << filename \ << ">." << std::endl); \ return 0; \ @@ -118,7 +121,9 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreComponentGroup) << std::endl); // Begin the archive for this group std::string packageFileName= std::string(toplevel); - packageFileName += "/"+std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))+"-"+compGIt->first + this->GetOutputExtension(); + packageFileName += "/" + +std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")) + +"-"+compGIt->first + this->GetOutputExtension(); // open a block in order to automatically close archive // at the end of the block { @@ -142,13 +147,16 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreComponentGroup) else { std::map<std::string, cmCPackComponent>::iterator compIt; - for (compIt=this->Components.begin();compIt!=this->Components.end(); ++compIt ) + for (compIt=this->Components.begin(); + compIt!=this->Components.end(); ++compIt ) { std::string localToplevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY")); std::string packageFileName = std::string(toplevel); localToplevel += "/"+ compIt->first; - packageFileName += "/"+std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))+"-"+compIt->first + this->GetOutputExtension(); + packageFileName += "/" + +std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")) + +"-"+compIt->first + this->GetOutputExtension(); { DECLARE_AND_OPEN_ARCHIVE(packageFileName,archive); // Add the files of this component to the archive @@ -167,8 +175,12 @@ int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponentInOne) // reset the package file names packageFileNames.clear(); packageFileNames.push_back(std::string(toplevel)); - packageFileNames[0] += "/"+std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))+"-ALL" + this->GetOutputExtension(); - cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging all groups in one package...(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE is set)" + packageFileNames[0] += "/" + +std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")) + +"-ALL" + this->GetOutputExtension(); + cmCPackLogger(cmCPackLog::LOG_VERBOSE, + "Packaging all groups in one package..." + "(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE is set)" << std::endl); DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive); @@ -197,7 +209,8 @@ int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponentInOne) else { std::map<std::string, cmCPackComponent>::iterator compIt; - for (compIt=this->Components.begin();compIt!=this->Components.end(); ++compIt ) + for (compIt=this->Components.begin();compIt!=this->Components.end(); + ++compIt ) { // Add the files of this component to the archive addOneComponentToArchive(archive,&(compIt->second)); @@ -215,9 +228,15 @@ int cmCPackArchiveGenerator::PackageFiles() // The default behavior is to create 1 package by component group // unless the user asked to put all COMPONENTS in a single package - bool allGroupInOne = (NULL != (this->GetOption("CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE"))); - bool allComponentInOne = (NULL != (this->GetOption("CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE"))); - bool ignoreComponentGroup = ( NULL != (this->GetOption("CPACK_COMPONENTS_IGNORE_GROUPS"))); + bool allGroupInOne = (NULL != + (this->GetOption( + "CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE"))); + bool allComponentInOne = (NULL != + (this->GetOption( + "CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE"))); + bool ignoreComponentGroup = ( NULL != + (this->GetOption( + "CPACK_COMPONENTS_IGNORE_GROUPS"))); std::string groupingType; @@ -248,13 +267,15 @@ int cmCPackArchiveGenerator::PackageFiles() cmCPackLogger(cmCPackLog::LOG_WARNING, "[" << this->Name << "]" << " requested component grouping type <"<< groupingType - << "> UNKNOWN not in (ALL_GROUP_IN_ONE,ALL_COMPONENT_IN_ONE,IGNORE)" <<std::endl); + << "> UNKNOWN not in (ALL_GROUP_IN_ONE," + "ALL_COMPONENT_IN_ONE,IGNORE)" <<std::endl); } } // Some components were defined but NO group // force ignoreGroups - if (this->ComponentGroups.empty() && (!this->Components.empty()) && (!ignoreComponentGroup)) { + if (this->ComponentGroups.empty() && (!this->Components.empty()) + && (!ignoreComponentGroup)) { cmCPackLogger(cmCPackLog::LOG_WARNING, "[" << this->Name << "]" << " Some Components defined but NO component group:" @@ -286,7 +307,8 @@ int cmCPackArchiveGenerator::PackageFiles() for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt ) { // Get the relative path to the file - std::string rp = cmSystemTools::RelativePath(toplevel.c_str(), fileIt->c_str()); + std::string rp = cmSystemTools::RelativePath(toplevel.c_str(), + fileIt->c_str()); archive.Add(rp); if(!archive) { diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index ae545c8..6e173bd 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -45,7 +45,8 @@ protected: * @param[in,out] archive the archive object * @param[in] component the component whose file will be added to archive */ - int addOneComponentToArchive(cmArchiveWrite& archive, cmCPackComponent* component); + int addOneComponentToArchive(cmArchiveWrite& archive, + cmCPackComponent* component); /** * The main package file method. diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 7c3ff1d..c39aea4 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -172,7 +172,8 @@ int cmCPackGenerator::InstallProject() = this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY"); std::string tempInstallDirectoryStr = bareTempInstallDirectory; bool setDestDir = cmSystemTools::IsOn(this->GetOption("CPACK_SET_DESTDIR")) - | cmSystemTools::IsInternallyOn(this->GetOption("CPACK_SET_DESTDIR")); + | cmSystemTools::IsInternallyOn( + this->GetOption("CPACK_SET_DESTDIR")); if (!setDestDir) { tempInstallDirectoryStr += this->GetPackagingInstallPrefix(); @@ -694,9 +695,11 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( // CPACK_PACKAGING_INSTALL_PREFIX // I know this is tricky and awkward but it's the price for // CPACK_SET_DESTDIR backward compatibility. - if (cmSystemTools::IsInternallyOn(this->GetOption("CPACK_SET_DESTDIR"))) + if (cmSystemTools::IsInternallyOn( + this->GetOption("CPACK_SET_DESTDIR"))) { - this->SetOption("CPACK_INSTALL_PREFIX",this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX")); + this->SetOption("CPACK_INSTALL_PREFIX", + this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX")); } std::string dir; if (this->GetOption("CPACK_INSTALL_PREFIX")) @@ -782,7 +785,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( if (absoluteDestFiles.length()>0) { absoluteDestFiles +=";"; } - absoluteDestFiles += mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES"); + absoluteDestFiles += + mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES"); cmCPackLogger(cmCPackLog::LOG_DEBUG, "Got some ABSOLUTE DESTINATION FILES: " << absoluteDestFiles << std::endl); @@ -794,7 +798,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( } } } - this->SetOption("CPACK_ABSOLUTE_DESTINATION_FILES",absoluteDestFiles.c_str()); + this->SetOption("CPACK_ABSOLUTE_DESTINATION_FILES", + absoluteDestFiles.c_str()); return 1; } @@ -921,8 +926,9 @@ int cmCPackGenerator::DoPackage() // beware we cannot just use tempDirectory as before // because some generator will "CPACK_INCLUDE_TOPLEVEL_DIRECTORY" // we really want "CPACK_TEMPORARY_DIRECTORY" - std::string fileN = cmSystemTools::RelativePath(this->GetOption("CPACK_TEMPORARY_DIRECTORY"), - it->c_str()); + std::string fileN = + cmSystemTools::RelativePath( + this->GetOption("CPACK_TEMPORARY_DIRECTORY"), it->c_str()); // Determine which component we are in. std::string componentName = fileN.substr(0, fileN.find('/')); @@ -932,7 +938,9 @@ int cmCPackGenerator::DoPackage() // Add this file to the list of files for the component. this->Components[componentName].Files.push_back(fileN); - cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <" <<fileN<<"> to component <"<<componentName<<">"<<std::endl); + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <" + <<fileN<<"> to component <" + <<componentName<<">"<<std::endl); } } diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index f6f9fbc..d0eda81 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -93,7 +93,8 @@ int cmCPackNSISGenerator::PackageFiles() for ( sit = dirs.begin(); sit != dirs.end(); ++ sit ) { std::string componentName; - std::string fileN = cmSystemTools::RelativePath(toplevel.c_str(), sit->c_str()); + std::string fileN = cmSystemTools::RelativePath(toplevel.c_str(), + sit->c_str()); if ( fileN.empty() ) { continue; diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 389ec7f..7f3e360 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -902,7 +902,7 @@ void cmCursesMainForm::HandleInput() this->SearchMode = false; if ( this->SearchString.size() > 0 ) { - this->JumpToCacheEntry(-1, this->SearchString.c_str()); + this->JumpToCacheEntry(this->SearchString.c_str()); this->OldSearchString = this->SearchString; } this->SearchString = ""; @@ -1076,7 +1076,7 @@ void cmCursesMainForm::HandleInput() { if ( this->OldSearchString.size() > 0 ) { - this->JumpToCacheEntry(-1, this->OldSearchString.c_str()); + this->JumpToCacheEntry(this->OldSearchString.c_str()); } } // switch advanced on/off @@ -1191,7 +1191,7 @@ int cmCursesMainForm::LoadCache(const char *) return r; } -void cmCursesMainForm::JumpToCacheEntry(int idx, const char* astr) +void cmCursesMainForm::JumpToCacheEntry(const char* astr) { std::string str; if ( astr ) @@ -1199,18 +1199,14 @@ void cmCursesMainForm::JumpToCacheEntry(int idx, const char* astr) str = cmSystemTools::LowerCase(astr); } - if ( size_t(idx) > this->NumberOfVisibleEntries ) - { - return; - } - if ( idx < 0 && str.size() == 0) + if(str.empty()) { return; } FIELD* cur = current_field(this->Form); int start_index = field_index(cur); int findex = start_index; - while ( (findex / 3) != idx ) + for(;;) { if ( str.size() > 0 ) { diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h index 4084415..3e191b4 100644 --- a/Source/CursesDialog/cmCursesMainForm.h +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -122,9 +122,8 @@ protected: // Remove an entry from the interface and the cache. void RemoveEntry(const char* value); - // Jump to the cache value with index idx. If string str is - // specified, it will stop on widget that contain that string. - void JumpToCacheEntry(int idx, const char* str); + // Jump to the cache entry whose name matches the string. + void JumpToCacheEntry(const char* str); // Copies of cache entries stored in the user interface std::vector<cmCursesCacheEntryComposite*>* Entries; diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index dcdc8e1..2e05883 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -490,10 +490,6 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command) return 0; } - // call this so that the information is cached up front - // and not the first time EndTest is called. - this->ShouldCompressTestOutput(); - if ( this->ProduceXML ) { // Verify "Testing" directory exists: diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index c198727..1158fc0 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -687,7 +687,8 @@ cmELFInternalImpl<Types>::GetDynamicSectionString(int tag) // The value has been read successfully. Report it. se.Position = static_cast<unsigned long>(strtab.sh_offset + first); se.Size = last - first; - se.IndexInSection = static_cast<int>(di - this->DynamicSectionEntries.begin()); + se.IndexInSection = + static_cast<int>(di - this->DynamicSectionEntries.begin()); return &se; } } diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index 48c5c6e..cb614d4 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -152,11 +152,10 @@ bool cmExportCommand ebfg.SetCommand(this); // Compute the set of configurations exported. - if(const char* types = - this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES")) + std::vector<std::string> configurationTypes; + this->Makefile->GetConfigurations(configurationTypes); + if(!configurationTypes.empty()) { - std::vector<std::string> configurationTypes; - cmSystemTools::ExpandListArgument(types, configurationTypes); for(std::vector<std::string>::const_iterator ci = configurationTypes.begin(); ci != configurationTypes.end(); ++ci) @@ -164,11 +163,6 @@ bool cmExportCommand ebfg.AddConfiguration(ci->c_str()); } } - else if(const char* config = - this->Makefile->GetDefinition("CMAKE_BUILD_TYPE")) - { - ebfg.AddConfiguration(config); - } else { ebfg.AddConfiguration(""); diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 133c1a1..8ebd41f 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2571,8 +2571,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> std::vector<std::string>::const_iterator i = args.begin(); if(args.size() < 3) { - this->SetError("FILE(DOWNLOAD url file) must be called with " - "at least three arguments."); + this->SetError("DOWNLOAD must be called with at least three arguments."); return false; } ++i; // Get rid of subcommand @@ -2598,8 +2597,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> } else { - this->SetError("FILE(DOWNLOAD url file TIMEOUT time) missing " - "time for TIMEOUT."); + this->SetError("DOWNLOAD missing time for TIMEOUT."); return false; } } @@ -2608,8 +2606,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> ++i; if( i == args.end()) { - this->SetError("FILE(DOWNLOAD url file LOG VAR) missing " - "VAR for LOG."); + this->SetError("DOWNLOAD missing VAR for LOG."); return false; } verboseLog = *i; @@ -2619,8 +2616,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> ++i; if( i == args.end()) { - this->SetError("FILE(DOWNLOAD url file STATUS VAR) missing " - "VAR for STATUS."); + this->SetError("DOWNLOAD missing VAR for STATUS."); return false; } statusVar = *i; @@ -2630,8 +2626,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> ++i; if( i == args.end()) { - this->SetError("FILE(DOWNLOAD url file EXPECTED_MD5 sum) missing " - "sum value for EXPECTED_MD5."); + this->SetError("DOWNLOAD missing sum value for EXPECTED_MD5."); return false; } expectedMD5sum = cmSystemTools::LowerCase(*i); @@ -2654,8 +2649,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> if (!cmSystemTools::ComputeFileMD5(file.c_str(), computedMD5)) { - this->SetError("FILE(DOWNLOAD ) error; cannot compute MD5 sum on " - "pre-existing file"); + this->SetError("DOWNLOAD cannot compute MD5 sum on pre-existing file"); return false; } @@ -2665,7 +2659,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> if (expectedMD5sum == actualMD5sum) { this->Makefile->DisplayStatus( - "FILE(DOWNLOAD ) returning early: file already exists with " + "FILE(DOWNLOAD) returning early: file already exists with " "expected MD5 sum", -1); if(statusVar.size()) @@ -2698,8 +2692,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> std::ofstream fout(file.c_str(), std::ios::binary); if(!fout) { - this->SetError("FILE(DOWNLOAD url file TIMEOUT time) can not open " - "file for write."); + this->SetError("DOWNLOAD cannot open file for write."); return false; } @@ -2708,8 +2701,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> curl = ::curl_easy_init(); if(!curl) { - this->SetError("FILE(DOWNLOAD ) error " - "initializing curl."); + this->SetError("DOWNLOAD error initializing curl."); return false; } @@ -2718,9 +2710,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); if (res != CURLE_OK) { - std::string errstring = "FILE(DOWNLOAD ) error; cannot set url: "; - errstring += ::curl_easy_strerror(res); - this->SetError(errstring.c_str()); + std::string e = "DOWNLOAD cannot set url: "; + e += ::curl_easy_strerror(res); + this->SetError(e.c_str()); return false; } @@ -2728,10 +2720,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> cmFileCommandWriteMemoryCallback); if (res != CURLE_OK) { - std::string errstring = - "FILE(DOWNLOAD ) error; cannot set write function: "; - errstring += ::curl_easy_strerror(res); - this->SetError(errstring.c_str()); + std::string e = "DOWNLOAD cannot set write function: "; + e += ::curl_easy_strerror(res); + this->SetError(e.c_str()); return false; } @@ -2739,10 +2730,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> cmFileCommandCurlDebugCallback); if (res != CURLE_OK) { - std::string errstring = - "FILE(DOWNLOAD ) error; cannot set debug function: "; - errstring += ::curl_easy_strerror(res); - this->SetError(errstring.c_str()); + std::string e = "DOWNLOAD cannot set debug function: "; + e += ::curl_easy_strerror(res); + this->SetError(e.c_str()); return false; } @@ -2752,27 +2742,27 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> if (res != CURLE_OK) { - std::string errstring = "FILE(DOWNLOAD ) error; cannot set write data: "; - errstring += ::curl_easy_strerror(res); - this->SetError(errstring.c_str()); + std::string e = "DOWNLOAD cannot set write data: "; + e += ::curl_easy_strerror(res); + this->SetError(e.c_str()); return false; } res = ::curl_easy_setopt(curl, CURLOPT_DEBUGDATA, (void *)&chunkDebug); if (res != CURLE_OK) { - std::string errstring = "FILE(DOWNLOAD ) error; cannot set debug data: "; - errstring += ::curl_easy_strerror(res); - this->SetError(errstring.c_str()); + std::string e = "DOWNLOAD cannot set debug data: "; + e += ::curl_easy_strerror(res); + this->SetError(e.c_str()); return false; } res = ::curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); if (res != CURLE_OK) { - std::string errstring = "FILE(DOWNLOAD ) error; cannot set follow-redirect option: "; - errstring += ::curl_easy_strerror(res); - this->SetError(errstring.c_str()); + std::string e = "DOWNLOAD cannot set follow-redirect option: "; + e += ::curl_easy_strerror(res); + this->SetError(e.c_str()); return false; } @@ -2782,9 +2772,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> if (res != CURLE_OK) { - std::string errstring = "FILE(DOWNLOAD ) error; cannot set verbose: "; - errstring += ::curl_easy_strerror(res); - this->SetError(errstring.c_str()); + std::string e = "DOWNLOAD cannot set verbose: "; + e += ::curl_easy_strerror(res); + this->SetError(e.c_str()); return false; } } @@ -2795,9 +2785,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> if (res != CURLE_OK) { - std::string errstring = "FILE(DOWNLOAD ) error; cannot set timeout: "; - errstring += ::curl_easy_strerror(res); - this->SetError(errstring.c_str()); + std::string e = "DOWNLOAD cannot set timeout: "; + e += ::curl_easy_strerror(res); + this->SetError(e.c_str()); return false; } } @@ -2815,9 +2805,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> CURLOPT_NOPROGRESS, 0); if (res != CURLE_OK) { - std::string errstring = "FILE(DOWNLOAD ) error; cannot set noprogress value: "; - errstring += ::curl_easy_strerror(res); - this->SetError(errstring.c_str()); + std::string e = "DOWNLOAD cannot set noprogress value: "; + e += ::curl_easy_strerror(res); + this->SetError(e.c_str()); return false; } @@ -2825,9 +2815,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> CURLOPT_PROGRESSFUNCTION, cmFileCommandCurlProgressCallback); if (res != CURLE_OK) { - std::string errstring = "FILE(DOWNLOAD ) error; cannot set progress function: "; - errstring += ::curl_easy_strerror(res); - this->SetError(errstring.c_str()); + std::string e = "DOWNLOAD cannot set progress function: "; + e += ::curl_easy_strerror(res); + this->SetError(e.c_str()); return false; } @@ -2835,9 +2825,9 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> CURLOPT_PROGRESSDATA, reinterpret_cast<void*>(&helper)); if (res != CURLE_OK) { - std::string errstring = "FILE(DOWNLOAD ) error; cannot set progress data: "; - errstring += ::curl_easy_strerror(res); - this->SetError(errstring.c_str()); + std::string e = "DOWNLOAD cannot set progress data: "; + e += ::curl_easy_strerror(res); + this->SetError(e.c_str()); return false; } } @@ -2871,8 +2861,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> if (!cmSystemTools::ComputeFileMD5(file.c_str(), computedMD5)) { - this->SetError("FILE(DOWNLOAD ) error; cannot compute MD5 sum on " - "downloaded file"); + this->SetError("DOWNLOAD cannot compute MD5 sum on downloaded file"); return false; } @@ -2882,8 +2871,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> if (expectedMD5sum != actualMD5sum) { cmOStringStream oss; - oss << "FILE(DOWNLOAD ) error; expected and actual MD5 sums differ" - << std::endl + oss << "DOWNLOAD MD5 mismatch" << std::endl << " for file: [" << file << "]" << std::endl << " expected MD5 sum: [" << expectedMD5sum << "]" << std::endl << " actual MD5 sum: [" << actualMD5sum << "]" << std::endl @@ -2913,8 +2901,7 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> return true; #else - this->SetError("FILE(DOWNLOAD ) " - "not supported in bootstrap cmake "); + this->SetError("DOWNLOAD not supported by bootstrap cmake."); return false; #endif } diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index c5c9d5c..7c65c32 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -260,8 +260,8 @@ cmGlobalVisualStudio8Generator for(std::vector<std::string>::iterator i = this->Configurations.begin(); i != this->Configurations.end(); ++i) { - fout << "\t\t" << *i << "|" << this->GetPlatformName() << " = " << *i << "|" - << this->GetPlatformName() << "\n"; + fout << "\t\t" << *i << "|" << this->GetPlatformName() + << " = " << *i << "|" << this->GetPlatformName() << "\n"; } fout << "\tEndGlobalSection\n"; } diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 537a88f..4e9969d 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -722,26 +722,10 @@ void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen) // Select the current set of configuration types. this->CurrentConfigurationTypes.clear(); - if(this->XcodeVersion > 20) - { - if(const char* types = - this->CurrentMakefile->GetDefinition("CMAKE_CONFIGURATION_TYPES")) - { - cmSystemTools::ExpandListArgument(types, - this->CurrentConfigurationTypes); - } - } + this->CurrentMakefile->GetConfigurations(this->CurrentConfigurationTypes); if(this->CurrentConfigurationTypes.empty()) { - if(const char* buildType = - this->CurrentMakefile->GetDefinition("CMAKE_BUILD_TYPE")) - { - this->CurrentConfigurationTypes.push_back(buildType); - } - else - { - this->CurrentConfigurationTypes.push_back(""); - } + this->CurrentConfigurationTypes.push_back(""); } } @@ -2742,12 +2726,14 @@ void cmGlobalXCodeGenerator 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) { + archString += sep; archString += *i; - archString += " "; + sep = " "; } buildSettings->AddAttribute("ARCHS", this->CreateString(archString.c_str())); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index bac0223..5bffd52 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -278,16 +278,8 @@ void cmLocalGenerator::GenerateTestFiles() // Compute the set of configurations. std::vector<std::string> configurationTypes; - if(const char* types = - this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES")) - { - cmSystemTools::ExpandListArgument(types, configurationTypes); - } - const char* config = 0; - if(configurationTypes.empty()) - { - config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE"); - } + const char* config = + this->Makefile->GetConfigurations(configurationTypes, false); std::string file = this->Makefile->GetStartOutputDirectory(); file += "/"; @@ -383,16 +375,8 @@ void cmLocalGenerator::GenerateInstallRules() // Compute the set of configurations. std::vector<std::string> configurationTypes; - if(const char* types = - this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES")) - { - cmSystemTools::ExpandListArgument(types, configurationTypes); - } - const char* config = 0; - if(configurationTypes.empty()) - { - config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE"); - } + const char* config = + this->Makefile->GetConfigurations(configurationTypes, false); // Choose a default install configuration. const char* default_config = config; @@ -546,19 +530,7 @@ void cmLocalGenerator::GenerateTargetManifest() { // Collect the set of configuration types. std::vector<std::string> configNames; - if(const char* configurationTypes = - this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES")) - { - cmSystemTools::ExpandListArgument(configurationTypes, configNames); - } - else if(const char* buildType = - this->Makefile->GetDefinition("CMAKE_BUILD_TYPE")) - { - if(*buildType) - { - configNames.push_back(buildType); - } - } + this->Makefile->GetConfigurations(configNames); // Add our targets to the manifest for each configuration. cmTargets& targets = this->Makefile->GetTargets(); diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index 539816d..eb4e4a4 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -1187,7 +1187,8 @@ void cmLocalVisualStudio6Generator extraLinkOptionsMinSizeRel += targetLinkFlags; } - if(const char* targetLinkFlags = target.GetProperty("LINK_FLAGS_RELWITHDEBINFO")) + if(const char* targetLinkFlags = + target.GetProperty("LINK_FLAGS_RELWITHDEBINFO")) { extraLinkOptionsRelWithDebInfo += " "; extraLinkOptionsRelWithDebInfo += targetLinkFlags; @@ -1304,7 +1305,8 @@ void cmLocalVisualStudio6Generator optionsRelease); this->ComputeLinkOptions(target, "MinSizeRel", extraLinkOptionsMinSizeRel, optionsMinSizeRel); - this->ComputeLinkOptions(target, "RelWithDebInfo", extraLinkOptionsRelWithDebInfo, + this->ComputeLinkOptions(target, "RelWithDebInfo", + extraLinkOptionsRelWithDebInfo, optionsRelWithDebInfo); } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8eece6b..c64053a 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1436,16 +1436,7 @@ void cmMakefile::InitializeFromParent() this->SetProperty("COMPILE_DEFINITIONS", parent->GetProperty("COMPILE_DEFINITIONS")); std::vector<std::string> configs; - if(const char* configTypes = - this->GetDefinition("CMAKE_CONFIGURATION_TYPES")) - { - cmSystemTools::ExpandListArgument(configTypes, configs); - } - else if(const char* buildType = - this->GetDefinition("CMAKE_BUILD_TYPE")) - { - configs.push_back(buildType); - } + this->GetConfigurations(configs); for(std::vector<std::string>::const_iterator ci = configs.begin(); ci != configs.end(); ++ci) { @@ -2367,6 +2358,31 @@ void cmMakefile::AddDefaultDefinitions() cmake::GetCMakeFilesDirectory()); } +//---------------------------------------------------------------------------- +const char* +cmMakefile::GetConfigurations(std::vector<std::string>& configs, + bool single) const +{ + if(this->LocalGenerator->GetGlobalGenerator()->IsMultiConfig()) + { + if(const char* configTypes = + this->GetDefinition("CMAKE_CONFIGURATION_TYPES")) + { + cmSystemTools::ExpandListArgument(configTypes, configs); + } + return 0; + } + else + { + const char* buildType = this->GetDefinition("CMAKE_BUILD_TYPE"); + if(single && buildType && *buildType) + { + configs.push_back(buildType); + } + return buildType; + } +} + #if defined(CMAKE_BUILD_WITH_CMAKE) /** * Find a source group whose regular expression matches the filename diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 4fae7ee..8b8a3f8 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -309,7 +309,11 @@ public: { return this->ProjectName.c_str(); } - + + /** Get the configurations to be generated. */ + const char* GetConfigurations(std::vector<std::string>& configs, + bool single = true) const; + /** * Set the name of the library. */ diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx index bc52d7f..b793cd5 100644 --- a/Source/cmSourceFile.cxx +++ b/Source/cmSourceFile.cxx @@ -101,11 +101,11 @@ cmSourceFileLocation const& cmSourceFile::GetLocation() const } //---------------------------------------------------------------------------- -std::string const& cmSourceFile::GetFullPath() +std::string const& cmSourceFile::GetFullPath(std::string* error) { if(this->FullPath.empty()) { - if(this->FindFullPath()) + if(this->FindFullPath(error)) { this->CheckExtension(); } @@ -120,7 +120,7 @@ std::string const& cmSourceFile::GetFullPath() const } //---------------------------------------------------------------------------- -bool cmSourceFile::FindFullPath() +bool cmSourceFile::FindFullPath(std::string* error) { // If thie method has already failed once do not try again. if(this->FindFullPathFailed) @@ -199,7 +199,14 @@ bool cmSourceFile::FindFullPath() { e << " ." << *ext; } - this->Location.GetMakefile()->IssueMessage(cmake::FATAL_ERROR, e.str()); + if(error) + { + *error = e.str(); + } + else + { + this->Location.GetMakefile()->IssueMessage(cmake::FATAL_ERROR, e.str()); + } this->FindFullPathFailed = true; return false; } diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h index 937e4b7..2dc8488 100644 --- a/Source/cmSourceFile.h +++ b/Source/cmSourceFile.h @@ -60,7 +60,7 @@ public: * horrible interface, but is necessary for backwards * compatibility). */ - std::string const& GetFullPath(); + std::string const& GetFullPath(std::string* error = 0); std::string const& GetFullPath() const; /** @@ -108,7 +108,7 @@ private: std::string FullPath; bool FindFullPathFailed; - bool FindFullPath(); + bool FindFullPath(std::string* error); bool TryFullPath(const char* tryPath, const char* ext); void CheckExtension(); void CheckLanguage(std::string const& ext); diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 8378922..7bc89a4 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1176,7 +1176,8 @@ bool cmSystemTools::ComputeFileMD5(const char* source, char* md5out) // Should be efficient enough on most system: const int bufferSize = 4096; char buffer[bufferSize]; - unsigned char const* buffer_uc = reinterpret_cast<unsigned char const*>(buffer); + unsigned char const* buffer_uc = + reinterpret_cast<unsigned char const*>(buffer); // This copy loop is very sensitive on certain platforms with // slightly broken stream libraries (like HPUX). Normally, it is // incorrect to not check the error condition on the fin.read() @@ -1931,12 +1932,20 @@ bool extract_tar(const char* outFileName, bool verbose, } if(extract) { + r = archive_write_disk_set_options(ext, ARCHIVE_EXTRACT_TIME); + if (r != ARCHIVE_OK) + { + cmSystemTools::Error( + "Problem with archive_write_disk_set_options(): ", + archive_error_string(ext)); + } + r = archive_write_header(ext, entry); if (r != ARCHIVE_OK) { cmSystemTools::Error("Problem with archive_write_header(): ", - archive_error_string(a)); - cmSystemTools::Error("Curren file:", + archive_error_string(ext)); + cmSystemTools::Error("Current file:", archive_entry_pathname(entry)); } else diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 9611912..3ee329f 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -393,6 +393,24 @@ void cmTarget::DefineProperties(cmake *cm) "from which the target is imported."); cm->DefineProperty + ("IMPORTED_NO_SONAME", cmProperty::TARGET, + "Specifies that an IMPORTED shared library target has no \"soname\". ", + "Set this property to true for an imported shared library file that " + "has no \"soname\" field. " + "CMake may adjust generated link commands for some platforms to prevent " + "the linker from using the path to the library in place of its missing " + "soname. " + "Ignored for non-imported targets."); + + cm->DefineProperty + ("IMPORTED_NO_SONAME_<CONFIG>", cmProperty::TARGET, + "Per-configuration version of IMPORTED_NO_SONAME property.", + "This property is used when loading settings for the <CONFIG> " + "configuration of an imported target. " + "Configuration names correspond to those provided by the project " + "from which the target is imported."); + + cm->DefineProperty ("EXCLUDE_FROM_ALL", cmProperty::TARGET, "Exclude the target from the all target.", "A property on a target that indicates if the target is excluded " @@ -1040,18 +1058,7 @@ void cmTarget::SetMakefile(cmMakefile* mf) // Collect the set of configuration types. std::vector<std::string> configNames; - if(const char* configurationTypes = - mf->GetDefinition("CMAKE_CONFIGURATION_TYPES")) - { - cmSystemTools::ExpandListArgument(configurationTypes, configNames); - } - else if(const char* buildType = mf->GetDefinition("CMAKE_BUILD_TYPE")) - { - if(*buildType) - { - configNames.push_back(buildType); - } - } + mf->GetConfigurations(configNames); // Setup per-configuration property default values. const char* configProps[] = { @@ -1439,8 +1446,15 @@ bool cmTarget::FindSourceFiles() si = this->SourceFiles.begin(); si != this->SourceFiles.end(); ++si) { - if((*si)->GetFullPath().empty()) + std::string e; + if((*si)->GetFullPath(&e).empty()) { + if(!e.empty()) + { + cmake* cm = this->Makefile->GetCMakeInstance(); + cm->IssueMessage(cmake::FATAL_ERROR, e, + this->GetBacktrace()); + } return false; } } diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 70680ad..b290aed 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -155,6 +155,13 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString("<Keyword>Win32Proj</Keyword>\n", 2); this->WriteString("<Platform>", 2); (*this->BuildFileStream) << this->Platform << "</Platform>\n"; + const char* projLabel = this->Target->GetProperty("PROJECT_LABEL"); + if(!projLabel) + { + projLabel = this->Name.c_str(); + } + this->WriteString("<ProjectName>", 2); + (*this->BuildFileStream) << projLabel << "</ProjectName>\n"; this->WriteString("</PropertyGroup>\n", 1); this->WriteString("<Import Project=" "\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n", @@ -807,10 +814,12 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions() { - if(this->Target->GetType() > cmTarget::MODULE_LIBRARY) + cmTarget::TargetType ttype = this->Target->GetType(); + if(ttype > cmTarget::GLOBAL_TARGET) { return; } + this->WriteString("<PropertyGroup>\n", 2); this->WriteString("<_ProjectFileVersion>10.0.20506.1" "</_ProjectFileVersion>\n", 3); @@ -820,36 +829,50 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions() for(std::vector<std::string>::iterator config = configs->begin(); config != configs->end(); ++config) { - std::string targetNameFull = - this->Target->GetFullName(config->c_str()); - std::string intermediateDir = this->LocalGenerator-> - GetTargetDirectory(*this->Target); - intermediateDir += "/"; - intermediateDir += *config; - intermediateDir += "/"; - this->ConvertToWindowsSlash(intermediateDir); - std::string outDir = this->Target->GetDirectory(config->c_str()); - this->ConvertToWindowsSlash(outDir); - this->WritePlatformConfigTag("OutDir", config->c_str(), 3); - *this->BuildFileStream << outDir - << "\\" - << "</OutDir>\n"; - this->WritePlatformConfigTag("IntDir", config->c_str(), 3); - *this->BuildFileStream << intermediateDir - << "</IntDir>\n"; - this->WritePlatformConfigTag("TargetName", config->c_str(), 3); - *this->BuildFileStream << cmSystemTools::GetFilenameWithoutExtension( - targetNameFull.c_str()) - << "</TargetName>\n"; - - this->WritePlatformConfigTag("TargetExt", config->c_str(), 3); - *this->BuildFileStream << cmSystemTools::GetFilenameLastExtension( - targetNameFull.c_str()) - << "</TargetExt>\n"; - this->OutputLinkIncremental(*config); + if(ttype >= cmTarget::UTILITY) + { + this->WritePlatformConfigTag("IntDir", config->c_str(), 3); + *this->BuildFileStream + << "$(Platform)\\$(Configuration)\\$(ProjectName)\\" + << "</IntDir>\n"; + } + else + { + std::string targetNameFull = + this->Target->GetFullName(config->c_str()); + std::string intermediateDir = this->LocalGenerator-> + GetTargetDirectory(*this->Target); + intermediateDir += "/"; + intermediateDir += *config; + intermediateDir += "/"; + this->ConvertToWindowsSlash(intermediateDir); + std::string outDir = this->Target->GetDirectory(config->c_str()); + this->ConvertToWindowsSlash(outDir); + + this->WritePlatformConfigTag("OutDir", config->c_str(), 3); + *this->BuildFileStream << outDir + << "\\" + << "</OutDir>\n"; + + this->WritePlatformConfigTag("IntDir", config->c_str(), 3); + *this->BuildFileStream << intermediateDir + << "</IntDir>\n"; + + this->WritePlatformConfigTag("TargetName", config->c_str(), 3); + *this->BuildFileStream + << cmSystemTools::GetFilenameWithoutLastExtension( + targetNameFull.c_str()) + << "</TargetName>\n"; + + this->WritePlatformConfigTag("TargetExt", config->c_str(), 3); + *this->BuildFileStream + << cmSystemTools::GetFilenameLastExtension(targetNameFull.c_str()) + << "</TargetExt>\n"; + + this->OutputLinkIncremental(*config); + } } this->WriteString("</PropertyGroup>\n", 2); - } diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx index 07c7b8c..5920470 100644 --- a/Source/cmXCodeObject.cxx +++ b/Source/cmXCodeObject.cxx @@ -236,7 +236,7 @@ void cmXCodeObject::PrintString(std::ostream& os) const // considered special by the Xcode project file parser. bool needQuote = (this->String.empty() || - this->String.find_first_of(" <>.+-=@") != this->String.npos); + this->String.find_first_of(" <>.+-=@$") != this->String.npos); const char* quote = needQuote? "\"" : ""; // Print the string, quoted and escaped as necessary. diff --git a/Source/kwsys/MD5.c b/Source/kwsys/MD5.c index 1ea0a66..56776a3 100644 --- a/Source/kwsys/MD5.c +++ b/Source/kwsys/MD5.c @@ -29,6 +29,11 @@ it in a single source file instead of a separate header and implementation file. */ +#if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wcast-align" +#endif + /* Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. @@ -428,6 +433,10 @@ static void md5_finish(md5_state_t *pms, md5_byte_t digest[16]) digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3)); } +#if defined(__clang__) +# pragma clang diagnostic pop +#endif + /*--------------------------------------------------------------------------*/ /* Wrap up the MD5 state in our opaque structure. */ struct kwsysMD5_s diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index 4b0fb02..d50aa3f 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2010) SET(KWSYS_DATE_STAMP_MONTH 09) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 10) +SET(KWSYS_DATE_STAMP_DAY 21) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 8e8d0ca..5e88b5c 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -129,6 +129,9 @@ IF(BUILD_TESTING) ADD_TEST_MACRO(MathTest MathTest) ADD_TEST_MACRO(Simple Simple) ADD_TEST_MACRO(PreOrder PreOrder) + ADD_TEST_MACRO(MissingSourceFile MissingSourceFile) + SET_TESTS_PROPERTIES(MissingSourceFile PROPERTIES + PASS_REGULAR_EXPRESSION "CMake Error at CMakeLists.txt:3 \\(add_executable\\):[ \r\n]*Cannot find source file \"MissingSourceFile.c\"") ADD_TEST_MACRO(COnly COnly) ADD_TEST_MACRO(CxxOnly CxxOnly) ADD_TEST_MACRO(IPO COnly/COnly) @@ -1630,7 +1633,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ ENDIF() IF(NOT CMAKE_TEST_GENERATOR MATCHES "Xcode") - INCLUDE(FindJava) + find_package(Java QUIET) IF(JAVA_COMPILE AND JAVA_RUNTIME AND JAVA_ARCHIVE AND NOT MINGW) GET_FILENAME_COMPONENT(JNIPATH ${JAVA_COMPILE} PATH) FIND_FILE(JNI_H jni.h diff --git a/Tests/CxxOnly/CMakeLists.txt b/Tests/CxxOnly/CMakeLists.txt index d621499..5d27890 100644 --- a/Tests/CxxOnly/CMakeLists.txt +++ b/Tests/CxxOnly/CMakeLists.txt @@ -5,7 +5,7 @@ set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix") if(WIN32) set(EXTRA_SRCS test.CPP) endif() -add_library(testcxx1 STATIC libcxx1.cxx ${EXTRA_SRCS}) +add_library(testcxx1.my STATIC libcxx1.cxx ${EXTRA_SRCS}) add_library(testcxx2 SHARED libcxx2.cxx) add_executable (CxxOnly cxxonly.cxx) -target_link_libraries(CxxOnly testcxx1 testcxx2) +target_link_libraries(CxxOnly testcxx1.my testcxx2) diff --git a/Tests/FunctionTest/CMakeLists.txt b/Tests/FunctionTest/CMakeLists.txt index ef55173..5d4f42d 100644 --- a/Tests/FunctionTest/CMakeLists.txt +++ b/Tests/FunctionTest/CMakeLists.txt @@ -166,3 +166,11 @@ ELSE(DEFINED SUBDIR_DEFINED) ENDIF(DEFINED SUBDIR_DEFINED) ADD_EXECUTABLE(FunctionTest functionTest.c) + +# Use the PROJECT_LABEL property: in IDEs, the project label should appear +# in the UI rather than the target name. If this were a good test of the +# property rather than just a smoke test, it would verify that the label +# actually appears in the UI of the IDE... Or at least that the text appears +# somewhere in the generated project files. +SET_PROPERTY(TARGET miniFunctionTest + PROPERTY PROJECT_LABEL "Test de Fonctionnement") diff --git a/Tests/MissingSourceFile/CMakeLists.txt b/Tests/MissingSourceFile/CMakeLists.txt new file mode 100644 index 0000000..42b7c51 --- /dev/null +++ b/Tests/MissingSourceFile/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8) +project(MissingSourceFile C) +add_executable(MissingSourceFile MissingSourceFile.c) diff --git a/Utilities/Release/README b/Utilities/Release/README index 75cdf48..12eafe1 100644 --- a/Utilities/Release/README +++ b/Utilities/Release/README @@ -1,28 +1,21 @@ -To create a cmake release, first test the branch: +To create a cmake release, make sure the "release" tag is pointing to the +expected git commit: -mkdir 2-4 -cd 2-4 -cmake -DCMAKE_CREATE_VERSION=CMake-2-4 -P ../create-cmake-release.cmake -./create-CMake-2-4.sh +http://cmake.org/gitweb?p=cmake.git;a=shortlog;h=refs/heads/release -If that works: -EDIT CMakeLists.txt and remove the RC setting! -commit that. +Then as kitware@hythloth, using an up-to-date CMake: -Then tag the minor release: -cvs tag 2-4-7 + cd ~/CMakeReleases/cmake/Utilities/Release + mkdir 283rc1 + cd 283rc1 + ~/CMakeReleases/build/bin/cmake -DCMAKE_CREATE_VERSION=release -P ../create-cmake-release.cmake + ./create-release.sh -Then create a release from the tag: -mkdir 2-4-7 -cd 2-4-7 -cmake -DCMAKE_CREATE_VERSION=CMake-2-4-7 -P ../create-cmake-release.cmake -./create-CMake-2-4.sh - -create-cmake-release.cmake: script to run to create release sh script -To add or remove machines this file should be edited. +create-cmake-release.cmake: script to run to create release sh scripts +Add or remove machines in create-cmake-release.cmake. Cygwin -> directory that contains cpack cygwin package files used in - CMakeCPack.cmake) + CMakeCPack.cmake machine_release.cmake : config files for each machine diff --git a/Utilities/Release/create-cmake-release.cmake b/Utilities/Release/create-cmake-release.cmake index 66753ce..fd91665 100644 --- a/Utilities/Release/create-cmake-release.cmake +++ b/Utilities/Release/create-cmake-release.cmake @@ -5,17 +5,14 @@ endif(NOT DEFINED CMAKE_CREATE_VERSION) set(RELEASE_SCRIPTS dashmacmini2_release.cmake # Mac Darwin universal dashsun1_release.cmake # SunOS - destiny_release.cmake # HPUX +# destiny_release.cmake # HPUX -- destiny is dead; long live destiny magrathea_release.cmake # Linux dash2win64_release.cmake # Windows # dash2win64_cygwin.cmake # Cygwin # blight_cygwin.cmake # Cygwin v20n250_aix_release.cmake # AIX 5.3 -# vogon_cygwin.cmake # Cygwin ferrari_sgi64_release.cmake # IRIX 64 ferrari_sgi_release.cmake # IRIX 64 -# r36n11_aix_release.cmake # AIX 5.3 -# r15n65_aix_release.cmake # AIX 5.2 ) file(WRITE create-${CMAKE_CREATE_VERSION}.sh "#!/bin/bash") @@ -29,5 +26,3 @@ ${CMAKE_COMMAND} -DCMAKE_CREATE_VERSION=${CMAKE_CREATE_VERSION} -P ${CMAKE_ROOT} endforeach(f) execute_process(COMMAND chmod a+x create-${CMAKE_CREATE_VERSION}.sh) message("Run ./create-${CMAKE_CREATE_VERSION}.sh") - - diff --git a/Utilities/Release/dash2win64_cygwin.cmake b/Utilities/Release/dash2win64_cygwin.cmake index d866896..64099a9 100644 --- a/Utilities/Release/dash2win64_cygwin.cmake +++ b/Utilities/Release/dash2win64_cygwin.cmake @@ -6,12 +6,13 @@ set(HOST dash2win64) set(CPACK_BINARY_GENERATORS "CygwinBinary") set(CPACK_SOURCE_GENERATORS "CygwinSource") set(MAKE_PROGRAM "make") -set(CVS_COMMAND /usr/bin/cvs) set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release CMAKE_Fortran_COMPILER_FULLPATH:FILEPATH=FALSE ") set(CXX g++) set(CC gcc) set(SCRIPT_NAME dash2win64cygwin) +set(GIT_COMMAND git) +set(GIT_EXTRA "git config core.autocrlf true") get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/dashsgi1_release.cmake b/Utilities/Release/dashsgi1_release.cmake deleted file mode 100644 index 0af5ca7..0000000 --- a/Utilities/Release/dashsgi1_release.cmake +++ /dev/null @@ -1,11 +0,0 @@ -set(CMAKE_RELEASE_DIRECTORY "/usr/people/kitware/CMakeReleaseDirectory") -set(PROCESSORS 2) -set(HOST dashsgi1) -set(MAKE_PROGRAM "make") -set(MAKE "${MAKE_PROGRAM} -P") -set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -CPACK_SYSTEM_NAME:STRING=IRIX64-n32 -") -get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) -include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/dashsgi1_release64.cmake b/Utilities/Release/dashsgi1_release64.cmake deleted file mode 100644 index 133f478..0000000 --- a/Utilities/Release/dashsgi1_release64.cmake +++ /dev/null @@ -1,15 +0,0 @@ -set(CMAKE_RELEASE_DIRECTORY "/usr/people/kitware/CMakeReleaseDirectory64") -set(PROCESSORS 2) -set(CFLAGS "-64") -set(CXXFLAGS "-64") -set(LDFLAGS="-64") -set(HOST dashsgi1) -set(SCRIPT_NAME dashsgi164) -set(MAKE_PROGRAM "make") -set(MAKE "${MAKE_PROGRAM} -P") -set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -CPACK_SYSTEM_NAME:STRING=IRIX64-64 -") -get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) -include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/destiny_release.cmake b/Utilities/Release/destiny_release.cmake deleted file mode 100644 index 886909f..0000000 --- a/Utilities/Release/destiny_release.cmake +++ /dev/null @@ -1,12 +0,0 @@ -set(PROCESSORS 1) -set(RUN_SHELL "/usr/local/bin/zsh -l -c /bin/sh") -set(CVS_COMMAND "/usr/local/bin/cvs") -set(HOST destiny) -set(MAKE_PROGRAM "/usr/local/bin/gmake") -set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -CMAKE_EXE_LINKER_FLAGS:STRING=-Wl,-a,archive_shared -CMAKE_C_FLAGS:STRING=+DAportable -CMAKE_CXX_FLAGS:STRING=-Wl,+vnocompatwarnings +W740,749 +DAportable -D__HPACC_STRICTER_ANSI__") -get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) -include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/muse_release.cmake b/Utilities/Release/muse_release.cmake deleted file mode 100644 index 9fd41c4..0000000 --- a/Utilities/Release/muse_release.cmake +++ /dev/null @@ -1,10 +0,0 @@ -set(CMAKE_RELEASE_DIRECTORY "/home/collab/itk/CMakeReleaseDirectory" ) -set(PROCESSORS 20) -set(HOST muse) -set(MAKE_PROGRAM "gmake") -set(MAKE "${MAKE_PROGRAM} -j20") -set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -") -get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) -include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/muse_release64.cmake b/Utilities/Release/muse_release64.cmake deleted file mode 100644 index cd87f51..0000000 --- a/Utilities/Release/muse_release64.cmake +++ /dev/null @@ -1,14 +0,0 @@ -set(CMAKE_RELEASE_DIRECTORY "/home/collab/itk/CMakeReleaseDirectory64" ) -set(PROCESSORS 20) -set(CFLAGS "-64") -set(CXXFLAGS "-64") -set(LDFLAGS="-64") -set(HOST muse) -set(SCRIPT_NAME muse64) -set(MAKE_PROGRAM "gmake") -set(MAKE "${MAKE_PROGRAM} -j20") -set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -") -get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) -include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/r15n65_aix_release.cmake b/Utilities/Release/r15n65_aix_release.cmake deleted file mode 100644 index 74d6d0b..0000000 --- a/Utilities/Release/r15n65_aix_release.cmake +++ /dev/null @@ -1,22 +0,0 @@ -set(CMAKE_RELEASE_DIRECTORY "/bench1/noibm34/CMakeReleaseDirectory" ) -set(FINAL_PATH /u/noibm34/cmake-release) -set(PROCESSORS 2) -set(CVS_COMMAND /vol/local/bin/cvs) -set(HOST "sshserv.centers.ihost.com" ) -set(EXTRA_HOP "rsh r15n65" ) -set(MAKE_PROGRAM "make") -set(CC "xlc") -set(CXX "xlC") -set(FC "xlf") -set(INITIAL_CACHE " -CMAKE_BUILD_TYPE:STRING=Release -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -") -set(EXTRA_COPY " -rm -rf ~/cmake-release -mkdir ~/cmake-release -mv *.sh ~/cmake-release -mv *.Z ~/cmake-release -mv *.gz ~/cmake-release") -get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) -include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/r36n11_aix_release.cmake b/Utilities/Release/r36n11_aix_release.cmake deleted file mode 100644 index 60c8459..0000000 --- a/Utilities/Release/r36n11_aix_release.cmake +++ /dev/null @@ -1,22 +0,0 @@ -set(CMAKE_RELEASE_DIRECTORY "/bench1/noibm34/CMakeReleaseDirectory" ) -set(FINAL_PATH /u/noibm34/cmake-release) -set(PROCESSORS 2) -set(CVS_COMMAND /vol/local/bin/cvs) -set(HOST "sshserv.centers.ihost.com" ) -set(EXTRA_HOP "ssh r36n11" ) -set(MAKE_PROGRAM "make") -set(CC "xlc") -set(CXX "xlC") -set(FC "xlf") -set(INITIAL_CACHE " -CMAKE_BUILD_TYPE:STRING=Release -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -") -set(EXTRA_COPY " -rm -rf ~/cmake-release -mkdir ~/cmake-release -mv *.sh ~/cmake-release -mv *.Z ~/cmake-release -mv *.gz ~/cmake-release") -get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) -include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake index 6fd1372..3a35ec3 100644 --- a/Utilities/Release/release_cmake.cmake +++ b/Utilities/Release/release_cmake.cmake @@ -34,7 +34,11 @@ if(NOT DEFINED CVS_COMMAND) set(CVS_COMMAND cvs) endif(NOT DEFINED CVS_COMMAND) -set(GIT_BRANCH ${CMAKE_CREATE_VERSION}) +if(${CMAKE_CREATE_VERSION} MATCHES "^(release|maint|next)$") + set(GIT_BRANCH origin/${CMAKE_CREATE_VERSION}) +else() + set(GIT_BRANCH ${CMAKE_CREATE_VERSION}) +endif() set( CMAKE_CHECKOUT "${CVS_COMMAND} -q -d ${CVSROOT} co -d ${CMAKE_CREATE_VERSION} ${CMAKE_CREATE_VERSION}") diff --git a/Utilities/Release/release_cmake.sh.in b/Utilities/Release/release_cmake.sh.in index 4189728..8455e92 100755 --- a/Utilities/Release/release_cmake.sh.in +++ b/Utilities/Release/release_cmake.sh.in @@ -89,7 +89,7 @@ if [ ! -z "@GIT_COMMAND@" ]; then @GIT_EXTRA@ check_exit_value $? "git extra cmake source" || exit 1 # now checkout a copy on the local branch working - @GIT_COMMAND@ checkout -b working origin/@GIT_BRANCH@ + @GIT_COMMAND@ checkout -b working @GIT_BRANCH@ check_exit_value $? "git checkout" || exit 1 cd .. else diff --git a/Utilities/Release/v20n17_aix_release.cmake b/Utilities/Release/v20n17_aix_release.cmake deleted file mode 100644 index b7494bb..0000000 --- a/Utilities/Release/v20n17_aix_release.cmake +++ /dev/null @@ -1,22 +0,0 @@ -set(CMAKE_RELEASE_DIRECTORY "/bench1/noibm34/CMakeReleaseDirectory" ) -set(FINAL_PATH /u/noibm34/cmake-release) -set(PROCESSORS 2) -set(CVS_COMMAND /vol/local/bin/cvs) -set(HOST "sshserv.centers.ihost.com" ) -set(EXTRA_HOP "rsh v20n17" ) -set(MAKE_PROGRAM "make") -set(CC "xlc") -set(CXX "xlC") -set(FC "xlf") -set(INITIAL_CACHE " -CMAKE_BUILD_TYPE:STRING=Release -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -") -set(EXTRA_COPY " -rm -rf ~/cmake-release -mkdir ~/cmake-release -mv *.sh ~/cmake-release -mv *.Z ~/cmake-release -mv *.gz ~/cmake-release") -get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) -include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/v60n177_aix_release.cmake b/Utilities/Release/v60n177_aix_release.cmake deleted file mode 100644 index 9ed42ad..0000000 --- a/Utilities/Release/v60n177_aix_release.cmake +++ /dev/null @@ -1,21 +0,0 @@ -set(CMAKE_RELEASE_DIRECTORY "/bench1/noibm34/CMakeReleaseDirectory" ) -set(FINAL_PATH /u/noibm34/cmake-release) -set(PROCESSORS 2) -set(CVS_COMMAND /vol/local/bin/cvs) -set(HOST "sshserv.centers.ihost.com" ) -set(EXTRA_HOP "rsh v60n177" ) -set(MAKE_PROGRAM "make") -set(CC "xlc") -set(CXX "xlC") -set(INITIAL_CACHE " -CMAKE_BUILD_TYPE:STRING=Release -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -") -set(EXTRA_COPY " -rm -rf ~/cmake-release -mkdir ~/cmake-release -mv *.sh ~/cmake-release -mv *.Z ~/cmake-release -mv *.gz ~/cmake-release") -get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) -include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/vogon_cygwin.cmake b/Utilities/Release/vogon_cygwin.cmake deleted file mode 100644 index 0506f2a..0000000 --- a/Utilities/Release/vogon_cygwin.cmake +++ /dev/null @@ -1,11 +0,0 @@ -set(CMAKE_RELEASE_DIRECTORY "c:/hoffman/CMakeReleaseCygwin") -set(PROCESSORS 2) -set(HOST vogon) -set(CPACK_BINARY_GENERATORS "CygwinBinary") -set(CPACK_SOURCE_GENERATORS "CygwinSource") -set(MAKE_PROGRAM "make") -set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release -Subversion_SVNADMIN_EXECUTABLE:STRING=FALSE -") -get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) -include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/vogon_release.cmake b/Utilities/Release/vogon_release.cmake deleted file mode 100644 index 41245a5..0000000 --- a/Utilities/Release/vogon_release.cmake +++ /dev/null @@ -1,17 +0,0 @@ -set(CMAKE_RELEASE_DIRECTORY "c:/hoffman/CMakeReleaseDirectory") -set(CONFIGURE_WITH_CMAKE TRUE) -set(CMAKE_CONFIGURE_PATH "c:/Program\\ Files/CMake\\ 2.7/bin/cmake.exe") -set(PROCESSORS 1) -set(HOST vogon) -set(CPACK_BINARY_GENERATORS "NSIS ZIP") -set(CPACK_SOURCE_GENERATORS "ZIP") -set(MAKE_PROGRAM "nmake") -set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -CMAKE_GENERATOR:INTERNAL=NMake Makefiles -CMAKE_MT_EXECUTABLE:STRING=mt -BUILD_QtDialog:BOOL:=TRUE -QT_QMAKE_EXECUTABLE:FILEPATH=C:/QT/qt-win-opensource-src-4.5.0/bin/qmake.exe -") -get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) -include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/vogon_release_qt.cmake b/Utilities/Release/vogon_release_qt.cmake deleted file mode 100644 index 1772006..0000000 --- a/Utilities/Release/vogon_release_qt.cmake +++ /dev/null @@ -1,16 +0,0 @@ -set(CMAKE_RELEASE_DIRECTORY "c:/hoffman/CMakeReleaseDirectory") -set(CONFIGURE_WITH_CMAKE TRUE) -set(CMAKE_CONFIGURE_PATH "c:/Program\\ Files/CMake\\ 2.6/bin/cmake.exe") -set(PROCESSORS 1) -set(HOST vogon) -set(CPACK_BINARY_GENERATORS "NSIS ZIP") -set(CPACK_SOURCE_GENERATORS "ZIP") -set(MAKE_PROGRAM "nmake") -set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -CMAKE_GENERATOR:INTERNAL=NMake Makefiles -CMAKE_MT_EXECUTABLE:STRING=mt -QT_QMAKE_EXECUTABLE:FILEPATH=C:/QT/qt-win-opensource-src-4.5.0/bin/qmake.exe -") -get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) -include(${path}/release_cmake.cmake) diff --git a/Utilities/cmbzip2/bzlib_private.h b/Utilities/cmbzip2/bzlib_private.h index 147dbb8..02a667f 100644 --- a/Utilities/cmbzip2/bzlib_private.h +++ b/Utilities/cmbzip2/bzlib_private.h @@ -47,6 +47,9 @@ /* warning C4127: conditional expression is constant*/ # pragma warning(disable:4127) #endif +#if defined(__clang__) +# pragma clang diagnostic ignored "-Wcast-align" +#endif /*-- General stuff. --*/ diff --git a/Utilities/cmcurl/setup.h b/Utilities/cmcurl/setup.h index c49e63d..e302f35 100644 --- a/Utilities/cmcurl/setup.h +++ b/Utilities/cmcurl/setup.h @@ -42,6 +42,10 @@ #define WIN32 #endif +#if defined(__clang__) +# pragma clang diagnostic ignored "-Wcast-align" +#endif + /* * Include configuration script results or hand-crafted * configuration file for platforms which lack config tool. diff --git a/Utilities/cmlibarchive/libarchive/archive_check_magic.c b/Utilities/cmlibarchive/libarchive/archive_check_magic.c index a9177d7..e9dbe51 100644 --- a/Utilities/cmlibarchive/libarchive/archive_check_magic.c +++ b/Utilities/cmlibarchive/libarchive/archive_check_magic.c @@ -69,7 +69,7 @@ diediedie(void) /* Cause a breakpoint exception */ DebugBreak(); #endif - *(char *)0 = 1; /* Deliberately segfault and force a coredump. */ + *(char *)1 = 1; /* Deliberately segfault and force a coredump. */ _exit(1); /* If that didn't work, just exit with an error. */ } @@ -839,7 +839,7 @@ mkdir "${cmake_bootstrap_dir}/${TMPFILE}" cd "${cmake_bootstrap_dir}/${TMPFILE}" echo ' test: test.c - "'"${cmake_c_compiler}"'" -o test test.c + "'"${cmake_c_compiler}"'" '"${cmake_ld_flags} ${cmake_c_flags}"' -o test test.c '>"Makefile" echo ' #include <stdio.h> |