diff options
25 files changed, 188 insertions, 90 deletions
diff --git a/Help/command/install.rst b/Help/command/install.rst index 7571aae291..ab6fef6649 100644 --- a/Help/command/install.rst +++ b/Help/command/install.rst @@ -660,9 +660,9 @@ and installed by the current project. For example, the code install(TARGETS myexe EXPORT myproj DESTINATION bin) install(EXPORT myproj NAMESPACE mp_ DESTINATION lib/myproj) - install(EXPORT_ANDROID_MK myexp DESTINATION share/ndk-modules) + install(EXPORT_ANDROID_MK myproj DESTINATION share/ndk-modules) -will install the executable myexe to ``<prefix>/bin`` and code to import +will install the executable ``myexe`` to ``<prefix>/bin`` and code to import it in the file ``<prefix>/lib/myproj/myproj.cmake`` and ``<prefix>/share/ndk-modules/Android.mk``. An outside project may load this file with the include command and reference the ``myexe`` diff --git a/Help/dev/maint.rst b/Help/dev/maint.rst index a8942cd7c6..1153a095ff 100644 --- a/Help/dev/maint.rst +++ b/Help/dev/maint.rst @@ -188,12 +188,6 @@ Update ``Source/CMakeVersion.cmake`` to set the version to set(CMake_VERSION_PATCH 0) set(CMake_VERSION_RC 1) -Update ``Utilities/Release/upload_release.cmake``: - -.. code-block:: cmake - - set(VERSION $ver) - Update uses of ``DEVEL_CMAKE_VERSION`` in the source tree to mention the actual version number: diff --git a/Help/release/dev/FindPython-FIND_FRAMEWORK.rst b/Help/release/dev/FindPython-FIND_FRAMEWORK.rst new file mode 100644 index 0000000000..f390460ba5 --- /dev/null +++ b/Help/release/dev/FindPython-FIND_FRAMEWORK.rst @@ -0,0 +1,5 @@ +FindPython-FIND_FRAMEWORK +------------------------- + +* Modules :module:`FindPython3`, :module:`FindPython2` and :module:`FindPython` + gain a new variable to control frameworks lookup on macOS. diff --git a/Help/release/dev/cmake_automoc_relaxed_mode.rst b/Help/release/dev/cmake_automoc_relaxed_mode.rst new file mode 100644 index 0000000000..aa4772a3d6 --- /dev/null +++ b/Help/release/dev/cmake_automoc_relaxed_mode.rst @@ -0,0 +1,5 @@ +cmake_automoc_relaxed_mode +-------------------------- + +* The variable :variable:`CMAKE_AUTOMOC_RELAXED_MODE` is considered + deprecated. Support still exists but will be removed in future versions. diff --git a/Help/variable/CMAKE_AUTOMOC_RELAXED_MODE.rst b/Help/variable/CMAKE_AUTOMOC_RELAXED_MODE.rst index addc62de4e..6c0c61b112 100644 --- a/Help/variable/CMAKE_AUTOMOC_RELAXED_MODE.rst +++ b/Help/variable/CMAKE_AUTOMOC_RELAXED_MODE.rst @@ -1,6 +1,8 @@ CMAKE_AUTOMOC_RELAXED_MODE -------------------------- +.. deprecated:: 3.15 + Switch between strict and relaxed automoc mode. By default, :prop_tgt:`AUTOMOC` behaves exactly as described in the diff --git a/Help/variable/CTEST_CUSTOM_WARNING_EXCEPTION.rst b/Help/variable/CTEST_CUSTOM_WARNING_EXCEPTION.rst index 36fa37d921..a03d473423 100644 --- a/Help/variable/CTEST_CUSTOM_WARNING_EXCEPTION.rst +++ b/Help/variable/CTEST_CUSTOM_WARNING_EXCEPTION.rst @@ -2,6 +2,6 @@ CTEST_CUSTOM_WARNING_EXCEPTION ------------------------------ A list of regular expressions which will be used to exclude when detecting -warning messages in build outputs by the :command:`ctest_test` command. +warning messages in build outputs by the :command:`ctest_build` command. .. include:: CTEST_CUSTOM_XXX.txt diff --git a/Help/variable/CTEST_CUSTOM_WARNING_MATCH.rst b/Help/variable/CTEST_CUSTOM_WARNING_MATCH.rst index a35be96b55..18aa6b31d7 100644 --- a/Help/variable/CTEST_CUSTOM_WARNING_MATCH.rst +++ b/Help/variable/CTEST_CUSTOM_WARNING_MATCH.rst @@ -2,6 +2,6 @@ CTEST_CUSTOM_WARNING_MATCH -------------------------- A list of regular expressions which will be used to detect warning messages in -build outputs by the :command:`ctest_test` command. +build outputs by the :command:`ctest_build` command. .. include:: CTEST_CUSTOM_XXX.txt diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake index 2bba178bec..21f18d4000 100644 --- a/Modules/CMakeSwiftInformation.cmake +++ b/Modules/CMakeSwiftInformation.cmake @@ -18,10 +18,16 @@ if(CMAKE_Swift_COMPILER_ID) endif() set(CMAKE_INCLUDE_FLAG_Swift "-I ") -set(CMAKE_Swift_DEFINE_FLAG -D) + set(CMAKE_Swift_COMPILE_OPTIONS_TARGET "-target ") set(CMAKE_Swift_COMPILER_ARG1 -frontend) +set(CMAKE_Swift_DEFINE_FLAG -D) set(CMAKE_Swift_FRAMEWORK_SEARCH_FLAG "-F ") +set(CMAKE_Swift_LINKER_WRAPPER_FLAG "-Xlinker" " ") +set(CMAKE_Swift_RESPONSE_FILE_LINK_FLAG @) + +set(CMAKE_Swift_LINKER_PREFERENCE 50) +set(CMAKE_Swift_LINKER_PREFERENCE_PROPAGATES 1) # NOTE(compnerd) use the short form for convenience and ease of search. They # are treated equivalent to their long form names as well as custom Swift diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 018f675412..464f229822 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1093,6 +1093,16 @@ function(_Boost_COMPILER_FEATURES component _ret) # Compiler feature for `context` same as for `fiber`. set(_Boost_CONTEXT_COMPILER_FEATURES ${_Boost_FIBER_COMPILER_FEATURES}) endif() + + # Boost Contract library available in >= 1.67 + if(NOT Boost_VERSION_STRING VERSION_LESS 1.67.0) + # From `libs/contract/build/boost_contract_build.jam` + set(_Boost_CONTRACT_COMPILER_FEATURES + cxx_lambdas + cxx_variadic_templates + ) + endif() + string(TOUPPER ${component} uppercomponent) set(${_ret} ${_Boost_${uppercomponent}_COMPILER_FEATURES} PARENT_SCOPE) endfunction() diff --git a/Modules/FindFLEX.cmake b/Modules/FindFLEX.cmake index 09d57d20d6..d22b7ec67a 100644 --- a/Modules/FindFLEX.cmake +++ b/Modules/FindFLEX.cmake @@ -95,6 +95,7 @@ respectively ``FLEX_TARGET`` and ``BISON_TARGET`` macros. ${BISON_MyParser_OUTPUTS} ${FLEX_MyScanner_OUTPUTS} ) + target_link_libraries(Foo ${FLEX_LIBRARIES}) ==================================================================== #]=======================================================================] diff --git a/Modules/FindICU.cmake b/Modules/FindICU.cmake index e4b4909b5d..38081f5fa2 100644 --- a/Modules/FindICU.cmake +++ b/Modules/FindICU.cmake @@ -162,7 +162,8 @@ function(_ICU_FIND) string(TOUPPER "${program}" program_upcase) set(cache_var "ICU_${program_upcase}_EXECUTABLE") set(program_var "ICU_${program_upcase}_EXECUTABLE") - find_program("${cache_var}" "${program}" + find_program("${cache_var}" + NAMES "${program}" HINTS ${icu_roots} PATH_SUFFIXES ${icu_binary_suffixes} DOC "ICU ${program} executable" @@ -228,13 +229,15 @@ function(_ICU_FIND) list(APPEND component_libnames ${static_component_libnames}) list(APPEND component_debug_libnames ${static_component_debug_libnames}) endif() - find_library("${component_cache_release}" ${component_libnames} + find_library("${component_cache_release}" + NAMES ${component_libnames} HINTS ${icu_roots} PATH_SUFFIXES ${icu_library_suffixes} DOC "ICU ${component} library (release)" NO_PACKAGE_ROOT_PATH ) - find_library("${component_cache_debug}" ${component_debug_libnames} + find_library("${component_cache_debug}" + NAMES ${component_debug_libnames} HINTS ${icu_roots} PATH_SUFFIXES ${icu_library_suffixes} DOC "ICU ${component} library (debug)" @@ -286,7 +289,8 @@ function(_ICU_FIND) string(REPLACE "." "_" data_upcase "${data_upcase}") set(cache_var "ICU_${data_upcase}") set(data_var "ICU_${data_upcase}") - find_file("${cache_var}" "${data}" + find_file("${cache_var}" + NAMES "${data}" HINTS ${icu_roots} PATH_SUFFIXES ${icu_data_suffixes} DOC "ICU ${data} data file") diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index b909db8d0a..def23bb13c 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -347,6 +347,7 @@ macro(_OPENMP_SET_VERSION_BY_SPEC_DATE LANG) # Preview versions "201611=5.0" # OpenMP 5.0 preview 1 # Combined versions, 2.5 onwards + "201811=5.0" "201511=4.5" "201307=4.0" "201107=3.1" @@ -363,6 +364,9 @@ macro(_OPENMP_SET_VERSION_BY_SPEC_DATE LANG) # Fortran version 1.0 "199710=1.0" ) + if(MSVC) + list(APPEND OpenMP_SPEC_DATE_MAP "2019=2.0") + endif() if(OpenMP_${LANG}_SPEC_DATE) string(REGEX MATCHALL "${OpenMP_${LANG}_SPEC_DATE}=([0-9]+)\\.([0-9]+)" _version_match "${OpenMP_SPEC_DATE_MAP}") diff --git a/Modules/FindPython.cmake b/Modules/FindPython.cmake index 59c286db98..e2f3bf3496 100644 --- a/Modules/FindPython.cmake +++ b/Modules/FindPython.cmake @@ -161,14 +161,19 @@ Hints * ``LAST``: Try to use registry after environment variables. * ``NEVER``: Never try to use registry. -``CMAKE_FIND_FRAMEWORK`` - On macOS the :variable:`CMAKE_FIND_FRAMEWORK` variable determine the order of +``Python_FIND_FRAMEWORK`` + On macOS the ``Python_FIND_FRAMEWORK`` variable determine the order of preference between Apple-style and unix-style package components. + This variable can be set to empty or take same values as + :variable:`CMAKE_FIND_FRAMEWORK` variable. .. note:: Value ``ONLY`` is not supported so ``FIRST`` will be used instead. + If ``Python_FIND_FRAMEWORK`` is not defined, :variable:`CMAKE_FIND_FRAMEWORK` + variable will be used, if any. + ``Python_FIND_VIRTUALENV`` This variable defines the handling of virtual environments. It is meaningfull only when a virtual environment is active (i.e. the ``activate`` script has diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake index bb2f60d945..83fd1c54b7 100644 --- a/Modules/FindPython/Support.cmake +++ b/Modules/FindPython/Support.cmake @@ -361,6 +361,24 @@ set (_${_PYTHON_PREFIX}_IRON_PYTHON_PATH_SUFFIXES net45 net40) # Apple frameworks handling _python_find_frameworks () +set (_${_PYTHON_PREFIX}_FIND_FRAMEWORK "FIRST") + +if (DEFINED ${_PYTHON_PREFIX}_FIND_FRAMEWORK) + if (NOT ${_PYTHON_PREFIX}_FIND_FRAMEWORK MATCHES "^(FIRST|LAST|NEVER)$") + message (AUTHOR_WARNING "Find${_PYTHON_PREFIX}: ${${_PYTHON_PREFIX}_FIND_FRAMEWORK}: invalid value for '${_PYTHON_PREFIX}_FIND_FRAMEWORK'. 'FIRST', 'LAST' or 'NEVER' expected. 'FIRST' will be used instead.") + else() + set (_${_PYTHON_PREFIX}_FIND_FRAMEWORK ${${_PYTHON_PREFIX}_FIND_FRAMEWORK}) + endif() +elseif (DEFINED CMAKE_FIND_FRAMEWORK) + if (CMAKE_FIND_FRAMEWORK STREQUAL "ONLY") + message (AUTHOR_WARNING "Find${_PYTHON_PREFIX}: CMAKE_FIND_FRAMEWORK: 'ONLY' value is not supported. 'FIRST' will be used instead.") + elseif (NOT CMAKE_FIND_FRAMEWORK MATCHES "^(FIRST|LAST|NEVER)$") + message (AUTHOR_WARNING "Find${_PYTHON_PREFIX}: ${CMAKE_FIND_FRAMEWORK}: invalid value for 'CMAKE_FIND_FRAMEWORK'. 'FIRST', 'LAST' or 'NEVER' expected. 'FIRST' will be used instead.") + else() + set (_${_PYTHON_PREFIX}_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK}) + endif() +endif() + # Save CMAKE_FIND_APPBUNDLE if (DEFINED CMAKE_FIND_APPBUNDLE) set (_${_PYTHON_PREFIX}_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE}) @@ -373,15 +391,8 @@ set (CMAKE_FIND_APPBUNDLE "NEVER") # Save CMAKE_FIND_FRAMEWORK if (DEFINED CMAKE_FIND_FRAMEWORK) set (_${_PYTHON_PREFIX}_CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK}) - if (CMAKE_FIND_FRAMEWORK STREQUAL "ONLY") - message (AUTHOR_WARNING "Find${_PYTHON_PREFIX}: CMAKE_FIND_FRAMEWORK: 'ONLY' value is not supported. 'FIRST' will be used instead.") - set (_${_PYTHON_PREFIX}_FIND_FRAMEWORK "FIRST") - else() - set (_${_PYTHON_PREFIX}_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK}) - endif() else() unset (_${_PYTHON_PREFIX}_CMAKE_FIND_FRAMEWORK) - set (_${_PYTHON_PREFIX}_FIND_FRAMEWORK "FIRST") endif() # To avoid framework lookup set (CMAKE_FIND_FRAMEWORK "NEVER") @@ -389,7 +400,7 @@ set (CMAKE_FIND_FRAMEWORK "NEVER") # Windows Registry handling if (DEFINED ${_PYTHON_PREFIX}_FIND_REGISTRY) if (NOT ${_PYTHON_PREFIX}_FIND_REGISTRY MATCHES "^(FIRST|LAST|NEVER)$") - message (AUTHOR_WARNING "Find${_PYTHON_PREFIX}: ${${_PYTHON_PREFIX}_FIND_REGISTRY}: invalid value for '${_PYTHON_PREFIX}_FIND_REGISTRY'. 'FIRST', 'LAST' or 'NEVER' expected.") + message (AUTHOR_WARNING "Find${_PYTHON_PREFIX}: ${${_PYTHON_PREFIX}_FIND_REGISTRY}: invalid value for '${_PYTHON_PREFIX}_FIND_REGISTRY'. 'FIRST', 'LAST' or 'NEVER' expected. 'FIRST' will be used instead.") set (_${_PYTHON_PREFIX}_FIND_REGISTRY "FIRST") else() set (_${_PYTHON_PREFIX}_FIND_REGISTRY ${${_PYTHON_PREFIX}_FIND_REGISTRY}) @@ -402,7 +413,7 @@ endif() if (DEFINED ENV{VIRTUAL_ENV}) if (DEFINED ${_PYTHON_PREFIX}_FIND_VIRTUALENV) if (NOT ${_PYTHON_PREFIX}_FIND_VIRTUALENV MATCHES "^(FIRST|ONLY|STANDARD)$") - message (AUTHOR_WARNING "Find${_PYTHON_PREFIX}: ${${_PYTHON_PREFIX}_FIND_VIRTUALENV}: invalid value for '${_PYTHON_PREFIX}_FIND_VIRTUALENV'. 'FIRST', 'ONLY' or 'IGNORE' expected.") + message (AUTHOR_WARNING "Find${_PYTHON_PREFIX}: ${${_PYTHON_PREFIX}_FIND_VIRTUALENV}: invalid value for '${_PYTHON_PREFIX}_FIND_VIRTUALENV'. 'FIRST', 'ONLY' or 'STANDARD' expected. 'FIRST' will be used instead.") set (_${_PYTHON_PREFIX}_FIND_VIRTUALENV "FIRST") else() set (_${_PYTHON_PREFIX}_FIND_VIRTUALENV ${${_PYTHON_PREFIX}_FIND_VIRTUALENV}) diff --git a/Modules/FindPython2.cmake b/Modules/FindPython2.cmake index 8a633e0d00..8372ce74f4 100644 --- a/Modules/FindPython2.cmake +++ b/Modules/FindPython2.cmake @@ -162,14 +162,19 @@ Hints * ``LAST``: Try to use registry after environment variables. * ``NEVER``: Never try to use registry. -``CMAKE_FIND_FRAMEWORK`` - On macOS the :variable:`CMAKE_FIND_FRAMEWORK` variable determine the order of +``Python2_FIND_FRAMEWORK`` + On macOS the ``Python2_FIND_FRAMEWORK`` variable determine the order of preference between Apple-style and unix-style package components. + This variable can be set to empty or take same values as + :variable:`CMAKE_FIND_FRAMEWORK` variable. .. note:: Value ``ONLY`` is not supported so ``FIRST`` will be used instead. + If ``Python2_FIND_FRAMEWORK`` is not defined, :variable:`CMAKE_FIND_FRAMEWORK` + variable will be used, if any. + ``Python2_FIND_VIRTUALENV`` This variable defines the handling of virtual environments. It is meaningfull only when a virtual environment is active (i.e. the ``activate`` script has diff --git a/Modules/FindPython3.cmake b/Modules/FindPython3.cmake index 2867326a65..2ead5b6a59 100644 --- a/Modules/FindPython3.cmake +++ b/Modules/FindPython3.cmake @@ -162,14 +162,19 @@ Hints * ``LAST``: Try to use registry after environment variables. * ``NEVER``: Never try to use registry. -``CMAKE_FIND_FRAMEWORK`` - On macOS the :variable:`CMAKE_FIND_FRAMEWORK` variable determine the order of +``Python3_FIND_FRAMEWORK`` + On macOS the ``Python3_FIND_FRAMEWORK`` variable determine the order of preference between Apple-style and unix-style package components. + This variable can be set to empty or take same values as + :variable:`CMAKE_FIND_FRAMEWORK` variable. .. note:: Value ``ONLY`` is not supported so ``FIRST`` will be used instead. + If ``Python3_FIND_FRAMEWORK`` is not defined, :variable:`CMAKE_FIND_FRAMEWORK` + variable will be used, if any. + ``Python3_FIND_VIRTUALENV`` This variable defines the handling of virtual environments. It is meaningfull only when a virtual environment is active (i.e. the ``activate`` script has diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index d317b71ce6..b0c91b2acc 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -32,9 +32,6 @@ caller can set The compiler flag can only be used with the imported target. Use of both the imported target as well as this switch is highly recommended for new code. - -This module is not needed for C++11 and later if threading is done using -``std::thread`` from the standard library. #]=======================================================================] include (CheckLibraryExists) diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index fa6d75ae43..06655a4ce1 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -169,17 +169,11 @@ Possible types are: other #]=======================================================================] -function(gp_append_unique list_var value) - set(contains 0) - - foreach(item ${${list_var}}) - if(item STREQUAL "${value}") - set(contains 1) - break() - endif() - endforeach() +cmake_policy(PUSH) +cmake_policy(SET CMP0057 NEW) # if IN_LIST - if(NOT contains) +function(gp_append_unique list_var value) + if(NOT item IN_LIST ${list_var}) set(${list_var} ${${list_var}} "${value}" PARENT_SCOPE) endif() endfunction() @@ -1043,3 +1037,5 @@ function(list_prerequisites_by_glob glob_arg glob_exp) endif() endforeach() endfunction() + +cmake_policy(POP) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 9325305ca7..06fac722ef 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 14) -set(CMake_VERSION_PATCH 20190526) +set(CMake_VERSION_PATCH 20190529) #set(CMake_VERSION_RC 1) diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 1e4d2ed30c..77af45e68b 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -321,7 +321,11 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) rspcontent = "$in_newline"; } rspcontent += " $LINK_PATH $LINK_LIBRARIES"; - vars.Objects = responseFlag.c_str(); + if (this->TargetLinkLanguage == "Swift") { + vars.SwiftSources = responseFlag.c_str(); + } else { + vars.Objects = responseFlag.c_str(); + } vars.LinkLibraries = ""; } diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index 2d12964ab8..265daf6c94 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -407,6 +407,19 @@ bool cmQtAutoGenInitializer::InitCustomTargets() } } } + + // CMAKE_AUTOMOC_RELAXED_MODE deprecation warning + if (this->Moc.Enabled) { + if (cmSystemTools::IsOn( + makefile->GetDefinition("CMAKE_AUTOMOC_RELAXED_MODE"))) { + std::string msg = "AUTOMOC: CMAKE_AUTOMOC_RELAXED_MODE is " + "deprecated an will be removed in the future. "; + msg += "Consider disabling it and converting the target "; + msg += this->Target->GetName(); + msg += " to regular mode."; + makefile->IssueMessage(MessageType::AUTHOR_WARNING, msg); + } + } } // Init rcc specific settings diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx index dbabba0293..889f47db1b 100644 --- a/Source/cmQtAutoMocUic.cxx +++ b/Source/cmQtAutoMocUic.cxx @@ -708,7 +708,7 @@ bool cmQtAutoMocUic::JobEvaluateT::MocEvalSource( msg += Quoted(sourceFile.FileName); msg += "!\nBetter include "; msg += Quoted(sourceBase + ".moc"); - msg += " for compatibility with strict mode.\n"; + msg += " for compatibility with regular mode.\n"; msg += "This is a CMAKE_AUTOMOC_RELAXED_MODE warning.\n"; Log().WarningFile(GenT::MOC, sourceFile.FileName, msg); } @@ -770,7 +770,7 @@ bool cmQtAutoMocUic::JobEvaluateT::MocEvalSource( msg += Quoted(header->FileName); msg += "!\nBetter include "; msg += Quoted("moc_" + incKey.Base + ".cpp"); - msg += " for a compatibility with strict mode.\n"; + msg += " for a compatibility with regular mode.\n"; msg += "This is a CMAKE_AUTOMOC_RELAXED_MODE warning.\n"; Log().WarningFile(GenT::MOC, sourceFile.FileName, msg); } else { @@ -782,7 +782,7 @@ bool cmQtAutoMocUic::JobEvaluateT::MocEvalSource( msg += Quoted(header->FileName); msg += "!\nBetter include "; msg += Quoted("moc_" + incKey.Base + ".cpp"); - msg += " for compatibility with strict mode.\n"; + msg += " for compatibility with regular mode.\n"; msg += "This is a CMAKE_AUTOMOC_RELAXED_MODE warning.\n"; Log().WarningFile(GenT::MOC, sourceFile.FileName, msg); } @@ -797,7 +797,7 @@ bool cmQtAutoMocUic::JobEvaluateT::MocEvalSource( // Check if this is the sources own .moc file bool const ownMoc = (incKey.Base == sourceBase); if (!ownMoc) { - // Don't allow <BASE>.moc include other than own in strict mode + // Don't allow <BASE>.moc include other than own in regular mode std::string msg = "The file includes the moc file "; msg += Quoted(incKey.Key); msg += ",\nwhich seems to be the moc file from a different " diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 698cb1d581..6901077421 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -770,14 +770,14 @@ if(BUILD_TESTING) file(WRITE "${_TEST_DIR}/nightly-cmake.sh" "cd ${_TEST_DIR} ${CMake_BINARY_DIR}/bin/cmake -DCMAKE_CREATE_VERSION=nightly -P ${CMake_SOURCE_DIR}/Utilities/Release/${script} -${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release/upload_release.cmake +${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGHTLY_RELEASES}' ") add_test(${name} /bin/sh ${_TEST_DIR}/nightly-cmake.sh) if(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY) set_tests_properties (${name} PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT}) endif() endmacro() - if(CMAKE_BUILD_NIGHTLY_RELEASES) + if(CMake_BUILD_NIGHTLY_RELEASES) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyWin32 win32_release.cmake) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyWin64 diff --git a/Utilities/Release/push.bash b/Utilities/Release/push.bash new file mode 100755 index 0000000000..1c8efe9004 --- /dev/null +++ b/Utilities/Release/push.bash @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +usage='usage: push.bash [<options>] [--] <dest> + +Options: + + --dir <dir> Specify subdirectory under destination. + Defaults to "v<version>". + --version <ver> CMake <major>.<minor> version number to push. + Defaults to version of source tree. +' + +die() { + echo "$@" 1>&2; exit 1 +} + +cmake_source_dir="${BASH_SOURCE%/*}/../.." + +cmake_version_component() +{ + sed -n " +/^set(CMake_VERSION_${1}/ {s/set(CMake_VERSION_${1} *\([0-9]*\))/\1/;p;} +" "${cmake_source_dir}/Source/CMakeVersion.cmake" +} + + +version='' +dir='' +while test "$#" != 0; do + case "$1" in + --dir) shift; dir="$1" ;; + --version) shift; version="$1" ;; + --) shift ; break ;; + -*) die "$usage" ;; + *) break ;; + esac + shift +done +test "$#" = 1 || die "$usage" +readonly dest="$1" + +if test -z "$version"; then + cmake_version_major="$(cmake_version_component MAJOR)" + cmake_version_minor="$(cmake_version_component MINOR)" + version="${cmake_version_major}.${cmake_version_minor}" +fi +readonly version + +if test -z "$dir"; then + dir="v${version}" +fi +readonly dir + +for f in cmake-${version}*; do + if ! test -f "${f}"; then + continue + fi + + echo "pushing '${f}'" + + # Make a copy with a new timestamp and atomically rename into place. + tf="${dest}/${dir}/.tmp.${f}" + df="${dest}/${dir}/${f}" + cp "${f}" "${tf}" + mv "${tf}" "${df}" + + # Pause to give each file a distinct time stamp even with 1s resolution + # so that sorting by time also sorts alphabetically. + sleep 1.1 +done diff --git a/Utilities/Release/upload_release.cmake b/Utilities/Release/upload_release.cmake deleted file mode 100644 index 3613ae7a7f..0000000000 --- a/Utilities/Release/upload_release.cmake +++ /dev/null @@ -1,39 +0,0 @@ -set(CTEST_RUN_CURRENT_SCRIPT 0) -if(NOT VERSION) - set(VERSION 3.14) -endif() -if(NOT DEFINED PROJECT_PREFIX) - set(PROJECT_PREFIX cmake-${VERSION}) -endif() -if(NOT DEFINED DIR) - set(DIR "v${VERSION}") -endif() -file(GLOB FILES ${CMAKE_CURRENT_SOURCE_DIR} "${PROJECT_PREFIX}*") -list(SORT FILES) -list(REVERSE FILES) -message("${FILES}") -set(UPLOAD_LOC - "kitware@www.cmake.org:/projects/FTP/pub/cmake/${DIR}") -set(count 0) -foreach(file ${FILES}) - if(NOT IS_DIRECTORY ${file}) - message("upload ${file} ${UPLOAD_LOC}") - execute_process(COMMAND - scp ${file} ${UPLOAD_LOC} - RESULT_VARIABLE result) - if("${result}" GREATER 0) - message(FATAL_ERROR "failed to upload file to ${UPLOAD_LOC}") - endif() - - # Pause to give each upload a distinct (to the nearest second) - # time stamp - if(COMMAND ctest_sleep) - ctest_sleep(2) - endif() - - math(EXPR count "${count} + 1") - endif() -endforeach() -if(${count} EQUAL 0) - message(FATAL_ERROR "Error no files uploaded.") -endif() |