From kwrobot at kitware.com Thu Jun 1 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 1 Jun 2017 00:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.8.2-1349-g09e10f0 Message-ID: <20170601040504.6F824FA0B8@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 09e10f0937f971a5314a0b8f46c961c8c6e7fb2c (commit) from e7d690492a0ef55709185e7ca7ede659a002530b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=09e10f0937f971a5314a0b8f46c961c8c6e7fb2c commit 09e10f0937f971a5314a0b8f46c961c8c6e7fb2c Author: Kitware Robot AuthorDate: Thu Jun 1 00:01:06 2017 -0400 Commit: Kitware Robot CommitDate: Thu Jun 1 00:01:06 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 918e6b0..63eea25 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 8) -set(CMake_VERSION_PATCH 20170531) +set(CMake_VERSION_PATCH 20170601) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 1 13:35:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 1 Jun 2017 13:35:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.8.2-1352-g75850db Message-ID: <20170601173508.ADB24FA8CD@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 75850db66758ccdb4500ca0d580a2b97215a9357 (commit) via 5e9bd8a2ea759c4f7e412a8591ee55fe057313dc (commit) via 50988f6d763d99dc7d016000157528fa0ab20086 (commit) from 09e10f0937f971a5314a0b8f46c961c8c6e7fb2c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=75850db66758ccdb4500ca0d580a2b97215a9357 commit 75850db66758ccdb4500ca0d580a2b97215a9357 Merge: 09e10f0 5e9bd8a Author: Brad King AuthorDate: Thu Jun 1 17:33:00 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 1 13:34:11 2017 -0400 Merge topic 'update-kwsys' 5e9bd8a2 Merge branch 'upstream-KWSys' into update-kwsys 50988f6d KWSys 2017-05-31 (bd0bbad7) Acked-by: Kitware Robot Merge-request: !915 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e9bd8a2ea759c4f7e412a8591ee55fe057313dc commit 5e9bd8a2ea759c4f7e412a8591ee55fe057313dc Merge: de16ff3 50988f6 Author: Brad King AuthorDate: Wed May 31 09:11:14 2017 -0400 Commit: Brad King CommitDate: Wed May 31 09:11:14 2017 -0400 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2017-05-31 (bd0bbad7) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=50988f6d763d99dc7d016000157528fa0ab20086 commit 50988f6d763d99dc7d016000157528fa0ab20086 Author: KWSys Upstream AuthorDate: Wed May 31 08:56:55 2017 -0400 Commit: Brad King CommitDate: Wed May 31 09:11:11 2017 -0400 KWSys 2017-05-31 (bd0bbad7) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit bd0bbad7f47776565d87aeb3657250974a426190 (master). Upstream Shortlog ----------------- Daniel Pfeifer (1): 0f7ec930 Pass std::string as const& Matteo Settenvini (1): 6173f4b3 SystemTools: Add function to remove empty path components diff --git a/SystemInformation.cxx b/SystemInformation.cxx index bfc895e..b7bd102 100644 --- a/SystemInformation.cxx +++ b/SystemInformation.cxx @@ -918,7 +918,8 @@ int LoadLines(const char* fileName, std::vector& lines) // **************************************************************************** template -int NameValue(std::vector& lines, std::string name, T& value) +int NameValue(std::vector const& lines, std::string const& name, + T& value) { size_t nLines = lines.size(); for (size_t i = 0; i < nLines; ++i) { diff --git a/SystemTools.cxx b/SystemTools.cxx index 5ca382f..07da8dc 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -22,6 +22,7 @@ #include KWSYS_HEADER(FStream.hxx) #include KWSYS_HEADER(Encoding.hxx) +#include #include #include #include @@ -3708,6 +3709,16 @@ std::string SystemTools::JoinPath( return result; } +void SystemTools::RemoveEmptyPathElements(std::vector& path) +{ + if (path.empty()) { + return; + } + + path.erase(std::remove(path.begin() + 1, path.end(), std::string("")), + path.end()); +} + bool SystemTools::ComparePath(const std::string& c1, const std::string& c2) { #if defined(_WIN32) || defined(__APPLE__) diff --git a/SystemTools.hxx.in b/SystemTools.hxx.in index 0849e1d..5e091c2 100644 --- a/SystemTools.hxx.in +++ b/SystemTools.hxx.in @@ -474,6 +474,10 @@ public: static std::string JoinPath(std::vector::const_iterator first, std::vector::const_iterator last); + /** Removes empty components from path. + */ + static void RemoveEmptyPathElements(std::vector& path); + /** * Compare a path or components of a path. */ diff --git a/testSystemTools.cxx b/testSystemTools.cxx index 900894c..e6fbf6c 100644 --- a/testSystemTools.cxx +++ b/testSystemTools.cxx @@ -54,7 +54,8 @@ static const char* toUnixPaths[][2] = { { 0, 0 } }; -static bool CheckConvertToUnixSlashes(std::string input, std::string output) +static bool CheckConvertToUnixSlashes(std::string const& input, + std::string const& output) { std::string result = input; kwsys::SystemTools::ConvertToUnixSlashes(result); @@ -71,8 +72,9 @@ static const char* checkEscapeChars[][4] = { { "1 foo 2 bar 2", "12", "\\", { " {} ", "{}", "#", " #{#} " }, { 0, 0, 0, 0 } }; -static bool CheckEscapeChars(std::string input, const char* chars_to_escape, - char escape_char, std::string output) +static bool CheckEscapeChars(std::string const& input, + const char* chars_to_escape, char escape_char, + std::string const& output) { std::string result = kwsys::SystemTools::EscapeChars( input.c_str(), chars_to_escape, escape_char); ----------------------------------------------------------------------- Summary of changes: Source/kwsys/SystemInformation.cxx | 3 ++- Source/kwsys/SystemTools.cxx | 11 +++++++++++ Source/kwsys/SystemTools.hxx.in | 4 ++++ Source/kwsys/testSystemTools.cxx | 8 +++++--- 4 files changed, 22 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 1 13:45:22 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 1 Jun 2017 13:45:22 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.8.2-1371-g860db08 Message-ID: <20170601174523.7EA4CC01F5@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 860db083cafb1337147923f7dd21b57767abbee3 (commit) via c80148c77e552a43b0648bad02de86e6b6d2b61d (commit) via 59234fa2da4387fe9849d91fb9ad401d47a9b45c (commit) via 4b31267abfab1378e61b8406c9270284857810c1 (commit) via 987216062e8718e0c37970c7ea595703057ce344 (commit) via 3c1ecb5214afa45a44742ad2b1e24517925e858a (commit) via f70b0bb36545befdf5c5d9d524d51a6ff14021f1 (commit) via 6181a9e00ef50a44d873c771c028f2ca88fd6be5 (commit) via 9bb8b88904bcdd02fae883808f1b60468b1ec01c (commit) via ff77f4613a059cf24f34a5ea1733891ae54325bf (commit) via 52d0983a88a28709ced63dc0a9ad955d75cdbfe8 (commit) via 78841f27e3bee38961817b83b520c3b4a375f4c6 (commit) via 220ede74ff5dcd8a8078057c1ba71ecfa768f475 (commit) via a40e6ba88dfe88df9a9665325636b0e01a4beb5c (commit) via 9b112a848a2063c81fe758984351d765e712a2bc (commit) via 37221529c7d032599cd7f8a4bb6778a55b8bc5a8 (commit) via e556f1b909a910f7124bd26f82e4b42dd2142c17 (commit) via 20ffa14708e5e1b324ac954fd06a1415b9398b7c (commit) via 5bb7429166240ffaf6f53f834bbb1a4973df8e1d (commit) from 75850db66758ccdb4500ca0d580a2b97215a9357 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=860db083cafb1337147923f7dd21b57767abbee3 commit 860db083cafb1337147923f7dd21b57767abbee3 Merge: c80148c 3c1ecb5 Author: Brad King AuthorDate: Thu Jun 1 17:40:03 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 1 13:40:47 2017 -0400 Merge topic 'add-common-record-features-macros' 3c1ecb52 Intel: Fix missing C std default for 12.0 <= ver < 12.1 f70b0bb3 SunPro: Make sure all known versions get CXX98 defaults 220ede74 GNU: Fix language defaults for 3.4 a40e6ba8 Clang: Fix language defaults for 2.1 9b112a84 Compilers: Port to use default cmake_record_lang_compile_features macros 37221529 MSVC: Add empty definitions for std compile options e556f1b9 CompileFeatures: Makes tests work with meta-feature only 20ffa147 Tests: Allow test macro to take no executable arguments ... Acked-by: Kitware Robot Merge-request: !833 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c80148c77e552a43b0648bad02de86e6b6d2b61d commit c80148c77e552a43b0648bad02de86e6b6d2b61d Merge: 59234fa 6181a9e Author: Brad King AuthorDate: Thu Jun 1 17:39:36 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 1 13:40:03 2017 -0400 Merge topic 'bootstrap-std-flags' 6181a9e0 bootstrap: prefer to use standard flags for C and CXX Acked-by: Kitware Robot Merge-request: !842 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=59234fa2da4387fe9849d91fb9ad401d47a9b45c commit 59234fa2da4387fe9849d91fb9ad401d47a9b45c Merge: 4b31267 78841f2 Author: Brad King AuthorDate: Thu Jun 1 17:36:01 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 1 13:36:06 2017 -0400 Merge topic 'FindGSL-debug-postfix' 78841f27 FindGSL: recognize libraries name with debug postfix as debug libraries Acked-by: Kitware Robot Merge-request: !914 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b31267abfab1378e61b8406c9270284857810c1 commit 4b31267abfab1378e61b8406c9270284857810c1 Merge: 9872160 9bb8b88 Author: Brad King AuthorDate: Thu Jun 1 17:34:11 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 1 13:35:33 2017 -0400 Merge topic 'rel-no-bootstrap-test' 9bb8b889 Utilities/Release: Skip BootstrapTest for Linux binary ff77f461 Utilities/Release: Drop unused release script Acked-by: Kitware Robot Merge-request: !917 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=987216062e8718e0c37970c7ea595703057ce344 commit 987216062e8718e0c37970c7ea595703057ce344 Merge: 75850db 52d0983 Author: Brad King AuthorDate: Thu Jun 1 17:33:16 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 1 13:35:08 2017 -0400 Merge topic 'test-external-no-bootstrap' 52d0983a Tests: Skip BootstrapTest if testing external CMake Acked-by: Kitware Robot Merge-request: !916 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3c1ecb5214afa45a44742ad2b1e24517925e858a commit 3c1ecb5214afa45a44742ad2b1e24517925e858a Author: Chuck Atkins AuthorDate: Tue May 30 09:35:22 2017 -0400 Commit: Chuck Atkins CommitDate: Wed May 31 13:09:49 2017 -0400 Intel: Fix missing C std default for 12.0 <= ver < 12.1 diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake index 2e7ea24..4e4af29 100644 --- a/Modules/Compiler/Intel-C.cmake +++ b/Modules/Compiler/Intel-C.cmake @@ -37,7 +37,7 @@ else() endif() -__compiler_check_default_language_standard(C 12.1 90 15.0.0 11) +__compiler_check_default_language_standard(C 12.0 90 15.0.0 11) set(CMAKE_C_CREATE_PREPROCESSED_SOURCE " -E > ") set(CMAKE_C_CREATE_ASSEMBLY_SOURCE " -S -o ") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f70b0bb36545befdf5c5d9d524d51a6ff14021f1 commit f70b0bb36545befdf5c5d9d524d51a6ff14021f1 Author: Chuck Atkins AuthorDate: Tue May 30 09:18:47 2017 -0400 Commit: Chuck Atkins CommitDate: Wed May 31 13:09:42 2017 -0400 SunPro: Make sure all known versions get CXX98 defaults diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake index 2222b25..5cb7edc 100644 --- a/Modules/Compiler/SunPro-CXX.cmake +++ b/Modules/Compiler/SunPro-CXX.cmake @@ -43,9 +43,9 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13) set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=c++11") set(CMAKE_CXX_LINK_WITH_STANDARD_COMPILE_OPTION 1) else() - set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-library=stlport") - set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-library=stlport") + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-library=stlport4") + set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-library=stlport4") set(CMAKE_CXX_LINK_WITH_STANDARD_COMPILE_OPTION 1) endif() -__compiler_check_default_language_standard(CXX 5.13 98) +__compiler_check_default_language_standard(CXX 1 98) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6181a9e00ef50a44d873c771c028f2ca88fd6be5 commit 6181a9e00ef50a44d873c771c028f2ca88fd6be5 Author: Daniel Pfeifer AuthorDate: Sun May 14 19:41:55 2017 +0200 Commit: Brad King CommitDate: Wed May 31 13:06:00 2017 -0400 bootstrap: prefer to use standard flags for C and CXX diff --git a/bootstrap b/bootstrap index b1f8670..a9cf0b2 100755 --- a/bootstrap +++ b/bootstrap @@ -6,6 +6,17 @@ die() { echo "$@" 1>&2 ; exit 1 } +# Compile flag extraction function. +cmake_extract_standard_flags() +{ + cd "${cmake_source_dir}/Modules/Compiler/" + for file in ${1:-*}-${2}.cmake; do + cat "${file}" \ + | sed -n "s/ *set *( *CMAKE_${2}${3}_EXTENSION_COMPILE_OPTION *\"\{0,1\}\([^\")]*\).*/\1/p" \ + | tr ';' ' ' + done +} + # Version number extraction function. cmake_version_component() { @@ -954,6 +965,17 @@ for a in ${cmake_c_compilers}; do cmake_c_compiler="${a}" fi done +for std in 11 99 90; do + try_flags="`cmake_extract_standard_flags \"${cmake_toolchain}\" C \"${std}\"`" + for flag in $try_flags; do + echo "Checking whether ${cmake_c_compiler} supports ${flag}" >> cmake_bootstrap.log 2>&1 + if cmake_try_run "${cmake_c_compiler}" "${cmake_c_flags} ${flag}" \ + "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then + cmake_c_flags="${cmake_c_flags} ${flag}" + break 2 + fi + done +done rm -f "${TMPFILE}.c" if [ -z "${cmake_c_compiler}" ]; then @@ -988,6 +1010,10 @@ echo ' # include #endif +#if __cplusplus >= 201103L && defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5140 +#error "SunPro <= 5.13 C++ 11 mode not supported due to bug in move semantics." +#endif + class NeedCXX { public: @@ -1015,6 +1041,17 @@ for a in ${cmake_cxx_compilers}; do fi done done +for std in 14 11 98; do + try_flags="`cmake_extract_standard_flags \"${cmake_toolchain}\" CXX \"${std}\"`" + for flag in $try_flags; do + echo "Checking for wheter ${cmake_cxx_flags} supports ${flag}" >> cmake_bootstrap.log 2>&1 + if cmake_try_run "${cmake_cxx_compiler}" "${cmake_cxx_flags} ${flag} -DTEST1" \ + "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then + cmake_cxx_flags="${cmake_cxx_flags} ${flag} " + break 2 + fi + done +done rm -f "${TMPFILE}.cxx" if [ -z "${cmake_cxx_compiler}" ]; then @@ -1240,34 +1277,6 @@ if [ "x${cmake_cxx_compiler_is_gnu}" != "x1" ]; then fi -if [ "x${cmake_cxx_compiler_is_gnu}" != "x1" ]; then - # Are we SolarisStudio? - - TMPFILE=`cmake_tmp_file` - echo ' - #if defined(__SUNPRO_CC) - #include - int main() { std::cout << "This is SolarisStudio" << std::endl; return 0;} - #endif - ' > ${TMPFILE}.cxx - cmake_cxx_compiler_is_solarisstudio=0 - if cmake_try_run "${cmake_cxx_compiler}" \ - "${cmake_cxx_flags} " "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then - cmake_cxx_compiler_is_solarisstudio=1 - fi - if [ "x${cmake_cxx_compiler_is_solarisstudio}" = "x1" ]; then - echo "${cmake_cxx_compiler} is SolarisStudio compiler" - else - echo "${cmake_cxx_compiler} is not SolarisStudio compiler" - fi - rm -f "${TMPFILE}.cxx" - - if [ "x${cmake_cxx_compiler_is_solarisstudio}" = "x1" ]; then - cmake_cxx_flags="${cmake_cxx_flags} -library=stlport4" - fi -fi - - # Test for kwsys features KWSYS_NAME_IS_KWSYS=0 KWSYS_BUILD_SHARED=0 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9bb8b88904bcdd02fae883808f1b60468b1ec01c commit 9bb8b88904bcdd02fae883808f1b60468b1ec01c Author: Brad King AuthorDate: Wed May 31 10:23:57 2017 -0400 Commit: Brad King CommitDate: Wed May 31 10:23:57 2017 -0400 Utilities/Release: Skip BootstrapTest for Linux binary The build itself is done via bootstrap so there is no need to test it again. We already do this for the macOS binary. diff --git a/Utilities/Release/linux64_release.cmake b/Utilities/Release/linux64_release.cmake index feba2a5..3d8ddba 100644 --- a/Utilities/Release/linux64_release.cmake +++ b/Utilities/Release/linux64_release.cmake @@ -35,6 +35,7 @@ OPENSSL_SSL_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.2j/lib/libssl.a PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 CPACK_SYSTEM_NAME:STRING=Linux-x86_64 BUILD_QtDialog:BOOL:=TRUE +CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE CMake_ENABLE_SERVER_MODE:BOOL=TRUE CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3 CMake_INSTALL_DEPENDENCIES:BOOL=ON https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff77f4613a059cf24f34a5ea1733891ae54325bf commit ff77f4613a059cf24f34a5ea1733891ae54325bf Author: Brad King AuthorDate: Wed May 31 10:23:16 2017 -0400 Commit: Brad King CommitDate: Wed May 31 10:23:16 2017 -0400 Utilities/Release: Drop unused release script diff --git a/Utilities/Release/hythloth_release.cmake b/Utilities/Release/hythloth_release.cmake deleted file mode 100644 index d2f4ba5..0000000 --- a/Utilities/Release/hythloth_release.cmake +++ /dev/null @@ -1,10 +0,0 @@ -set(PROCESSORS 2) -set(HOST hythloth) -set(MAKE_PROGRAM "make") -set(MAKE "${MAKE_PROGRAM} -j2") -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) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52d0983a88a28709ced63dc0a9ad955d75cdbfe8 commit 52d0983a88a28709ced63dc0a9ad955d75cdbfe8 Author: Brad King AuthorDate: Wed May 31 10:11:51 2017 -0400 Commit: Brad King CommitDate: Wed May 31 10:11:51 2017 -0400 Tests: Skip BootstrapTest if testing external CMake If we are not actually building CMake then we should not run the `BootstrapTest` (which builds CMake). diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 21fe641..2c05789 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -3110,6 +3110,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endif () endif () + if(CMake_TEST_EXTERNAL_CMAKE) + set(CMAKE_SKIP_BOOTSTRAP_TEST 1) + endif() if("${CMAKE_GENERATOR}" MATCHES Xcode) set(CMAKE_SKIP_BOOTSTRAP_TEST 1) endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=78841f27e3bee38961817b83b520c3b4a375f4c6 commit 78841f27e3bee38961817b83b520c3b4a375f4c6 Author: Silvio Traversaro AuthorDate: Wed May 31 08:32:32 2017 -0400 Commit: Silvio Traversaro CommitDate: Wed May 31 15:01:49 2017 +0200 FindGSL: recognize libraries name with debug postfix as debug libraries This modification is necessary if the GSL libraries are installed in an installation layout without Release and Debug subdirectories, for example when installed by vcpkg . diff --git a/Modules/FindGSL.cmake b/Modules/FindGSL.cmake index 76059b3..8d10b6c 100644 --- a/Modules/FindGSL.cmake +++ b/Modules/FindGSL.cmake @@ -37,9 +37,10 @@ # # This script expects to find libraries at ``$GSL_ROOT_DIR/lib`` and the GSL # headers at ``$GSL_ROOT_DIR/include/gsl``. The library directory may -# optionally provide Release and Debug folders. For Unix-like systems, this -# script will use ``$GSL_ROOT_DIR/bin/gsl-config`` (if found) to aid in the -# discovery GSL. +# optionally provide Release and Debug folders. If available, the libraries +# named ``gsld``, ``gslblasd`` or ``cblasd`` are recognized as debug libraries. +# For Unix-like systems, this script will use ``$GSL_ROOT_DIR/bin/gsl-config`` +# (if found) to aid in the discovery of GSL. # # Cache Variables # ^^^^^^^^^^^^^^^ @@ -105,12 +106,12 @@ find_library( GSL_CBLAS_LIBRARY ) # Do we also have debug versions? find_library( GSL_LIBRARY_DEBUG - NAMES gsl + NAMES gsld gsl HINTS ${GSL_ROOT_DIR}/lib ${GSL_LIBDIR} PATH_SUFFIXES Debug ) find_library( GSL_CBLAS_LIBRARY_DEBUG - NAMES gslcblas cblas + NAMES gslcblasd cblasd gslcblas cblas HINTS ${GSL_ROOT_DIR}/lib ${GSL_LIBDIR} PATH_SUFFIXES Debug ) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=220ede74ff5dcd8a8078057c1ba71ecfa768f475 commit 220ede74ff5dcd8a8078057c1ba71ecfa768f475 Author: Chuck Atkins AuthorDate: Mon May 29 13:22:09 2017 -0400 Commit: Chuck Atkins CommitDate: Tue May 30 09:35:06 2017 -0400 GNU: Fix language defaults for 3.4 diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake index 4b8b3c0..4f1f30e 100644 --- a/Modules/Compiler/GNU-CXX.cmake +++ b/Modules/Compiler/GNU-CXX.cmake @@ -38,4 +38,4 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1) set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++1z") endif() -__compiler_check_default_language_standard(CXX 4.4 98 6.0 14) +__compiler_check_default_language_standard(CXX 3.4 98 6.0 14) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a40e6ba88dfe88df9a9665325636b0e01a4beb5c commit a40e6ba88dfe88df9a9665325636b0e01a4beb5c Author: Chuck Atkins AuthorDate: Mon May 29 12:51:53 2017 -0400 Commit: Chuck Atkins CommitDate: Tue May 30 09:35:06 2017 -0400 Clang: Fix language defaults for 2.1 diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake index ff041ab..d3707ee 100644 --- a/Modules/Compiler/Clang-CXX.cmake +++ b/Modules/Compiler/Clang-CXX.cmake @@ -36,4 +36,4 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5) set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++1z") endif() -__compiler_check_default_language_standard(CXX 3.1 98) +__compiler_check_default_language_standard(CXX 2.1 98) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9b112a848a2063c81fe758984351d765e712a2bc commit 9b112a848a2063c81fe758984351d765e712a2bc Author: Chuck Atkins AuthorDate: Wed May 10 16:39:53 2017 -0400 Commit: Chuck Atkins CommitDate: Tue May 30 09:34:36 2017 -0400 Compilers: Port to use default cmake_record_lang_compile_features macros diff --git a/Modules/Compiler/AppleClang-C.cmake b/Modules/Compiler/AppleClang-C.cmake index c18f541..a48adec 100644 --- a/Modules/Compiler/AppleClang-C.cmake +++ b/Modules/Compiler/AppleClang-C.cmake @@ -13,18 +13,3 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0) endif() __compiler_check_default_language_standard(C 4.0 99) - -macro(cmake_record_c_compile_features) - set(_result 0) - if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0) - if (_result EQUAL 0) - _record_compiler_features_c(11) - endif() - if (_result EQUAL 0) - _record_compiler_features_c(99) - endif() - if (_result EQUAL 0) - _record_compiler_features_c(90) - endif() - endif() -endmacro() diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake index 904d965..e5fd647 100644 --- a/Modules/Compiler/AppleClang-CXX.cmake +++ b/Modules/Compiler/AppleClang-CXX.cmake @@ -28,21 +28,3 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1) endif() __compiler_check_default_language_standard(CXX 4.0 98) - -macro(cmake_record_cxx_compile_features) - set(_result 0) - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0) - if(_result EQUAL 0 AND CMAKE_CXX17_STANDARD_COMPILE_OPTION) - _record_compiler_features_cxx(17) - endif() - if(_result EQUAL 0 AND CMAKE_CXX14_STANDARD_COMPILE_OPTION) - _record_compiler_features_cxx(14) - endif() - if (_result EQUAL 0) - _record_compiler_features_cxx(11) - endif() - if (_result EQUAL 0) - _record_compiler_features_cxx(98) - endif() - endif() -endmacro() diff --git a/Modules/Compiler/Clang-C.cmake b/Modules/Compiler/Clang-C.cmake index b94087f..b881e2b 100644 --- a/Modules/Compiler/Clang-C.cmake +++ b/Modules/Compiler/Clang-C.cmake @@ -18,18 +18,3 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4) endif() __compiler_check_default_language_standard(C 3.4 99 3.6 11) - -macro(cmake_record_c_compile_features) - set(_result 0) - if (UNIX AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4) - if (_result EQUAL 0) - _record_compiler_features_c(11) - endif() - if (_result EQUAL 0) - _record_compiler_features_c(99) - endif() - if (_result EQUAL 0) - _record_compiler_features_c(90) - endif() - endif() -endmacro() diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake index 5904efa..ff041ab 100644 --- a/Modules/Compiler/Clang-CXX.cmake +++ b/Modules/Compiler/Clang-CXX.cmake @@ -37,21 +37,3 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5) endif() __compiler_check_default_language_standard(CXX 3.1 98) - -macro(cmake_record_cxx_compile_features) - set(_result 0) - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1) - if(_result EQUAL 0 AND CMAKE_CXX17_STANDARD_COMPILE_OPTION) - _record_compiler_features_cxx(17) - endif() - if(_result EQUAL 0 AND CMAKE_CXX14_STANDARD_COMPILE_OPTION) - _record_compiler_features_cxx(14) - endif() - if (_result EQUAL 0 AND CMAKE_CXX11_STANDARD_COMPILE_OPTION) - _record_compiler_features_cxx(11) - endif() - if (_result EQUAL 0) - _record_compiler_features_cxx(98) - endif() - endif() -endmacro() diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake index 8090fa6..f072c54 100644 --- a/Modules/Compiler/GNU-C.cmake +++ b/Modules/Compiler/GNU-C.cmake @@ -23,18 +23,3 @@ elseif (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.6) endif() __compiler_check_default_language_standard(C 3.4 90 5.0 11) - -macro(cmake_record_c_compile_features) - set(_result 0) - if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4) - if(_result EQUAL 0 AND CMAKE_C11_STANDARD_COMPILE_OPTION) - _record_compiler_features_c(11) - endif() - if (_result EQUAL 0) - _record_compiler_features_c(99) - endif() - if (_result EQUAL 0) - _record_compiler_features_c(90) - endif() - endif() -endmacro() diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake index b221c4a..4b8b3c0 100644 --- a/Modules/Compiler/GNU-CXX.cmake +++ b/Modules/Compiler/GNU-CXX.cmake @@ -39,21 +39,3 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1) endif() __compiler_check_default_language_standard(CXX 4.4 98 6.0 14) - -macro(cmake_record_cxx_compile_features) - set(_result 0) - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4) - if(_result EQUAL 0 AND CMAKE_CXX17_STANDARD_COMPILE_OPTION) - _record_compiler_features_cxx(17) - endif() - if(_result EQUAL 0 AND CMAKE_CXX14_STANDARD_COMPILE_OPTION) - _record_compiler_features_cxx(14) - endif() - if (_result EQUAL 0) - _record_compiler_features_cxx(11) - endif() - if (_result EQUAL 0) - _record_compiler_features_cxx(98) - endif() - endif() -endmacro() diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake index 20e29e2..2e7ea24 100644 --- a/Modules/Compiler/Intel-C.cmake +++ b/Modules/Compiler/Intel-C.cmake @@ -39,20 +39,5 @@ endif() __compiler_check_default_language_standard(C 12.1 90 15.0.0 11) -macro(cmake_record_c_compile_features) - set(_result 0) - if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1) - if (_result EQUAL 0 AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0) - _record_compiler_features_C(11) - endif() - if (_result EQUAL 0) - _record_compiler_features_C(99) - endif() - if (_result EQUAL 0) - _record_compiler_features_C(90) - endif() - endif() -endmacro() - set(CMAKE_C_CREATE_PREPROCESSED_SOURCE " -E > ") set(CMAKE_C_CREATE_ASSEMBLY_SOURCE " -S -o ") diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake index 08d23fc..0eb9e1f 100644 --- a/Modules/Compiler/Intel-CXX.cmake +++ b/Modules/Compiler/Intel-CXX.cmake @@ -56,23 +56,5 @@ endif() __compiler_check_default_language_standard(CXX 12.1 98) -macro(cmake_record_cxx_compile_features) - set(_result 0) - if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1) - if (_result EQUAL 0 AND - (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0 - OR (NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC" AND - NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0))) - _record_compiler_features_cxx(14) - endif() - if (_result EQUAL 0) - _record_compiler_features_cxx(11) - endif() - if (_result EQUAL 0) - _record_compiler_features_cxx(98) - endif() - endif() -endmacro() - set(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " -E > ") set(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " -S -o ") diff --git a/Modules/Compiler/MSVC-CXX.cmake b/Modules/Compiler/MSVC-CXX.cmake index 98b74e4..9371301 100644 --- a/Modules/Compiler/MSVC-CXX.cmake +++ b/Modules/Compiler/MSVC-CXX.cmake @@ -1,6 +1,8 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. +include(Compiler/CMakeCommonCompilerMacros) + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0) # MSVC has no specific options to set language standards, but set them as # empty strings anyways so the feature test infrastructure can at least check @@ -17,15 +19,3 @@ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0) # There is no meaningful default for this set(CMAKE_CXX_STANDARD_DEFAULT "") endif() - -macro(cmake_record_cxx_compile_features) - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0) - list(APPEND CMAKE_CXX_COMPILE_FEATURES - cxx_std_98 - cxx_std_11 - cxx_std_14 - cxx_std_17 - ) - _record_compiler_features(CXX "" CMAKE_CXX_COMPILE_FEATURES) - endif() -endmacro() diff --git a/Modules/Compiler/SunPro-C.cmake b/Modules/Compiler/SunPro-C.cmake index ac88e6f..29c2f22 100644 --- a/Modules/Compiler/SunPro-C.cmake +++ b/Modules/Compiler/SunPro-C.cmake @@ -43,20 +43,5 @@ endif() __compiler_check_default_language_standard(C 5.11 90 5.14 11) -macro(cmake_record_c_compile_features) - set(_result 0) - if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.13) - if(_result EQUAL 0 AND CMAKE_C11_STANDARD_COMPILE_OPTION) - _record_compiler_features_c(11) - endif() - if (_result EQUAL 0) - _record_compiler_features_c(99) - endif() - if (_result EQUAL 0) - _record_compiler_features_c(90) - endif() - endif() -endmacro() - set(CMAKE_C_CREATE_PREPROCESSED_SOURCE " -E > ") set(CMAKE_C_CREATE_ASSEMBLY_SOURCE " -S -o ") diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake index 4b0a21d..2222b25 100644 --- a/Modules/Compiler/SunPro-CXX.cmake +++ b/Modules/Compiler/SunPro-CXX.cmake @@ -49,15 +49,3 @@ else() endif() __compiler_check_default_language_standard(CXX 5.13 98) - -macro(cmake_record_cxx_compile_features) - set(_result 0) - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13) - if (_result EQUAL 0) - _record_compiler_features_cxx(11) - endif() - if (_result EQUAL 0) - _record_compiler_features_cxx(98) - endif() - endif() -endmacro() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=37221529c7d032599cd7f8a4bb6778a55b8bc5a8 commit 37221529c7d032599cd7f8a4bb6778a55b8bc5a8 Author: Chuck Atkins AuthorDate: Wed May 10 16:37:19 2017 -0400 Commit: Chuck Atkins CommitDate: Mon May 29 13:51:54 2017 -0400 MSVC: Add empty definitions for std compile options There are no specific options for MSVC to set language standards, but set them as empty strings anyways so the feature test infrastructure can at least check to see if they are defined. diff --git a/Modules/Compiler/MSVC-CXX.cmake b/Modules/Compiler/MSVC-CXX.cmake index 8fcfa0f..98b74e4 100644 --- a/Modules/Compiler/MSVC-CXX.cmake +++ b/Modules/Compiler/MSVC-CXX.cmake @@ -1,6 +1,20 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. -if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0) - # MSVC has no specific language level or flags to change it. +if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16.0) + # MSVC has no specific options to set language standards, but set them as + # empty strings anyways so the feature test infrastructure can at least check + # to see if they are defined. + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "") + set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "") + set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "") + set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "") + + # There is no meaningful default for this set(CMAKE_CXX_STANDARD_DEFAULT "") endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e556f1b909a910f7124bd26f82e4b42dd2142c17 commit e556f1b909a910f7124bd26f82e4b42dd2142c17 Author: Chuck Atkins AuthorDate: Mon May 15 18:06:29 2017 +0000 Commit: Chuck Atkins CommitDate: Mon May 29 13:51:45 2017 -0400 CompileFeatures: Makes tests work with meta-feature only diff --git a/Tests/CMakeCommands/target_compile_features/CMakeLists.txt b/Tests/CMakeCommands/target_compile_features/CMakeLists.txt index 555a08f..5096a58 100644 --- a/Tests/CMakeCommands/target_compile_features/CMakeLists.txt +++ b/Tests/CMakeCommands/target_compile_features/CMakeLists.txt @@ -1,45 +1,65 @@ cmake_minimum_required(VERSION 3.0) +cmake_policy(SET CMP0057 NEW) project(target_compile_features) -if (NOT CMAKE_CXX_COMPILE_FEATURES AND NOT CMAKE_C_COMPILE_FEATURES) - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_dummy.cpp" - "int main(int,char**) { return 0; }\n" - ) - add_executable(target_compile_features "${CMAKE_CURRENT_BINARY_DIR}/test_dummy.cpp") - return() -endif() - set(CMAKE_VERBOSE_MAKEFILE ON) -if (CMAKE_C_COMPILE_FEATURES) - add_executable(target_compile_features main.c) - target_compile_features(target_compile_features +if (c_restrict IN_LIST CMAKE_C_COMPILE_FEATURES) + add_executable(c_target_compile_features_specific main.c) + target_compile_features(c_target_compile_features_specific PRIVATE c_restrict ) - add_library(lib_restrict lib_restrict.c) - target_compile_features(lib_restrict + add_library(c_lib_restrict_specific lib_restrict.c) + target_compile_features(c_lib_restrict_specific PUBLIC c_restrict ) - add_executable(restrict_user restrict_user.c) - target_link_libraries(restrict_user lib_restrict) + add_executable(c_restrict_user_specific restrict_user.c) + target_link_libraries(c_restrict_user_specific c_lib_restrict_specific) endif() -if (CMAKE_CXX_COMPILE_FEATURES AND ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_auto_type;") - if (CMAKE_C_COMPILE_FEATURES) - set(target_suffix _cxx) - endif() - add_executable(target_compile_features${target_suffix} main.cpp) - target_compile_features(target_compile_features${target_suffix} +if (c_std_99 IN_LIST CMAKE_C_COMPILE_FEATURES) + add_executable(c_target_compile_features_meta main.c) + target_compile_features(c_target_compile_features_meta + PRIVATE c_std_99 + ) + + add_library(c_lib_restrict_meta lib_restrict.c) + target_compile_features(c_lib_restrict_meta + PUBLIC c_std_99 + ) + + add_executable(c_restrict_user_meta restrict_user.c) + target_link_libraries(c_restrict_user_meta c_lib_restrict_meta) +endif() + +if (cxx_auto_type IN_LIST CMAKE_CXX_COMPILE_FEATURES) + add_executable(cxx_target_compile_features_specific main.cpp) + target_compile_features(cxx_target_compile_features_specific PRIVATE cxx_auto_type ) - add_library(lib_auto_type lib_auto_type.cpp) - target_compile_features(lib_auto_type + add_library(cxx_lib_auto_type_specific lib_auto_type.cpp) + target_compile_features(cxx_lib_auto_type_specific PUBLIC cxx_auto_type ) - add_executable(lib_user lib_user.cpp) - target_link_libraries(lib_user lib_auto_type) + add_executable(cxx_lib_user_specific lib_user.cpp) + target_link_libraries(cxx_lib_user_specific cxx_lib_auto_type_specific) +endif() + +if (cxx_std_11 IN_LIST CMAKE_CXX_COMPILE_FEATURES) + add_executable(cxx_target_compile_features_meta main.cpp) + target_compile_features(cxx_target_compile_features_meta + PRIVATE cxx_std_11 + ) + + add_library(cxx_lib_auto_type_meta lib_auto_type.cpp) + target_compile_features(cxx_lib_auto_type_meta + PUBLIC cxx_std_11 + ) + + add_executable(cxx_lib_user_meta lib_user.cpp) + target_link_libraries(cxx_lib_user_meta cxx_lib_auto_type_meta) endif() diff --git a/Tests/CMakeCommands/target_compile_features/dummy.cpp b/Tests/CMakeCommands/target_compile_features/dummy.cpp deleted file mode 100644 index e9ad257..0000000 --- a/Tests/CMakeCommands/target_compile_features/dummy.cpp +++ /dev/null @@ -1,5 +0,0 @@ - -int main(int, char**) -{ - return 0; -} diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index cbd7906..02156e8 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -275,7 +275,7 @@ if(BUILD_TESTING) ADD_TEST_MACRO(SystemInformation SystemInformation) ADD_TEST_MACRO(MathTest MathTest) ADD_TEST_MACRO(CompileFeatures CompileFeatures) - ADD_TEST_MACRO(CMakeCommands.target_compile_features target_compile_features) + ADD_TEST_MACRO(CMakeCommands.target_compile_features) if(CMake_TEST_RESOURCES) ADD_TEST_MACRO(VSResource VSResource) diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt index bb18543..4a5558d 100644 --- a/Tests/CompileFeatures/CMakeLists.txt +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -1,10 +1,11 @@ cmake_minimum_required(VERSION 3.1) +cmake_policy(SET CMP0057 NEW) project(CompileFeatures) macro(run_test feature lang) - if (";${CMAKE_${lang}_COMPILE_FEATURES};" MATCHES ${feature}) + if (${feature} IN_LIST CMAKE_${lang}_COMPILE_FEATURES) add_library(test_${feature} OBJECT ${feature}) set_property(TARGET test_${feature} PROPERTY COMPILE_FEATURES "${feature}" @@ -15,12 +16,13 @@ macro(run_test feature lang) endmacro() get_property(c_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES) -list(REMOVE_ITEM c_features c_std_90 c_std_99 c_std_11) +list(FILTER c_features EXCLUDE REGEX "^c_std_[0-9][0-9]") foreach(feature ${c_features}) run_test(${feature} C) endforeach() + get_property(cxx_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES) -list(REMOVE_ITEM cxx_features cxx_std_98 cxx_std_11 cxx_std_14 cxx_std_17) +list(FILTER cxx_features EXCLUDE REGEX "^cxx_std_[0-9][0-9]") foreach(feature ${cxx_features}) run_test(${feature} CXX) endforeach() @@ -171,12 +173,20 @@ if (CMAKE_C_COMPILER_ID STREQUAL "Intel") endif() endif() +if (CMAKE_C_COMPILE_FEATURES) + set(C_expected_features ${CMAKE_C_COMPILE_FEATURES}) + list(FILTER C_expected_features EXCLUDE REGEX "^c_std_[0-9][0-9]") +endif() +if (CMAKE_CXX_COMPILE_FEATURES) + set(CXX_expected_features ${CMAKE_CXX_COMPILE_FEATURES}) + list(FILTER CXX_expected_features EXCLUDE REGEX "^cxx_std_[0-9][0-9]") +endif () set(C_ext c) set(C_standard_flag 11) set(CXX_ext cpp) set(CXX_standard_flag 14) foreach(lang CXX C) - if (CMAKE_${lang}_COMPILE_FEATURES) + if (${lang}_expected_features) foreach(feature ${${lang}_non_features}) message("Testing feature : ${feature}") try_compile(${feature}_works @@ -198,7 +208,7 @@ foreach(lang CXX C) endif() endforeach() -if (CMAKE_C_COMPILE_FEATURES) +if (C_expected_features) if (CMAKE_C_STANDARD_DEFAULT) string(FIND "${CMAKE_C_FLAGS}" "-std=" std_flag_idx) if (std_flag_idx EQUAL -1) @@ -280,7 +290,8 @@ if (CMAKE_CXX_COMPILE_FEATURES) endif () # always add a target "CompileFeatures" -if (NOT ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_auto_type;") +if ((NOT CXX_expected_features) OR + (NOT cxx_auto_type IN_LIST CXX_expected_features)) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp" "int main(int,char**) { return 0; }\n" ) diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt index 2657aeb..52d4613 100644 --- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt +++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt @@ -48,7 +48,14 @@ macro(set_defines target true_defs false_defs) ) endmacro() +# Only run the compiler detection header test for compilers with +# detailed features tables, not just meta-features + if (CMAKE_C_COMPILE_FEATURES) + set(C_expected_features ${CMAKE_C_COMPILE_FEATURES}) + list(FILTER C_expected_features EXCLUDE REGEX "^c_std_[0-9][0-9]") +endif() +if (C_expected_features) string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" COMPILER_VERSION_MAJOR "${CMAKE_C_COMPILER_VERSION}") string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" COMPILER_VERSION_MINOR "${CMAKE_C_COMPILER_VERSION}") string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" COMPILER_VERSION_PATCH "${CMAKE_C_COMPILER_VERSION}") @@ -85,7 +92,11 @@ if (CMAKE_C_COMPILE_FEATURES) endif() endif() -if (NOT CMAKE_CXX_COMPILE_FEATURES) +if (CMAKE_CXX_COMPILE_FEATURES) + set(CXX_expected_features ${CMAKE_CXX_COMPILE_FEATURES}) + list(FILTER CXX_expected_features EXCLUDE REGEX "^cxx_std_[0-9][0-9]") +endif() +if (NOT CXX_expected_features) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp" "int main(int,char**) { return 0; }\n" ) diff --git a/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake index 2d14a9e..b24a680 100644 --- a/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake +++ b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake @@ -6,9 +6,10 @@ add_library(empty3 INTERFACE) target_compile_features(empty3 INTERFACE cxx_std_11) target_link_libraries(empty1 - # When starting, $ is '0', so 'freeze' the + # When starting, $ is '0', so 'freeze' the # CXX_STANDARD at 98 during computation. - $<$:empty2> + $<$:empty2> + # This would add cxx_std_11, but that would require CXX_STANDARD = 11, # which is not allowed after freeze. Report an error. empty3 diff --git a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake index 8dc627d..5a70da2 100644 --- a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake +++ b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake @@ -1,3 +1,4 @@ +cmake_policy(SET CMP0057 NEW) include(RunCMake) run_cmake(NotAFeature) @@ -28,13 +29,13 @@ endif() if (NOT CXX_FEATURES) run_cmake(NoSupportedCxxFeatures) run_cmake(NoSupportedCxxFeaturesGenex) -else() +elseif (cxx_std_98 IN_LIST CXX_FEATURES AND cxx_std_11 IN_LIST CXX_FEATURES) if(CXX_STANDARD_DEFAULT EQUAL 98) run_cmake(LinkImplementationFeatureCycle) endif() run_cmake(LinkImplementationFeatureCycleSolved) - if (";${CXX_FEATURES};" MATCHES ";cxx_final;") + if (cxx_final IN_LIST CXX_FEATURES) set(RunCMake_TEST_OPTIONS "-DHAVE_FINAL=1") endif() run_cmake(NonValidTarget1) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20ffa14708e5e1b324ac954fd06a1415b9398b7c commit 20ffa14708e5e1b324ac954fd06a1415b9398b7c Author: Chuck Atkins AuthorDate: Mon May 15 18:05:17 2017 +0000 Commit: Chuck Atkins CommitDate: Mon May 29 12:34:28 2017 -0400 Tests: Allow test macro to take no executable arguments diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 335267a..cbd7906 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1,6 +1,9 @@ # a macro for tests that have a simple format where the name matches the # directory and project -macro(ADD_TEST_MACRO NAME COMMAND) +macro(ADD_TEST_MACRO NAME) + if(${ARGC} GREATER 1) + set(_test_command --test-command ${ARGN}) + endif() string(REPLACE "." "/" dir "${NAME}") string(REGEX REPLACE "[^.]*\\." "" proj "${NAME}") add_test(NAME "${NAME}" COMMAND "${CMAKE_CTEST_COMMAND}" @@ -13,7 +16,8 @@ macro(ADD_TEST_MACRO NAME COMMAND) ${${NAME}_CTEST_OPTIONS} --build-options ${build_options} ${${NAME}_BUILD_OPTIONS} - --test-command ${COMMAND} ${ARGN}) + ${_test_command}) + unset(_test_command) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${dir}") endmacro() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5bb7429166240ffaf6f53f834bbb1a4973df8e1d commit 5bb7429166240ffaf6f53f834bbb1a4973df8e1d Author: Chuck Atkins AuthorDate: Wed May 10 16:20:10 2017 -0400 Commit: Chuck Atkins CommitDate: Mon May 29 12:33:42 2017 -0400 Compilers: Add default cmake_record_{c,cxx}_compile_features macros Add default implementations for the cmake_record_lang_compile_features macros. All implementations of this are the same so it can be safely factored out to a common implementation. diff --git a/Modules/Compiler/CMakeCommonCompilerMacros.cmake b/Modules/Compiler/CMakeCommonCompilerMacros.cmake index cb365d6..684fd30 100644 --- a/Modules/Compiler/CMakeCommonCompilerMacros.cmake +++ b/Modules/Compiler/CMakeCommonCompilerMacros.cmake @@ -60,3 +60,34 @@ macro(__compiler_check_default_language_standard lang stdver1 std1) endif () unset(__std_ver_pairs) endmacro() + +# Define to allow compile features to be automatically determined +macro(cmake_record_c_compile_features) + set(_result 0) + if(_result EQUAL 0 AND DEFINED CMAKE_C11_STANDARD_COMPILE_OPTION) + _record_compiler_features_c(11) + endif() + if(_result EQUAL 0 AND DEFINED CMAKE_C99_STANDARD_COMPILE_OPTION) + _record_compiler_features_c(99) + endif() + if(_result EQUAL 0 AND DEFINED CMAKE_C90_STANDARD_COMPILE_OPTION) + _record_compiler_features_c(90) + endif() +endmacro() + +# Define to allow compile features to be automatically determined +macro(cmake_record_cxx_compile_features) + set(_result 0) + if(_result EQUAL 0 AND DEFINED CMAKE_CXX17_STANDARD_COMPILE_OPTION) + _record_compiler_features_cxx(17) + endif() + if(_result EQUAL 0 AND DEFINED CMAKE_CXX14_STANDARD_COMPILE_OPTION) + _record_compiler_features_cxx(14) + endif() + if(_result EQUAL 0 AND DEFINED CMAKE_CXX11_STANDARD_COMPILE_OPTION) + _record_compiler_features_cxx(11) + endif() + if(_result EQUAL 0 AND DEFINED CMAKE_CXX98_STANDARD_COMPILE_OPTION) + _record_compiler_features_cxx(98) + endif() +endmacro() ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/AppleClang-C.cmake | 15 ----- Modules/Compiler/AppleClang-CXX.cmake | 18 ----- Modules/Compiler/CMakeCommonCompilerMacros.cmake | 31 +++++++++ Modules/Compiler/Clang-C.cmake | 15 ----- Modules/Compiler/Clang-CXX.cmake | 20 +----- Modules/Compiler/GNU-C.cmake | 15 ----- Modules/Compiler/GNU-CXX.cmake | 20 +----- Modules/Compiler/Intel-C.cmake | 17 +---- Modules/Compiler/Intel-CXX.cmake | 18 ----- Modules/Compiler/MSVC-CXX.cmake | 32 +++++---- Modules/Compiler/SunPro-C.cmake | 15 ----- Modules/Compiler/SunPro-CXX.cmake | 18 +---- Modules/FindGSL.cmake | 11 +-- .../target_compile_features/CMakeLists.txt | 70 +++++++++++++------- .../target_compile_features/dummy.cpp | 5 -- Tests/CMakeLists.txt | 13 +++- Tests/CompileFeatures/CMakeLists.txt | 23 +++++-- .../WriteCompilerDetectionHeader/CMakeLists.txt | 13 +++- .../LinkImplementationFeatureCycle.cmake | 5 +- Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake | 5 +- Utilities/Release/hythloth_release.cmake | 10 --- Utilities/Release/linux64_release.cmake | 1 + bootstrap | 65 ++++++++++-------- 23 files changed, 189 insertions(+), 266 deletions(-) delete mode 100644 Tests/CMakeCommands/target_compile_features/dummy.cpp delete mode 100644 Utilities/Release/hythloth_release.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 1 14:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 1 Jun 2017 14:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.8.2-1374-g6a42b96 Message-ID: <20170601180507.23DFEFA0B9@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 6a42b9609f1d0a047394a8d63fb8ddb803abce34 (commit) via 82badfffc34f043521ff3314047a3831e0fb17c7 (commit) via c5ff50fc19ac8393be3cad5f7c1578a6a8c64819 (commit) from 860db083cafb1337147923f7dd21b57767abbee3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a42b9609f1d0a047394a8d63fb8ddb803abce34 commit 6a42b9609f1d0a047394a8d63fb8ddb803abce34 Merge: 860db08 82badff Author: Brad King AuthorDate: Thu Jun 1 17:59:28 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 1 14:00:58 2017 -0400 Merge topic 'ninja-mingw' 82badfff Ninja: Fix CMP0058 on MinGW c5ff50fc Tests: Fix CustomCommandByproducts regex for phony rules Acked-by: Kitware Robot Merge-request: !919 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=82badfffc34f043521ff3314047a3831e0fb17c7 commit 82badfffc34f043521ff3314047a3831e0fb17c7 Author: Brad King AuthorDate: Wed May 31 13:32:32 2017 -0400 Commit: Brad King CommitDate: Wed May 31 13:44:16 2017 -0400 Ninja: Fix CMP0058 on MinGW For CMP0058 we identify dependencies that have no rules to generate them by collecting a set of all dependencies and a set of all files CMake knows are generated by something, and then computing a set difference. Fix construction of these sets to use the same form for each path. This is after ConvertToNinjaPath but before EncodePath. Without this, the slash conversion done by EncodePath for the GNU compiler on Windows results in a mismatch, triggering an incorrect CMP0058 warning. diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 39f5d8f..bb0b83a 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -209,7 +209,7 @@ void cmGlobalNinjaGenerator::WriteBuild( ++i) { build += " " + EncodeIdent(EncodePath(*i), os); if (this->ComputingUnknownDependencies) { - this->CombinedBuildOutputs.insert(EncodePath(*i)); + this->CombinedBuildOutputs.insert(*i); } } if (!implicitOuts.empty()) { @@ -311,7 +311,7 @@ void cmGlobalNinjaGenerator::WriteCustomCommandBuild( // we need to track every dependency that comes in, since we are trying // to find dependencies that are side effects of build commands for (cmNinjaDeps::const_iterator i = deps.begin(); i != deps.end(); ++i) { - this->CombinedCustomCommandExplicitDependencies.insert(EncodePath(*i)); + this->CombinedCustomCommandExplicitDependencies.insert(*i); } } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c5ff50fc19ac8393be3cad5f7c1578a6a8c64819 commit c5ff50fc19ac8393be3cad5f7c1578a6a8c64819 Author: Brad King AuthorDate: Wed May 31 11:48:02 2017 -0400 Commit: Brad King CommitDate: Wed May 31 11:48:02 2017 -0400 Tests: Fix CustomCommandByproducts regex for phony rules Update the regex to match phony rules that have no inputs. diff --git a/Tests/CustomCommandByproducts/ninja-check.cmake b/Tests/CustomCommandByproducts/ninja-check.cmake index 2fc3cc2..a7beb3d 100644 --- a/Tests/CustomCommandByproducts/ninja-check.cmake +++ b/Tests/CustomCommandByproducts/ninja-check.cmake @@ -4,7 +4,7 @@ if("${build_ninja}" MATCHES [====[ # Tell Ninja that they may appear as side effects of build rules # otherwise ordered by order-only dependencies. -((build [^:]*: phony [^\n]* +((build [^:]*: phony[^\n]* )*)# ========]====]) set(phony "${CMAKE_MATCH_1}") if(NOT phony) ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalNinjaGenerator.cxx | 4 ++-- Tests/CustomCommandByproducts/ninja-check.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 2 00:05:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 2 Jun 2017 00:05:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.8.2-1375-g2088ca0 Message-ID: <20170602040507.43D72F9F17@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 2088ca0ca03900ced937d248dcd4129b0b821915 (commit) from 6a42b9609f1d0a047394a8d63fb8ddb803abce34 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2088ca0ca03900ced937d248dcd4129b0b821915 commit 2088ca0ca03900ced937d248dcd4129b0b821915 Author: Kitware Robot AuthorDate: Fri Jun 2 00:01:05 2017 -0400 Commit: Kitware Robot CommitDate: Fri Jun 2 00:01:05 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 63eea25..0555bd7 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 8) -set(CMake_VERSION_PATCH 20170601) +set(CMake_VERSION_PATCH 20170602) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 2 09:25:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 2 Jun 2017 09:25:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.8.2-1383-g78d1a2d Message-ID: <20170602132506.13049FA7DE@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 78d1a2d0bbda1798ffc71b11a181d376914bdc3c (commit) via 0a082be80086931557df57a7171e80187ddf8aa8 (commit) via db2d46e2ddbdf1c5d942e70b341e085f84e79c13 (commit) via 8b6f439ef20cf882b4f3deba48f34a01a98963d9 (commit) via 389ed56f63653e89b3d640cf7aebdc8ebe7ca643 (commit) via 9fe4a9e2aed8457d7124d86e31a272180794ac61 (commit) via 594a9fcf6fa1ad9bcfe91abe7d94df2e92f3d11b (commit) via 74ef363dd7e46fc883b9822f3516002d9345293e (commit) from 2088ca0ca03900ced937d248dcd4129b0b821915 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=78d1a2d0bbda1798ffc71b11a181d376914bdc3c commit 78d1a2d0bbda1798ffc71b11a181d376914bdc3c Merge: 0a082be db2d46e Author: Brad King AuthorDate: Fri Jun 2 13:19:27 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 2 09:19:37 2017 -0400 Merge topic 'string-npos-cleanup' db2d46e2 Remove second arg: npos in substr usages 8b6f439e Access string npos without instance 389ed56f cmLocalUnixMakefileGenerator3: Remove unnecessary local variable 9fe4a9e2 cmParseBlanketJSCoverage: Pass unmodified parameter as const& Acked-by: Kitware Robot Merge-request: !905 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a082be80086931557df57a7171e80187ddf8aa8 commit 0a082be80086931557df57a7171e80187ddf8aa8 Merge: 2088ca0 594a9fc Author: Brad King AuthorDate: Fri Jun 2 13:18:23 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 2 09:18:41 2017 -0400 Merge topic 'update-kwsys' 594a9fcf Merge branch 'upstream-KWSys' into update-kwsys 74ef363d KWSys 2017-06-01 (8243fefa) Acked-by: Kitware Robot Merge-request: !922 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=db2d46e2ddbdf1c5d942e70b341e085f84e79c13 commit db2d46e2ddbdf1c5d942e70b341e085f84e79c13 Author: Pavel Solodovnikov AuthorDate: Tue May 30 22:46:05 2017 +0300 Commit: Brad King CommitDate: Thu Jun 1 14:19:52 2017 -0400 Remove second arg: npos in substr usages diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 3e113d3..d8e2753 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -811,8 +811,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( for (fit = result.begin(); fit != diff; ++fit) { localFileName = cmSystemTools::RelativePath(InstallPrefix, fit->c_str()); - localFileName = localFileName.substr( - localFileName.find_first_not_of('/'), std::string::npos); + localFileName = + localFileName.substr(localFileName.find_first_not_of('/')); Components[installComponent].Files.push_back(localFileName); cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <" << localFileName << "> to component <" diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index beb2d01..9697a38 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -76,7 +76,7 @@ int cmCPackNSISGenerator::PackageFiles() } // Strip off the component part of the path. - fileN = fileN.substr(pos + 1, std::string::npos); + fileN = fileN.substr(pos + 1); } std::replace(fileN.begin(), fileN.end(), '/', '\\'); @@ -106,7 +106,7 @@ int cmCPackNSISGenerator::PackageFiles() componentName = fileN.substr(0, slash); // Strip off the component part of the path. - fileN = fileN.substr(slash + 1, std::string::npos); + fileN = fileN.substr(slash + 1); } } std::replace(fileN.begin(), fileN.end(), '/', '\\'); diff --git a/Source/CTest/cmParseBlanketJSCoverage.cxx b/Source/CTest/cmParseBlanketJSCoverage.cxx index f7f3e41..83a7b75 100644 --- a/Source/CTest/cmParseBlanketJSCoverage.cxx +++ b/Source/CTest/cmParseBlanketJSCoverage.cxx @@ -35,7 +35,7 @@ public: line.substr(begIndex + 3, endIndex - (begIndex + 4)); return foundFileName; } - return line.substr(begIndex, std::string::npos); + return line.substr(begIndex); } bool ParseFile(std::string const& file) { @@ -78,7 +78,7 @@ public: * only the value of the line coverage is captured */ std::string result = getValue(line, 1); - result = result.substr(2, std::string::npos); + result = result.substr(2); if (result == "\"\"") { // Empty quotation marks indicate that the // line is not executable diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 7025747..e260556 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -673,8 +673,7 @@ bool cmCTest::UpdateCTestConfiguration() continue; } std::string key = line.substr(0, cpos); - std::string value = - cmCTest::CleanString(line.substr(cpos + 1, std::string::npos)); + std::string value = cmCTest::CleanString(line.substr(cpos + 1)); this->CTestConfiguration[key] = value; } fin.close(); @@ -2518,7 +2517,7 @@ void cmCTest::AddCTestConfigurationOverwrite(const std::string& overStr) return; } std::string key = overStr.substr(0, epos); - std::string value = overStr.substr(epos + 1, std::string::npos); + std::string value = overStr.substr(epos + 1); this->CTestConfigurationOverwrites[key] = value; } diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index a404ae8..2c464cc 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -453,7 +453,7 @@ void cmDependsC::ParseTransform(std::string const& xform) return; } std::string name = xform.substr(0, pos); - std::string value = xform.substr(pos + 4, std::string::npos); + std::string value = xform.substr(pos + 4); this->TransformRules[name] = value; } diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx index b07a26a..103e692 100644 --- a/Source/cmFindCommon.cxx +++ b/Source/cmFindCommon.cxx @@ -311,7 +311,7 @@ void cmFindCommon::AddPathSuffix(std::string const& arg) return; } if (suffix[0] == '/') { - suffix = suffix.substr(1, std::string::npos); + suffix = suffix.substr(1); } if (suffix.empty()) { return; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 6233ec6..9a33bec 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -5149,7 +5149,7 @@ std::string cmGeneratorTarget::CheckCMP0004(std::string const& item) const std::string lib = item; std::string::size_type pos = lib.find_first_not_of(" \t\r\n"); if (pos != std::string::npos) { - lib = lib.substr(pos, std::string::npos); + lib = lib.substr(pos); } pos = lib.find_last_not_of(" \t\r\n"); if (pos != std::string::npos) { diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 19597fd..67e272d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2730,7 +2730,7 @@ void cmGlobalGenerator::CheckRuleHashes(std::string const& pfile, } // Get the filename. - fname = line.substr(33, std::string::npos); + fname = line.substr(33); // Look for a hash for this file's rule. std::map::const_iterator rhi = diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 146cfd0..9b9d22c 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -79,7 +79,7 @@ static std::string cmSplitExtension(std::string const& in, std::string& base) std::string::size_type dot_pos = in.rfind('.'); if (dot_pos != std::string::npos) { // Remove the extension first in case &base == &in. - ext = in.substr(dot_pos, std::string::npos); + ext = in.substr(dot_pos); base = in.substr(0, dot_pos); } else { base = in; diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index 12bbaf6..5364f76 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -98,7 +98,7 @@ void cmRST::ProcessModule(std::istream& is) continue; } if (line.substr(0, 2) == "# ") { - this->ProcessLine(line.substr(2, std::string::npos)); + this->ProcessLine(line.substr(2)); continue; } rst = ""; diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 54ec6b0..f7192e0 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2372,8 +2372,7 @@ bool cmSystemTools::ChangeRPath(std::string const& file, // not being changed. rp[rp_count].Value = se[i]->Value.substr(0, prefix_len); rp[rp_count].Value += newRPath; - rp[rp_count].Value += - se[i]->Value.substr(pos + oldRPath.length(), std::string::npos); + rp[rp_count].Value += se[i]->Value.substr(pos + oldRPath.length()); if (!rp[rp_count].Value.empty()) { remove_rpath = false; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b6f439ef20cf882b4f3deba48f34a01a98963d9 commit 8b6f439ef20cf882b4f3deba48f34a01a98963d9 Author: Pavel Solodovnikov AuthorDate: Tue May 30 22:37:46 2017 +0300 Commit: Brad King CommitDate: Thu Jun 1 14:19:51 2017 -0400 Access string npos without instance diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index b6075c9..18ef05c 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -596,10 +596,10 @@ void cmCTestBuildHandler::GenerateXMLLogScraped(cmXMLWriter& xml) // At this point we need to make this->SourceFile relative to // the source root of the project, so cvs links will work cmSystemTools::ConvertToUnixSlashes(cm->SourceFile); - if (cm->SourceFile.find("/.../") != cm->SourceFile.npos) { + if (cm->SourceFile.find("/.../") != std::string::npos) { cmSystemTools::ReplaceString(cm->SourceFile, "/.../", ""); std::string::size_type p = cm->SourceFile.find('/'); - if (p != cm->SourceFile.npos) { + if (p != std::string::npos) { cm->SourceFile = cm->SourceFile.substr(p + 1, cm->SourceFile.size() - p); } diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 87c532c..877cd24 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -103,6 +103,7 @@ public: return this->PipeState; } int GetProcessState() { return this->PipeState; } + private: int PipeState; cmsysProcess* Process; @@ -896,7 +897,7 @@ int cmCTestCoverageHandler::HandleBlanketJSCoverage( cmsys::ifstream in(files[fileEntry].c_str()); cmSystemTools::GetLineFromStream(in, line); cmSystemTools::GetLineFromStream(in, line); - if (line.find("node-jscoverage") != line.npos) { + if (line.find("node-jscoverage") != std::string::npos) { blanketFiles.push_back(files[fileEntry]); } } @@ -1222,7 +1223,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage( // Initially all entries are -1 (not used). If we get coverage // information, increment it to 0 first. if (vec[lineIdx] < 0) { - if (cov > 0 || prefix.find('#') != prefix.npos) { + if (cov > 0 || prefix.find('#') != std::string::npos) { vec[lineIdx] = 0; } } @@ -1524,7 +1525,7 @@ int cmCTestCoverageHandler::HandleLCovCoverage( // Initially all entries are -1 (not used). If we get coverage // information, increment it to 0 first. if (vec[lineIdx] < 0) { - if (cov > 0 || prefix.find('#') != prefix.npos) { + if (cov > 0 || prefix.find('#') != std::string::npos) { vec[lineIdx] = 0; } } @@ -2127,7 +2128,7 @@ bool cmCTestCoverageHandler::GetNextInt(std::string const& inputLine, std::string::size_type start = pos; pos = inputLine.find(',', start); value = atoi(inputLine.substr(start, pos).c_str()); - if (pos == inputLine.npos) { + if (pos == std::string::npos) { return true; } pos++; @@ -2141,7 +2142,7 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine( { // find the first comma std::string::size_type pos = inputLine.find(','); - if (pos == inputLine.npos) { + if (pos == std::string::npos) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing string : " << inputLine << "\n"); return false; @@ -2168,7 +2169,7 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine( return false; } // should be at the end now - if (pos != inputLine.npos) { + if (pos != std::string::npos) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing input : " << inputLine << " last pos not npos = " << pos << "\n"); } diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx index 17f822d..230aedf 100644 --- a/Source/CTest/cmCTestGIT.cxx +++ b/Source/CTest/cmCTestGIT.cxx @@ -191,9 +191,9 @@ bool cmCTestGIT::UpdateByFetchAndReset() std::string line; while (sha1.empty() && cmSystemTools::GetLineFromStream(fin, line)) { this->Log << "FETCH_HEAD> " << line << "\n"; - if (line.find("\tnot-for-merge\t") == line.npos) { + if (line.find("\tnot-for-merge\t") == std::string::npos) { std::string::size_type pos = line.find('\t'); - if (pos != line.npos) { + if (pos != std::string::npos) { sha1 = line.substr(0, pos); } } diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index fc4980b..c35f0bc 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -801,7 +801,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput( std::vector lines; cmSystemTools::Split(str.c_str(), lines); bool unlimitedOutput = false; - if (str.find("CTEST_FULL_OUTPUT") != str.npos || + if (str.find("CTEST_FULL_OUTPUT") != std::string::npos || this->CustomMaximumFailedTestOutputSize == 0) { unlimitedOutput = true; } @@ -953,7 +953,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput( std::string& theLine = lines[cc]; // check for command line arguments that are not escaped // correctly by BC - if (theLine.find("TargetArgs=") != theLine.npos) { + if (theLine.find("TargetArgs=") != std::string::npos) { // skip this because BC gets it wrong and we can't parse it } else if (!parser.ParseChunk(theLine.c_str(), theLine.size())) { cmCTestLog(this->CTest, ERROR_MESSAGE, diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index fe23075..0c4269e 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -596,8 +596,7 @@ void cmCTestRunTest::ComputeArguments() void cmCTestRunTest::DartProcessing() { if (!this->ProcessOutput.empty() && - this->ProcessOutput.find("ProcessOutput.npos) { + this->ProcessOutput.find("TestHandler->DartStuff.find(this->ProcessOutput.c_str())) { this->TestResult.DartString = this->TestHandler->DartStuff.match(1); // keep searching and replacing until none are left diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 4aceddb..8d62fa1 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -595,7 +595,7 @@ void cmCTestSubmitHandler::ParseResponse( std::string output; output.append(chunk.begin(), chunk.end()); - if (output.find(" const& /*args*/, cmExecutionStatus& /*unused*/) CM_OVERRIDE; @@ -247,7 +247,7 @@ inline int GetNextNumber(std::string const& in, int& val, std::string::size_type& pos2) { pos2 = in.find(',', pos); - if (pos2 != in.npos) { + if (pos2 != std::string::npos) { if (pos2 - pos == 0) { val = -1; } else { @@ -273,7 +273,7 @@ inline int GetNextRealNumber(std::string const& in, double& val, std::string::size_type& pos2) { pos2 = in.find(',', pos); - if (pos2 != in.npos) { + if (pos2 != std::string::npos) { if (pos2 - pos == 0) { val = -1; } else { @@ -1823,7 +1823,7 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed() std::string::size_type pos; while (cmSystemTools::GetLineFromStream(ifs, line)) { pos = line.find(':', 0); - if (pos == line.npos) { + if (pos == std::string::npos) { continue; } @@ -2027,7 +2027,7 @@ void cmCTestTestHandler::SetTestsToRunInformation(const char* in) bool cmCTestTestHandler::CleanTestOutput(std::string& output, size_t length) { if (!length || length >= output.size() || - output.find("CTEST_FULL_OUTPUT") != output.npos) { + output.find("CTEST_FULL_OUTPUT") != std::string::npos) { return true; } @@ -2175,7 +2175,7 @@ bool cmCTestTestHandler::SetTestsProperties( } if (key == "MEASUREMENT") { size_t pos = val.find_first_of('='); - if (pos != val.npos) { + if (pos != std::string::npos) { std::string mKey = val.substr(0, pos); const char* mVal = val.c_str() + pos + 1; rtit->Measurements[mKey] = mVal; diff --git a/Source/CTest/cmParseBlanketJSCoverage.cxx b/Source/CTest/cmParseBlanketJSCoverage.cxx index e5d8a23..f7f3e41 100644 --- a/Source/CTest/cmParseBlanketJSCoverage.cxx +++ b/Source/CTest/cmParseBlanketJSCoverage.cxx @@ -35,7 +35,7 @@ public: line.substr(begIndex + 3, endIndex - (begIndex + 4)); return foundFileName; } - return line.substr(begIndex, line.npos); + return line.substr(begIndex, std::string::npos); } bool ParseFile(std::string const& file) { @@ -51,13 +51,13 @@ public: return false; } while (cmSystemTools::GetLineFromStream(in, line)) { - if (line.find("filename") != line.npos) { + if (line.find("filename") != std::string::npos) { if (foundFile) { /* - * Upon finding a second file name, generate a - * vector within the total coverage to capture the - * information in the local vector - */ + * Upon finding a second file name, generate a + * vector within the total coverage to capture the + * information in the local vector + */ FileLinesType& CoverageVector = this->Coverage.TotalCoverage[filename]; CoverageVector = localCoverageVector; @@ -66,19 +66,19 @@ public: foundFile = true; inSource = false; filename = getValue(line, 0); - } else if ((line.find("coverage") != line.npos) && foundFile && + } else if ((line.find("coverage") != std::string::npos) && foundFile && inSource) { /* - * two types of "coverage" in the JSON structure - * - * The coverage result over the file or set of files - * and the coverage for each individual line - * - * FoundFile and foundSource ensure that - * only the value of the line coverage is captured - */ + * two types of "coverage" in the JSON structure + * + * The coverage result over the file or set of files + * and the coverage for each individual line + * + * FoundFile and foundSource ensure that + * only the value of the line coverage is captured + */ std::string result = getValue(line, 1); - result = result.substr(2, result.npos); + result = result.substr(2, std::string::npos); if (result == "\"\"") { // Empty quotation marks indicate that the // line is not executable @@ -87,7 +87,7 @@ public: // Else, it contains the number of time executed localCoverageVector.push_back(atoi(result.c_str())); } - } else if (line.find("source") != line.npos) { + } else if (line.find("source") != std::string::npos) { inSource = true; } } diff --git a/Source/CTest/cmParseDelphiCoverage.cxx b/Source/CTest/cmParseDelphiCoverage.cxx index 9cdd50b..4b781a6 100644 --- a/Source/CTest/cmParseDelphiCoverage.cxx +++ b/Source/CTest/cmParseDelphiCoverage.cxx @@ -42,18 +42,20 @@ public: size_t beginPos = line.find("begin"); // Check that the begin is the first non-space string on the line - if ((beginPos == line.find_first_not_of(' ')) && beginPos != line.npos) { + if ((beginPos == line.find_first_not_of(' ')) && + beginPos != std::string::npos) { beginSet.push_back("begin"); coverageVector.push_back(-1); continue; } - if (line.find('{') != line.npos) { + if (line.find('{') != std::string::npos) { blockComFlag = true; - } else if (line.find('}') != line.npos) { + } else if (line.find('}') != std::string::npos) { blockComFlag = false; coverageVector.push_back(-1); continue; - } else if ((line.find("end;") != line.npos) && !beginSet.empty()) { + } else if ((line.find("end;") != std::string::npos) && + !beginSet.empty()) { beginSet.pop_back(); coverageVector.push_back(-1); continue; @@ -62,7 +64,7 @@ public: // This checks for comments after lines of code, finding the // comment symbol after the ending semicolon. comPos = line.find("//"); - if (comPos != line.npos) { + if (comPos != std::string::npos) { semiPos = line.find(';'); if (comPos < semiPos) { lineComFlag = true; @@ -91,20 +93,20 @@ public: size_t pos = 0; /* - * This first 'while' section goes through the found HTML - * file name and attempts to capture the source file name - * which is set as part of the HTML file name: the name of - * the file is found in parenthesis '()' - * - * See test HTML file name: UTCovTest(UTCovTest.pas).html. - * - * Find the text inside each pair of parenthesis and check - * to see if it ends in '.pas'. If it can't be found, - * exit the function. - */ + * This first 'while' section goes through the found HTML + * file name and attempts to capture the source file name + * which is set as part of the HTML file name: the name of + * the file is found in parenthesis '()' + * + * See test HTML file name: UTCovTest(UTCovTest.pas).html. + * + * Find the text inside each pair of parenthesis and check + * to see if it ends in '.pas'. If it can't be found, + * exit the function. + */ while (true) { lastoffset = line.find('(', pos); - if (lastoffset == line.npos) { + if (lastoffset == std::string::npos) { cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, endnamepos << "File not found " << lastoffset << std::endl, this->Coverage.Quiet); @@ -112,7 +114,7 @@ public: } endnamepos = line.find(')', lastoffset); filename = line.substr(lastoffset + 1, (endnamepos - 1) - lastoffset); - if (filename.find(".pas") != filename.npos) { + if (filename.find(".pas") != std::string::npos) { cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Coverage found for file: " << filename << std::endl, @@ -122,9 +124,9 @@ public: pos = lastoffset + 1; } /* - * Glob through the source directory for the - * file found above - */ + * Glob through the source directory for the + * file found above + */ cmsys::Glob gl; gl.RecurseOn(); gl.RecurseThroughSymlinksOff(); @@ -133,9 +135,9 @@ public: std::vector const& files = gl.GetFiles(); if (files.empty()) { /* - * If that doesn't find any matching files - * return a failure. - */ + * If that doesn't find any matching files + * return a failure. + */ cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Unable to find file matching" << glob << std::endl, this->Coverage.Quiet); @@ -144,9 +146,9 @@ public: FileLinesType& coverageVector = this->Coverage.TotalCoverage[files[0]]; /* - * Initialize the file to have all code between 'begin' and - * 'end' tags marked as executable - */ + * Initialize the file to have all code between 'begin' and + * 'end' tags marked as executable + */ this->initializeDelphiFile(files[0], coverageVector); @@ -156,19 +158,19 @@ public: } /* - * Now read the HTML file, looking for the lines that have an - * "inline" in it. Then parse out the "class" value of that - * line to determine if the line is executed or not. - * - * Sample HTML line: - * - * 47
-    *     CheckEquals(1,2-1);
- * - */ + * Now read the HTML file, looking for the lines that have an + * "inline" in it. Then parse out the "class" value of that + * line to determine if the line is executed or not. + * + * Sample HTML line: + * + * 47
+     *     CheckEquals(1,2-1);
+ * + */ while (cmSystemTools::GetLineFromStream(in, line)) { - if (line.find("inline") == line.npos) { + if (line.find("inline") == std::string::npos) { continue; } diff --git a/Source/CTest/cmParseGTMCoverage.cxx b/Source/CTest/cmParseGTMCoverage.cxx index 15ef059..e4ee699 100644 --- a/Source/CTest/cmParseGTMCoverage.cxx +++ b/Source/CTest/cmParseGTMCoverage.cxx @@ -56,7 +56,7 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file) int lastoffset = 0; while (cmSystemTools::GetLineFromStream(in, line)) { // only look at lines that have coverage data - if (line.find("^ZZCOVERAGE") == line.npos) { + if (line.find("^ZZCOVERAGE") == std::string::npos) { continue; } std::string filepath; @@ -199,7 +199,7 @@ bool cmParseGTMCoverage::ParseMCOVLine(std::string const& line, // now parse the right hand side of the = pos = line.find('='); // no = found, this is an error - if (pos == line.npos) { + if (pos == std::string::npos) { return false; } pos++; // move past = diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx index 0fa7aa5..026320a 100644 --- a/Source/CursesDialog/cmCursesMainForm.cxx +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -1050,7 +1050,7 @@ void cmCursesMainForm::JumpToCacheEntry(const char* astr) const char* curField = lbl->GetValue(); if (curField) { std::string cfld = cmSystemTools::LowerCase(curField); - if (cfld.find(str) != cfld.npos && findex != start_index) { + if (cfld.find(str) != std::string::npos && findex != start_index) { break; } } diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx index a100617..b5e7c9e 100644 --- a/Source/cmAddCustomCommandCommand.cxx +++ b/Source/cmAddCustomCommandCommand.cxx @@ -369,7 +369,7 @@ bool cmAddCustomCommandCommand::CheckOutputs( // Make sure the output file name has no invalid characters. std::string::size_type pos = o->find_first_of("#<>"); - if (pos != o->npos) { + if (pos != std::string::npos) { std::ostringstream msg; msg << "called with OUTPUT containing a \"" << (*o)[pos] << "\". This character is not allowed."; diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx index 5db6e09..87e1147 100644 --- a/Source/cmAddCustomTargetCommand.cxx +++ b/Source/cmAddCustomTargetCommand.cxx @@ -27,7 +27,7 @@ bool cmAddCustomTargetCommand::InitialPass( std::string const& targetName = args[0]; // Check the target name. - if (targetName.find_first_of("/\\") != targetName.npos) { + if (targetName.find_first_of("/\\") != std::string::npos) { std::ostringstream e; e << "called with invalid target name \"" << targetName << "\". Target names may not contain a slash. " @@ -144,7 +144,7 @@ bool cmAddCustomTargetCommand::InitialPass( } std::string::size_type pos = targetName.find_first_of("#<>"); - if (pos != targetName.npos) { + if (pos != std::string::npos) { std::ostringstream msg; msg << "called with target name containing a \"" << targetName[pos] << "\". This character is not allowed."; diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index f469998..7025747 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -119,10 +119,10 @@ std::string cmCTest::CleanString(const std::string& str) { std::string::size_type spos = str.find_first_not_of(" \n\t\r\f\v"); std::string::size_type epos = str.find_last_not_of(" \n\t\r\f\v"); - if (spos == str.npos) { + if (spos == std::string::npos) { return std::string(); } - if (epos != str.npos) { + if (epos != std::string::npos) { epos = epos - spos + 1; } return str.substr(spos, epos); @@ -669,12 +669,12 @@ bool cmCTest::UpdateCTestConfiguration() continue; } std::string::size_type cpos = line.find_first_of(':'); - if (cpos == line.npos) { + if (cpos == std::string::npos) { continue; } std::string key = line.substr(0, cpos); std::string value = - cmCTest::CleanString(line.substr(cpos + 1, line.npos)); + cmCTest::CleanString(line.substr(cpos + 1, std::string::npos)); this->CTestConfiguration[key] = value; } fin.close(); @@ -1241,7 +1241,7 @@ std::string cmCTest::SafeBuildIdField(const std::string& value) // const char* disallowed = "\\:*?\"<>|\n\r\t\f\v"; - if (safevalue.find_first_of(disallowed) != value.npos) { + if (safevalue.find_first_of(disallowed) != std::string::npos) { std::string::size_type i = 0; std::string::size_type n = strlen(disallowed); char replace[2]; @@ -2349,8 +2349,8 @@ std::string cmCTest::GetShortPathToFile(const char* cfname) cmSystemTools::RelativePath(buildDir.c_str(), fname.c_str()); // If any contains "." it is not parent directory - bool inSrc = srcRelpath.find("..") == srcRelpath.npos; - bool inBld = bldRelpath.find("..") == bldRelpath.npos; + bool inSrc = srcRelpath.find("..") == std::string::npos; + bool inBld = bldRelpath.find("..") == std::string::npos; // TODO: Handle files with .. in their name std::string* res = CM_NULLPTR; @@ -2509,7 +2509,7 @@ void cmCTest::AddSubmitFile(Part part, const char* name) void cmCTest::AddCTestConfigurationOverwrite(const std::string& overStr) { size_t epos = overStr.find('='); - if (epos == overStr.npos) { + if (epos == std::string::npos) { cmCTestLog(this, ERROR_MESSAGE, "CTest configuration overwrite specified in the wrong format." << std::endl @@ -2518,7 +2518,7 @@ void cmCTest::AddCTestConfigurationOverwrite(const std::string& overStr) return; } std::string key = overStr.substr(0, epos); - std::string value = overStr.substr(epos + 1, overStr.npos); + std::string value = overStr.substr(epos + 1, std::string::npos); this->CTestConfigurationOverwrites[key] = value; } diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index f7fefca..224cf47 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -387,7 +387,7 @@ void cmCacheManager::OutputKey(std::ostream& fout, std::string const& key) { // support : in key name by double quoting const char* q = - (key.find(':') != key.npos || key.find("//") == 0) ? "\"" : ""; + (key.find(':') != std::string::npos || key.find("//") == 0) ? "\"" : ""; fout << q << key << q; } @@ -490,7 +490,7 @@ void cmCacheManager::AddCacheEntry(const std::string& key, const char* value, e.Type = type; // make sure we only use unix style paths if (type == cmStateEnums::FILEPATH || type == cmStateEnums::PATH) { - if (e.Value.find(';') != e.Value.npos) { + if (e.Value.find(';') != std::string::npos) { std::vector paths; cmSystemTools::ExpandListArgument(e.Value, paths); const char* sep = ""; diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index c2ada43..b2deaaa 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -1033,8 +1033,8 @@ void cmComputeLinkInformation::AddFullItem(std::string const& item) // See documentation of CMP0008. std::string generator = this->GlobalGenerator->GetName(); if (this->Target->GetPolicyStatusCMP0008() != cmPolicies::NEW && - (generator.find("Visual Studio") != generator.npos || - generator.find("Xcode") != generator.npos)) { + (generator.find("Visual Studio") != std::string::npos || + generator.find("Xcode") != std::string::npos)) { std::string file = cmSystemTools::GetFilenameName(item); if (!this->ExtractAnyLibraryName.find(file.c_str())) { this->HandleBadFullItem(item, file); diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index d8ddf45..c461739 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -672,7 +672,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv, fprintf(fout, " \"%s\"", si->c_str()); // Add dependencies on any non-temporary sources. - if (si->find("CMakeTmp") == si->npos) { + if (si->find("CMakeTmp") == std::string::npos) { this->Makefile->AddCMakeDependFile(*si); } } diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index 3b84516..a404ae8 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -449,11 +449,11 @@ void cmDependsC::ParseTransform(std::string const& xform) // A transform rule is of the form SOME_MACRO(%)=value-with-% // We can simply separate with "(%)=". std::string::size_type pos = xform.find("(%)="); - if (pos == xform.npos || pos == 0) { + if (pos == std::string::npos || pos == 0) { return; } std::string name = xform.substr(0, pos); - std::string value = xform.substr(pos + 4, xform.npos); + std::string value = xform.substr(pos + 4, std::string::npos); this->TransformRules[name] = value; } diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index ae3ec3b..565b84d 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -590,16 +590,17 @@ void cmExportFileGenerator::ResolveTargetsInGeneratorExpression( std::string::size_type pos = 0; std::string::size_type lastPos = pos; - while ((pos = input.find("$', nameStartPos); std::string::size_type commaPos = input.find(',', nameStartPos); std::string::size_type nextOpenPos = input.find("$<", nameStartPos); - if (commaPos == input.npos // Implied 'this' target - || closePos == input.npos // Imcomplete expression. - || closePos < commaPos // Implied 'this' target - || nextOpenPos < commaPos) // Non-literal + if (commaPos == std::string::npos // Implied 'this' target + || closePos == std::string::npos // Imcomplete expression. + || closePos < commaPos // Implied 'this' target + || nextOpenPos < commaPos) // Non-literal { lastPos = nameStartPos; continue; @@ -617,15 +618,15 @@ void cmExportFileGenerator::ResolveTargetsInGeneratorExpression( std::string errorString; pos = 0; lastPos = pos; - while ((pos = input.find("$', nameStartPos); - if (endPos == input.npos) { + if (endPos == std::string::npos) { errorString = "$ expression incomplete"; break; } std::string targetName = input.substr(nameStartPos, endPos - nameStartPos); - if (targetName.find("$<") != input.npos) { + if (targetName.find("$<") != std::string::npos) { errorString = "$ requires its parameter to be a " "literal."; break; @@ -642,10 +643,10 @@ void cmExportFileGenerator::ResolveTargetsInGeneratorExpression( pos = 0; lastPos = pos; while (errorString.empty() && - (pos = input.find("$', nameStartPos); - if (endPos == input.npos) { + if (endPos == std::string::npos) { errorString = "$ expression incomplete"; break; } diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 16bd5e8..664a342 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -255,7 +255,8 @@ void cmExportInstallFileGenerator::ReplaceInstallPrefix(std::string& input) std::string::size_type pos = 0; std::string::size_type lastPos = pos; - while ((pos = input.find("$", lastPos)) != input.npos) { + while ((pos = input.find("$", lastPos)) != + std::string::npos) { std::string::size_type endPos = pos + sizeof("$") - 1; input.replace(pos, endPos - pos, "${_IMPORT_PREFIX}"); lastPos = endPos; diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx index e8ae20f..b07a26a 100644 --- a/Source/cmFindCommon.cxx +++ b/Source/cmFindCommon.cxx @@ -311,7 +311,7 @@ void cmFindCommon::AddPathSuffix(std::string const& arg) return; } if (suffix[0] == '/') { - suffix = suffix.substr(1, suffix.npos); + suffix = suffix.substr(1, std::string::npos); } if (suffix.empty()) { return; diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 562a9fc..a6b1a21 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -303,7 +303,7 @@ bool cmFindLibraryHelper::HasValidSuffix(std::string const& name) // Check if a valid library suffix is somewhere in the name, // this may happen e.g. for versioned shared libraries: libfoo.so.2 suffix += "."; - if (name.find(suffix) != name.npos) { + if (name.find(suffix) != std::string::npos) { return true; } } diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index f67f353..21ca347 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -326,7 +326,7 @@ bool cmFindPackageCommand::InitialPass(std::vector const& args, } else if (doing == DoingPathSuffixes) { this->AddPathSuffix(args[i]); } else if (doing == DoingConfigs) { - if (args[i].find_first_of(":/\\") != args[i].npos || + if (args[i].find_first_of(":/\\") != std::string::npos || cmSystemTools::GetFilenameLastExtension(args[i]) != ".cmake") { std::ostringstream e; e << "given CONFIGS option followed by invalid file name \"" << args[i] @@ -1593,6 +1593,7 @@ class cmFileListGeneratorBase { public: virtual ~cmFileListGeneratorBase() {} + protected: bool Consider(std::string const& fullPath, cmFileList& listing); diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx index 644b025..d3541ca 100644 --- a/Source/cmFindPathCommand.cxx +++ b/Source/cmFindPathCommand.cxx @@ -76,14 +76,14 @@ std::string cmFindPathCommand::FindHeaderInFramework(std::string const& file, // if there is a / in the name try to find the header as a framework // For example bar/foo.h would look for: // bar.framework/Headers/foo.h - if (pos != fileName.npos) { + if (pos != std::string::npos) { // remove the name from the slash; fileName = fileName.substr(pos + 1); frameWorkName = file; frameWorkName = frameWorkName.substr(0, frameWorkName.size() - fileName.size() - 1); // if the framework has a path in it then just use the filename - if (frameWorkName.find('/') != frameWorkName.npos) { + if (frameWorkName.find('/') != std::string::npos) { fileName = file; frameWorkName = ""; } diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 570aa6e..00b5ff4 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -126,7 +126,7 @@ cmCompiledGeneratorExpression::~cmCompiledGeneratorExpression() std::string cmGeneratorExpression::StripEmptyListElements( const std::string& input) { - if (input.find(';') == input.npos) { + if (input.find(';') == std::string::npos) { return input; } std::string result; @@ -161,7 +161,7 @@ static std::string stripAllGeneratorExpressions(const std::string& input) std::string::size_type pos = 0; std::string::size_type lastPos = pos; int nestingLevel = 0; - while ((pos = input.find("$<", lastPos)) != input.npos) { + while ((pos = input.find("$<", lastPos)) != std::string::npos) { result += input.substr(lastPos, pos - lastPos); pos += 2; nestingLevel = 1; @@ -290,7 +290,7 @@ void cmGeneratorExpression::Split(const std::string& input, { std::string::size_type pos = 0; std::string::size_type lastPos = pos; - while ((pos = input.find("$<", lastPos)) != input.npos) { + while ((pos = input.find("$<", lastPos)) != std::string::npos) { std::string part = input.substr(lastPos, pos - lastPos); std::string preGenex; if (!part.empty()) { diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 073bde2..6233ec6 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -5148,11 +5148,11 @@ std::string cmGeneratorTarget::CheckCMP0004(std::string const& item) const // do the expansion but users link to libraries like " ${VAR} ". std::string lib = item; std::string::size_type pos = lib.find_first_not_of(" \t\r\n"); - if (pos != lib.npos) { - lib = lib.substr(pos, lib.npos); + if (pos != std::string::npos) { + lib = lib.substr(pos, std::string::npos); } pos = lib.find_last_not_of(" \t\r\n"); - if (pos != lib.npos) { + if (pos != std::string::npos) { lib = lib.substr(0, pos + 1); } if (lib != item) { diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx index 5915a67..c23684c 100644 --- a/Source/cmGetFilenameComponentCommand.cxx +++ b/Source/cmGetFilenameComponentCommand.cxx @@ -28,7 +28,7 @@ bool cmGetFilenameComponentCommand::InitialPass( std::string result; std::string filename = args[1]; - if (filename.find("[HKEY") != filename.npos) { + if (filename.find("[HKEY") != std::string::npos) { // Check the registry as the target application would view it. cmSystemTools::KeyWOW64 view = cmSystemTools::KeyWOW64_32; cmSystemTools::KeyWOW64 other_view = cmSystemTools::KeyWOW64_64; @@ -37,10 +37,10 @@ bool cmGetFilenameComponentCommand::InitialPass( other_view = cmSystemTools::KeyWOW64_32; } cmSystemTools::ExpandRegistryValues(filename, view); - if (filename.find("/registry") != filename.npos) { + if (filename.find("/registry") != std::string::npos) { std::string other = args[1]; cmSystemTools::ExpandRegistryValues(other, other_view); - if (other.find("/registry") == other.npos) { + if (other.find("/registry") == std::string::npos) { filename = other; } } diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index f3eb249..19597fd 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -306,7 +306,7 @@ bool cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) // if there are spaces in the make program use short path // but do not short path the actual program name, as // this can cause trouble with VSExpress - if (makeProgram.find(' ') != makeProgram.npos) { + if (makeProgram.find(' ') != std::string::npos) { std::string dir; std::string file; cmSystemTools::SplitProgramPath(makeProgram, dir, file); @@ -2730,7 +2730,7 @@ void cmGlobalGenerator::CheckRuleHashes(std::string const& pfile, } // Get the filename. - fname = line.substr(33, line.npos); + fname = line.substr(33, std::string::npos); // Look for a hash for this file's rule. std::map::const_iterator rhi = diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 84740ca..64616ad 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -170,7 +170,7 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::Factory::CreateGlobalGenerator( std::string::size_type pos; if (cmSystemTools::RunSingleCommand("xcode-select --print-path", &out, 0, 0, 0, cmSystemTools::OUTPUT_NONE) && - (pos = out.find(".app/"), pos != out.npos)) { + (pos = out.find(".app/"), pos != std::string::npos)) { versionFile = out.substr(0, pos + 5) + "Contents/version.plist"; } } @@ -244,7 +244,7 @@ std::string cmGlobalXCodeGenerator::FindXcodeBuildCommand() bool cmGlobalXCodeGenerator::SetGeneratorToolset(std::string const& ts, cmMakefile* mf) { - if (ts.find_first_of(",=") != ts.npos) { + if (ts.find_first_of(",=") != std::string::npos) { std::ostringstream e; /* clang-format off */ e << @@ -1400,7 +1400,7 @@ std::string cmGlobalXCodeGenerator::ExtractFlag(const char* flag, std::string retFlag; std::string::size_type lastOccurancePos = flags.rfind(flag); bool saved = false; - while (lastOccurancePos != flags.npos) { + while (lastOccurancePos != std::string::npos) { // increment pos, we use lastOccurancePos to reduce search space on next // inc std::string::size_type pos = lastOccurancePos; @@ -3423,7 +3423,7 @@ std::string cmGlobalXCodeGenerator::RelativeToBinary(const char* p) std::string cmGlobalXCodeGenerator::XCodeEscapePath(const std::string& p) { - if (p.find(' ') != p.npos) { + if (p.find(' ') != std::string::npos) { std::string t = "\""; t += p; t += "\""; @@ -3511,7 +3511,7 @@ void cmGlobalXCodeGenerator::AppendFlag(std::string& flags, // Check if the flag needs quoting. bool quoteFlag = - flag.find_first_of("`~!@#$%^&*()+={}[]|:;\"'<>,.? ") != flag.npos; + flag.find_first_of("`~!@#$%^&*()+={}[]|:;\"'<>,.? ") != std::string::npos; // We escape a flag as follows: // - Place each flag in single quotes '' diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx index cdb0279..b81f7cb 100644 --- a/Source/cmIncludeDirectoryCommand.cxx +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -113,7 +113,7 @@ void cmIncludeDirectoryCommand::NormalizeInclude(std::string& inc) { std::string::size_type b = inc.find_first_not_of(" \r"); std::string::size_type e = inc.find_last_not_of(" \r"); - if ((b != inc.npos) && (e != inc.npos)) { + if ((b != std::string::npos) && (e != std::string::npos)) { inc.assign(inc, b, 1 + e - b); // copy the remaining substring } else { inc = ""; diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 93e467c..f499924 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -1210,7 +1210,7 @@ bool cmInstallCommand::HandleExportAndroidMKMode( // Check the file name. std::string fname = filename.GetString(); - if (fname.find_first_of(":/\\") != fname.npos) { + if (fname.find_first_of(":/\\") != std::string::npos) { std::ostringstream e; e << args[0] << " given invalid export file name \"" << fname << "\". " << "The FILE argument may not contain a path. " @@ -1228,7 +1228,7 @@ bool cmInstallCommand::HandleExportAndroidMKMode( this->SetError(e.str()); return false; } - if (fname.find_first_of(":/\\") != fname.npos) { + if (fname.find_first_of(":/\\") != std::string::npos) { std::ostringstream e; e << args[0] << " given export name \"" << exp.GetString() << "\". " << "This name cannot be safely converted to a file name. " @@ -1302,7 +1302,7 @@ bool cmInstallCommand::HandleExportMode(std::vector const& args) // Check the file name. std::string fname = filename.GetString(); - if (fname.find_first_of(":/\\") != fname.npos) { + if (fname.find_first_of(":/\\") != std::string::npos) { std::ostringstream e; e << args[0] << " given invalid export file name \"" << fname << "\". " << "The FILE argument may not contain a path. " @@ -1326,7 +1326,7 @@ bool cmInstallCommand::HandleExportMode(std::vector const& args) fname = exp.GetString(); fname += ".cmake"; - if (fname.find_first_of(":/\\") != fname.npos) { + if (fname.find_first_of(":/\\") != std::string::npos) { std::ostringstream e; e << args[0] << " given export name \"" << exp.GetString() << "\". " << "This name cannot be safely converted to a file name. " @@ -1391,7 +1391,7 @@ bool cmInstallCommand::MakeFilesFullPath( } // Make sure the file is not a directory. - if (gpos == file.npos && cmSystemTools::FileIsDirectory(file)) { + if (gpos == std::string::npos && cmSystemTools::FileIsDirectory(file)) { std::ostringstream e; e << modeName << " given directory \"" << (*fileIt) << "\" to install."; this->SetError(e.str()); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index e48378d..0418521 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -140,7 +140,7 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars); replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) { std::string actualReplace = *replaceIter; - if (actualReplace.find("${LANG}") != actualReplace.npos) { + if (actualReplace.find("${LANG}") != std::string::npos) { cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); } @@ -1932,7 +1932,7 @@ void cmLocalGenerator::JoinDefines(const std::set& defines, // -DNAME="value" instead of -D"NAME=value" for historical reasons. std::string::size_type eq = defineIt->find("="); def += defineIt->substr(0, eq); - if (eq != defineIt->npos) { + if (eq != std::string::npos) { def += "="; def += this->EscapeForShell(defineIt->c_str() + eq + 1, true); } @@ -2109,7 +2109,7 @@ static bool cmLocalGeneratorShortenObjectName(std::string& objName, // its own md5 sum. std::string::size_type pos = objName.find('/', objName.size() - max_len + 32); - if (pos != objName.npos) { + if (pos != std::string::npos) { cmCryptoHash md5(cmCryptoHash::AlgoMD5); std::string md5name = md5.HashString(objName.substr(0, pos)); md5name += objName.substr(pos); @@ -2460,7 +2460,7 @@ bool cmLocalGenerator::CheckDefinition(std::string const& define) const } // Many compilers do not support # in the value so we disable it. - if (define.find_first_of('#') != define.npos) { + if (define.find_first_of('#') != std::string::npos) { std::ostringstream e; /* clang-format off */ e << "WARNING: Preprocessor definitions containing '#' may not be " diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 8d3edb8..146cfd0 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -606,7 +606,7 @@ std::string cmLocalUnixMakefileGenerator3::MaybeConvertWatcomShellCommand( std::string const& cmd) { if (this->IsWatcomWMake() && cmSystemTools::FileIsFullPath(cmd.c_str()) && - cmd.find_first_of("( )") != cmd.npos) { + cmd.find_first_of("( )") != std::string::npos) { // On Watcom WMake use the windows short path for the command // name. This is needed to avoid funny quoting problems on // lines with shell redirection operators. @@ -852,7 +852,7 @@ void cmLocalUnixMakefileGenerator3::AppendFlags(std::string& flags, { if (this->IsWatcomWMake() && !newFlags.empty()) { std::string newf = newFlags; - if (newf.find("\\\"") != newf.npos) { + if (newf.find("\\\"") != std::string::npos) { cmSystemTools::ReplaceString(newf, "\\\"", "\""); this->cmLocalGenerator::AppendFlags(flags, newf); return; @@ -978,11 +978,11 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( cmSystemTools::ReplaceString(cmd, "/./", "/"); // Convert the command to a relative path only if the current // working directory will be the start-output directory. - bool had_slash = cmd.find('/') != cmd.npos; + bool had_slash = cmd.find('/') != std::string::npos; if (workingDir.empty()) { cmd = this->MaybeConvertToRelativePath(currentBinDir, cmd); } - bool has_slash = cmd.find('/') != cmd.npos; + bool has_slash = cmd.find('/') != std::string::npos; if (had_slash && !has_slash) { // This command was specified as a path to a file in the // current directory. Add a leading "./" so it can run @@ -1039,9 +1039,9 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand( // curly braces are removed. The hack can be skipped if the // first curly brace is the last character. std::string::size_type lcurly = cmd.find('{'); - if (lcurly != cmd.npos && lcurly < (cmd.size() - 1)) { + if (lcurly != std::string::npos && lcurly < (cmd.size() - 1)) { std::string::size_type rcurly = cmd.find('}'); - if (rcurly == cmd.npos || rcurly > lcurly) { + if (rcurly == std::string::npos || rcurly > lcurly) { // The first curly is a left curly. Use the hack. std::string hack_cmd = cmd.substr(0, lcurly); hack_cmd += "{{}"; @@ -1207,9 +1207,12 @@ std::string cmLocalUnixMakefileGenerator3::CreateMakeVariable( // if there is no restriction on the length of make variables // and there are no "." characters in the string, then return the // unmodified combination. - if ((!this->MakefileVariableSize && unmodified.find('.') == s.npos) && - (!this->MakefileVariableSize && unmodified.find('+') == s.npos) && - (!this->MakefileVariableSize && unmodified.find('-') == s.npos)) { + if ((!this->MakefileVariableSize && + unmodified.find('.') == std::string::npos) && + (!this->MakefileVariableSize && + unmodified.find('+') == std::string::npos) && + (!this->MakefileVariableSize && + unmodified.find('-') == std::string::npos)) { return unmodified; } diff --git a/Source/cmMSVC60LinkLineComputer.cxx b/Source/cmMSVC60LinkLineComputer.cxx index d761e7b..b5e8511 100644 --- a/Source/cmMSVC60LinkLineComputer.cxx +++ b/Source/cmMSVC60LinkLineComputer.cxx @@ -24,7 +24,7 @@ std::string cmMSVC60LinkLineComputer::ConvertToLinkReference( // Work-ardound command line parsing limitations in MSVC 6.0 // Search for the last space. std::string::size_type pos = lib.rfind(' '); - if (pos != lib.npos) { + if (pos != std::string::npos) { // Find the slash after the last space, if any. pos = lib.find('/', pos); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 5af0084..51d8980 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -316,6 +316,7 @@ public: bool noPolicyScope); ~IncludeScope(); void Quiet() { this->ReportError = false; } + private: cmMakefile* Makefile; bool NoPolicyScope; @@ -480,6 +481,7 @@ public: } void Quiet() { this->ReportError = false; } + private: cmMakefile* Makefile; bool ReportError; @@ -625,7 +627,7 @@ struct file_not_persistent { bool operator()(const std::string& path) const { - return !(path.find("CMakeTmp") == path.npos && + return !(path.find("CMakeTmp") == std::string::npos && cmSystemTools::FileExists(path.c_str())); } }; @@ -1347,6 +1349,7 @@ public: } void Quiet() { this->ReportError = false; } + private: cmMakefile* Makefile; cmGlobalGenerator* GG; @@ -1893,7 +1896,7 @@ cmSourceFile* cmMakefile::LinearGetSourceFileWithOutput( out = *o; std::string::size_type pos = out.rfind(name); // If the output matches exactly - if (pos != out.npos && pos == out.size() - name.size() && + if (pos != std::string::npos && pos == out.size() - name.size() && (pos == 0 || out[pos - 1] == '/')) { return *i; } @@ -2406,7 +2409,7 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringOld( bool removeEmpty, bool replaceAt) const { // Fast path strings without any special characters. - if (source.find_first_of("$@\\") == source.npos) { + if (source.find_first_of("$@\\") == std::string::npos) { return cmake::LOG; } diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 9c0520e..1aeeb7d 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1287,6 +1287,7 @@ public: this->CurrentString += this->NextObject; } void Done() { this->Strings.push_back(this->CurrentString); } + private: std::string MaybeConvertToRelativePath(std::string const& obj) { @@ -1596,7 +1597,8 @@ void cmMakefileTargetGenerator::CreateLinkLibs( frameworkPath, linkPath); linkLibs = frameworkPath + linkPath + linkLibs; - if (useResponseFile && linkLibs.find_first_not_of(' ') != linkLibs.npos) { + if (useResponseFile && + linkLibs.find_first_not_of(' ') != std::string::npos) { // Lookup the response file reference flag. std::string responseFlagVar = "CMAKE_"; responseFlagVar += diff --git a/Source/cmQtAutoGeneratorCommon.cxx b/Source/cmQtAutoGeneratorCommon.cxx index 1807514..3e1b58c 100644 --- a/Source/cmQtAutoGeneratorCommon.cxx +++ b/Source/cmQtAutoGeneratorCommon.cxx @@ -16,7 +16,7 @@ static std::string utilStripCR(std::string const& line) { // Strip CR characters rcc may have printed (possibly more than one!). std::string::size_type cr = line.find('\r'); - if (cr != line.npos) { + if (cr != std::string::npos) { return line.substr(0, cr); } return line; diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx index 938cad9..12bbaf6 100644 --- a/Source/cmRST.cxx +++ b/Source/cmRST.cxx @@ -80,7 +80,7 @@ void cmRST::ProcessModule(std::istream& is) if (!rst.empty() && rst != "#") { // Bracket mode: check for end bracket std::string::size_type pos = line.find(rst); - if (pos == line.npos) { + if (pos == std::string::npos) { this->ProcessLine(line); } else { if (line[0] != '#') { @@ -98,7 +98,7 @@ void cmRST::ProcessModule(std::istream& is) continue; } if (line.substr(0, 2) == "# ") { - this->ProcessLine(line.substr(2, line.npos)); + this->ProcessLine(line.substr(2, std::string::npos)); continue; } rst = ""; @@ -156,8 +156,8 @@ void cmRST::ProcessLine(std::string const& line) isspace(line[2]))) { this->Reset(); this->Markup = - (line.find_first_not_of(" \t", 2) == line.npos ? MarkupEmpty - : MarkupNormal); + (line.find_first_not_of(" \t", 2) == std::string::npos ? MarkupEmpty + : MarkupNormal); if (this->CMakeDirective.find(line)) { // Output cmake domain directives and their content normally. this->NormalLine(line); @@ -252,7 +252,7 @@ void cmRST::OutputLine(std::string const& line_in, bool inlineMarkup) // no explicit "(...)" then add "()" to the text. if (this->CMakeRole.match(2) == "command" && this->CMakeRole.match(5).empty() && - text.find_first_of("()") == text.npos) { + text.find_first_of("()") == std::string::npos) { text += "()"; } this->OS << "``" << text << "``"; diff --git a/Source/cmRulePlaceholderExpander.cxx b/Source/cmRulePlaceholderExpander.cxx index d5d2f67..a71861a 100644 --- a/Source/cmRulePlaceholderExpander.cxx +++ b/Source/cmRulePlaceholderExpander.cxx @@ -155,7 +155,7 @@ std::string cmRulePlaceholderExpander::ExpandRuleVariable( // Strip the last extension off the target name. std::string targetBase = replaceValues.Target; std::string::size_type pos = targetBase.rfind('.'); - if (pos != targetBase.npos) { + if (pos != std::string::npos) { return targetBase.substr(0, pos); } return targetBase; @@ -270,7 +270,7 @@ std::string cmRulePlaceholderExpander::ExpandRuleVariable( std::map::iterator mapIt = this->VariableMappings.find(variable); if (mapIt != this->VariableMappings.end()) { - if (variable.find("_FLAG") == variable.npos) { + if (variable.find("_FLAG") == std::string::npos) { return outputConverter->ConvertToOutputForExisting(mapIt->second); } return mapIt->second; @@ -284,15 +284,15 @@ void cmRulePlaceholderExpander::ExpandRuleVariables( { std::string::size_type start = s.find('<'); // no variables to expand - if (start == s.npos) { + if (start == std::string::npos) { return; } std::string::size_type pos = 0; std::string expandedInput; - while (start != s.npos && start < s.size() - 2) { + while (start != std::string::npos && start < s.size() - 2) { std::string::size_type end = s.find('>', start); // if we find a < with no > we are done - if (end == s.npos) { + if (end == std::string::npos) { return; } char c = s[start + 1]; diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index dc7034e..54ec6b0 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -134,6 +134,7 @@ public: operator bool() const { return this->handle_ != INVALID_HANDLE_VALUE; } bool operator!() const { return this->handle_ == INVALID_HANDLE_VALUE; } operator HANDLE() const { return this->handle_; } + private: HANDLE handle_; }; @@ -2372,7 +2373,7 @@ bool cmSystemTools::ChangeRPath(std::string const& file, rp[rp_count].Value = se[i]->Value.substr(0, prefix_len); rp[rp_count].Value += newRPath; rp[rp_count].Value += - se[i]->Value.substr(pos + oldRPath.length(), oldRPath.npos); + se[i]->Value.substr(pos + oldRPath.length(), std::string::npos); if (!rp[rp_count].Value.empty()) { remove_rpath = false; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index f675833..c95a3ca 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1476,7 +1476,7 @@ bool cmTarget::CheckImportedLibName(std::string const& prop, return false; } std::string::size_type bad = value.find_first_of(":/\\;"); - if (bad != value.npos) { + if (bad != std::string::npos) { this->Makefile->IssueMessage( cmake::FATAL_ERROR, prop + " property value\n " + value + "\nmay not contain '" + value.substr(bad, 1) + "'."); diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx index 3689ac4..0def8c3 100644 --- a/Source/cmXCodeObject.cxx +++ b/Source/cmXCodeObject.cxx @@ -224,11 +224,11 @@ void cmXCodeObject::PrintString(std::ostream& os, std::string String) { // The string needs to be quoted if it contains any characters // considered special by the Xcode project file parser. - bool needQuote = (String.empty() || String.find("//") != String.npos || + bool needQuote = (String.empty() || String.find("//") != std::string::npos || String.find_first_not_of("ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789" - "$_./") != String.npos); + "$_./") != std::string::npos); const char* quote = needQuote ? "\"" : ""; // Print the string, quoted and escaped as necessary. diff --git a/Source/cmakexbuild.cxx b/Source/cmakexbuild.cxx index f1f4bbb..72da456 100644 --- a/Source/cmakexbuild.cxx +++ b/Source/cmakexbuild.cxx @@ -29,7 +29,8 @@ int RunXCode(std::vector& argv, bool& hitbug) std::string line; int pipe = cmSystemTools::WaitForLine(cp, line, 100.0, out, err); while (pipe != cmsysProcess_Pipe_None) { - if (line.find("/bin/sh: bad interpreter: Text file busy") != line.npos) { + if (line.find("/bin/sh: bad interpreter: Text file busy") != + std::string::npos) { hitbug = true; std::cerr << "Hit xcodebuild bug : " << line << "\n"; } @@ -37,7 +38,7 @@ int RunXCode(std::vector& argv, bool& hitbug) // because it may contain bogus errors // also remove all output with setenv in it to tone down // the verbosity of xcodebuild - if (!hitbug && (line.find("setenv") == line.npos)) { + if (!hitbug && (line.find("setenv") == std::string::npos)) { if (pipe == cmsysProcess_Pipe_STDERR) { std::cerr << line << "\n"; } else if (pipe == cmsysProcess_Pipe_STDOUT) { diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 9f2e8b7..d5b0861 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -351,8 +351,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) } // Warn if iwyu reported anything. - if (stdErr.find("should remove these lines:") != stdErr.npos || - stdErr.find("should add these lines:") != stdErr.npos) { + if (stdErr.find("should remove these lines:") != std::string::npos || + stdErr.find("should add these lines:") != std::string::npos) { std::cerr << "Warning: include-what-you-use reported diagnostics:\n" << stdErr << "\n"; } @@ -412,7 +412,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) // Output the stdout from ldd -r -u to stderr // Warn if lwyu reported anything. - if (stdOut.find("Unused direct dependencies:") != stdOut.npos) { + if (stdOut.find("Unused direct dependencies:") != std::string::npos) { std::cerr << "Warning: " << stdOut; } } @@ -480,7 +480,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) std::cerr << "cmake -E env: unknown option '" << a << "'" << std::endl; return 1; - } else if (a.find('=') != a.npos) { + } else if (a.find('=') != std::string::npos) { // Set environment variable. cmSystemTools::PutEnv(a); } else { @@ -924,15 +924,15 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) cmSystemTools::TarCompressNone; bool verbose = false; int nCompress = 0; - if (flags.find_first_of('j') != flags.npos) { + if (flags.find_first_of('j') != std::string::npos) { compress = cmSystemTools::TarCompressBZip2; ++nCompress; } - if (flags.find_first_of('J') != flags.npos) { + if (flags.find_first_of('J') != std::string::npos) { compress = cmSystemTools::TarCompressXZ; ++nCompress; } - if (flags.find_first_of('z') != flags.npos) { + if (flags.find_first_of('z') != std::string::npos) { compress = cmSystemTools::TarCompressGZip; ++nCompress; } @@ -946,22 +946,22 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) "at most one flag of z, j, or J may be used"); return 1; } - if (flags.find_first_of('v') != flags.npos) { + if (flags.find_first_of('v') != std::string::npos) { verbose = true; } - if (flags.find_first_of('t') != flags.npos) { + if (flags.find_first_of('t') != std::string::npos) { if (!cmSystemTools::ListTar(outFile.c_str(), verbose)) { cmSystemTools::Error("Problem listing tar: ", outFile.c_str()); return 1; } - } else if (flags.find_first_of('c') != flags.npos) { + } else if (flags.find_first_of('c') != std::string::npos) { if (!cmSystemTools::CreateTar(outFile.c_str(), files, compress, verbose, mtime, format)) { cmSystemTools::Error("Problem creating tar: ", outFile.c_str()); return 1; } - } else if (flags.find_first_of('x') != flags.npos) { + } else if (flags.find_first_of('x') != std::string::npos) { if (!cmSystemTools::ExtractTar(outFile.c_str(), verbose)) { cmSystemTools::Error("Problem extracting tar: ", outFile.c_str()); return 1; @@ -1272,7 +1272,7 @@ int cmcmd::ExecuteLinkScript(std::vector& args) int result = 0; while (result == 0 && cmSystemTools::GetLineFromStream(fin, command)) { // Skip empty command lines. - if (command.find_first_not_of(" \t") == command.npos) { + if (command.find_first_not_of(" \t") == std::string::npos) { continue; } @@ -1420,7 +1420,7 @@ static bool RunCommand(const char* comment, std::vector& command, // it is the dumb rc command banner, but if the command // returned an error code then print the output anyway as // the banner may be mixed with some other important information. - if (output.find("Resource Compiler Version") == output.npos || !res || + if (output.find("Resource Compiler Version") == std::string::npos || !res || retCode) { std::cout << output; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=389ed56f63653e89b3d640cf7aebdc8ebe7ca643 commit 389ed56f63653e89b3d640cf7aebdc8ebe7ca643 Author: Brad King AuthorDate: Thu Jun 1 14:18:15 2017 -0400 Commit: Brad King CommitDate: Thu Jun 1 14:18:54 2017 -0400 cmLocalUnixMakefileGenerator3: Remove unnecessary local variable diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 959178e..8d3edb8 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1200,9 +1200,8 @@ void cmLocalUnixMakefileGenerator3::AppendEcho( } std::string cmLocalUnixMakefileGenerator3::CreateMakeVariable( - const std::string& sin, const std::string& s2) + std::string const& s, std::string const& s2) { - std::string s = sin; std::string unmodified = s; unmodified += s2; // if there is no restriction on the length of make variables https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9fe4a9e2aed8457d7124d86e31a272180794ac61 commit 9fe4a9e2aed8457d7124d86e31a272180794ac61 Author: Brad King AuthorDate: Thu Jun 1 14:17:31 2017 -0400 Commit: Brad King CommitDate: Thu Jun 1 14:18:54 2017 -0400 cmParseBlanketJSCoverage: Pass unmodified parameter as const& diff --git a/Source/CTest/cmParseBlanketJSCoverage.cxx b/Source/CTest/cmParseBlanketJSCoverage.cxx index 54bb422..e5d8a23 100644 --- a/Source/CTest/cmParseBlanketJSCoverage.cxx +++ b/Source/CTest/cmParseBlanketJSCoverage.cxx @@ -22,7 +22,7 @@ public: virtual ~JSONParser() {} - std::string getValue(std::string line, int type) + std::string getValue(std::string const& line, int type) { size_t begIndex; size_t endIndex; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=594a9fcf6fa1ad9bcfe91abe7d94df2e92f3d11b commit 594a9fcf6fa1ad9bcfe91abe7d94df2e92f3d11b Merge: 6a42b96 74ef363 Author: Brad King AuthorDate: Thu Jun 1 14:07:35 2017 -0400 Commit: Brad King CommitDate: Thu Jun 1 14:07:35 2017 -0400 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2017-06-01 (8243fefa) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74ef363dd7e46fc883b9822f3516002d9345293e commit 74ef363dd7e46fc883b9822f3516002d9345293e Author: KWSys Upstream AuthorDate: Thu Jun 1 14:05:16 2017 -0400 Commit: Brad King CommitDate: Thu Jun 1 14:07:35 2017 -0400 KWSys 2017-06-01 (8243fefa) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit 8243fefa3f1ecb623a3bb8db8153941b914c7206 (master). Upstream Shortlog ----------------- Pavel Solodovnikov (2): 36d14691 Access string npos without instance ab265991 Remove second arg: npos in substr usages diff --git a/Directory.cxx b/Directory.cxx index ca1cb18..5141d45 100644 --- a/Directory.cxx +++ b/Directory.cxx @@ -109,7 +109,7 @@ bool Directory::Load(const std::string& name) // Make sure the slashes in the wildcard suffix are consistent with the // rest of the path buf = new char[n + 2 + 1]; - if (name.find('\\') != name.npos) { + if (name.find('\\') != std::string::npos) { sprintf(buf, "%s\\*", name.c_str()); } else { sprintf(buf, "%s/*", name.c_str()); diff --git a/EncodingCXX.cxx b/EncodingCXX.cxx index 641c0e6..b1e54c9 100644 --- a/EncodingCXX.cxx +++ b/EncodingCXX.cxx @@ -147,11 +147,11 @@ std::wstring Encoding::ToWide(const std::string& str) wstr += ToWide(str.c_str() + pos); } nullPos = str.find('\0', pos); - if (nullPos != str.npos) { + if (nullPos != std::string::npos) { pos = nullPos + 1; wstr += wchar_t('\0'); } - } while (nullPos != str.npos); + } while (nullPos != std::string::npos); #endif return wstr; } @@ -181,11 +181,11 @@ std::string Encoding::ToNarrow(const std::wstring& str) nstr += ToNarrow(str.c_str() + pos); } nullPos = str.find(wchar_t('\0'), pos); - if (nullPos != str.npos) { + if (nullPos != std::string::npos) { pos = nullPos + 1; nstr += '\0'; } - } while (nullPos != str.npos); + } while (nullPos != std::string::npos); #endif return nstr; } diff --git a/SystemInformation.cxx b/SystemInformation.cxx index b7bd102..86fdccd 100644 --- a/SystemInformation.cxx +++ b/SystemInformation.cxx @@ -1332,7 +1332,7 @@ std::string SymbolProperties::GetFileName(const std::string& path) const if (!this->ReportPath) { size_t at = file.rfind("/"); if (at != std::string::npos) { - file = file.substr(at + 1, std::string::npos); + file = file.substr(at + 1); } } return file; @@ -3342,11 +3342,11 @@ std::string SystemInformationImplementation::ExtractValueFromCpuInfoFile( std::string buffer, const char* word, size_t init) { size_t pos = buffer.find(word, init); - if (pos != buffer.npos) { + if (pos != std::string::npos) { this->CurrentPositionInFile = pos; pos = buffer.find(":", pos); size_t pos2 = buffer.find("\n", pos); - if (pos != buffer.npos && pos2 != buffer.npos) { + if (pos != std::string::npos && pos2 != std::string::npos) { // It may happen that the beginning matches, but this is still not the // requested key. // An example is looking for "cpu" when "cpu family" comes first. So we @@ -3361,7 +3361,7 @@ std::string SystemInformationImplementation::ExtractValueFromCpuInfoFile( return buffer.substr(pos + 2, pos2 - pos - 2); } } - this->CurrentPositionInFile = buffer.npos; + this->CurrentPositionInFile = std::string::npos; return ""; } @@ -3388,7 +3388,7 @@ bool SystemInformationImplementation::RetreiveInformationFromCpuInfoFile() // Number of logical CPUs (combination of multiple processors, multi-core // and SMT) size_t pos = buffer.find("processor\t"); - while (pos != buffer.npos) { + while (pos != std::string::npos) { this->NumberOfLogicalCPU++; pos = buffer.find("processor\t", pos + 1); } @@ -3397,7 +3397,7 @@ bool SystemInformationImplementation::RetreiveInformationFromCpuInfoFile() // Count sockets. std::set PhysicalIDs; std::string idc = this->ExtractValueFromCpuInfoFile(buffer, "physical id"); - while (this->CurrentPositionInFile != buffer.npos) { + while (this->CurrentPositionInFile != std::string::npos) { int id = atoi(idc.c_str()); PhysicalIDs.insert(id); idc = this->ExtractValueFromCpuInfoFile(buffer, "physical id", @@ -3507,7 +3507,7 @@ bool SystemInformationImplementation::RetreiveInformationFromCpuInfoFile() this->ExtractValueFromCpuInfoFile(buffer, cachename[index]); if (!cacheSize.empty()) { pos = cacheSize.find(" KB"); - if (pos != cacheSize.npos) { + if (pos != std::string::npos) { cacheSize = cacheSize.substr(0, pos); } this->Features.L1CacheSize += atoi(cacheSize.c_str()); @@ -4586,10 +4586,10 @@ std::string SystemInformationImplementation::ExtractValueFromSysCtl( const char* word) { size_t pos = this->SysCtlBuffer.find(word); - if (pos != this->SysCtlBuffer.npos) { + if (pos != std::string::npos) { pos = this->SysCtlBuffer.find(": ", pos); size_t pos2 = this->SysCtlBuffer.find("\n", pos); - if (pos != this->SysCtlBuffer.npos && pos2 != this->SysCtlBuffer.npos) { + if (pos != std::string::npos && pos2 != std::string::npos) { return this->SysCtlBuffer.substr(pos + 2, pos2 - pos - 2); } } @@ -4661,14 +4661,14 @@ std::string SystemInformationImplementation::ParseValueFromKStat( args.push_back("-p"); std::string command = arguments; - size_t start = command.npos; + size_t start = std::string::npos; size_t pos = command.find(' ', 0); - while (pos != command.npos) { + while (pos != std::string::npos) { bool inQuotes = false; // Check if we are between quotes size_t b0 = command.find('"', 0); size_t b1 = command.find('"', b0 + 1); - while (b0 != command.npos && b1 != command.npos && b1 > b0) { + while (b0 != std::string::npos && b1 != std::string::npos && b1 > b0) { if (pos > b0 && pos < b1) { inQuotes = true; break; @@ -4682,7 +4682,7 @@ std::string SystemInformationImplementation::ParseValueFromKStat( // Remove the quotes if any size_t quotes = arg.find('"'); - while (quotes != arg.npos) { + while (quotes != std::string::npos) { arg.erase(quotes, 1); quotes = arg.find('"'); } @@ -4865,11 +4865,11 @@ bool SystemInformationImplementation::QueryQNXMemory() args.clear(); size_t pos = buffer.find("System RAM:"); - if (pos == buffer.npos) + if (pos == std::string::npos) return false; pos = buffer.find(":", pos); size_t pos2 = buffer.find("M (", pos); - if (pos2 == buffer.npos) + if (pos2 == std::string::npos) return false; pos++; @@ -4923,11 +4923,11 @@ bool SystemInformationImplementation::QueryQNXProcessor() args.clear(); size_t pos = buffer.find("Processor1:"); - if (pos == buffer.npos) + if (pos == std::string::npos) return false; size_t pos2 = buffer.find("MHz", pos); - if (pos2 == buffer.npos) + if (pos2 == std::string::npos) return false; size_t pos3 = pos2; @@ -4937,9 +4937,9 @@ bool SystemInformationImplementation::QueryQNXProcessor() this->CPUSpeedInMHz = atoi(buffer.substr(pos3 + 1, pos2 - pos3 - 1).c_str()); pos2 = buffer.find(" Stepping", pos); - if (pos2 != buffer.npos) { + if (pos2 != std::string::npos) { pos2 = buffer.find(" ", pos2 + 1); - if (pos2 != buffer.npos && pos2 < pos3) { + if (pos2 != std::string::npos && pos2 < pos3) { this->ChipID.Revision = atoi(buffer.substr(pos2 + 1, pos3 - pos2).c_str()); } @@ -4949,7 +4949,7 @@ bool SystemInformationImplementation::QueryQNXProcessor() do { pos = buffer.find("\nProcessor", pos + 1); ++this->NumberOfPhysicalCPU; - } while (pos != buffer.npos); + } while (pos != std::string::npos); this->NumberOfLogicalCPU = 1; return true; diff --git a/SystemTools.cxx b/SystemTools.cxx index 07da8dc..1c4fe33 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -554,7 +554,7 @@ bool SystemTools::HasEnv(const std::string& key) static int kwsysUnPutEnv(const std::string& env) { size_t pos = env.find('='); - if (pos != env.npos) { + if (pos != std::string::npos) { std::string name = env.substr(0, pos); unsetenv(name.c_str()); } else { @@ -570,7 +570,7 @@ static int kwsysUnPutEnv(const std::string& env) { int err = 0; size_t pos = env.find('='); - size_t const len = pos == env.npos ? env.size() : pos; + size_t const len = pos == std::string::npos ? env.size() : pos; size_t const sz = len + 1; char local_buf[256]; char* buf = sz > sizeof(local_buf) ? (char*)malloc(sz) : local_buf; @@ -604,7 +604,7 @@ static int kwsysUnPutEnv(std::string const& env) { std::wstring wEnv = Encoding::ToWide(env); size_t const pos = wEnv.find('='); - size_t const len = pos == wEnv.npos ? wEnv.size() : pos; + size_t const len = pos == std::string::npos ? wEnv.size() : pos; wEnv.resize(len + 1, L'='); wchar_t* newEnv = _wcsdup(wEnv.c_str()); if (!newEnv) { @@ -620,7 +620,7 @@ static int kwsysUnPutEnv(std::string const& env) static int kwsysUnPutEnv(const std::string& env) { size_t pos = env.find('='); - size_t const len = pos == env.npos ? env.size() : pos; + size_t const len = pos == std::string::npos ? env.size() : pos; int in = 0; int out = 0; while (environ[in]) { @@ -645,7 +645,7 @@ static int kwsysUnPutEnv(const std::string& env) bool SystemTools::PutEnv(const std::string& env) { size_t pos = env.find('='); - if (pos != env.npos) { + if (pos != std::string::npos) { std::string name = env.substr(0, pos); return setenv(name.c_str(), env.c_str() + pos + 1, 1) == 0; } else { @@ -1722,7 +1722,7 @@ std::string SystemTools::CropString(const std::string& s, size_t max_len) size_t middle = max_len / 2; n += s.substr(0, middle); - n += s.substr(s.size() - (max_len - middle), std::string::npos); + n += s.substr(s.size() - (max_len - middle)); if (max_len > 2) { n[middle] = '.'; @@ -1851,7 +1851,7 @@ static void ConvertVMSToUnix(std::string& path) { std::string::size_type rootEnd = path.find(":["); std::string::size_type pathEnd = path.find("]"); - if (rootEnd != path.npos) { + if (rootEnd != std::string::npos) { std::string root = path.substr(0, rootEnd); std::string pathPart = path.substr(rootEnd + 2, pathEnd - rootEnd - 2); const char* pathCString = pathPart.c_str(); @@ -4337,7 +4337,7 @@ bool SystemTools::GetPermissions(const std::string& file, mode_t& mode) mode |= S_IFREG; } size_t dotPos = file.rfind('.'); - const char* ext = dotPos == file.npos ? 0 : (file.c_str() + dotPos); + const char* ext = dotPos == std::string::npos ? 0 : (file.c_str() + dotPos); if (ext && (Strucmp(ext, ".exe") == 0 || Strucmp(ext, ".com") == 0 || Strucmp(ext, ".cmd") == 0 || Strucmp(ext, ".bat") == 0)) { mode |= (_S_IEXEC | (_S_IEXEC >> 3) | (_S_IEXEC >> 6)); diff --git a/testConsoleBuf.cxx b/testConsoleBuf.cxx index 21930f9..816a433 100644 --- a/testConsoleBuf.cxx +++ b/testConsoleBuf.cxx @@ -329,9 +329,8 @@ static int testPipe() throw std::runtime_error("ReadFile#3 failed!"); } buffer2[bytesRead] = 0; - didFail = - encodedTestString.compare(0, encodedTestString.npos, buffer2, - encodedTestString.size()) == 0 + didFail = encodedTestString.compare(0, std::string::npos, buffer2, + encodedTestString.size()) == 0 ? 0 : 1; } @@ -435,9 +434,8 @@ static int testFile() throw std::runtime_error("ReadFile#2 failed!"); } buffer2[bytesRead] = 0; - didFail = - encodedTestString.compare(0, encodedTestString.npos, buffer2, - encodedTestString.size()) == 0 + didFail = encodedTestString.compare(0, std::string::npos, buffer2, + encodedTestString.size()) == 0 ? 0 : 1; } ----------------------------------------------------------------------- Summary of changes: Source/CPack/cmCPackGenerator.cxx | 4 +- Source/CPack/cmCPackNSISGenerator.cxx | 4 +- Source/CTest/cmCTestBuildHandler.cxx | 4 +- Source/CTest/cmCTestCoverageHandler.cxx | 13 ++--- Source/CTest/cmCTestGIT.cxx | 4 +- Source/CTest/cmCTestMemCheckHandler.cxx | 4 +- Source/CTest/cmCTestRunTest.cxx | 3 +- Source/CTest/cmCTestSubmitHandler.cxx | 2 +- Source/CTest/cmCTestTestHandler.cxx | 12 ++--- Source/CTest/cmParseBlanketJSCoverage.cxx | 36 ++++++------- Source/CTest/cmParseDelphiCoverage.cxx | 78 +++++++++++++++-------------- Source/CTest/cmParseGTMCoverage.cxx | 4 +- Source/CursesDialog/cmCursesMainForm.cxx | 2 +- Source/cmAddCustomCommandCommand.cxx | 2 +- Source/cmAddCustomTargetCommand.cxx | 4 +- Source/cmCTest.cxx | 19 ++++--- Source/cmCacheManager.cxx | 4 +- Source/cmComputeLinkInformation.cxx | 4 +- Source/cmCoreTryCompile.cxx | 2 +- Source/cmDependsC.cxx | 4 +- Source/cmExportFileGenerator.cxx | 21 ++++---- Source/cmExportInstallFileGenerator.cxx | 3 +- Source/cmFindCommon.cxx | 2 +- Source/cmFindLibraryCommand.cxx | 2 +- Source/cmFindPackageCommand.cxx | 3 +- Source/cmFindPathCommand.cxx | 4 +- Source/cmGeneratorExpression.cxx | 6 +-- Source/cmGeneratorTarget.cxx | 6 +-- Source/cmGetFilenameComponentCommand.cxx | 6 +-- Source/cmGlobalGenerator.cxx | 4 +- Source/cmGlobalXCodeGenerator.cxx | 10 ++-- Source/cmIncludeDirectoryCommand.cxx | 2 +- Source/cmInstallCommand.cxx | 10 ++-- Source/cmLocalGenerator.cxx | 8 +-- Source/cmLocalUnixMakefileGenerator3.cxx | 26 +++++----- Source/cmMSVC60LinkLineComputer.cxx | 2 +- Source/cmMakefile.cxx | 9 ++-- Source/cmMakefileTargetGenerator.cxx | 4 +- Source/cmQtAutoGeneratorCommon.cxx | 2 +- Source/cmRST.cxx | 10 ++-- Source/cmRulePlaceholderExpander.cxx | 10 ++-- Source/cmSystemTools.cxx | 4 +- Source/cmTarget.cxx | 2 +- Source/cmXCodeObject.cxx | 4 +- Source/cmakexbuild.cxx | 5 +- Source/cmcmd.cxx | 26 +++++----- Source/kwsys/Directory.cxx | 2 +- Source/kwsys/EncodingCXX.cxx | 8 +-- Source/kwsys/SystemInformation.cxx | 40 +++++++-------- Source/kwsys/SystemTools.cxx | 16 +++--- Source/kwsys/testConsoleBuf.cxx | 10 ++-- 51 files changed, 243 insertions(+), 233 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 2 09:45:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 2 Jun 2017 09:45:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.8.2-1384-g3216c21 Message-ID: <20170602134502.BFD60E6F17@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 3216c2178cfcc75d48f383a76ccff4aa052b5fdc (commit) from 78d1a2d0bbda1798ffc71b11a181d376914bdc3c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3216c2178cfcc75d48f383a76ccff4aa052b5fdc commit 3216c2178cfcc75d48f383a76ccff4aa052b5fdc Merge: 78d1a2d 0d5a225 Author: Brad King AuthorDate: Fri Jun 2 09:34:49 2017 -0400 Commit: Brad King CommitDate: Fri Jun 2 09:34:49 2017 -0400 Merge branch 'release-3.8' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Sat Jun 3 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 3 Jun 2017 00:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.8.2-1385-g422c67e Message-ID: <20170603040504.82AF1FA0B8@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 422c67e4f76358e34b26ec4fa641a682f160a22f (commit) from 3216c2178cfcc75d48f383a76ccff4aa052b5fdc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=422c67e4f76358e34b26ec4fa641a682f160a22f commit 422c67e4f76358e34b26ec4fa641a682f160a22f Author: Kitware Robot AuthorDate: Sat Jun 3 00:01:05 2017 -0400 Commit: Kitware Robot CommitDate: Sat Jun 3 00:01:05 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 0555bd7..bd2737e 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 8) -set(CMake_VERSION_PATCH 20170602) +set(CMake_VERSION_PATCH 20170603) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Jun 4 00:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 4 Jun 2017 00:05:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.8.2-1386-g7ff29fb Message-ID: <20170604040508.3E56FFA9C2@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 7ff29fb37924038315870ffc8afa977e2538a12e (commit) from 422c67e4f76358e34b26ec4fa641a682f160a22f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ff29fb37924038315870ffc8afa977e2538a12e commit 7ff29fb37924038315870ffc8afa977e2538a12e Author: Kitware Robot AuthorDate: Sun Jun 4 00:01:04 2017 -0400 Commit: Kitware Robot CommitDate: Sun Jun 4 00:01:04 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index bd2737e..1ce9dfb 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 8) -set(CMake_VERSION_PATCH 20170603) +set(CMake_VERSION_PATCH 20170604) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 5 00:05:11 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 5 Jun 2017 00:05:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.8.2-1387-g1fa1653 Message-ID: <20170605040511.88C83FAB57@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 1fa165359fd7ed3989b1a8350726038a55deab5c (commit) from 7ff29fb37924038315870ffc8afa977e2538a12e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1fa165359fd7ed3989b1a8350726038a55deab5c commit 1fa165359fd7ed3989b1a8350726038a55deab5c Author: Kitware Robot AuthorDate: Mon Jun 5 00:01:03 2017 -0400 Commit: Kitware Robot CommitDate: Mon Jun 5 00:01:03 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 1ce9dfb..8983057 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 8) -set(CMake_VERSION_PATCH 20170604) +set(CMake_VERSION_PATCH 20170605) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 5 09:45:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 5 Jun 2017 09:45:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.8.2-1396-gc6ea3f0 Message-ID: <20170605134509.78578F3BBB@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via c6ea3f01c3e78145b8fd3dd534d8803d8f7e7bd7 (commit) via 8a68a2ceb355621da21983c2571ead15d2b98dea (commit) via 00639f2d5d41bb44f6ead5165b249bcd9e2b95b3 (commit) via 5875140c57bc3160970d640070ae1e9ab19111db (commit) via b1ec5deaf15be459658b8fb0392e4d4a4ec1a0dd (commit) via 8d7b3ef5d42c07dffe1f84af14b0055d288e4376 (commit) via 0068224fdd7569f02dffe9fd8de2e6ce0c7abc28 (commit) via 913736f17dfb2e51423861c9a74be3a9be3211c8 (commit) via f59d729c7cb03babafac0cee792b9a3127e51d4d (commit) from 1fa165359fd7ed3989b1a8350726038a55deab5c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c6ea3f01c3e78145b8fd3dd534d8803d8f7e7bd7 commit c6ea3f01c3e78145b8fd3dd534d8803d8f7e7bd7 Merge: 8a68a2c b1ec5de Author: Brad King AuthorDate: Mon Jun 5 13:44:21 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 5 09:44:24 2017 -0400 Merge topic 'lint-function-args' b1ec5dea Pass large types by const&, small types by value Acked-by: Kitware Robot Merge-request: !927 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8a68a2ceb355621da21983c2571ead15d2b98dea commit 8a68a2ceb355621da21983c2571ead15d2b98dea Merge: 00639f2 8d7b3ef Author: Brad King AuthorDate: Mon Jun 5 13:43:47 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 5 09:43:51 2017 -0400 Merge topic 'cm_fallthrough' 8d7b3ef5 Provide and use CM_FALLTHROUGH 0068224f C++ feature checks: check output for '[Ww]arning' Acked-by: Kitware Robot Merge-request: !924 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=00639f2d5d41bb44f6ead5165b249bcd9e2b95b3 commit 00639f2d5d41bb44f6ead5165b249bcd9e2b95b3 Merge: 5875140 913736f Author: Brad King AuthorDate: Mon Jun 5 13:41:05 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 5 09:42:36 2017 -0400 Merge topic 'test-GNUInstallDirs-FreeBSD' 913736f1 Tests: Fix RunCMake.GNUInstallDirs on BSD platforms Acked-by: Kitware Robot Merge-request: !921 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5875140c57bc3160970d640070ae1e9ab19111db commit 5875140c57bc3160970d640070ae1e9ab19111db Merge: 1fa1653 f59d729 Author: Brad King AuthorDate: Mon Jun 5 13:40:58 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 5 09:41:53 2017 -0400 Merge topic 'display-ctest-disabled' f59d729c ctest: Display disabled status when ctest -N is called Acked-by: Kitware Robot Reviewed-by: Craig Scott Merge-request: !923 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b1ec5deaf15be459658b8fb0392e4d4a4ec1a0dd commit b1ec5deaf15be459658b8fb0392e4d4a4ec1a0dd Author: Daniel Pfeifer AuthorDate: Fri Jun 2 21:01:01 2017 +0200 Commit: Daniel Pfeifer CommitDate: Sun Jun 4 00:48:21 2017 +0200 Pass large types by const&, small types by value diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 224cf47..0b025ab 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -205,8 +205,7 @@ bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey, return false; } -void cmCacheManager::WritePropertyEntries(std::ostream& os, - CacheIterator const& i) +void cmCacheManager::WritePropertyEntries(std::ostream& os, CacheIterator i) { for (const char** p = this->PersistentProperties; *p; ++p) { if (const char* value = i.GetProperty(*p)) { diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h index a72d6cb..c464311 100644 --- a/Source/cmCacheManager.h +++ b/Source/cmCacheManager.h @@ -228,7 +228,7 @@ private: static const char* PersistentProperties[]; bool ReadPropertyEntry(std::string const& key, CacheEntry& e); - void WritePropertyEntries(std::ostream& os, CacheIterator const& i); + void WritePropertyEntries(std::ostream& os, CacheIterator i); CacheEntryMap Cache; // Only cmake and cmState should be able to add cache values diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 3e2cf18..9c516ee 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -333,7 +333,7 @@ int cmComputeLinkDepends::AddLinkEntry(cmLinkItem const& item) return index; } -void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe) +void cmComputeLinkDepends::FollowLinkEntry(BFSEntry qe) { // Get this entry representation. int depender_index = qe.Index; diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index 195b544..84ee916 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -93,7 +93,7 @@ private: const char* LibDepends; }; std::queue BFSQueue; - void FollowLinkEntry(BFSEntry const&); + void FollowLinkEntry(BFSEntry qe); // Shared libraries that are included only because they are // dependencies of other shared libraries, not because they are part diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx index f530ba7..7fbe75c 100644 --- a/Source/cmDynamicLoader.cxx +++ b/Source/cmDynamicLoader.cxx @@ -10,8 +10,7 @@ class cmDynamicLoaderCache { public: ~cmDynamicLoaderCache(); - void CacheFile(const char* path, - const cmsys::DynamicLoader::LibraryHandle& /*p*/); + void CacheFile(const char* path, cmsys::DynamicLoader::LibraryHandle /*p*/); bool GetCacheFile(const char* path, cmsys::DynamicLoader::LibraryHandle& /*p*/); bool FlushCache(const char* path); @@ -29,8 +28,8 @@ cmDynamicLoaderCache::~cmDynamicLoaderCache() { } -void cmDynamicLoaderCache::CacheFile( - const char* path, const cmsys::DynamicLoader::LibraryHandle& p) +void cmDynamicLoaderCache::CacheFile(const char* path, + cmsys::DynamicLoader::LibraryHandle p) { cmsys::DynamicLoader::LibraryHandle h; if (this->GetCacheFile(path, h)) { diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index d23abec..fc97bf3 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -53,17 +53,17 @@ template struct cmELFByteSwapSize { }; -void cmELFByteSwap(char* /*unused*/, cmELFByteSwapSize<1> const& /*unused*/) +void cmELFByteSwap(char* /*unused*/, cmELFByteSwapSize<1> /*unused*/) { } -void cmELFByteSwap(char* data, cmELFByteSwapSize<2> const& /*unused*/) +void cmELFByteSwap(char* data, cmELFByteSwapSize<2> /*unused*/) { char one_byte; one_byte = data[0]; data[0] = data[1]; data[1] = one_byte; } -void cmELFByteSwap(char* data, cmELFByteSwapSize<4> const& /*unused*/) +void cmELFByteSwap(char* data, cmELFByteSwapSize<4> /*unused*/) { char one_byte; one_byte = data[0]; @@ -73,7 +73,7 @@ void cmELFByteSwap(char* data, cmELFByteSwapSize<4> const& /*unused*/) data[1] = data[2]; data[2] = one_byte; } -void cmELFByteSwap(char* data, cmELFByteSwapSize<8> const& /*unused*/) +void cmELFByteSwap(char* data, cmELFByteSwapSize<8> /*unused*/) { char one_byte; one_byte = data[0]; diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 32a539c..77b0d13 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -1121,9 +1121,9 @@ protected: bool InstallSymlink(const char* fromFile, const char* toFile); bool InstallFile(const char* fromFile, const char* toFile, - MatchProperties const& match_properties); + MatchProperties match_properties); bool InstallDirectory(const char* source, const char* destination, - MatchProperties const& match_properties); + MatchProperties match_properties); virtual bool Install(const char* fromFile, const char* toFile); virtual std::string const& ToName(std::string const& fromName) { @@ -1542,7 +1542,7 @@ bool cmFileCopier::InstallSymlink(const char* fromFile, const char* toFile) } bool cmFileCopier::InstallFile(const char* fromFile, const char* toFile, - MatchProperties const& match_properties) + MatchProperties match_properties) { // Determine whether we will copy the file. bool copy = true; @@ -1596,7 +1596,7 @@ bool cmFileCopier::InstallFile(const char* fromFile, const char* toFile, bool cmFileCopier::InstallDirectory(const char* source, const char* destination, - MatchProperties const& match_properties) + MatchProperties match_properties) { // Inform the user about this directory installation. this->ReportCopy(destination, TypeDir, diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx index ea031cf..9327c18 100644 --- a/Source/cmFindProgramCommand.cxx +++ b/Source/cmFindProgramCommand.cxx @@ -212,7 +212,8 @@ std::string cmFindProgramCommand::FindAppBundle() return ""; } -std::string cmFindProgramCommand::GetBundleExecutable(std::string bundlePath) +std::string cmFindProgramCommand::GetBundleExecutable( + std::string const& bundlePath) { std::string executable; (void)bundlePath; diff --git a/Source/cmFindProgramCommand.h b/Source/cmFindProgramCommand.h index a0d6af9..b0cd420 100644 --- a/Source/cmFindProgramCommand.h +++ b/Source/cmFindProgramCommand.h @@ -43,7 +43,7 @@ private: std::string FindNormalProgramDirsPerName(); std::string FindNormalProgramNamesPerDir(); std::string FindAppBundle(); - std::string GetBundleExecutable(std::string bundlePath); + std::string GetBundleExecutable(std::string const& bundlePath); }; #endif diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 9a33bec..24decea 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -76,7 +76,7 @@ public: cmLinkImplItem cmGeneratorTarget::TargetPropertyEntry::NoLinkImplItem; void CreatePropertyGeneratorExpressions( - cmStringRange const& entries, cmBacktraceRange const& backtraces, + cmStringRange entries, cmBacktraceRange backtraces, std::vector& items, bool evaluateForBuildsystem = false) { diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 67e272d..b32f4e4 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1482,13 +1482,13 @@ cmGlobalGenerator::CreateQtAutoGeneratorsTargets() } cmLinkLineComputer* cmGlobalGenerator::CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmStateDirectory stateDir) const + cmOutputConverter* outputConverter, cmStateDirectory const& stateDir) const { return new cmLinkLineComputer(outputConverter, stateDir); } cmLinkLineComputer* cmGlobalGenerator::CreateMSVC60LinkLineComputer( - cmOutputConverter* outputConverter, cmStateDirectory stateDir) const + cmOutputConverter* outputConverter, cmStateDirectory const& stateDir) const { return new cmMSVC60LinkLineComputer(outputConverter, stateDir); } diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index cc7ffed..871178b 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -105,10 +105,12 @@ public: virtual void Generate(); virtual cmLinkLineComputer* CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmStateDirectory stateDir) const; + cmOutputConverter* outputConverter, + cmStateDirectory const& stateDir) const; cmLinkLineComputer* CreateMSVC60LinkLineComputer( - cmOutputConverter* outputConverter, cmStateDirectory stateDir) const; + cmOutputConverter* outputConverter, + cmStateDirectory const& stateDir) const; /** * Set/Get and Clear the enabled languages. diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index bb0b83a..2eef9e4 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -77,7 +77,8 @@ void cmGlobalNinjaGenerator::WriteComment(std::ostream& os, } cmLinkLineComputer* cmGlobalNinjaGenerator::CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmStateDirectory /* stateDir */) const + cmOutputConverter* outputConverter, + cmStateDirectory const& /* stateDir */) const { return new cmNinjaLinkLineComputer( outputConverter, diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 41c5175..b0008f7 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -78,7 +78,7 @@ public: cmLinkLineComputer* CreateLinkLineComputer( cmOutputConverter* outputConverter, - cmStateDirectory stateDir) const CM_OVERRIDE; + cmStateDirectory const& stateDir) const CM_OVERRIDE; /** * Write the given @a comment to the output stream @a os. It diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx index 120d1b3..13b588e 100644 --- a/Source/cmInstallGenerator.cxx +++ b/Source/cmInstallGenerator.cxx @@ -27,7 +27,7 @@ void cmInstallGenerator::AddInstallRule( std::vector const& files, bool optional /* = false */, const char* permissions_file /* = 0 */, const char* permissions_dir /* = 0 */, const char* rename /* = 0 */, - const char* literal_args /* = 0 */, Indent const& indent) + const char* literal_args /* = 0 */, Indent indent) { // Use the FILE command to install the file. std::string stype; diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h index de19f98..8f8701f 100644 --- a/Source/cmInstallGenerator.h +++ b/Source/cmInstallGenerator.h @@ -43,7 +43,7 @@ public: std::vector const& files, bool optional = false, const char* permissions_file = CM_NULLPTR, const char* permissions_dir = CM_NULLPTR, const char* rename = CM_NULLPTR, - const char* literal_args = CM_NULLPTR, Indent const& indent = Indent()); + const char* literal_args = CM_NULLPTR, Indent indent = Indent()); /** Get the install destination as it should appear in the installation script. */ diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index e728632..c0f702e 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -13,7 +13,7 @@ #include "cmStateTypes.h" cmLinkLineComputer::cmLinkLineComputer(cmOutputConverter* outputConverter, - cmStateDirectory stateDir) + cmStateDirectory const& stateDir) : StateDir(stateDir) , OutputConverter(outputConverter) , ForResponse(false) diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h index 27b8adb..d33e8d1 100644 --- a/Source/cmLinkLineComputer.h +++ b/Source/cmLinkLineComputer.h @@ -20,7 +20,7 @@ class cmLinkLineComputer public: cmLinkLineComputer(cmOutputConverter* outputConverter, - cmStateDirectory stateDir); + cmStateDirectory const& stateDir); virtual ~cmLinkLineComputer(); void SetUseWatcomQuote(bool useWatcomQuote); diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx index bf30b39..942e9b9 100644 --- a/Source/cmLinkLineDeviceComputer.cxx +++ b/Source/cmLinkLineDeviceComputer.cxx @@ -10,13 +10,12 @@ #include "cmComputeLinkInformation.h" #include "cmGeneratorTarget.h" #include "cmGlobalNinjaGenerator.h" -#include "cmStateDirectory.h" #include "cmStateTypes.h" class cmOutputConverter; cmLinkLineDeviceComputer::cmLinkLineDeviceComputer( - cmOutputConverter* outputConverter, cmStateDirectory stateDir) + cmOutputConverter* outputConverter, cmStateDirectory const& stateDir) : cmLinkLineComputer(outputConverter, stateDir) { } @@ -89,7 +88,7 @@ std::string cmLinkLineDeviceComputer::GetLinkerLanguage(cmGeneratorTarget*, } cmNinjaLinkLineDeviceComputer::cmNinjaLinkLineDeviceComputer( - cmOutputConverter* outputConverter, cmStateDirectory stateDir, + cmOutputConverter* outputConverter, cmStateDirectory const& stateDir, cmGlobalNinjaGenerator const* gg) : cmLinkLineDeviceComputer(outputConverter, stateDir) , GG(gg) diff --git a/Source/cmLinkLineDeviceComputer.h b/Source/cmLinkLineDeviceComputer.h index e9e98ac..c3fac61 100644 --- a/Source/cmLinkLineDeviceComputer.h +++ b/Source/cmLinkLineDeviceComputer.h @@ -22,7 +22,7 @@ class cmLinkLineDeviceComputer : public cmLinkLineComputer public: cmLinkLineDeviceComputer(cmOutputConverter* outputConverter, - cmStateDirectory stateDir); + cmStateDirectory const& stateDir); ~cmLinkLineDeviceComputer() CM_OVERRIDE; std::string ComputeLinkLibraries(cmComputeLinkInformation& cli, @@ -39,7 +39,7 @@ class cmNinjaLinkLineDeviceComputer : public cmLinkLineDeviceComputer public: cmNinjaLinkLineDeviceComputer(cmOutputConverter* outputConverter, - cmStateDirectory stateDir, + cmStateDirectory const& stateDir, cmGlobalNinjaGenerator const* gg); std::string ConvertToLinkReference(std::string const& input) const diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx index 929b1cd..0c73cd7 100644 --- a/Source/cmListFileCache.cxx +++ b/Source/cmListFileCache.cxx @@ -307,7 +307,8 @@ struct cmListFileBacktrace::Entry : public cmListFileContext unsigned int RefCount; }; -cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot bottom, Entry* up, +cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot const& bottom, + Entry* up, cmListFileContext const& lfc) : Bottom(bottom) , Cur(new Entry(lfc, up)) @@ -316,7 +317,8 @@ cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot bottom, Entry* up, this->Cur->Ref(); } -cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot bottom, Entry* cur) +cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot const& bottom, + Entry* cur) : Bottom(bottom) , Cur(cur) { @@ -332,7 +334,7 @@ cmListFileBacktrace::cmListFileBacktrace() { } -cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot snapshot) +cmListFileBacktrace::cmListFileBacktrace(cmStateSnapshot const& snapshot) : Bottom(snapshot.GetCallStackBottom()) , Cur(CM_NULLPTR) { diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index aa11ba7..349ddef 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -107,7 +107,7 @@ public: // Construct an empty backtrace whose bottom sits in the directory // indicated by the given valid snapshot. - cmListFileBacktrace(cmStateSnapshot snapshot); + cmListFileBacktrace(cmStateSnapshot const& snapshot); // Backtraces may be copied and assigned as values. cmListFileBacktrace(cmListFileBacktrace const& r); @@ -143,9 +143,9 @@ private: cmStateSnapshot Bottom; Entry* Cur; - cmListFileBacktrace(cmStateSnapshot bottom, Entry* up, + cmListFileBacktrace(cmStateSnapshot const& bottom, Entry* up, cmListFileContext const& lfc); - cmListFileBacktrace(cmStateSnapshot bottom, Entry* cur); + cmListFileBacktrace(cmStateSnapshot const& bottom, Entry* cur); }; struct cmListFile diff --git a/Source/cmMSVC60LinkLineComputer.cxx b/Source/cmMSVC60LinkLineComputer.cxx index b5e8511..5298d1a 100644 --- a/Source/cmMSVC60LinkLineComputer.cxx +++ b/Source/cmMSVC60LinkLineComputer.cxx @@ -3,8 +3,6 @@ #include "cmMSVC60LinkLineComputer.h" -#include "cmStateDirectory.h" - #if defined(_WIN32) && !defined(__CYGWIN__) #include "cmSystemTools.h" #endif @@ -12,7 +10,7 @@ class cmOutputConverter; cmMSVC60LinkLineComputer::cmMSVC60LinkLineComputer( - cmOutputConverter* outputConverter, cmStateDirectory stateDir) + cmOutputConverter* outputConverter, cmStateDirectory const& stateDir) : cmLinkLineComputer(outputConverter, stateDir) { } diff --git a/Source/cmMSVC60LinkLineComputer.h b/Source/cmMSVC60LinkLineComputer.h index e494060..f2892d5 100644 --- a/Source/cmMSVC60LinkLineComputer.h +++ b/Source/cmMSVC60LinkLineComputer.h @@ -19,7 +19,7 @@ class cmMSVC60LinkLineComputer : public cmLinkLineComputer public: cmMSVC60LinkLineComputer(cmOutputConverter* outputConverter, - cmStateDirectory stateDir); + cmStateDirectory const& stateDir); std::string ConvertToLinkReference(std::string const& input) const CM_OVERRIDE; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 51d8980..11814b0 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3463,7 +3463,7 @@ void cmMakefile::ConfigureString(const std::string& input, std::string& output, int cmMakefile::ConfigureFile(const char* infile, const char* outfile, bool copyonly, bool atOnly, bool escapeQuotes, - const cmNewLineStyle& newLine) + cmNewLineStyle newLine) { int res = 1; if (!this->CanIWriteThisFile(outfile)) { diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 6dc30ce..e65ba46 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -548,7 +548,7 @@ public: */ int ConfigureFile(const char* infile, const char* outfile, bool copyonly, bool atOnly, bool escapeQuotes, - const cmNewLineStyle& = cmNewLineStyle()); + cmNewLineStyle = cmNewLineStyle()); #if defined(CMAKE_BUILD_WITH_CMAKE) /** diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 1aeeb7d..a4511b6 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1255,7 +1255,7 @@ class cmMakefileTargetGeneratorObjectStrings public: cmMakefileTargetGeneratorObjectStrings(std::vector& strings, cmOutputConverter* outputConverter, - cmStateDirectory stateDir, + cmStateDirectory const& stateDir, std::string::size_type limit) : Strings(strings) , OutputConverter(outputConverter) @@ -1574,7 +1574,7 @@ std::string cmMakefileTargetGenerator::CreateResponseFile( } cmLinkLineComputer* cmMakefileTargetGenerator::CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmStateDirectory stateDir) + cmOutputConverter* outputConverter, cmStateDirectory const& stateDir) { if (this->Makefile->IsOn("MSVC60")) { return this->GlobalGenerator->CreateMSVC60LinkLineComputer(outputConverter, diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 32b1fee..92c9f60 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -143,7 +143,7 @@ protected: std::vector& makefile_depends); cmLinkLineComputer* CreateLinkLineComputer( - cmOutputConverter* outputConverter, cmStateDirectory stateDir); + cmOutputConverter* outputConverter, cmStateDirectory const& stateDir); /** Create a response file with the given set of options. Returns the relative path from the target build working directory to the diff --git a/Source/cmNinjaLinkLineComputer.cxx b/Source/cmNinjaLinkLineComputer.cxx index 2546b55..7fbeeea 100644 --- a/Source/cmNinjaLinkLineComputer.cxx +++ b/Source/cmNinjaLinkLineComputer.cxx @@ -4,12 +4,11 @@ #include "cmNinjaLinkLineComputer.h" #include "cmGlobalNinjaGenerator.h" -#include "cmStateDirectory.h" class cmOutputConverter; cmNinjaLinkLineComputer::cmNinjaLinkLineComputer( - cmOutputConverter* outputConverter, cmStateDirectory stateDir, + cmOutputConverter* outputConverter, cmStateDirectory const& stateDir, cmGlobalNinjaGenerator const* gg) : cmLinkLineComputer(outputConverter, stateDir) , GG(gg) diff --git a/Source/cmNinjaLinkLineComputer.h b/Source/cmNinjaLinkLineComputer.h index e612e88..13f05a8 100644 --- a/Source/cmNinjaLinkLineComputer.h +++ b/Source/cmNinjaLinkLineComputer.h @@ -20,7 +20,7 @@ class cmNinjaLinkLineComputer : public cmLinkLineComputer public: cmNinjaLinkLineComputer(cmOutputConverter* outputConverter, - cmStateDirectory stateDir, + cmStateDirectory const& stateDir, cmGlobalNinjaGenerator const* gg); std::string ConvertToLinkReference(std::string const& input) const diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx index d48eb53..333e313 100644 --- a/Source/cmOrderDirectories.cxx +++ b/Source/cmOrderDirectories.cxx @@ -424,7 +424,7 @@ struct cmOrderDirectoriesCompare // The conflict pair is unique based on just the directory // (first). The second element is only used for displaying // information about why the entry is present. - bool operator()(ConflictPair const& l, ConflictPair const& r) + bool operator()(ConflictPair l, ConflictPair r) { return l.first == r.first; } diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index d6864a6..14c986d 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -14,7 +14,7 @@ #include "cmStateDirectory.h" #include "cmSystemTools.h" -cmOutputConverter::cmOutputConverter(cmStateSnapshot snapshot) +cmOutputConverter::cmOutputConverter(cmStateSnapshot const& snapshot) : StateSnapshot(snapshot) , LinkScriptShell(false) { @@ -81,7 +81,7 @@ static bool cmOutputConverterNotAbove(const char* a, const char* b) bool cmOutputConverter::ContainedInDirectory(std::string const& local_path, std::string const& remote_path, - cmStateDirectory directory) + cmStateDirectory const& directory) { const std::string relativePathTopBinary = directory.GetRelativePathTopBinary(); diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 12a1773..ae15055 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -15,7 +15,7 @@ class cmStateDirectory; class cmOutputConverter { public: - cmOutputConverter(cmStateSnapshot snapshot); + cmOutputConverter(cmStateSnapshot const& snapshot); enum OutputFormat { @@ -94,7 +94,7 @@ public: static bool ContainedInDirectory(std::string const& local_path, std::string const& remote_path, - cmStateDirectory directory); + cmStateDirectory const& directory); /** * Convert the given remote path to a relative path with respect to diff --git a/Source/cmState.cxx b/Source/cmState.cxx index ce9f470..92e47f7 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -633,7 +633,7 @@ cmStateSnapshot cmState::CreateBaseSnapshot() } cmStateSnapshot cmState::CreateBuildsystemDirectorySnapshot( - cmStateSnapshot originSnapshot) + cmStateSnapshot const& originSnapshot) { assert(originSnapshot.IsValid()); cmStateDetail::PositionType pos = @@ -667,7 +667,7 @@ cmStateSnapshot cmState::CreateBuildsystemDirectorySnapshot( } cmStateSnapshot cmState::CreateFunctionCallSnapshot( - cmStateSnapshot originSnapshot, std::string const& fileName) + cmStateSnapshot const& originSnapshot, std::string const& fileName) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -686,7 +686,7 @@ cmStateSnapshot cmState::CreateFunctionCallSnapshot( } cmStateSnapshot cmState::CreateMacroCallSnapshot( - cmStateSnapshot originSnapshot, std::string const& fileName) + cmStateSnapshot const& originSnapshot, std::string const& fileName) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -701,7 +701,7 @@ cmStateSnapshot cmState::CreateMacroCallSnapshot( } cmStateSnapshot cmState::CreateIncludeFileSnapshot( - cmStateSnapshot originSnapshot, const std::string& fileName) + cmStateSnapshot const& originSnapshot, std::string const& fileName) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -716,7 +716,7 @@ cmStateSnapshot cmState::CreateIncludeFileSnapshot( } cmStateSnapshot cmState::CreateVariableScopeSnapshot( - cmStateSnapshot originSnapshot) + cmStateSnapshot const& originSnapshot) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -734,7 +734,7 @@ cmStateSnapshot cmState::CreateVariableScopeSnapshot( } cmStateSnapshot cmState::CreateInlineListFileSnapshot( - cmStateSnapshot originSnapshot, const std::string& fileName) + cmStateSnapshot const& originSnapshot, std::string const& fileName) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -748,7 +748,7 @@ cmStateSnapshot cmState::CreateInlineListFileSnapshot( } cmStateSnapshot cmState::CreatePolicyScopeSnapshot( - cmStateSnapshot originSnapshot) + cmStateSnapshot const& originSnapshot) { cmStateDetail::PositionType pos = this->SnapshotData.Push(originSnapshot.Position, *originSnapshot.Position); @@ -759,7 +759,7 @@ cmStateSnapshot cmState::CreatePolicyScopeSnapshot( return cmStateSnapshot(this, pos); } -cmStateSnapshot cmState::Pop(cmStateSnapshot originSnapshot) +cmStateSnapshot cmState::Pop(cmStateSnapshot const& originSnapshot) { cmStateDetail::PositionType pos = originSnapshot.Position; cmStateDetail::PositionType prevPos = pos; diff --git a/Source/cmState.h b/Source/cmState.h index 1a5738f..e03ad89 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -36,18 +36,20 @@ public: cmStateSnapshot CreateBaseSnapshot(); cmStateSnapshot CreateBuildsystemDirectorySnapshot( - cmStateSnapshot originSnapshot); - cmStateSnapshot CreateFunctionCallSnapshot(cmStateSnapshot originSnapshot, - std::string const& fileName); - cmStateSnapshot CreateMacroCallSnapshot(cmStateSnapshot originSnapshot, - std::string const& fileName); - cmStateSnapshot CreateIncludeFileSnapshot(cmStateSnapshot originSnapshot, - std::string const& fileName); - cmStateSnapshot CreateVariableScopeSnapshot(cmStateSnapshot originSnapshot); - cmStateSnapshot CreateInlineListFileSnapshot(cmStateSnapshot originSnapshot, - std::string const& fileName); - cmStateSnapshot CreatePolicyScopeSnapshot(cmStateSnapshot originSnapshot); - cmStateSnapshot Pop(cmStateSnapshot originSnapshot); + cmStateSnapshot const& originSnapshot); + cmStateSnapshot CreateFunctionCallSnapshot( + cmStateSnapshot const& originSnapshot, std::string const& fileName); + cmStateSnapshot CreateMacroCallSnapshot( + cmStateSnapshot const& originSnapshot, std::string const& fileName); + cmStateSnapshot CreateIncludeFileSnapshot( + cmStateSnapshot const& originSnapshot, std::string const& fileName); + cmStateSnapshot CreateVariableScopeSnapshot( + cmStateSnapshot const& originSnapshot); + cmStateSnapshot CreateInlineListFileSnapshot( + cmStateSnapshot const& originSnapshot, std::string const& fileName); + cmStateSnapshot CreatePolicyScopeSnapshot( + cmStateSnapshot const& originSnapshot); + cmStateSnapshot Pop(cmStateSnapshot const& originSnapshot); static cmStateEnums::CacheEntryType StringToCacheEntryType(const char*); static const char* CacheEntryTypeToString(cmStateEnums::CacheEntryType); diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx index d2c9d73..77413c7 100644 --- a/Source/cmStateSnapshot.cxx +++ b/Source/cmStateSnapshot.cxx @@ -125,7 +125,7 @@ cmStateSnapshot cmStateSnapshot::GetCallStackBottom() const return cmStateSnapshot(this->State, pos); } -void cmStateSnapshot::PushPolicy(cmPolicies::PolicyMap entry, bool weak) +void cmStateSnapshot::PushPolicy(cmPolicies::PolicyMap const& entry, bool weak) { cmStateDetail::PositionType pos = this->Position; pos->Policies = this->State->PolicyStack.Push( diff --git a/Source/cmStateSnapshot.h b/Source/cmStateSnapshot.h index 2e82ef4..6293803 100644 --- a/Source/cmStateSnapshot.h +++ b/Source/cmStateSnapshot.h @@ -45,7 +45,7 @@ public: void SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); cmPolicies::PolicyStatus GetPolicy(cmPolicies::PolicyID id) const; bool HasDefinedPolicyCMP0011(); - void PushPolicy(cmPolicies::PolicyMap entry, bool weak); + void PushPolicy(cmPolicies::PolicyMap const& entry, bool weak); bool PopPolicy(); bool CanPopPolicyScope(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d7b3ef5d42c07dffe1f84af14b0055d288e4376 commit 8d7b3ef5d42c07dffe1f84af14b0055d288e4376 Author: Daniel Pfeifer AuthorDate: Fri Jun 2 20:32:58 2017 +0200 Commit: Daniel Pfeifer CommitDate: Sat Jun 3 08:38:51 2017 +0200 Provide and use CM_FALLTHROUGH diff --git a/Source/Checks/cm_cxx_attribute_fallthrough.cxx b/Source/Checks/cm_cxx_attribute_fallthrough.cxx new file mode 100644 index 0000000..df43625 --- /dev/null +++ b/Source/Checks/cm_cxx_attribute_fallthrough.cxx @@ -0,0 +1,11 @@ +int main(int argc, char* argv[]) +{ + int i = 3; + switch (argc) { + case 1: + i = 0; + __attribute__((fallthrough)); + default: + return i; + } +} diff --git a/Source/Checks/cm_cxx_fallthrough.cxx b/Source/Checks/cm_cxx_fallthrough.cxx new file mode 100644 index 0000000..7b35a5f --- /dev/null +++ b/Source/Checks/cm_cxx_fallthrough.cxx @@ -0,0 +1,11 @@ +int main(int argc, char* argv[]) +{ + int i = 3; + switch (argc) { + case 1: + i = 0; + [[fallthrough]]; + default: + return i; + } +} diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake index 76c823c..c3835c3 100644 --- a/Source/Checks/cm_cxx_features.cmake +++ b/Source/Checks/cm_cxx_features.cmake @@ -38,6 +38,13 @@ endfunction() cm_check_cxx_feature(auto_ptr) cm_check_cxx_feature(eq_delete) +cm_check_cxx_feature(fallthrough) +if(NOT CMake_HAVE_CXX_FALLTHROUGH) + cm_check_cxx_feature(gnu_fallthrough) + if(NOT CMake_HAVE_CXX_GNU_FALLTHROUGH) + cm_check_cxx_feature(attribute_fallthrough) + endif() +endif() cm_check_cxx_feature(make_unique) if(CMake_HAVE_CXX_MAKE_UNIQUE) set(CMake_HAVE_CXX_UNIQUE_PTR 1) diff --git a/Source/Checks/cm_cxx_gnu_fallthrough.cxx b/Source/Checks/cm_cxx_gnu_fallthrough.cxx new file mode 100644 index 0000000..6021094 --- /dev/null +++ b/Source/Checks/cm_cxx_gnu_fallthrough.cxx @@ -0,0 +1,11 @@ +int main(int argc, char* argv[]) +{ + int i = 3; + switch (argc) { + case 1: + i = 0; + [[gnu::fallthrough]]; + default: + return i; + } +} diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index bcfbfbe..2bacf73 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -285,12 +285,12 @@ bool cmConditionEvaluator::GetBooleanValueWithAutoDereference( bool oldResult = this->GetBooleanValueOld(newArg, oneArg); if (newResult != oldResult) { switch (this->Policy12Status) { - case cmPolicies::WARN: { + case cmPolicies::WARN: errorString = "An argument named \"" + newArg.GetValue() + "\" appears in a conditional statement. " + cmPolicies::GetPolicyWarning(cmPolicies::CMP0012); status = cmake::AUTHOR_WARNING; - } + CM_FALLTHROUGH; case cmPolicies::OLD: return oldResult; case cmPolicies::REQUIRED_IF_USED: diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index 970fde5..524fdf8 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -22,6 +22,9 @@ #cmakedefine CMAKE_USE_LIBUV #cmakedefine CMake_HAVE_CXX_AUTO_PTR #cmakedefine CMake_HAVE_CXX_EQ_DELETE +#cmakedefine CMake_HAVE_CXX_FALLTHROUGH +#cmakedefine CMake_HAVE_CXX_GNU_FALLTHROUGH +#cmakedefine CMake_HAVE_CXX_ATTRIBUTE_FALLTHROUGH #cmakedefine CMake_HAVE_CXX_MAKE_UNIQUE #cmakedefine CMake_HAVE_CXX_NULLPTR #cmakedefine CMake_HAVE_CXX_OVERRIDE @@ -37,6 +40,16 @@ #define CM_EQ_DELETE #endif +#if defined(CMake_HAVE_CXX_FALLTHROUGH) +#define CM_FALLTHROUGH [[fallthrough]] +#elif defined(CMake_HAVE_CXX_GNU_FALLTHROUGH) +#define CM_FALLTHROUGH [[gnu::fallthrough]] +elif defined(CMake_HAVE_CXX_ATTRIBUTE_FALLTHROUGH) +#define CM_FALLTHROUGH __attribute__((fallthrough)) +#else +#define CM_FALLTHROUGH +#endif + #ifdef CMake_HAVE_CXX_NULLPTR #define CM_NULLPTR nullptr #else diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index c461739..9a4abf3 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -219,6 +219,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv, if (tgt->IsExecutableWithExports()) { break; } + CM_FALLTHROUGH; default: this->Makefile->IssueMessage( cmake::FATAL_ERROR, @@ -516,6 +517,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv, this->Makefile->IssueMessage( cmake::FATAL_ERROR, cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0066)); + CM_FALLTHROUGH; case cmPolicies::NEW: { // NEW behavior is to pass config-specific compiler flags. static std::string const cfgDefault = "DEBUG"; @@ -553,6 +555,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv, this->Makefile->IssueMessage( cmake::FATAL_ERROR, cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0056)); + CM_FALLTHROUGH; case cmPolicies::NEW: // NEW behavior is to pass linker flags. { @@ -693,6 +696,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv, case cmPolicies::WARN: warnCMP0067 = this->Makefile->PolicyOptionalWarningEnabled( "CMAKE_POLICY_WARNING_CMP0067"); + CM_FALLTHROUGH; case cmPolicies::OLD: // OLD behavior is to not honor the language standard variables. honorStandard = false; diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 565b84d..972f4b9 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -273,6 +273,7 @@ static bool checkInterfaceDirs(const std::string& prepro, << std::endl; target->GetLocalGenerator()->IssueMessage(cmake::AUTHOR_WARNING, s.str()); + CM_FALLTHROUGH; } case cmPolicies::OLD: shouldContinue = true; diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx index adab061..b478f34 100644 --- a/Source/cmExtraCodeLiteGenerator.cxx +++ b/Source/cmExtraCodeLiteGenerator.cxx @@ -141,6 +141,7 @@ std::vector cmExtraCodeLiteGenerator::CreateProjectsByTarget( case cmStateEnums::STATIC_LIBRARY: case cmStateEnums::MODULE_LIBRARY: visualname = "lib" + visualname; + CM_FALLTHROUGH; case cmStateEnums::EXECUTABLE: xml->StartElement("Project"); xml->Attribute("Name", visualname); diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 32a539c..c37f5a2 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -1770,6 +1770,7 @@ protected: if (this->Makefile->IsOn("CMAKE_INSTALL_SO_NO_EXE")) { break; } + CM_FALLTHROUGH; case cmInstallType_EXECUTABLE: case cmInstallType_PROGRAMS: this->FilePermissions |= mode_owner_execute; diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 21ca347..65670e5 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -423,13 +423,17 @@ bool cmFindPackageCommand::InitialPass(std::vector const& args, &parsed_minor, &parsed_patch, &parsed_tweak); switch (this->VersionCount) { case 4: - this->VersionTweak = parsed_tweak; // no break! + this->VersionTweak = parsed_tweak; + CM_FALLTHROUGH; case 3: - this->VersionPatch = parsed_patch; // no break! + this->VersionPatch = parsed_patch; + CM_FALLTHROUGH; case 2: - this->VersionMinor = parsed_minor; // no break! + this->VersionMinor = parsed_minor; + CM_FALLTHROUGH; case 1: - this->VersionMajor = parsed_major; // no break! + this->VersionMajor = parsed_major; + CM_FALLTHROUGH; default: break; } @@ -1542,13 +1546,17 @@ bool cmFindPackageCommand::CheckVersionFile(std::string const& version_file, &parsed_minor, &parsed_patch, &parsed_tweak); switch (this->VersionFoundCount) { case 4: - this->VersionFoundTweak = parsed_tweak; // no break! + this->VersionFoundTweak = parsed_tweak; + CM_FALLTHROUGH; case 3: - this->VersionFoundPatch = parsed_patch; // no break! + this->VersionFoundPatch = parsed_patch; + CM_FALLTHROUGH; case 2: - this->VersionFoundMinor = parsed_minor; // no break! + this->VersionFoundMinor = parsed_minor; + CM_FALLTHROUGH; case 1: - this->VersionFoundMajor = parsed_major; // no break! + this->VersionFoundMajor = parsed_major; + CM_FALLTHROUGH; default: break; } diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index e065a74..a57d2a0 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -410,6 +410,7 @@ struct CompilerIdNode : public cmGeneratorExpressionNode e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0044); context->LG->GetCMakeInstance()->IssueMessage( cmake::AUTHOR_WARNING, e.str(), context->Backtrace); + CM_FALLTHROUGH; } case cmPolicies::OLD: return "1"; @@ -1459,6 +1460,7 @@ static const struct TargetPolicyNode : public cmGeneratorExpressionNode lg->IssueMessage( cmake::AUTHOR_WARNING, cmPolicies::GetPolicyWarning(policyForString(policy))); + CM_FALLTHROUGH; case cmPolicies::REQUIRED_IF_USED: case cmPolicies::REQUIRED_ALWAYS: case cmPolicies::OLD: diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 9a33bec..6a1e28c 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -2481,6 +2481,7 @@ static void processIncludeDirectories( switch (tgt->GetPolicyStatusCMP0027()) { case cmPolicies::WARN: e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0027) << "\n"; + CM_FALLTHROUGH; case cmPolicies::OLD: messageType = cmake::AUTHOR_WARNING; break; @@ -2837,6 +2838,7 @@ void cmGeneratorTarget::GetCompileDefinitions( std::ostringstream e; e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0043); this->LocalGenerator->IssueMessage(cmake::AUTHOR_WARNING, e.str()); + CM_FALLTHROUGH; } case cmPolicies::OLD: { cmGeneratorExpression ge; @@ -4132,11 +4134,14 @@ void cmGeneratorTarget::GetTargetVersion(bool soversion, int& major, switch (sscanf(version, "%d.%d.%d", &parsed_major, &parsed_minor, &parsed_patch)) { case 3: - patch = parsed_patch; // no break! + patch = parsed_patch; + CM_FALLTHROUGH; case 2: - minor = parsed_minor; // no break! + minor = parsed_minor; + CM_FALLTHROUGH; case 1: - major = parsed_major; // no break! + major = parsed_major; + CM_FALLTHROUGH; default: break; } diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx index 6cb8e19..1005b15 100644 --- a/Source/cmGetDirectoryPropertyCommand.cxx +++ b/Source/cmGetDirectoryPropertyCommand.cxx @@ -78,6 +78,7 @@ bool cmGetDirectoryPropertyCommand::InitialPass( this->Makefile->IssueMessage( cmake::AUTHOR_WARNING, cmPolicies::GetPolicyWarning(cmPolicies::CMP0059)); + CM_FALLTHROUGH; case cmPolicies::OLD: this->StoreResult(variable, this->Makefile->GetDefineFlagsCMP0059()); return true; diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx index d2056d2..ddecdf6 100644 --- a/Source/cmGetPropertyCommand.cxx +++ b/Source/cmGetPropertyCommand.cxx @@ -232,6 +232,7 @@ bool cmGetPropertyCommand::HandleDirectoryMode() case cmPolicies::WARN: mf->IssueMessage(cmake::AUTHOR_WARNING, cmPolicies::GetPolicyWarning(cmPolicies::CMP0059)); + CM_FALLTHROUGH; case cmPolicies::OLD: return this->StoreResult(mf->GetDefineFlagsCMP0059()); case cmPolicies::NEW: diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 67e272d..608ac02 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -838,6 +838,7 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility( /* clang-format on */ mf->IssueMessage(cmake::AUTHOR_WARNING, w.str()); } + CM_FALLTHROUGH; case cmPolicies::OLD: // OLD behavior is to convert AppleClang to Clang. mf->AddDefinition(compilerIdVar, "Clang"); @@ -867,6 +868,7 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility( /* clang-format on */ mf->IssueMessage(cmake::AUTHOR_WARNING, w.str()); } + CM_FALLTHROUGH; case cmPolicies::OLD: // OLD behavior is to convert QCC to GNU. mf->AddDefinition(compilerIdVar, "GNU"); @@ -881,6 +883,7 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility( mf->IssueMessage( cmake::FATAL_ERROR, cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0047)); + CM_FALLTHROUGH; case cmPolicies::NEW: // NEW behavior is to keep QCC. break; diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index f499924..294fb17 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -1406,11 +1406,11 @@ bool cmInstallCommand::MakeFilesFullPath( bool cmInstallCommand::CheckCMP0006(bool& failure) { switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0006)) { - case cmPolicies::WARN: { + case cmPolicies::WARN: this->Makefile->IssueMessage( cmake::AUTHOR_WARNING, cmPolicies::GetPolicyWarning(cmPolicies::CMP0006)); - } + CM_FALLTHROUGH; case cmPolicies::OLD: // OLD behavior is to allow compatibility return true; diff --git a/Source/cmLinkDirectoriesCommand.cxx b/Source/cmLinkDirectoriesCommand.cxx index f863292..9b0c288 100644 --- a/Source/cmLinkDirectoriesCommand.cxx +++ b/Source/cmLinkDirectoriesCommand.cxx @@ -49,6 +49,7 @@ void cmLinkDirectoriesCommand::AddLinkDir(std::string const& dir) case cmPolicies::REQUIRED_ALWAYS: e << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0015); this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + CM_FALLTHROUGH; case cmPolicies::NEW: // NEW behavior converts convertToAbsolute = true; diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 0418521..bc886b6 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -960,6 +960,7 @@ void cmLocalGenerator::GetTargetFlags( break; case cmStateEnums::MODULE_LIBRARY: libraryLinkVariable = "CMAKE_MODULE_LINKER_FLAGS"; + CM_FALLTHROUGH; case cmStateEnums::SHARED_LIBRARY: { linkFlags = this->Makefile->GetSafeDefinition(libraryLinkVariable); linkFlags += " "; @@ -1248,6 +1249,7 @@ std::string cmLocalGenerator::GetLinkLibsCMP0065( /* clang-format on */ this->IssueMessage(cmake::AUTHOR_WARNING, w.str()); } + CM_FALLTHROUGH; case cmPolicies::OLD: // OLD behavior is to always add the flags add_shlib_flags = true; @@ -1257,6 +1259,7 @@ std::string cmLocalGenerator::GetLinkLibsCMP0065( this->IssueMessage( cmake::FATAL_ERROR, cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0065)); + CM_FALLTHROUGH; case cmPolicies::NEW: // NEW behavior is to only add the flags if ENABLE_EXPORTS is on add_shlib_flags = tgt.GetPropertyAsBool("ENABLE_EXPORTS"); @@ -1747,7 +1750,7 @@ bool cmLocalGenerator::GetShouldUseOldFlags(bool shared, << cmPolicies::GetPolicyWarning(cmPolicies::CMP0018); this->IssueMessage(cmake::AUTHOR_WARNING, e.str()); - // fall through to OLD behaviour + CM_FALLTHROUGH; } case cmPolicies::OLD: return true; diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 51d8980..756179b 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -360,6 +360,7 @@ cmMakefile::IncludeScope::IncludeScope(cmMakefile* mf, // We should never make this policy required, but we handle it // here just in case. this->CheckCMP0011 = true; + CM_FALLTHROUGH; case cmPolicies::NEW: // NEW behavior is to push a (strong) scope. this->Makefile->PushPolicy(); @@ -1161,6 +1162,7 @@ bool cmMakefile::ParseDefineFlag(std::string const& def, bool remove) case cmPolicies::WARN: this->IssueMessage(cmake::AUTHOR_WARNING, cmPolicies::GetPolicyWarning(cmPolicies::CMP0005)); + CM_FALLTHROUGH; case cmPolicies::OLD: // OLD behavior is to not escape the value. We should not // convert the definition to use the property. @@ -1511,6 +1513,7 @@ void cmMakefile::ConfigureSubDirectory(cmMakefile* mf) case cmPolicies::REQUIRED_IF_USED: case cmPolicies::REQUIRED_ALWAYS: e << "\n" << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0014); + CM_FALLTHROUGH; case cmPolicies::NEW: // NEW behavior prints the error. this->IssueMessage(cmake::FATAL_ERROR, e.str()); @@ -2340,6 +2343,7 @@ const char* cmMakefile::ExpandVariablesInString( newErrorstr, newResult, escapeQuotes, noEscapes, atOnly, filename, line, removeEmpty, replaceAt); this->SuppressWatches = false; + CM_FALLTHROUGH; } case cmPolicies::OLD: mtype = @@ -2496,6 +2500,7 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringOld( switch (this->GetPolicyStatus(cmPolicies::CMP0010)) { case cmPolicies::WARN: error << "\n" << cmPolicies::GetPolicyWarning(cmPolicies::CMP0010); + CM_FALLTHROUGH; case cmPolicies::OLD: // OLD behavior is to just warn and continue. mtype = cmake::AUTHOR_WARNING; @@ -2649,6 +2654,7 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew( } break; } + CM_FALLTHROUGH; case '\\': if (!noEscapes) { const char* next = in + 1; @@ -3386,7 +3392,7 @@ std::string cmMakefile::GetModulesFile(const char* filename) const /* clang-format on */ this->IssueMessage(cmake::AUTHOR_WARNING, e.str()); - // break; // fall through to OLD behaviour + CM_FALLTHROUGH; } case cmPolicies::OLD: result = moduleInCMakeModulePath; @@ -3779,6 +3785,7 @@ bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg, case cmPolicies::WARN: this->IssueMessage(cmake::AUTHOR_WARNING, cmPolicies::GetPolicyWarning(cmPolicies::CMP0002)); + CM_FALLTHROUGH; case cmPolicies::OLD: return true; case cmPolicies::REQUIRED_IF_USED: @@ -3864,12 +3871,14 @@ bool cmMakefile::EnforceUniqueDir(const std::string& srcPath, << "compatibility."; /* clang-format on */ this->IssueMessage(cmake::AUTHOR_WARNING, e.str()); + CM_FALLTHROUGH; case cmPolicies::OLD: // OLD behavior does not warn. return true; case cmPolicies::REQUIRED_IF_USED: case cmPolicies::REQUIRED_ALWAYS: e << cmPolicies::GetRequiredPolicyError(cmPolicies::CMP0013) << "\n"; + CM_FALLTHROUGH; case cmPolicies::NEW: // NEW behavior prints the error. /* clang-format off */ diff --git a/bootstrap b/bootstrap index 84285a8..84df54a 100755 --- a/bootstrap +++ b/bootstrap @@ -1307,6 +1307,7 @@ cmake_report cmConfigure.h${_tmp} "#define CMAKE_BIN_DIR \"/bootstrap-not-insall cmake_report cmConfigure.h${_tmp} "#define CMAKE_DATA_DIR \"/bootstrap-not-insalled\"" cmake_report cmConfigure.h${_tmp} "#define CMAKE_BOOTSTRAP" cmake_report cmConfigure.h${_tmp} "#define CM_EQ_DELETE" +cmake_report cmConfigure.h${_tmp} "#define CM_FALLTHROUGH" cmake_report cmConfigure.h${_tmp} "#define CM_NULLPTR 0" cmake_report cmConfigure.h${_tmp} "#define CM_OVERRIDE" cmake_report cmConfigure.h${_tmp} "#define CM_DISABLE_COPY(Class)" https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0068224fdd7569f02dffe9fd8de2e6ce0c7abc28 commit 0068224fdd7569f02dffe9fd8de2e6ce0c7abc28 Author: Daniel Pfeifer AuthorDate: Sat Jun 3 08:38:31 2017 +0200 Commit: Daniel Pfeifer CommitDate: Sat Jun 3 08:38:51 2017 +0200 C++ feature checks: check output for '[Ww]arning' diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake index 458901e..76c823c 100644 --- a/Source/Checks/cm_cxx_features.cmake +++ b/Source/Checks/cm_cxx_features.cmake @@ -15,7 +15,7 @@ function(cm_check_cxx_feature name) OUTPUT_VARIABLE OUTPUT ) # If using the feature causes warnings, treat it as broken/unavailable. - if(OUTPUT MATCHES "warning") + if(OUTPUT MATCHES "[Ww]arning") set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE) endif() if(CMake_HAVE_CXX_${FEATURE}) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=913736f17dfb2e51423861c9a74be3a9be3211c8 commit 913736f17dfb2e51423861c9a74be3a9be3211c8 Author: Brad King AuthorDate: Thu Jun 1 13:55:35 2017 -0400 Commit: Brad King CommitDate: Fri Jun 2 16:26:30 2017 -0400 Tests: Fix RunCMake.GNUInstallDirs on BSD platforms The `GNUInstallDirs` module has different defaults on BSD platforms. Update the test expected output to account for the difference. Fixes: #16887 diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 75d4e29..79f487d 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -147,7 +147,7 @@ endif() add_RunCMake_test(GeneratorExpression) add_RunCMake_test(GeneratorPlatform) add_RunCMake_test(GeneratorToolset) -add_RunCMake_test(GNUInstallDirs) +add_RunCMake_test(GNUInstallDirs -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME}) add_RunCMake_test(TargetPropertyGeneratorExpressions) add_RunCMake_test(Languages) add_RunCMake_test(LinkStatic) diff --git a/Tests/RunCMake/GNUInstallDirs/Common.cmake b/Tests/RunCMake/GNUInstallDirs/Common.cmake index 5f119af..919cd91 100644 --- a/Tests/RunCMake/GNUInstallDirs/Common.cmake +++ b/Tests/RunCMake/GNUInstallDirs/Common.cmake @@ -1,8 +1,5 @@ set(CMAKE_SIZEOF_VOID_P 8) set(CMAKE_LIBRARY_ARCHITECTURE "arch") -if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") - set(CMAKE_SYSTEM_NAME "OpenBSD-Fake") -endif() include(GNUInstallDirs) set(dirs BINDIR diff --git a/Tests/RunCMake/GNUInstallDirs/Opt-BSD-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Opt-BSD-stderr.txt new file mode 100644 index 0000000..09ae303 --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/Opt-BSD-stderr.txt @@ -0,0 +1,30 @@ +^CMAKE_INSTALL_BINDIR='bin' +CMAKE_INSTALL_DATADIR='share' +CMAKE_INSTALL_DATAROOTDIR='share' +CMAKE_INSTALL_DOCDIR='share/doc/Opt' +CMAKE_INSTALL_INCLUDEDIR='include' +CMAKE_INSTALL_INFODIR='info' +CMAKE_INSTALL_LIBDIR='(lib|lib64)' +CMAKE_INSTALL_LIBEXECDIR='libexec' +CMAKE_INSTALL_LOCALEDIR='share/locale' +CMAKE_INSTALL_LOCALSTATEDIR='var' +CMAKE_INSTALL_RUNSTATEDIR='var/run' +CMAKE_INSTALL_MANDIR='man' +CMAKE_INSTALL_SBINDIR='sbin' +CMAKE_INSTALL_SHAREDSTATEDIR='com' +CMAKE_INSTALL_SYSCONFDIR='etc' +CMAKE_INSTALL_FULL_BINDIR='/opt/Opt/bin' +CMAKE_INSTALL_FULL_DATADIR='/opt/Opt/share' +CMAKE_INSTALL_FULL_DATAROOTDIR='/opt/Opt/share' +CMAKE_INSTALL_FULL_DOCDIR='/opt/Opt/share/doc/Opt' +CMAKE_INSTALL_FULL_INCLUDEDIR='/opt/Opt/include' +CMAKE_INSTALL_FULL_INFODIR='/opt/Opt/info' +CMAKE_INSTALL_FULL_LIBDIR='/opt/Opt/(lib|lib64)' +CMAKE_INSTALL_FULL_LIBEXECDIR='/opt/Opt/libexec' +CMAKE_INSTALL_FULL_LOCALEDIR='/opt/Opt/share/locale' +CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var/opt/Opt' +CMAKE_INSTALL_FULL_RUNSTATEDIR='/var/run/opt/Opt' +CMAKE_INSTALL_FULL_MANDIR='/opt/Opt/man' +CMAKE_INSTALL_FULL_SBINDIR='/opt/Opt/sbin' +CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/opt/Opt/com' +CMAKE_INSTALL_FULL_SYSCONFDIR='/etc/opt/Opt'$ diff --git a/Tests/RunCMake/GNUInstallDirs/Root-BSD-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Root-BSD-stderr.txt new file mode 100644 index 0000000..4be66bc --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/Root-BSD-stderr.txt @@ -0,0 +1,30 @@ +^CMAKE_INSTALL_BINDIR='usr/bin' +CMAKE_INSTALL_DATADIR='usr/share' +CMAKE_INSTALL_DATAROOTDIR='usr/share' +CMAKE_INSTALL_DOCDIR='usr/share/doc/Root' +CMAKE_INSTALL_INCLUDEDIR='usr/include' +CMAKE_INSTALL_INFODIR='usr/info' +CMAKE_INSTALL_LIBDIR='usr/(lib|lib64)' +CMAKE_INSTALL_LIBEXECDIR='usr/libexec' +CMAKE_INSTALL_LOCALEDIR='usr/share/locale' +CMAKE_INSTALL_LOCALSTATEDIR='var' +CMAKE_INSTALL_RUNSTATEDIR='var/run' +CMAKE_INSTALL_MANDIR='usr/man' +CMAKE_INSTALL_SBINDIR='usr/sbin' +CMAKE_INSTALL_SHAREDSTATEDIR='usr/com' +CMAKE_INSTALL_SYSCONFDIR='etc' +CMAKE_INSTALL_FULL_BINDIR='/usr/bin' +CMAKE_INSTALL_FULL_DATADIR='/usr/share' +CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/share' +CMAKE_INSTALL_FULL_DOCDIR='/usr/share/doc/Root' +CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/include' +CMAKE_INSTALL_FULL_INFODIR='/usr/info' +CMAKE_INSTALL_FULL_LIBDIR='/usr/(lib|lib64)' +CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/libexec' +CMAKE_INSTALL_FULL_LOCALEDIR='/usr/share/locale' +CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var' +CMAKE_INSTALL_FULL_RUNSTATEDIR='/var/run' +CMAKE_INSTALL_FULL_MANDIR='/usr/man' +CMAKE_INSTALL_FULL_SBINDIR='/usr/sbin' +CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/com' +CMAKE_INSTALL_FULL_SYSCONFDIR='/etc'$ diff --git a/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake b/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake index f88569a..b544ba6 100644 --- a/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake +++ b/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake @@ -1,6 +1,17 @@ include(RunCMake) -run_cmake(Opt) -run_cmake(Root) -run_cmake(Usr) -run_cmake(UsrLocal) +if(SYSTEM_NAME MATCHES "^(.*BSD|DragonFly)$") + set(EXPECT_BSD 1) +endif() + +foreach(case + Opt + Root + Usr + UsrLocal + ) + if(EXPECT_BSD) + set(RunCMake-stderr-file ${case}-BSD-stderr.txt) + endif() + run_cmake(${case}) +endforeach() diff --git a/Tests/RunCMake/GNUInstallDirs/Usr-BSD-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Usr-BSD-stderr.txt new file mode 100644 index 0000000..3d7b4c8 --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/Usr-BSD-stderr.txt @@ -0,0 +1,30 @@ +^CMAKE_INSTALL_BINDIR='bin' +CMAKE_INSTALL_DATADIR='share' +CMAKE_INSTALL_DATAROOTDIR='share' +CMAKE_INSTALL_DOCDIR='share/doc/Usr' +CMAKE_INSTALL_INCLUDEDIR='include' +CMAKE_INSTALL_INFODIR='info' +CMAKE_INSTALL_LIBDIR='(lib|lib64|lib/arch)' +CMAKE_INSTALL_LIBEXECDIR='libexec' +CMAKE_INSTALL_LOCALEDIR='share/locale' +CMAKE_INSTALL_LOCALSTATEDIR='var' +CMAKE_INSTALL_RUNSTATEDIR='var/run' +CMAKE_INSTALL_MANDIR='man' +CMAKE_INSTALL_SBINDIR='sbin' +CMAKE_INSTALL_SHAREDSTATEDIR='com' +CMAKE_INSTALL_SYSCONFDIR='etc' +CMAKE_INSTALL_FULL_BINDIR='/usr/bin' +CMAKE_INSTALL_FULL_DATADIR='/usr/share' +CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/share' +CMAKE_INSTALL_FULL_DOCDIR='/usr/share/doc/Usr' +CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/include' +CMAKE_INSTALL_FULL_INFODIR='/usr/info' +CMAKE_INSTALL_FULL_LIBDIR='/usr/(lib|lib64|lib/arch)' +CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/libexec' +CMAKE_INSTALL_FULL_LOCALEDIR='/usr/share/locale' +CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var' +CMAKE_INSTALL_FULL_RUNSTATEDIR='/var/run' +CMAKE_INSTALL_FULL_MANDIR='/usr/man' +CMAKE_INSTALL_FULL_SBINDIR='/usr/sbin' +CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/com' +CMAKE_INSTALL_FULL_SYSCONFDIR='/etc'$ diff --git a/Tests/RunCMake/GNUInstallDirs/UsrLocal-BSD-stderr.txt b/Tests/RunCMake/GNUInstallDirs/UsrLocal-BSD-stderr.txt new file mode 100644 index 0000000..e1425d5 --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/UsrLocal-BSD-stderr.txt @@ -0,0 +1,30 @@ +^CMAKE_INSTALL_BINDIR='bin' +CMAKE_INSTALL_DATADIR='share' +CMAKE_INSTALL_DATAROOTDIR='share' +CMAKE_INSTALL_DOCDIR='share/doc/UsrLocal' +CMAKE_INSTALL_INCLUDEDIR='include' +CMAKE_INSTALL_INFODIR='info' +CMAKE_INSTALL_LIBDIR='(lib|lib64)' +CMAKE_INSTALL_LIBEXECDIR='libexec' +CMAKE_INSTALL_LOCALEDIR='share/locale' +CMAKE_INSTALL_LOCALSTATEDIR='var' +CMAKE_INSTALL_RUNSTATEDIR='var/run' +CMAKE_INSTALL_MANDIR='man' +CMAKE_INSTALL_SBINDIR='sbin' +CMAKE_INSTALL_SHAREDSTATEDIR='com' +CMAKE_INSTALL_SYSCONFDIR='etc' +CMAKE_INSTALL_FULL_BINDIR='/usr/local/bin' +CMAKE_INSTALL_FULL_DATADIR='/usr/local/share' +CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/local/share' +CMAKE_INSTALL_FULL_DOCDIR='/usr/local/share/doc/UsrLocal' +CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/local/include' +CMAKE_INSTALL_FULL_INFODIR='/usr/local/info' +CMAKE_INSTALL_FULL_LIBDIR='/usr/local/(lib|lib64)' +CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/local/libexec' +CMAKE_INSTALL_FULL_LOCALEDIR='/usr/local/share/locale' +CMAKE_INSTALL_FULL_LOCALSTATEDIR='/usr/local/var' +CMAKE_INSTALL_FULL_RUNSTATEDIR='/usr/local/var/run' +CMAKE_INSTALL_FULL_MANDIR='/usr/local/man' +CMAKE_INSTALL_FULL_SBINDIR='/usr/local/sbin' +CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/local/com' +CMAKE_INSTALL_FULL_SYSCONFDIR='/usr/local/etc'$ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f59d729c7cb03babafac0cee792b9a3127e51d4d commit f59d729c7cb03babafac0cee792b9a3127e51d4d Author: Chuck Atkins AuthorDate: Fri Jun 2 12:56:31 2017 -0400 Commit: Chuck Atkins CommitDate: Fri Jun 2 12:56:31 2017 -0400 ctest: Display disabled status when ctest -N is called diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 2d4726c..a9ed713 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -720,9 +720,13 @@ void cmCTestMultiProcessHandler::PrintTestList() std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex())) << indexStr.str(), this->Quiet); - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " ", this->Quiet); - cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, p.Name << std::endl, + cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " " << p.Name, this->Quiet); + if (p.Disabled) { + cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " (Disabled)", + this->Quiet); + } + cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, std::endl, this->Quiet); } cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, std::endl ----------------------------------------------------------------------- Summary of changes: Source/CTest/cmCTestMultiProcessHandler.cxx | 8 ++++-- Source/Checks/cm_cxx_attribute_fallthrough.cxx | 11 +++++++++ Source/Checks/cm_cxx_fallthrough.cxx | 11 +++++++++ Source/Checks/cm_cxx_features.cmake | 9 ++++++- Source/Checks/cm_cxx_gnu_fallthrough.cxx | 11 +++++++++ Source/cmCacheManager.cxx | 3 +-- Source/cmCacheManager.h | 2 +- Source/cmComputeLinkDepends.cxx | 2 +- Source/cmComputeLinkDepends.h | 2 +- Source/cmConditionEvaluator.cxx | 4 +-- Source/cmConfigure.cmake.h.in | 13 ++++++++++ Source/cmCoreTryCompile.cxx | 4 +++ Source/cmDynamicLoader.cxx | 7 +++--- Source/cmELF.cxx | 8 +++--- Source/cmExportFileGenerator.cxx | 1 + Source/cmExtraCodeLiteGenerator.cxx | 1 + Source/cmFileCommand.cxx | 9 ++++--- Source/cmFindPackageCommand.cxx | 24 ++++++++++++------ Source/cmFindProgramCommand.cxx | 3 ++- Source/cmFindProgramCommand.h | 2 +- Source/cmGeneratorExpressionNode.cxx | 2 ++ Source/cmGeneratorTarget.cxx | 13 +++++++--- Source/cmGetDirectoryPropertyCommand.cxx | 1 + Source/cmGetPropertyCommand.cxx | 1 + Source/cmGlobalGenerator.cxx | 7 ++++-- Source/cmGlobalGenerator.h | 6 +++-- Source/cmGlobalNinjaGenerator.cxx | 3 ++- Source/cmGlobalNinjaGenerator.h | 2 +- Source/cmInstallCommand.cxx | 4 +-- Source/cmInstallGenerator.cxx | 2 +- Source/cmInstallGenerator.h | 2 +- Source/cmLinkDirectoriesCommand.cxx | 1 + Source/cmLinkLineComputer.cxx | 2 +- Source/cmLinkLineComputer.h | 2 +- Source/cmLinkLineDeviceComputer.cxx | 5 ++-- Source/cmLinkLineDeviceComputer.h | 4 +-- Source/cmListFileCache.cxx | 8 +++--- Source/cmListFileCache.h | 6 ++--- Source/cmLocalGenerator.cxx | 5 +++- Source/cmMSVC60LinkLineComputer.cxx | 4 +-- Source/cmMSVC60LinkLineComputer.h | 2 +- Source/cmMakefile.cxx | 13 ++++++++-- Source/cmMakefile.h | 2 +- Source/cmMakefileTargetGenerator.cxx | 4 +-- Source/cmMakefileTargetGenerator.h | 2 +- Source/cmNinjaLinkLineComputer.cxx | 3 +-- Source/cmNinjaLinkLineComputer.h | 2 +- Source/cmOrderDirectories.cxx | 2 +- Source/cmOutputConverter.cxx | 4 +-- Source/cmOutputConverter.h | 4 +-- Source/cmState.cxx | 16 ++++++------ Source/cmState.h | 26 +++++++++++--------- Source/cmStateSnapshot.cxx | 2 +- Source/cmStateSnapshot.h | 2 +- Tests/RunCMake/CMakeLists.txt | 2 +- Tests/RunCMake/GNUInstallDirs/Common.cmake | 3 --- .../{Opt-stderr.txt => Opt-BSD-stderr.txt} | 8 +++--- .../{Root-stderr.txt => Root-BSD-stderr.txt} | 8 +++--- Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake | 19 +++++++++++--- .../{Usr-stderr.txt => Usr-BSD-stderr.txt} | 8 +++--- ...UsrLocal-stderr.txt => UsrLocal-BSD-stderr.txt} | 8 +++--- bootstrap | 1 + 62 files changed, 232 insertions(+), 124 deletions(-) create mode 100644 Source/Checks/cm_cxx_attribute_fallthrough.cxx create mode 100644 Source/Checks/cm_cxx_fallthrough.cxx create mode 100644 Source/Checks/cm_cxx_gnu_fallthrough.cxx copy Tests/RunCMake/GNUInstallDirs/{Opt-stderr.txt => Opt-BSD-stderr.txt} (86%) copy Tests/RunCMake/GNUInstallDirs/{Root-stderr.txt => Root-BSD-stderr.txt} (86%) copy Tests/RunCMake/GNUInstallDirs/{Usr-stderr.txt => Usr-BSD-stderr.txt} (86%) copy Tests/RunCMake/GNUInstallDirs/{UsrLocal-stderr.txt => UsrLocal-BSD-stderr.txt} (86%) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 5 10:25:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 5 Jun 2017 10:25:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.8.2-1405-gd025faf Message-ID: <20170605142507.D120CFAB53@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via d025faf436c86ee9cc033fbb324a9bc2c18757fa (commit) via c26c69498e980a8009a4aa5748d08ae33b98e89c (commit) via 2d3d88f3bb7076a26d9147f63453931595133aa1 (commit) via 92bbb70695893b617aa5addc1d3747d9146a9f2b (commit) via a44d3cc6ede7d4ef520151fdef5e5cf0a02707b7 (commit) via 4e52809edfbff7565fe19edad5b1c3054f2e2dfe (commit) via c913ab61aea87439d6822632a8e74a28a287a460 (commit) via 945cb9aa93c1b42b63867d59d396d8723fa24c04 (commit) via 7bc264305037b9aa7a6f58400c81b33879dac369 (commit) from c6ea3f01c3e78145b8fd3dd534d8803d8f7e7bd7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d025faf436c86ee9cc033fbb324a9bc2c18757fa commit d025faf436c86ee9cc033fbb324a9bc2c18757fa Merge: c26c694 945cb9a Author: Brad King AuthorDate: Mon Jun 5 14:22:08 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 5 10:22:15 2017 -0400 Merge topic 'doc-3.9-relnotes' 945cb9aa Help: Organize and revise 3.9 release notes 7bc26430 Help: Consolidate 3.9 release notes Acked-by: Kitware Robot Merge-request: !926 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c26c69498e980a8009a4aa5748d08ae33b98e89c commit c26c69498e980a8009a4aa5748d08ae33b98e89c Merge: 2d3d88f a44d3cc Author: Brad King AuthorDate: Mon Jun 5 14:18:32 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 5 10:18:40 2017 -0400 Merge topic 'doc-dev-maint' a44d3cc6 Help/dev: Add release branch creation to maintainer guide 4e52809e Help/dev: Add a CMake Maintainer Guide document c913ab61 Utilities/Release: Add script to consolidate release notes Acked-by: Kitware Robot Merge-request: !925 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2d3d88f3bb7076a26d9147f63453931595133aa1 commit 2d3d88f3bb7076a26d9147f63453931595133aa1 Merge: c6ea3f0 92bbb70 Author: Brad King AuthorDate: Mon Jun 5 14:16:29 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 5 10:16:39 2017 -0400 Merge topic 'GoogleTest-disabled-tests' 92bbb706 GoogleTest: Add support for disabled tests Acked-by: Kitware Robot Reviewed-by: Craig Scott Merge-request: !920 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=92bbb70695893b617aa5addc1d3747d9146a9f2b commit 92bbb70695893b617aa5addc1d3747d9146a9f2b Author: Chuck Atkins AuthorDate: Thu Jun 1 09:03:39 2017 -0400 Commit: Brad King CommitDate: Mon Jun 5 10:11:08 2017 -0400 GoogleTest: Add support for disabled tests Fixes: #10612 diff --git a/Modules/GoogleTest.cmake b/Modules/GoogleTest.cmake index c9e0544..7415e06 100644 --- a/Modules/GoogleTest.cmake +++ b/Modules/GoogleTest.cmake @@ -172,20 +172,50 @@ function(gtest_add_tests) # Parameterized tests have a different signature for the filter if("x${test_type}" STREQUAL "xTEST_P") - string(REGEX REPLACE ${gtest_case_name_regex} "*/\\1.\\2/*" test_name ${hit}) + string(REGEX REPLACE ${gtest_case_name_regex} "*/\\1.\\2/*" gtest_test_name ${hit}) elseif("x${test_type}" STREQUAL "xTEST_F" OR "x${test_type}" STREQUAL "xTEST") - string(REGEX REPLACE ${gtest_case_name_regex} "\\1.\\2" test_name ${hit}) + string(REGEX REPLACE ${gtest_case_name_regex} "\\1.\\2" gtest_test_name ${hit}) elseif("x${test_type}" STREQUAL "xTYPED_TEST") - string(REGEX REPLACE ${gtest_case_name_regex} "\\1/*.\\2" test_name ${hit}) + string(REGEX REPLACE ${gtest_case_name_regex} "\\1/*.\\2" gtest_test_name ${hit}) else() message(WARNING "Could not parse GTest ${hit} for adding to CTest.") continue() endif() - add_test(NAME ${ARGS_TEST_PREFIX}${test_name}${ARGS_TEST_SUFFIX} - ${workDir} - COMMAND ${ARGS_TARGET} --gtest_filter=${test_name} ${ARGS_EXTRA_ARGS} - ) - list(APPEND testList ${ARGS_TEST_PREFIX}${test_name}${ARGS_TEST_SUFFIX}) + + # Make sure tests disabled in GTest get disabled in CTest + if(gtest_test_name MATCHES "(^|\\.)DISABLED_") + # Add the disabled test if CMake is new enough + # Note that this check is to allow backwards compatibility so this + # module can be copied locally in projects to use with older CMake + # versions + if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.8.20170401) + string(REGEX REPLACE + "(^|\\.)DISABLED_" "\\1" + orig_test_name "${gtest_test_name}" + ) + set(ctest_test_name + ${ARGS_TEST_PREFIX}${orig_test_name}${ARGS_TEST_SUFFIX} + ) + add_test(NAME ${ctest_test_name} + ${workDir} + COMMAND ${ARGS_TARGET} + --gtest_also_run_disabled_tests + --gtest_filter=${gtest_test_name} + ${ARGS_EXTRA_ARGS} + ) + set_tests_properties(${ctest_test_name} PROPERTIES DISABLED TRUE) + list(APPEND testList ${ctest_test_name}) + endif() + else() + set(ctest_test_name ${ARGS_TEST_PREFIX}${gtest_test_name}${ARGS_TEST_SUFFIX}) + add_test(NAME ${ctest_test_name} + ${workDir} + COMMAND ${ARGS_TARGET} + --gtest_filter=${gtest_test_name} + ${ARGS_EXTRA_ARGS} + ) + list(APPEND testList ${ctest_test_name}) + endif() endforeach() endforeach() diff --git a/Tests/GoogleTest/Test/CMakeLists.txt b/Tests/GoogleTest/Test/CMakeLists.txt index a1f08d4..f798d31 100644 --- a/Tests/GoogleTest/Test/CMakeLists.txt +++ b/Tests/GoogleTest/Test/CMakeLists.txt @@ -53,12 +53,25 @@ gtest_add_tests(TARGET test_gtest2 ) set(expectedTests GoogleTest.SomethingElse + GoogleTest.OffTest1 + GoogleTest.OffTest2 + GoogleTest.OffTest3 ) if(NOT testList STREQUAL "${expectedTests}") message(FATAL_ERROR "Expected test list: ${expectedTests} Actual test list: ${testList}") endif() - +set(disabledTests + GoogleTest.OffTest1 + GoogleTest.OffTest2 + GoogleTest.OffTest3 +) +foreach(T ${disabledTests}) + get_test_property(${T} DISABLED testDisabled) + if(NOT testDisabled) + message(FATAL_ERROR "Test ${T} should be disabled but is not") + endif() +endforeach() # Non-keyword form, auto-find sources add_executable(test_gtest3 main3.cxx) diff --git a/Tests/GoogleTest/Test/main2.h b/Tests/GoogleTest/Test/main2.h index 7243f53..7881c4f 100644 --- a/Tests/GoogleTest/Test/main2.h +++ b/Tests/GoogleTest/Test/main2.h @@ -4,3 +4,18 @@ TEST(GoogleTest, SomethingElse) { ASSERT_TRUE(true); } + +TEST(GoogleTest, DISABLED_OffTest1) +{ + ASSERT_TRUE(true); +} + +TEST(DISABLED_GoogleTest, OffTest2) +{ + ASSERT_TRUE(true); +} + +TEST(DISABLED_GoogleTest, DISABLED_OffTest3) +{ + ASSERT_TRUE(true); +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a44d3cc6ede7d4ef520151fdef5e5cf0a02707b7 commit a44d3cc6ede7d4ef520151fdef5e5cf0a02707b7 Author: Brad King AuthorDate: Fri Jun 2 14:18:41 2017 -0400 Commit: Brad King CommitDate: Fri Jun 2 14:36:52 2017 -0400 Help/dev: Add release branch creation to maintainer guide diff --git a/Help/dev/maint.rst b/Help/dev/maint.rst index c1a2048..78c06df 100644 --- a/Help/dev/maint.rst +++ b/Help/dev/maint.rst @@ -7,3 +7,165 @@ See documentation on `CMake Development`_ for more information. .. _`CMake Development`: README.rst .. contents:: Maintainer Processes: + +Branch a New Release +==================== + +This section covers how to start a new ``release`` branch for a major or +minor version bump (patch releases remain on their existing branch). + +In the following we use the placeholder ``$ver`` to represent the +version number of the new release with the form ``$major.$minor``, +and ``$prev`` to represent the version number of the prior release. + +Review Prior Release +-------------------- + +Review the history around the prior release branch: + +.. code-block:: shell + + git log --graph --boundary \ + ^$(git rev-list --grep="Merge topic 'doc-.*-relnotes'" -n 1 master)~1 \ + $(git rev-list --grep="Begin post-.* development" -n 1 master) \ + $(git tag --list *-rc1| tail -1) + +Consolidate Release Notes +------------------------- + +Starting from a clean work tree on ``master``, create a topic branch to +use for consolidating the release notes: + +.. code-block:: shell + + git checkout -b doc-$ver-relnotes + +Run the `consolidate-relnotes.bash`_ script: + +.. code-block:: shell + + Utilities/Release/consolidate-relnotes.bash $ver $prev + +.. _`consolidate-relnotes.bash`: ../../Utilities/Release/consolidate-relnotes.bash + +This moves notes from the ``Help/release/dev/*.rst`` files into a versioned +``Help/release/$ver.rst`` file and updates ``Help/release/index.rst`` to +link to the new document. Commit the changes with a message such as:: + + Help: Consolidate $ver release notes + + Run the `Utilities/Release/consolidate-relnotes.bash` script to move + notes from `Help/release/dev/*` into `Help/release/$ver.rst`. + +Manually edit ``Help/release/$ver.rst`` to add section headers, organize +the notes, and revise wording. Then commit with a message such as:: + + Help: Organize and revise $ver release notes + + Add section headers similar to the $prev release notes and move each + individual bullet into an appropriate section. Revise a few bullets. + +Open a merge request with the ``doc-$ver-relnotes`` branch for review +and integration. Further steps may proceed after this has been merged +to ``master``. + +Update 'release' Branch +----------------------- + +Starting from a clean work tree on ``master``, create a new ``release-$ver`` +branch locally: + +.. code-block:: shell + + git checkout -b release-$ver origin/master + +Remove the development branch release note infrastructure: + +.. code-block:: shell + + git rm Help/release/dev/0-sample-topic.rst + sed -i '/^\.\. include:: dev.txt/ {N;d}' Help/release/index.rst + +Commit with a message such as:: + + Help: Drop development topic notes to prepare release + + Release versions do not have the development topic section of + the CMake Release Notes index page. + +Update ``Source/CMakeVersion.cmake`` to set the version to +``$major.$minor.0-rc1``: + +.. code-block:: cmake + + # CMake version number components. + set(CMake_VERSION_MAJOR $major) + set(CMake_VERSION_MINOR $minor) + 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: + +.. code-block:: shell + + $EDITOR $(git grep -l DEVEL_CMAKE_VERSION) + +Commit with a message such as:: + + CMake $major.$minor.0-rc1 version update + +Merge the ``release-$ver`` branch to ``master``: + +.. code-block:: shell + + git checkout master + git pull + git merge --no-ff release-$ver + +Begin post-release development by restoring the development branch release +note infrastructure and the version date from ``origin/master``: + +.. code-block:: shell + + git checkout origin/master -- \ + Source/CMakeVersion.cmake Help/release/dev/0-sample-topic.rst + sed -i $'/^Releases/ i\\\n.. include:: dev.txt\\\n' Help/release/index.rst + +Update ``Source/CMakeVersion.cmake`` to set the version to +``$major.$minor.$date``: + +.. code-block:: cmake + + # CMake version number components. + set(CMake_VERSION_MAJOR $major) + set(CMake_VERSION_MINOR $minor) + set(CMake_VERSION_PATCH $date) + #set(CMake_VERSION_RC 1) + +Commit with a message such as:: + + Begin post-$ver development + +Push the update to the ``master`` and ``release`` branches: + +.. code-block:: shell + + git push --atomic origin master release-$ver:release + +Announce 'release' Branch +------------------------- + +Send email to the ``cmake-developers at cmake.org`` mailing list (perhaps +in reply to a release preparation thread) announcing that post-release +development is open:: + + I've branched 'release' for $ver. The repository is now open for + post-$ver development. Please rebase open merge requests on 'master' + before staging or merging. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4e52809edfbff7565fe19edad5b1c3054f2e2dfe commit 4e52809edfbff7565fe19edad5b1c3054f2e2dfe Author: Brad King AuthorDate: Fri Jun 2 11:13:59 2017 -0400 Commit: Brad King CommitDate: Fri Jun 2 14:24:47 2017 -0400 Help/dev: Add a CMake Maintainer Guide document Initialize it with placeholder content. This document will serve to contain instructions for CMake maintenance processes. diff --git a/Help/dev/README.rst b/Help/dev/README.rst index 163be97..ce62abc 100644 --- a/Help/dev/README.rst +++ b/Help/dev/README.rst @@ -38,3 +38,12 @@ CMake developer documentation is provided by the following documents: * The `CMake Source Code Guide`_. .. _`CMake Source Code Guide`: source.rst + +Maintainer Documentation +======================== + +CMake maintainer documentation is provided by the following documents: + +* The `CMake Maintainer Guide`_. + +.. _`CMake Maintainer Guide`: maint.rst diff --git a/Help/dev/maint.rst b/Help/dev/maint.rst new file mode 100644 index 0000000..c1a2048 --- /dev/null +++ b/Help/dev/maint.rst @@ -0,0 +1,9 @@ +CMake Maintainer Guide +********************** + +The following is a guide to CMake maintenance processes. +See documentation on `CMake Development`_ for more information. + +.. _`CMake Development`: README.rst + +.. contents:: Maintainer Processes: https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c913ab61aea87439d6822632a8e74a28a287a460 commit c913ab61aea87439d6822632a8e74a28a287a460 Author: Brad King AuthorDate: Fri Jun 2 11:46:10 2017 -0400 Commit: Brad King CommitDate: Fri Jun 2 14:18:34 2017 -0400 Utilities/Release: Add script to consolidate release notes diff --git a/Utilities/Release/consolidate-relnotes.bash b/Utilities/Release/consolidate-relnotes.bash new file mode 100755 index 0000000..91307ac --- /dev/null +++ b/Utilities/Release/consolidate-relnotes.bash @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +set -e + +usage='usage: consolidate-relnotes.bash ' + +die() { + echo "$@" 1>&2; exit 1 +} + +test "$#" = 2 || die "$usage" + +files="$(ls Help/release/dev/* | grep -v Help/release/dev/0-sample-topic.rst)" +title="CMake $1 Release Notes" +underline="$(echo "$title" | sed 's/./*/g')" +echo "$title +$underline + +.. only:: html + + .. contents:: + +Changes made since CMake $2 include the following." > Help/release/"$1".rst +tail -q -n +3 $files >> Help/release/"$1".rst +sed -i "/^ $2 / i\\ + $1 <$1>" Help/release/index.rst +rm $files https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=945cb9aa93c1b42b63867d59d396d8723fa24c04 commit 945cb9aa93c1b42b63867d59d396d8723fa24c04 Author: Brad King AuthorDate: Fri Jun 2 10:04:37 2017 -0400 Commit: Brad King CommitDate: Fri Jun 2 11:07:36 2017 -0400 Help: Organize and revise 3.9 release notes Add section headers similar to the 3.8 release notes and move each individual bullet into an appropriate section. Revise a few bullets. diff --git a/Help/release/3.9.rst b/Help/release/3.9.rst index 57bdbf0..5169aa4 100644 --- a/Help/release/3.9.rst +++ b/Help/release/3.9.rst @@ -7,153 +7,155 @@ CMake 3.9 Release Notes Changes made since CMake 3.8 include the following. -* The :command:`add_custom_command` command learned to evaluate the - ``TARGET_OBJECTS`` - :manual:`generator expression `. +New Features +============ + +Languages +--------- + +* ``CUDA`` is now supported by the :ref:`Visual Studio Generators` + for VS 2010 and above. This complements the existing support by the + :ref:`Makefile Generators` and the :generator:`Ninja` generator. + +Generators +---------- + +* :ref:`Visual Studio Generators` for VS 2010 and above learned to support + the ``ASM_NASM`` language when ``nasm`` is installed. + +* The :generator:`Xcode` generator learned to create Xcode schema files. + This is an experimental feature and can be activated by setting the + :variable:`CMAKE_XCODE_GENERATE_SCHEME` variable to a ``TRUE`` value. + +Commands +-------- * The :command:`add_library` command ``IMPORTED`` option learned to support :ref:`Object Libraries`. -* The new target property :prop_tgt:`AUTOGEN_BUILD_DIR` was introduced which - allows to set a custom output directory for - :prop_tgt:`AUTOMOC`, :prop_tgt:`AUTOUIC` and :prop_tgt:`AUTORCC`. +* All ``find_`` commands now have a ``PACKAGE_ROOT`` search path group that + is first in the search heuristics. If a ``find_`` command is called from + inside a find module, then the CMake variable and environment variable named + ``_ROOT`` are used as prefixes and are the first set of paths + to be searched. -* Variable :variable:`CMAKE_AUTOMOC_DEPEND_FILTERS` was introduced to - allow :variable:`CMAKE_AUTOMOC` to extract additional dependency file names - for ``moc`` from the contents of source files. +* The :command:`find_library` command learned to search ``libx32`` paths + when the build targets the ``x32`` ABI. See the + :prop_gbl:`FIND_LIBRARY_USE_LIBX32_PATHS` global property. -* The new target property :prop_tgt:`AUTOMOC_DEPEND_FILTERS` was introduced to - allow :prop_tgt:`AUTOMOC` to extract additional dependency file names - for ``moc`` from the contents of source files. +* The :command:`include_external_msproject` command learned to use + the :prop_tgt:`MAP_IMPORTED_CONFIG_` target property + to map current configurations to the external configurations. -* When using :prop_tgt:`AUTOMOC`, CMake scans for the presence of the - ``Q_PLUGIN_METADATA`` macro and reruns moc when the file from the - macro's ``FILE`` argument changes. +* The :command:`install(TARGETS)` command learned a new ``OBJECTS`` option to + specify where to install :ref:`Object Libraries`. -* When :prop_tgt:`AUTOMOC` detects an include statement of the form - ``#include "moc_.cpp"`` the respective header file is searched - for in the :prop_tgt:`INCLUDE_DIRECTORIES` of the target as well. +* The :command:`install(EXPORT)` command learned how to export + :ref:`Object Libraries`. -* Global properties :prop_gbl:`AUTOGEN_SOURCE_GROUP`, - :prop_gbl:`AUTOMOC_SOURCE_GROUP` and - :prop_gbl:`AUTORCC_SOURCE_GROUP` were - introduced to allow files generated by :prop_tgt:`AUTOMOC` or - :prop_tgt:`AUTORCC` to be placed in a :command:`source_group`. +* The :command:`project` command learned an optional ``DESCRIPTION`` + parameter to set the :variable:`PROJECT_DESCRIPTION` variable. -* Variable :variable:`CMAKE_AUTOUIC_SEARCH_PATHS` was introduced to - allow :variable:`CMAKE_AUTOUIC` to search for ``foo.ui`` in more - places than the vicinity of the ``ui_foo.h`` including file. +* The :command:`separate_arguments` command gained a ``NATIVE_COMMAND`` mode + that performs argument separation depending on the host operating system. -* The new target property :prop_tgt:`AUTOUIC_SEARCH_PATHS` was introduced to - allow :prop_tgt:`AUTOUIC` to search for ``foo.ui`` in more - places than the vicinity of the ``ui_foo.h`` including file. +Variables +--------- -* Two new informational generator expressions to retrieve Apple Bundle - directories have been added. The first one ``$`` - outputs the full path to the Bundle directory, the other one - ``$`` outputs the full path to the - ``Contents`` directory of macOS Bundles and App Bundles. For all other - bundle types and SDKs it is identical with ``$``. +* A :variable:`CMAKE_AUTOMOC_DEPEND_FILTERS` variable was introduced to + allow :variable:`CMAKE_AUTOMOC` to extract additional dependency file names + for ``moc`` from the contents of source files. - Those new expressions are helpful to query Bundle locations independent of - the different Bundle types and layouts on macOS and iOS. +* A :variable:`CMAKE_AUTOUIC_SEARCH_PATHS` variable was introduced to + allow :variable:`CMAKE_AUTOUIC` to search for ``foo.ui`` in more + places than the vicinity of the file including ``ui_foo.h``. -* A :module:`CheckIPOSupported` module was added to help projects - check whether interprocedural optimization (IPO) is supported by - the current toolchain and CMake version. +* A :variable:`CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX` variable was added to + tell the :command:`find_library` command to search in a ``lib`` + directory before each ``lib`` directory that would normally be searched. * A :variable:`CMAKE_INTERPROCEDURAL_OPTIMIZATION` variable was added to initialize the :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` property on all targets. -* The :generator:`Xcode` generator got the ability to create schema files. - This is still an experimental feature and can be activated by setting the - :variable:`CMAKE_XCODE_GENERATE_SCHEME` variable to a ``TRUE`` value. - * A :variable:`CMAKE__COMPILER_AR` variable was added to hold the path to the GCC/Clang wrapper of ``ar``. * A :variable:`CMAKE__COMPILER_RANLIB` variable was added to hold the path to the GCC/Clang wrapper of ``ranlib``. -* The :module:`CPackArchive` module learned to modify filename per component. - See :variable:`CPACK_ARCHIVE_FILE_NAME` variable and its per component - version. +* The :variable:`CMAKE_SYSROOT_COMPILE` and :variable:`CMAKE_SYSROOT_LINK` + variables were added to use separate sysroots for compiling and linking. -* The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and - :command:`cpack_ifw_configure_component_group` commands gained a - internationalization support for ``DISPLAY_NAME`` and ``DESCRIPTION`` options - to more specific configuration. +Properties +---------- -* The :module:`CPackIFW` module learned the new hint :variable:`CPACK_IFW_ROOT` - variable for finding the QtIFW tool suite installed in a non-standard place. -* The :module:`CPackIFW` module tries to find and use QtIFW tools of the `3.0` - and `3.1` versions. +* A new :prop_tgt:`AUTOGEN_BUILD_DIR` target property was introduced to set + a custom output directory for :prop_tgt:`AUTOMOC`, :prop_tgt:`AUTOUIC`, + and :prop_tgt:`AUTORCC`. -* The :module:`CPackRPM` module learned to modify debuginfo package name. - See :variable:`CPACK_RPM_DEBUGINFO_FILE_NAME` variable. +* A new :prop_tgt:`AUTOMOC_DEPEND_FILTERS` target property was introduced to + allow :prop_tgt:`AUTOMOC` to extract additional dependency file names + for ``moc`` from the contents of source files. -* A :prop_test:`DISABLED` test property was added to mark tests that - are configured but explicitly disabled so they do not run. +* A new :prop_tgt:`AUTOUIC_SEARCH_PATHS` target property was introduced to + allow :prop_tgt:`AUTOUIC` to search for ``foo.ui`` in more + places than the vicinity of the file including ``ui_foo.h``. -* The :command:`ctest_submit` command gained a ``HTTPHEADER`` option - to specify custom headers to send during submission. +* Global properties :prop_gbl:`AUTOGEN_SOURCE_GROUP`, + :prop_gbl:`AUTOMOC_SOURCE_GROUP` and + :prop_gbl:`AUTORCC_SOURCE_GROUP` were + introduced to allow files generated by :prop_tgt:`AUTOMOC` or + :prop_tgt:`AUTORCC` to be placed in a :command:`source_group`. -* When running tests, CTest learned to treat skipped tests (using the - :prop_test:`SKIP_RETURN_CODE` property) the same as tests with the - :prop_test:`DISABLED` property. Due to this change, CTest will not indicate - failure when all tests are either skipped or pass. +* A :prop_tgt:`BUILD_WITH_INSTALL_NAME_DIR` target property and corresponding + :variable:`CMAKE_BUILD_WITH_INSTALL_NAME_DIR` variable were added to + control whether to use the :prop_tgt:`INSTALL_NAME_DIR` target property + value for binaries in the build tree. This is for macOS ``install_name`` + as :prop_tgt:`BUILD_WITH_INSTALL_RPATH` is for ``RPATH``. -* ``CUDA`` is now supported by the :ref:`Visual Studio Generators` - for VS 2010 and above. +* A :prop_tgt:`CUDA_PTX_COMPILATION` target property was added to + :ref:`Object Libraries` to support compiling to ``.ptx`` files + instead of host object files. -* An explicit deprecation diagnostic was added for policies ``CMP0036`` - and below. The :manual:`cmake-policies(7)` manual explains that the - OLD behaviors of all policies are deprecated and that projects should - port to the NEW behaviors. +* A :prop_gbl:`GENERATOR_IS_MULTI_CONFIG` global property was + added to determine whether the current generator is a multi-configuration + generator (such as :ref:`Visual Studio Generators` or :generator:`Xcode`). -* The :module:`FindDoxygen` module learned to control Doxygen behavior using - CMake variables and generate documentation via the newly added - :command:`doxygen_add_docs` function. The Doxygen input file (``Doxyfile``) - is automatically generated and doxygen is run as part of a custom target. - A number of doxygen-related variables have been deprecated. Additional - components can be specified to find optional tools: ``dot``, ``mscgen`` - and ``dia``. +* The :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` target property is now enforced + when enabled. CMake will add IPO flags unconditionally or produce an error + if it does not know the flags for the current compiler. The project is now + responsible to use the :module:`CheckIPOSupported` module to check for IPO + support before enabling the target property. See policy :policy:`CMP0069`. -* The :prop_tgt:`CUDA_PTX_COMPILATION` target property was added to - :ref:`Object Libraries` to support compiling to ``.ptx`` files - instead of host object files. +* The :prop_tgt:`WINDOWS_EXPORT_ALL_SYMBOLS` target property may now + be used in combination with explicit ``.def`` files in order to + export all symbols from the object files within a target plus + an explicit list of symbols that the linker finds in dependencies + (e.g. ``msvcrt.lib``). -* The :manual:`ctest(1)` executable gained new options which allow the - developer to disable automatically adding tests to the test set to satisfy - fixture dependencies. ``-FS`` prevents adding setup tests for fixtures - matching the provided regular expression, ``-FC`` prevents adding cleanup - tests for matching fixtures and ``-FA`` prevents adding any test for matching - fixtures. +Modules +------- -* A new :module:`GoogleTest` module was added to provide the - :command:`gtest_add_tests` function independently of the :module:`FindGTest` - module. The function was also updated to support keyword arguments, with - functionality expanded to allow a test name prefix and suffix to be - specified, the dependency on the source files to be optional and the list of - discovered test cases to be returned to the caller. +* A :module:`CheckIPOSupported` module was added to help projects + check whether interprocedural optimization (IPO) is supported by + the current toolchain and CMake version. -* The :command:`feature_summary` command in the :module:`FeatureSummary` module +* The :module:`FeatureSummary` module :command:`feature_summary` command now accepts the new ``DEFAULT_DESCRIPTION`` option that will print the default title for the selected package type. -* The global property :variable:`FeatureSummary__DESCRIPTION` can be - defined for each ```` to replace the type name with the specified string - whenever the package type is used in an output string by the - :module:`FeatureSummary` module. +* The :module:`FeatureSummary` module gained a new + :variable:`FeatureSummary__DESCRIPTION` variable that can be defined + for each ```` to replace the type name with the specified string + whenever the package type is used in an output string by the module. -* The :command:`file(GENERATE)` subcommand learned to evaluate the - ``TARGET_OBJECTS`` - :manual:`generator expression `. - -* A :variable:`CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX` variable was added to - tell the :command:`find_library` command to search in a ``lib`` - directory before each ``lib`` directory that would normally be searched. +* The :module:`FindDoxygen` module learned to control Doxygen behavior using + CMake variables and generate documentation via the newly added + :command:`doxygen_add_docs` function. The Doxygen input file (``Doxyfile``) + is automatically generated and doxygen is run as part of a custom target. + Additional components can be specified to find optional tools: ``dot``, + ``mscgen`` and ``dia``. * The :module:`FindMPI` module now provides imported targets. @@ -167,105 +169,136 @@ Changes made since CMake 3.8 include the following. * The :module:`FindProtobuf` module now provides imported targets when the libraries are found. -* Interprocedural optimization (IPO) is now supported for GNU - compilers using link time optimization (LTO) flags. See the - :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` target property and - :module:`CheckIPOSupported` module. - -* The :command:`include_external_msproject` command learned to use - the :prop_tgt:`MAP_IMPORTED_CONFIG_` target property - to map current configurations to the external configurations. - -* A :prop_tgt:`BUILD_WITH_INSTALL_NAME_DIR` target property and corresponding - :variable:`CMAKE_BUILD_WITH_INSTALL_NAME_DIR` variable were added to - control whether to use the :prop_tgt:`INSTALL_NAME_DIR` target property - value for binaries in the build tree. This is for macOS ``install_name`` - as :prop_tgt:`BUILD_WITH_INSTALL_RPATH` is for ``RPATH``. - -* On macOS, ``RPATH`` settings such as :prop_tgt:`BUILD_WITH_INSTALL_RPATH` - no longer affect the ``install_name`` field. See policy :policy:`CMP0068`. - -* The :command:`install(TARGETS)` command learned a new ``OBJECTS`` option to - specify where to install :ref:`Object Libraries`. +* A new :module:`GoogleTest` module was added to provide the + :command:`gtest_add_tests` function independently of the :module:`FindGTest` + module. The function was also updated to support keyword arguments, with + functionality expanded to allow a test name prefix and suffix to be + specified, the dependency on the source files to be optional and the list of + discovered test cases to be returned to the caller. -* The :command:`install(EXPORT)` command learned how to export - :ref:`Object Libraries`. +CTest +----- -* The :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` target property is now enforced - when enabled. CMake will add IPO flags unconditionally or produce an error - if it does not know the flags for the current compiler. The project is now - responsible to use the :module:`CheckIPOSupported` module to check for IPO - support before enabling the target property. See policy :policy:`CMP0069`. +* The :command:`ctest_submit` command gained a ``HTTPHEADER`` option + to specify custom headers to send during submission. -* On macOS the default application bundle ``Info.plist`` file now enables - Hi-DPI support. +* The :manual:`ctest(1)` executable gained new options which allow the + developer to disable automatically adding tests to the test set to satisfy + fixture dependencies. ``-FS`` prevents adding setup tests for fixtures + matching the provided regular expression, ``-FC`` prevents adding cleanup + tests for matching fixtures and ``-FA`` prevents adding any test for matching + fixtures. -* The :prop_tgt:`WINDOWS_EXPORT_ALL_SYMBOLS` target property may now - be used in combination with explicit ``.def`` files in order to - export all symbols from the object files within a target plus - an explicit list of symbols that the linker finds in dependencies - (e.g. ``msvcrt.lib``). +* A :prop_test:`DISABLED` test property was added to mark tests that + are configured but explicitly disabled so they do not run. -* The :generator:`Ninja` generator has loosened dependencies on object - compilation to depend on the custom targets and commands of dependent - libraries instead of the libraries themselves. This helps projects with deep - dependency graphs to be blocked only on their link steps at the deeper - levels rather than also blocking object compilation on dependent link steps. +CPack +----- -* All ``find_`` commands now have a `PACKAGE_ROOT` search path group that is - first in the search heuristics. If the ``find_`` command is called from - inside a find module, then the CMake and environment variables - ``_ROOT`` are used as prefixes and are the first set of paths - that are searched. +* The :module:`CPackArchive` module learned to modify the filename + per-component. See the :variable:`CPACK_ARCHIVE_FILE_NAME` variable and + its per-component version :variable:`CPACK_ARCHIVE__FILE_NAME`. * The :module:`CPackComponent` module :command:`cpack_add_component` command gained a new ``PLIST `` option to specify the ``pkgbuild`` ``--component-plist`` argument when using the :module:`productbuild ` generator. +* The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and + :command:`cpack_ifw_configure_component_group` commands gained + internationalization support for ``DISPLAY_NAME`` and ``DESCRIPTION`` + options. + +* The :module:`CPackIFW` module learned the new hint :variable:`CPACK_IFW_ROOT` + variable for finding the QtIFW tool suite installed in a non-standard place. + * The :module:`CPackProductBuild` module gained a new :variable:`CPACK_PRODUCTBUILD_RESOURCES_DIR` variable to specify resources to be copied into the ``Resources`` directory. -* The :command:`project` command learned an optional ``DESCRIPTION`` parameter. - See :command:`project` command and :variable:`PROJECT_DESCRIPTION` variable. +* The :module:`CPackRPM` module learned to modify the ``debuginfo`` package + name. See the :variable:`CPACK_RPM_DEBUGINFO_FILE_NAME` variable. -* A :prop_gbl:`GENERATOR_IS_MULTI_CONFIG` global property was - added to determine whether the current generator is a multi-configuration - generator (such as :ref:`Visual Studio Generators` or :generator:`Xcode`). +* The :module:`CPackWIX` module patching system now has the ability to set + additional attributes. This can be done by specifying attributes with + the ``CPackWiXFragment`` XML tag after the ``Id`` attribute. + See the :variable:`CPACK_WIX_PATCH_FILE` variable. + +* The CPack WIX generator implemented a new + :variable:`CPACK_WIX_ROOT_FOLDER_ID` variable which allows + using a custom root folder ID instead of the default + ``ProgramFilesFolder`` / ``ProgramFiles64Folder``. + +Other +----- + +* Interprocedural optimization (IPO) is now supported for GNU and Clang + compilers using link time optimization (LTO) flags. See the + :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` target property and + :module:`CheckIPOSupported` module. + +* The ``TARGET_OBJECTS`` + :manual:`generator expression ` + is now supported by the :command:`add_custom_command` and + :command:`file(GENERATE)` commands. + +* Two new informational generator expressions to retrieve Apple Bundle + directories have been added. The first one ``$`` + outputs the full path to the Bundle directory, the other one + ``$`` outputs the full path to the + ``Contents`` directory of macOS Bundles and App Bundles. For all other + bundle types and SDKs it is identical with ``$``. + The new expressions are helpful to query Bundle locations independent of + the different Bundle types and layouts on macOS and iOS. + +Deprecated and Removed Features +=============================== + +* An explicit deprecation diagnostic was added for policies ``CMP0036`` + and below. The :manual:`cmake-policies(7)` manual explains that the + OLD behaviors of all policies are deprecated and that projects should + always port to the NEW behaviors as soon as possible. + +* The :generator:`Visual Studio 8 2005` generator is now deprecated + and will be removed in a future version of CMake. * The :generator:`Visual Studio 7 .NET 2003` generator has been removed. * The :generator:`Xcode` generator dropped support for Xcode versions older than 3. -* A ``NATIVE_COMMAND`` mode was added to :command:`separate_arguments` - performing argument separation depening on the host operating system. - -* The :variable:`CMAKE_SYSROOT_COMPILE` and :variable:`CMAKE_SYSROOT_LINK` - variables were added to use separate sysroots for compiling and linking. +* The :module:`FindDoxygen` module has deprecated several variables. * The version of curl bundled with CMake no longer accepts URLs of the form ``file://c:/...`` on Windows due to a change in upstream curl 7.52. Use the form ``file:///c:/...`` instead to work on all versions. -* The :generator:`Visual Studio 8 2005` generator is now deprecated - and will be removed in a future version of CMake. +Other Changes +============= -* :ref:`Visual Studio Generators` for VS 2010 and above learned to support - the ``ASM_NASM`` language when ``nasm`` is installed. +* When using :prop_tgt:`AUTOMOC`, CMake now scans for the presence of the + ``Q_PLUGIN_METADATA`` macro and reruns moc when the file from the + macro's ``FILE`` argument changes. -* The patching system within the :module:`CPackWIX` module now allows the - ability to set additional attributes. This can be done by specifying - addional attributes with the ``CPackWiXFragment`` XML tag after the - ``Id`` attribute. See the :variable:`CPACK_WIX_PATCH_FILE` variable. +* When :prop_tgt:`AUTOMOC` detects an include statement of the form + ``#include "moc_.cpp"`` the search for the respective header file + now looks in the :prop_tgt:`INCLUDE_DIRECTORIES` of the target as well. -* The CPack WIX generator implemented a new - :variable:`CPACK_WIX_ROOT_FOLDER_ID` variable which allows - using a custom root folder ID instead of the default - ``ProgramFilesFolder`` / ``ProgramFiles64Folder``. +* When running tests, CTest learned to treat skipped tests (using the + :prop_test:`SKIP_RETURN_CODE` property) the same as tests with the new + :prop_test:`DISABLED` property. Due to this change, CTest will not indicate + failure when all tests are either skipped or pass. -* The :command:`find_library` command learned to search ``libx32`` paths - when the build targets the ``x32`` ABI. See the - :prop_gbl:`FIND_LIBRARY_USE_LIBX32_PATHS` global property. +* The :generator:`Ninja` generator has loosened the dependencies of object + compilation. Object compilation now depends only on custom targets + and custom commands associated with libraries on which the object's target + depends and no longer depends on the libraries themselves. Source files + in dependent targets may now compile without waiting for their targets' + dependencies to link. + +* On macOS, the default application bundle ``Info.plist`` file now enables + Hi-DPI support. + +* On macOS, ``RPATH`` settings such as :prop_tgt:`BUILD_WITH_INSTALL_RPATH` + no longer affect the ``install_name`` field. See policy :policy:`CMP0068`. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7bc264305037b9aa7a6f58400c81b33879dac369 commit 7bc264305037b9aa7a6f58400c81b33879dac369 Author: Brad King AuthorDate: Fri Jun 2 09:35:52 2017 -0400 Commit: Brad King CommitDate: Fri Jun 2 09:35:52 2017 -0400 Help: Consolidate 3.9 release notes Move all development release notes into a new version-specific document: tail -q -n +3 Help/release/dev/* > Help/release/3.9.rst git rm -- Help/release/dev/* except the sample topic: git checkout HEAD -- Help/release/dev/0-sample-topic.rst Reference the new document from the release notes index document. Add a title and intro sentence to the new document by hand. diff --git a/Help/release/3.9.rst b/Help/release/3.9.rst new file mode 100644 index 0000000..57bdbf0 --- /dev/null +++ b/Help/release/3.9.rst @@ -0,0 +1,271 @@ +CMake 3.9 Release Notes +*********************** + +.. only:: html + + .. contents:: + +Changes made since CMake 3.8 include the following. + +* The :command:`add_custom_command` command learned to evaluate the + ``TARGET_OBJECTS`` + :manual:`generator expression `. + +* The :command:`add_library` command ``IMPORTED`` option learned to support + :ref:`Object Libraries`. + +* The new target property :prop_tgt:`AUTOGEN_BUILD_DIR` was introduced which + allows to set a custom output directory for + :prop_tgt:`AUTOMOC`, :prop_tgt:`AUTOUIC` and :prop_tgt:`AUTORCC`. + +* Variable :variable:`CMAKE_AUTOMOC_DEPEND_FILTERS` was introduced to + allow :variable:`CMAKE_AUTOMOC` to extract additional dependency file names + for ``moc`` from the contents of source files. + +* The new target property :prop_tgt:`AUTOMOC_DEPEND_FILTERS` was introduced to + allow :prop_tgt:`AUTOMOC` to extract additional dependency file names + for ``moc`` from the contents of source files. + +* When using :prop_tgt:`AUTOMOC`, CMake scans for the presence of the + ``Q_PLUGIN_METADATA`` macro and reruns moc when the file from the + macro's ``FILE`` argument changes. + +* When :prop_tgt:`AUTOMOC` detects an include statement of the form + ``#include "moc_.cpp"`` the respective header file is searched + for in the :prop_tgt:`INCLUDE_DIRECTORIES` of the target as well. + +* Global properties :prop_gbl:`AUTOGEN_SOURCE_GROUP`, + :prop_gbl:`AUTOMOC_SOURCE_GROUP` and + :prop_gbl:`AUTORCC_SOURCE_GROUP` were + introduced to allow files generated by :prop_tgt:`AUTOMOC` or + :prop_tgt:`AUTORCC` to be placed in a :command:`source_group`. + +* Variable :variable:`CMAKE_AUTOUIC_SEARCH_PATHS` was introduced to + allow :variable:`CMAKE_AUTOUIC` to search for ``foo.ui`` in more + places than the vicinity of the ``ui_foo.h`` including file. + +* The new target property :prop_tgt:`AUTOUIC_SEARCH_PATHS` was introduced to + allow :prop_tgt:`AUTOUIC` to search for ``foo.ui`` in more + places than the vicinity of the ``ui_foo.h`` including file. + +* Two new informational generator expressions to retrieve Apple Bundle + directories have been added. The first one ``$`` + outputs the full path to the Bundle directory, the other one + ``$`` outputs the full path to the + ``Contents`` directory of macOS Bundles and App Bundles. For all other + bundle types and SDKs it is identical with ``$``. + + Those new expressions are helpful to query Bundle locations independent of + the different Bundle types and layouts on macOS and iOS. + +* A :module:`CheckIPOSupported` module was added to help projects + check whether interprocedural optimization (IPO) is supported by + the current toolchain and CMake version. + +* A :variable:`CMAKE_INTERPROCEDURAL_OPTIMIZATION` variable was added to + initialize the :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` property on all + targets. + +* The :generator:`Xcode` generator got the ability to create schema files. + This is still an experimental feature and can be activated by setting the + :variable:`CMAKE_XCODE_GENERATE_SCHEME` variable to a ``TRUE`` value. + +* A :variable:`CMAKE__COMPILER_AR` variable was added to hold + the path to the GCC/Clang wrapper of ``ar``. + +* A :variable:`CMAKE__COMPILER_RANLIB` variable was added to hold + the path to the GCC/Clang wrapper of ``ranlib``. + +* The :module:`CPackArchive` module learned to modify filename per component. + See :variable:`CPACK_ARCHIVE_FILE_NAME` variable and its per component + version. + +* The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and + :command:`cpack_ifw_configure_component_group` commands gained a + internationalization support for ``DISPLAY_NAME`` and ``DESCRIPTION`` options + to more specific configuration. + +* The :module:`CPackIFW` module learned the new hint :variable:`CPACK_IFW_ROOT` + variable for finding the QtIFW tool suite installed in a non-standard place. +* The :module:`CPackIFW` module tries to find and use QtIFW tools of the `3.0` + and `3.1` versions. + +* The :module:`CPackRPM` module learned to modify debuginfo package name. + See :variable:`CPACK_RPM_DEBUGINFO_FILE_NAME` variable. + +* A :prop_test:`DISABLED` test property was added to mark tests that + are configured but explicitly disabled so they do not run. + +* The :command:`ctest_submit` command gained a ``HTTPHEADER`` option + to specify custom headers to send during submission. + +* When running tests, CTest learned to treat skipped tests (using the + :prop_test:`SKIP_RETURN_CODE` property) the same as tests with the + :prop_test:`DISABLED` property. Due to this change, CTest will not indicate + failure when all tests are either skipped or pass. + +* ``CUDA`` is now supported by the :ref:`Visual Studio Generators` + for VS 2010 and above. + +* An explicit deprecation diagnostic was added for policies ``CMP0036`` + and below. The :manual:`cmake-policies(7)` manual explains that the + OLD behaviors of all policies are deprecated and that projects should + port to the NEW behaviors. + +* The :module:`FindDoxygen` module learned to control Doxygen behavior using + CMake variables and generate documentation via the newly added + :command:`doxygen_add_docs` function. The Doxygen input file (``Doxyfile``) + is automatically generated and doxygen is run as part of a custom target. + A number of doxygen-related variables have been deprecated. Additional + components can be specified to find optional tools: ``dot``, ``mscgen`` + and ``dia``. + +* The :prop_tgt:`CUDA_PTX_COMPILATION` target property was added to + :ref:`Object Libraries` to support compiling to ``.ptx`` files + instead of host object files. + +* The :manual:`ctest(1)` executable gained new options which allow the + developer to disable automatically adding tests to the test set to satisfy + fixture dependencies. ``-FS`` prevents adding setup tests for fixtures + matching the provided regular expression, ``-FC`` prevents adding cleanup + tests for matching fixtures and ``-FA`` prevents adding any test for matching + fixtures. + +* A new :module:`GoogleTest` module was added to provide the + :command:`gtest_add_tests` function independently of the :module:`FindGTest` + module. The function was also updated to support keyword arguments, with + functionality expanded to allow a test name prefix and suffix to be + specified, the dependency on the source files to be optional and the list of + discovered test cases to be returned to the caller. + +* The :command:`feature_summary` command in the :module:`FeatureSummary` module + accepts the new ``DEFAULT_DESCRIPTION`` option that will print the default + title for the selected package type. + +* The global property :variable:`FeatureSummary__DESCRIPTION` can be + defined for each ```` to replace the type name with the specified string + whenever the package type is used in an output string by the + :module:`FeatureSummary` module. + +* The :command:`file(GENERATE)` subcommand learned to evaluate the + ``TARGET_OBJECTS`` + :manual:`generator expression `. + +* A :variable:`CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX` variable was added to + tell the :command:`find_library` command to search in a ``lib`` + directory before each ``lib`` directory that would normally be searched. + +* The :module:`FindMPI` module now provides imported targets. + +* The :module:`FindProtobuf` module :command:`protobuf_generate_cpp` + command gained an ``EXPORT_MACRO`` option to specify the name of + a DLL export markup macro. + +* The :module:`FindProtobuf` module now supports usage of static libraries + for Unix via a new ``Protobuf_USE_STATIC_LIBS`` input variable. + +* The :module:`FindProtobuf` module now provides imported targets + when the libraries are found. + +* Interprocedural optimization (IPO) is now supported for GNU + compilers using link time optimization (LTO) flags. See the + :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` target property and + :module:`CheckIPOSupported` module. + +* The :command:`include_external_msproject` command learned to use + the :prop_tgt:`MAP_IMPORTED_CONFIG_` target property + to map current configurations to the external configurations. + +* A :prop_tgt:`BUILD_WITH_INSTALL_NAME_DIR` target property and corresponding + :variable:`CMAKE_BUILD_WITH_INSTALL_NAME_DIR` variable were added to + control whether to use the :prop_tgt:`INSTALL_NAME_DIR` target property + value for binaries in the build tree. This is for macOS ``install_name`` + as :prop_tgt:`BUILD_WITH_INSTALL_RPATH` is for ``RPATH``. + +* On macOS, ``RPATH`` settings such as :prop_tgt:`BUILD_WITH_INSTALL_RPATH` + no longer affect the ``install_name`` field. See policy :policy:`CMP0068`. + +* The :command:`install(TARGETS)` command learned a new ``OBJECTS`` option to + specify where to install :ref:`Object Libraries`. + +* The :command:`install(EXPORT)` command learned how to export + :ref:`Object Libraries`. + +* The :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` target property is now enforced + when enabled. CMake will add IPO flags unconditionally or produce an error + if it does not know the flags for the current compiler. The project is now + responsible to use the :module:`CheckIPOSupported` module to check for IPO + support before enabling the target property. See policy :policy:`CMP0069`. + +* On macOS the default application bundle ``Info.plist`` file now enables + Hi-DPI support. + +* The :prop_tgt:`WINDOWS_EXPORT_ALL_SYMBOLS` target property may now + be used in combination with explicit ``.def`` files in order to + export all symbols from the object files within a target plus + an explicit list of symbols that the linker finds in dependencies + (e.g. ``msvcrt.lib``). + +* The :generator:`Ninja` generator has loosened dependencies on object + compilation to depend on the custom targets and commands of dependent + libraries instead of the libraries themselves. This helps projects with deep + dependency graphs to be blocked only on their link steps at the deeper + levels rather than also blocking object compilation on dependent link steps. + +* All ``find_`` commands now have a `PACKAGE_ROOT` search path group that is + first in the search heuristics. If the ``find_`` command is called from + inside a find module, then the CMake and environment variables + ``_ROOT`` are used as prefixes and are the first set of paths + that are searched. + +* The :module:`CPackComponent` module :command:`cpack_add_component` command + gained a new ``PLIST `` option to specify the ``pkgbuild`` + ``--component-plist`` argument when using the + :module:`productbuild ` generator. + +* The :module:`CPackProductBuild` module gained a new + :variable:`CPACK_PRODUCTBUILD_RESOURCES_DIR` variable to + specify resources to be copied into the ``Resources`` + directory. + +* The :command:`project` command learned an optional ``DESCRIPTION`` parameter. + See :command:`project` command and :variable:`PROJECT_DESCRIPTION` variable. + +* A :prop_gbl:`GENERATOR_IS_MULTI_CONFIG` global property was + added to determine whether the current generator is a multi-configuration + generator (such as :ref:`Visual Studio Generators` or :generator:`Xcode`). + +* The :generator:`Visual Studio 7 .NET 2003` generator has been removed. + +* The :generator:`Xcode` generator dropped support for Xcode versions + older than 3. + +* A ``NATIVE_COMMAND`` mode was added to :command:`separate_arguments` + performing argument separation depening on the host operating system. + +* The :variable:`CMAKE_SYSROOT_COMPILE` and :variable:`CMAKE_SYSROOT_LINK` + variables were added to use separate sysroots for compiling and linking. + +* The version of curl bundled with CMake no longer accepts URLs of the form + ``file://c:/...`` on Windows due to a change in upstream curl 7.52. Use + the form ``file:///c:/...`` instead to work on all versions. + +* The :generator:`Visual Studio 8 2005` generator is now deprecated + and will be removed in a future version of CMake. + +* :ref:`Visual Studio Generators` for VS 2010 and above learned to support + the ``ASM_NASM`` language when ``nasm`` is installed. + +* The patching system within the :module:`CPackWIX` module now allows the + ability to set additional attributes. This can be done by specifying + addional attributes with the ``CPackWiXFragment`` XML tag after the + ``Id`` attribute. See the :variable:`CPACK_WIX_PATCH_FILE` variable. + +* The CPack WIX generator implemented a new + :variable:`CPACK_WIX_ROOT_FOLDER_ID` variable which allows + using a custom root folder ID instead of the default + ``ProgramFilesFolder`` / ``ProgramFiles64Folder``. + +* The :command:`find_library` command learned to search ``libx32`` paths + when the build targets the ``x32`` ABI. See the + :prop_gbl:`FIND_LIBRARY_USE_LIBX32_PATHS` global property. diff --git a/Help/release/dev/Autogen_build_dir.rst b/Help/release/dev/Autogen_build_dir.rst deleted file mode 100644 index d11c00b..0000000 --- a/Help/release/dev/Autogen_build_dir.rst +++ /dev/null @@ -1,6 +0,0 @@ -AutoGen build dir ------------------ - -* The new target property :prop_tgt:`AUTOGEN_BUILD_DIR` was introduced which - allows to set a custom output directory for - :prop_tgt:`AUTOMOC`, :prop_tgt:`AUTOUIC` and :prop_tgt:`AUTORCC`. diff --git a/Help/release/dev/Autogen_depends.rst b/Help/release/dev/Autogen_depends.rst deleted file mode 100644 index c774386..0000000 --- a/Help/release/dev/Autogen_depends.rst +++ /dev/null @@ -1,10 +0,0 @@ -AutoGen depends ---------------- - -* Variable :variable:`CMAKE_AUTOMOC_DEPEND_FILTERS` was introduced to - allow :variable:`CMAKE_AUTOMOC` to extract additional dependency file names - for ``moc`` from the contents of source files. - -* The new target property :prop_tgt:`AUTOMOC_DEPEND_FILTERS` was introduced to - allow :prop_tgt:`AUTOMOC` to extract additional dependency file names - for ``moc`` from the contents of source files. diff --git a/Help/release/dev/Autogen_json.rst b/Help/release/dev/Autogen_json.rst deleted file mode 100644 index 73bbdf1..0000000 --- a/Help/release/dev/Autogen_json.rst +++ /dev/null @@ -1,10 +0,0 @@ -AutoGen json ------------- - -* When using :prop_tgt:`AUTOMOC`, CMake scans for the presence of the - ``Q_PLUGIN_METADATA`` macro and reruns moc when the file from the - macro's ``FILE`` argument changes. - -* When :prop_tgt:`AUTOMOC` detects an include statement of the form - ``#include "moc_.cpp"`` the respective header file is searched - for in the :prop_tgt:`INCLUDE_DIRECTORIES` of the target as well. diff --git a/Help/release/dev/Autogen_source_group.rst b/Help/release/dev/Autogen_source_group.rst deleted file mode 100644 index 60faa8c..0000000 --- a/Help/release/dev/Autogen_source_group.rst +++ /dev/null @@ -1,8 +0,0 @@ -AutoGen source group --------------------- - -* Global properties :prop_gbl:`AUTOGEN_SOURCE_GROUP`, - :prop_gbl:`AUTOMOC_SOURCE_GROUP` and - :prop_gbl:`AUTORCC_SOURCE_GROUP` were - introduced to allow files generated by :prop_tgt:`AUTOMOC` or - :prop_tgt:`AUTORCC` to be placed in a :command:`source_group`. diff --git a/Help/release/dev/Autogen_uic_paths.rst b/Help/release/dev/Autogen_uic_paths.rst deleted file mode 100644 index 0893194..0000000 --- a/Help/release/dev/Autogen_uic_paths.rst +++ /dev/null @@ -1,10 +0,0 @@ -AutoGen uic paths ------------------ - -* Variable :variable:`CMAKE_AUTOUIC_SEARCH_PATHS` was introduced to - allow :variable:`CMAKE_AUTOUIC` to search for ``foo.ui`` in more - places than the vicinity of the ``ui_foo.h`` including file. - -* The new target property :prop_tgt:`AUTOUIC_SEARCH_PATHS` was introduced to - allow :prop_tgt:`AUTOUIC` to search for ``foo.ui`` in more - places than the vicinity of the ``ui_foo.h`` including file. diff --git a/Help/release/dev/CMAKE_INTERPROCEDURAL_OPTIMIZATION.rst b/Help/release/dev/CMAKE_INTERPROCEDURAL_OPTIMIZATION.rst deleted file mode 100644 index fc4f733..0000000 --- a/Help/release/dev/CMAKE_INTERPROCEDURAL_OPTIMIZATION.rst +++ /dev/null @@ -1,6 +0,0 @@ -CMAKE_INTERPROCEDURAL_OPTIMIZATION ----------------------------------- - -* A :variable:`CMAKE_INTERPROCEDURAL_OPTIMIZATION` variable was added to - initialize the :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` property on all - targets. diff --git a/Help/release/dev/CheckIPOSupported.rst b/Help/release/dev/CheckIPOSupported.rst deleted file mode 100644 index dbc84e6..0000000 --- a/Help/release/dev/CheckIPOSupported.rst +++ /dev/null @@ -1,6 +0,0 @@ -CheckIPOSupported ------------------ - -* A :module:`CheckIPOSupported` module was added to help projects - check whether interprocedural optimization (IPO) is supported by - the current toolchain and CMake version. diff --git a/Help/release/dev/ExtractGTestMacro.rst b/Help/release/dev/ExtractGTestMacro.rst deleted file mode 100644 index ff2b444..0000000 --- a/Help/release/dev/ExtractGTestMacro.rst +++ /dev/null @@ -1,9 +0,0 @@ -ExtractGTestMacro ------------------ - -* A new :module:`GoogleTest` module was added to provide the - :command:`gtest_add_tests` function independently of the :module:`FindGTest` - module. The function was also updated to support keyword arguments, with - functionality expanded to allow a test name prefix and suffix to be - specified, the dependency on the source files to be optional and the list of - discovered test cases to be returned to the caller. diff --git a/Help/release/dev/FeatureSummary_description.rst b/Help/release/dev/FeatureSummary_description.rst deleted file mode 100644 index c56e4ce..0000000 --- a/Help/release/dev/FeatureSummary_description.rst +++ /dev/null @@ -1,11 +0,0 @@ -FeatureSummary_description --------------------------- - -* The :command:`feature_summary` command in the :module:`FeatureSummary` module - accepts the new ``DEFAULT_DESCRIPTION`` option that will print the default - title for the selected package type. - -* The global property :variable:`FeatureSummary__DESCRIPTION` can be - defined for each ```` to replace the type name with the specified string - whenever the package type is used in an output string by the - :module:`FeatureSummary` module. diff --git a/Help/release/dev/FindMPI-add-imported-targets.rst b/Help/release/dev/FindMPI-add-imported-targets.rst deleted file mode 100644 index c0a7bfc..0000000 --- a/Help/release/dev/FindMPI-add-imported-targets.rst +++ /dev/null @@ -1,4 +0,0 @@ -FindMPI-add-imported-targets ------------------------------- - -* The :module:`FindMPI` module now provides imported targets. diff --git a/Help/release/dev/FindProtobuf-export-macro.rst b/Help/release/dev/FindProtobuf-export-macro.rst deleted file mode 100644 index 43d9223..0000000 --- a/Help/release/dev/FindProtobuf-export-macro.rst +++ /dev/null @@ -1,6 +0,0 @@ -FindProtobuf-export-macro -------------------------- - -* The :module:`FindProtobuf` module :command:`protobuf_generate_cpp` - command gained an ``EXPORT_MACRO`` option to specify the name of - a DLL export markup macro. diff --git a/Help/release/dev/FindProtobuf-static-libs.rst b/Help/release/dev/FindProtobuf-static-libs.rst deleted file mode 100644 index fcc0678..0000000 --- a/Help/release/dev/FindProtobuf-static-libs.rst +++ /dev/null @@ -1,5 +0,0 @@ -FindProtobuf-static-libs ------------------------- - -* The :module:`FindProtobuf` module now supports usage of static libraries - for Unix via a new ``Protobuf_USE_STATIC_LIBS`` input variable. diff --git a/Help/release/dev/FindProtobuf-targets.rst b/Help/release/dev/FindProtobuf-targets.rst deleted file mode 100644 index e38303d..0000000 --- a/Help/release/dev/FindProtobuf-targets.rst +++ /dev/null @@ -1,5 +0,0 @@ -FindProtobuf-targets --------------------- - -* The :module:`FindProtobuf` module now provides imported targets - when the libraries are found. diff --git a/Help/release/dev/PackageRoot-search-path-group.rst b/Help/release/dev/PackageRoot-search-path-group.rst deleted file mode 100644 index 4fb8237..0000000 --- a/Help/release/dev/PackageRoot-search-path-group.rst +++ /dev/null @@ -1,8 +0,0 @@ -PackageRoot search path group ------------------------------ - -* All ``find_`` commands now have a `PACKAGE_ROOT` search path group that is - first in the search heuristics. If the ``find_`` command is called from - inside a find module, then the CMake and environment variables - ``_ROOT`` are used as prefixes and are the first set of paths - that are searched. diff --git a/Help/release/dev/add_custom_command-TARGET_OBJECTS.rst b/Help/release/dev/add_custom_command-TARGET_OBJECTS.rst deleted file mode 100644 index c4a9ee8..0000000 --- a/Help/release/dev/add_custom_command-TARGET_OBJECTS.rst +++ /dev/null @@ -1,6 +0,0 @@ -add_custom_command-TARGET_OBJECTS ---------------------------------- - -* The :command:`add_custom_command` command learned to evaluate the - ``TARGET_OBJECTS`` - :manual:`generator expression `. diff --git a/Help/release/dev/add_library-TARGET_OBJECTS.rst b/Help/release/dev/add_library-TARGET_OBJECTS.rst deleted file mode 100644 index 964064e..0000000 --- a/Help/release/dev/add_library-TARGET_OBJECTS.rst +++ /dev/null @@ -1,5 +0,0 @@ -add_library-TARGET_OBJECTS --------------------------- - -* The :command:`add_library` command ``IMPORTED`` option learned to support - :ref:`Object Libraries`. diff --git a/Help/release/dev/bundle-genex.rst b/Help/release/dev/bundle-genex.rst deleted file mode 100644 index e79b84c..0000000 --- a/Help/release/dev/bundle-genex.rst +++ /dev/null @@ -1,12 +0,0 @@ -bundle-genex ------------- - -* Two new informational generator expressions to retrieve Apple Bundle - directories have been added. The first one ``$`` - outputs the full path to the Bundle directory, the other one - ``$`` outputs the full path to the - ``Contents`` directory of macOS Bundles and App Bundles. For all other - bundle types and SDKs it is identical with ``$``. - - Those new expressions are helpful to query Bundle locations independent of - the different Bundle types and layouts on macOS and iOS. diff --git a/Help/release/dev/cmake-xcode-schemes.rst b/Help/release/dev/cmake-xcode-schemes.rst deleted file mode 100644 index 81068ae..0000000 --- a/Help/release/dev/cmake-xcode-schemes.rst +++ /dev/null @@ -1,6 +0,0 @@ -cmake-xcode-schemes -------------------- - -* The :generator:`Xcode` generator got the ability to create schema files. - This is still an experimental feature and can be activated by setting the - :variable:`CMAKE_XCODE_GENERATE_SCHEME` variable to a ``TRUE`` value. diff --git a/Help/release/dev/compiler_archiving_tools.rst b/Help/release/dev/compiler_archiving_tools.rst deleted file mode 100644 index de3471d..0000000 --- a/Help/release/dev/compiler_archiving_tools.rst +++ /dev/null @@ -1,8 +0,0 @@ -compiler_archiving_tools ------------------------- - -* A :variable:`CMAKE__COMPILER_AR` variable was added to hold - the path to the GCC/Clang wrapper of ``ar``. - -* A :variable:`CMAKE__COMPILER_RANLIB` variable was added to hold - the path to the GCC/Clang wrapper of ``ranlib``. diff --git a/Help/release/dev/cpack-archive-per-component-filename.rst b/Help/release/dev/cpack-archive-per-component-filename.rst deleted file mode 100644 index a7a413f..0000000 --- a/Help/release/dev/cpack-archive-per-component-filename.rst +++ /dev/null @@ -1,6 +0,0 @@ -cpack-rpm-debuginfo-honor-package-filename ------------------------------------------- - -* The :module:`CPackArchive` module learned to modify filename per component. - See :variable:`CPACK_ARCHIVE_FILE_NAME` variable and its per component - version. diff --git a/Help/release/dev/cpack-rpm-debuginfo-honor-package-filename.rst b/Help/release/dev/cpack-rpm-debuginfo-honor-package-filename.rst deleted file mode 100644 index 1c6eb2b..0000000 --- a/Help/release/dev/cpack-rpm-debuginfo-honor-package-filename.rst +++ /dev/null @@ -1,5 +0,0 @@ -cpack-rpm-debuginfo-honor-package-filename ------------------------------------------- - -* The :module:`CPackRPM` module learned to modify debuginfo package name. - See :variable:`CPACK_RPM_DEBUGINFO_FILE_NAME` variable. diff --git a/Help/release/dev/cpackifw-i18n.rst b/Help/release/dev/cpackifw-i18n.rst deleted file mode 100644 index 59327fe..0000000 --- a/Help/release/dev/cpackifw-i18n.rst +++ /dev/null @@ -1,7 +0,0 @@ -cpackifw-i18n -------------- - -* The :module:`CPackIFW` module :command:`cpack_ifw_configure_component` and - :command:`cpack_ifw_configure_component_group` commands gained a - internationalization support for ``DISPLAY_NAME`` and ``DESCRIPTION`` options - to more specific configuration. diff --git a/Help/release/dev/cpackifw-search-algorithm.rst b/Help/release/dev/cpackifw-search-algorithm.rst deleted file mode 100644 index f2e9985..0000000 --- a/Help/release/dev/cpackifw-search-algorithm.rst +++ /dev/null @@ -1,7 +0,0 @@ -cpackifw-search-algorithm -------------------------- - -* The :module:`CPackIFW` module learned the new hint :variable:`CPACK_IFW_ROOT` - variable for finding the QtIFW tool suite installed in a non-standard place. -* The :module:`CPackIFW` module tries to find and use QtIFW tools of the `3.0` - and `3.1` versions. diff --git a/Help/release/dev/ctest-disable-tests.rst b/Help/release/dev/ctest-disable-tests.rst deleted file mode 100644 index 9208f0c..0000000 --- a/Help/release/dev/ctest-disable-tests.rst +++ /dev/null @@ -1,5 +0,0 @@ -ctest-disable-tests -------------------- - -* A :prop_test:`DISABLED` test property was added to mark tests that - are configured but explicitly disabled so they do not run. diff --git a/Help/release/dev/ctest_submit_headers.rst b/Help/release/dev/ctest_submit_headers.rst deleted file mode 100644 index 61fbc7a..0000000 --- a/Help/release/dev/ctest_submit_headers.rst +++ /dev/null @@ -1,5 +0,0 @@ -ctest_submit_headers --------------------- - -* The :command:`ctest_submit` command gained a ``HTTPHEADER`` option - to specify custom headers to send during submission. diff --git a/Help/release/dev/ctest_test-ignore-skipped-tests.rst b/Help/release/dev/ctest_test-ignore-skipped-tests.rst deleted file mode 100644 index 1e2486c..0000000 --- a/Help/release/dev/ctest_test-ignore-skipped-tests.rst +++ /dev/null @@ -1,7 +0,0 @@ -ctest_test-ignore-skipped-tests -------------------------------- - -* When running tests, CTest learned to treat skipped tests (using the - :prop_test:`SKIP_RETURN_CODE` property) the same as tests with the - :prop_test:`DISABLED` property. Due to this change, CTest will not indicate - failure when all tests are either skipped or pass. diff --git a/Help/release/dev/cuda-vs.rst b/Help/release/dev/cuda-vs.rst deleted file mode 100644 index 9170537..0000000 --- a/Help/release/dev/cuda-vs.rst +++ /dev/null @@ -1,5 +0,0 @@ -cuda-vs -------- - -* ``CUDA`` is now supported by the :ref:`Visual Studio Generators` - for VS 2010 and above. diff --git a/Help/release/dev/deprecate-policy-old.rst b/Help/release/dev/deprecate-policy-old.rst deleted file mode 100644 index 9ae30e6..0000000 --- a/Help/release/dev/deprecate-policy-old.rst +++ /dev/null @@ -1,7 +0,0 @@ -deprecate-policy-old --------------------- - -* An explicit deprecation diagnostic was added for policies ``CMP0036`` - and below. The :manual:`cmake-policies(7)` manual explains that the - OLD behaviors of all policies are deprecated and that projects should - port to the NEW behaviors. diff --git a/Help/release/dev/doxygen-improvements.rst b/Help/release/dev/doxygen-improvements.rst deleted file mode 100644 index fd86536..0000000 --- a/Help/release/dev/doxygen-improvements.rst +++ /dev/null @@ -1,10 +0,0 @@ -doxygen-improvements --------------------- - -* The :module:`FindDoxygen` module learned to control Doxygen behavior using - CMake variables and generate documentation via the newly added - :command:`doxygen_add_docs` function. The Doxygen input file (``Doxyfile``) - is automatically generated and doxygen is run as part of a custom target. - A number of doxygen-related variables have been deprecated. Additional - components can be specified to find optional tools: ``dot``, ``mscgen`` - and ``dia``. diff --git a/Help/release/dev/enable_ptx_compilation.rst b/Help/release/dev/enable_ptx_compilation.rst deleted file mode 100644 index 965247f..0000000 --- a/Help/release/dev/enable_ptx_compilation.rst +++ /dev/null @@ -1,6 +0,0 @@ -enable_ptx_compilation ----------------------- - -* The :prop_tgt:`CUDA_PTX_COMPILATION` target property was added to - :ref:`Object Libraries` to support compiling to ``.ptx`` files - instead of host object files. diff --git a/Help/release/dev/excludeFixtures.rst b/Help/release/dev/excludeFixtures.rst deleted file mode 100644 index 56d4226..0000000 --- a/Help/release/dev/excludeFixtures.rst +++ /dev/null @@ -1,9 +0,0 @@ -excludeFixtures ---------------- - -* The :manual:`ctest(1)` executable gained new options which allow the - developer to disable automatically adding tests to the test set to satisfy - fixture dependencies. ``-FS`` prevents adding setup tests for fixtures - matching the provided regular expression, ``-FC`` prevents adding cleanup - tests for matching fixtures and ``-FA`` prevents adding any test for matching - fixtures. diff --git a/Help/release/dev/file-GENERATE-TARGET_OBJECTS.rst b/Help/release/dev/file-GENERATE-TARGET_OBJECTS.rst deleted file mode 100644 index 853a803..0000000 --- a/Help/release/dev/file-GENERATE-TARGET_OBJECTS.rst +++ /dev/null @@ -1,6 +0,0 @@ -file-GENERATE-TARGET_OBJECTS ----------------------------- - -* The :command:`file(GENERATE)` subcommand learned to evaluate the - ``TARGET_OBJECTS`` - :manual:`generator expression `. diff --git a/Help/release/dev/find_library-custom-lib-suffix.rst b/Help/release/dev/find_library-custom-lib-suffix.rst deleted file mode 100644 index 824b27e..0000000 --- a/Help/release/dev/find_library-custom-lib-suffix.rst +++ /dev/null @@ -1,6 +0,0 @@ -find_library-custom-lib-suffix ------------------------------- - -* A :variable:`CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX` variable was added to - tell the :command:`find_library` command to search in a ``lib`` - directory before each ``lib`` directory that would normally be searched. diff --git a/Help/release/dev/gcc-ipo.rst b/Help/release/dev/gcc-ipo.rst deleted file mode 100644 index ebc5c0d..0000000 --- a/Help/release/dev/gcc-ipo.rst +++ /dev/null @@ -1,7 +0,0 @@ -GCC IPO -------- - -* Interprocedural optimization (IPO) is now supported for GNU - compilers using link time optimization (LTO) flags. See the - :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` target property and - :module:`CheckIPOSupported` module. diff --git a/Help/release/dev/include_external_msproject-map-config.rst b/Help/release/dev/include_external_msproject-map-config.rst deleted file mode 100644 index d5f7a7f..0000000 --- a/Help/release/dev/include_external_msproject-map-config.rst +++ /dev/null @@ -1,6 +0,0 @@ -include_external_msproject-map-config -------------------------------------- - -* The :command:`include_external_msproject` command learned to use - the :prop_tgt:`MAP_IMPORTED_CONFIG_` target property - to map current configurations to the external configurations. diff --git a/Help/release/dev/install-TARGET_OBJECTS.rst b/Help/release/dev/install-TARGET_OBJECTS.rst deleted file mode 100644 index dbcf635..0000000 --- a/Help/release/dev/install-TARGET_OBJECTS.rst +++ /dev/null @@ -1,8 +0,0 @@ -install-TARGET_OBJECTS ----------------------- - -* The :command:`install(TARGETS)` command learned a new ``OBJECTS`` option to - specify where to install :ref:`Object Libraries`. - -* The :command:`install(EXPORT)` command learned how to export - :ref:`Object Libraries`. diff --git a/Help/release/dev/install_name_policy.rst b/Help/release/dev/install_name_policy.rst deleted file mode 100644 index 7fe9a86..0000000 --- a/Help/release/dev/install_name_policy.rst +++ /dev/null @@ -1,11 +0,0 @@ -install_name_policy -------------------- - -* A :prop_tgt:`BUILD_WITH_INSTALL_NAME_DIR` target property and corresponding - :variable:`CMAKE_BUILD_WITH_INSTALL_NAME_DIR` variable were added to - control whether to use the :prop_tgt:`INSTALL_NAME_DIR` target property - value for binaries in the build tree. This is for macOS ``install_name`` - as :prop_tgt:`BUILD_WITH_INSTALL_RPATH` is for ``RPATH``. - -* On macOS, ``RPATH`` settings such as :prop_tgt:`BUILD_WITH_INSTALL_RPATH` - no longer affect the ``install_name`` field. See policy :policy:`CMP0068`. diff --git a/Help/release/dev/interprocedural_optimization_policy.rst b/Help/release/dev/interprocedural_optimization_policy.rst deleted file mode 100644 index 93a9d68..0000000 --- a/Help/release/dev/interprocedural_optimization_policy.rst +++ /dev/null @@ -1,8 +0,0 @@ -interprocedural_optimization_policy ------------------------------------ - -* The :prop_tgt:`INTERPROCEDURAL_OPTIMIZATION` target property is now enforced - when enabled. CMake will add IPO flags unconditionally or produce an error - if it does not know the flags for the current compiler. The project is now - responsible to use the :module:`CheckIPOSupported` module to check for IPO - support before enabling the target property. See policy :policy:`CMP0069`. diff --git a/Help/release/dev/macos-hidpi-qt-dialog.rst b/Help/release/dev/macos-hidpi-qt-dialog.rst deleted file mode 100644 index 263d405..0000000 --- a/Help/release/dev/macos-hidpi-qt-dialog.rst +++ /dev/null @@ -1,5 +0,0 @@ -macos-hidpi-qt-dialog ---------------------- - -* On macOS the default application bundle ``Info.plist`` file now enables - Hi-DPI support. diff --git a/Help/release/dev/module-def-and-WINDOWS_EXPORT_ALL_SYMBOLS.rst b/Help/release/dev/module-def-and-WINDOWS_EXPORT_ALL_SYMBOLS.rst deleted file mode 100644 index dfa9ef1..0000000 --- a/Help/release/dev/module-def-and-WINDOWS_EXPORT_ALL_SYMBOLS.rst +++ /dev/null @@ -1,8 +0,0 @@ -module-def-and-WINDOWS_EXPORT_ALL_SYMBOLS ------------------------------------------ - -* The :prop_tgt:`WINDOWS_EXPORT_ALL_SYMBOLS` target property may now - be used in combination with explicit ``.def`` files in order to - export all symbols from the object files within a target plus - an explicit list of symbols that the linker finds in dependencies - (e.g. ``msvcrt.lib``). diff --git a/Help/release/dev/ninja-loosen-object-deps.rst b/Help/release/dev/ninja-loosen-object-deps.rst deleted file mode 100644 index c47fb93..0000000 --- a/Help/release/dev/ninja-loosen-object-deps.rst +++ /dev/null @@ -1,8 +0,0 @@ -ninja-loosen-object-deps ------------------------- - -* The :generator:`Ninja` generator has loosened dependencies on object - compilation to depend on the custom targets and commands of dependent - libraries instead of the libraries themselves. This helps projects with deep - dependency graphs to be blocked only on their link steps at the deeper - levels rather than also blocking object compilation on dependent link steps. diff --git a/Help/release/dev/productbuild_component_plist.rst b/Help/release/dev/productbuild_component_plist.rst deleted file mode 100644 index 78d305c..0000000 --- a/Help/release/dev/productbuild_component_plist.rst +++ /dev/null @@ -1,7 +0,0 @@ -productbuild_component_plist ----------------------------- - -* The :module:`CPackComponent` module :command:`cpack_add_component` command - gained a new ``PLIST `` option to specify the ``pkgbuild`` - ``--component-plist`` argument when using the - :module:`productbuild ` generator. diff --git a/Help/release/dev/productbuild_resources.rst b/Help/release/dev/productbuild_resources.rst deleted file mode 100644 index f381e63..0000000 --- a/Help/release/dev/productbuild_resources.rst +++ /dev/null @@ -1,7 +0,0 @@ -productbuild_resources ----------------------- - -* The :module:`CPackProductBuild` module gained a new - :variable:`CPACK_PRODUCTBUILD_RESOURCES_DIR` variable to - specify resources to be copied into the ``Resources`` - directory. diff --git a/Help/release/dev/project_description.rst b/Help/release/dev/project_description.rst deleted file mode 100644 index baf0045..0000000 --- a/Help/release/dev/project_description.rst +++ /dev/null @@ -1,5 +0,0 @@ -project-description -------------------- - -* The :command:`project` command learned an optional ``DESCRIPTION`` parameter. - See :command:`project` command and :variable:`PROJECT_DESCRIPTION` variable. diff --git a/Help/release/dev/prop-is-multi-config.rst b/Help/release/dev/prop-is-multi-config.rst deleted file mode 100644 index 52de563..0000000 --- a/Help/release/dev/prop-is-multi-config.rst +++ /dev/null @@ -1,6 +0,0 @@ -prop-is-multi-config --------------------- - -* A :prop_gbl:`GENERATOR_IS_MULTI_CONFIG` global property was - added to determine whether the current generator is a multi-configuration - generator (such as :ref:`Visual Studio Generators` or :generator:`Xcode`). diff --git a/Help/release/dev/remove-vs7.1-generator.rst b/Help/release/dev/remove-vs7.1-generator.rst deleted file mode 100644 index 72ffafb..0000000 --- a/Help/release/dev/remove-vs7.1-generator.rst +++ /dev/null @@ -1,4 +0,0 @@ -remove-vs7.1-generator ----------------------- - -* The :generator:`Visual Studio 7 .NET 2003` generator has been removed. diff --git a/Help/release/dev/remove-xcode-2.rst b/Help/release/dev/remove-xcode-2.rst deleted file mode 100644 index 5b36582..0000000 --- a/Help/release/dev/remove-xcode-2.rst +++ /dev/null @@ -1,5 +0,0 @@ -remove-xcode-2 --------------- - -* The :generator:`Xcode` generator dropped support for Xcode versions - older than 3. diff --git a/Help/release/dev/separgs-native.rst b/Help/release/dev/separgs-native.rst deleted file mode 100644 index 943f08e..0000000 --- a/Help/release/dev/separgs-native.rst +++ /dev/null @@ -1,5 +0,0 @@ -separgs-native -------------------- - -* A ``NATIVE_COMMAND`` mode was added to :command:`separate_arguments` - performing argument separation depening on the host operating system. diff --git a/Help/release/dev/split-sysroot.rst b/Help/release/dev/split-sysroot.rst deleted file mode 100644 index 8144e3f..0000000 --- a/Help/release/dev/split-sysroot.rst +++ /dev/null @@ -1,5 +0,0 @@ -split-sysroot -------------- - -* The :variable:`CMAKE_SYSROOT_COMPILE` and :variable:`CMAKE_SYSROOT_LINK` - variables were added to use separate sysroots for compiling and linking. diff --git a/Help/release/dev/update-curl.rst b/Help/release/dev/update-curl.rst deleted file mode 100644 index 852ad5a..0000000 --- a/Help/release/dev/update-curl.rst +++ /dev/null @@ -1,6 +0,0 @@ -update-curl ------------ - -* The version of curl bundled with CMake no longer accepts URLs of the form - ``file://c:/...`` on Windows due to a change in upstream curl 7.52. Use - the form ``file:///c:/...`` instead to work on all versions. diff --git a/Help/release/dev/vs-nasm.rst b/Help/release/dev/vs-nasm.rst deleted file mode 100644 index bb082a4..0000000 --- a/Help/release/dev/vs-nasm.rst +++ /dev/null @@ -1,5 +0,0 @@ -vs-nasm -------- - -* :ref:`Visual Studio Generators` for VS 2010 and above learned to support - the ``ASM_NASM`` language when ``nasm`` is installed. diff --git a/Help/release/dev/vs8-deprecate.rst b/Help/release/dev/vs8-deprecate.rst deleted file mode 100644 index 97d996f..0000000 --- a/Help/release/dev/vs8-deprecate.rst +++ /dev/null @@ -1,5 +0,0 @@ -vs8-deprecate -------------- - -* The :generator:`Visual Studio 8 2005` generator is now deprecated - and will be removed in a future version of CMake. diff --git a/Help/release/dev/wix-attributes-patch.rst b/Help/release/dev/wix-attributes-patch.rst deleted file mode 100644 index e68d9f2..0000000 --- a/Help/release/dev/wix-attributes-patch.rst +++ /dev/null @@ -1,7 +0,0 @@ -wix-attributes-patch --------------------- - -* The patching system within the :module:`CPackWIX` module now allows the - ability to set additional attributes. This can be done by specifying - addional attributes with the ``CPackWiXFragment`` XML tag after the - ``Id`` attribute. See the :variable:`CPACK_WIX_PATCH_FILE` variable. diff --git a/Help/release/dev/wix-custom-root-id.rst b/Help/release/dev/wix-custom-root-id.rst deleted file mode 100644 index 3e10fdd..0000000 --- a/Help/release/dev/wix-custom-root-id.rst +++ /dev/null @@ -1,7 +0,0 @@ -wix-custom-root-id ------------------- - -* The CPack WIX generator implemented a new - :variable:`CPACK_WIX_ROOT_FOLDER_ID` variable which allows - using a custom root folder ID instead of the default - ``ProgramFilesFolder`` / ``ProgramFiles64Folder``. diff --git a/Help/release/dev/x32-abi.rst b/Help/release/dev/x32-abi.rst deleted file mode 100644 index 7571fac..0000000 --- a/Help/release/dev/x32-abi.rst +++ /dev/null @@ -1,6 +0,0 @@ -x32-abi -------- - -* The :command:`find_library` command learned to search ``libx32`` paths - when the build targets the ``x32`` ABI. See the - :prop_gbl:`FIND_LIBRARY_USE_LIBX32_PATHS` global property. diff --git a/Help/release/index.rst b/Help/release/index.rst index 292c9a8..7f481a3 100644 --- a/Help/release/index.rst +++ b/Help/release/index.rst @@ -13,6 +13,7 @@ Releases .. toctree:: :maxdepth: 1 + 3.9 <3.9> 3.8 <3.8> 3.7 <3.7> 3.6 <3.6> ----------------------------------------------------------------------- Summary of changes: Help/dev/README.rst | 9 + Help/dev/maint.rst | 171 +++++++++++ Help/release/3.9.rst | 304 ++++++++++++++++++++ Help/release/dev/Autogen_build_dir.rst | 6 - Help/release/dev/Autogen_depends.rst | 10 - Help/release/dev/Autogen_json.rst | 10 - Help/release/dev/Autogen_source_group.rst | 8 - Help/release/dev/Autogen_uic_paths.rst | 10 - .../dev/CMAKE_INTERPROCEDURAL_OPTIMIZATION.rst | 6 - Help/release/dev/CheckIPOSupported.rst | 6 - Help/release/dev/ExtractGTestMacro.rst | 9 - Help/release/dev/FeatureSummary_description.rst | 11 - Help/release/dev/FindMPI-add-imported-targets.rst | 4 - Help/release/dev/FindProtobuf-export-macro.rst | 6 - Help/release/dev/FindProtobuf-static-libs.rst | 5 - Help/release/dev/FindProtobuf-targets.rst | 5 - Help/release/dev/PackageRoot-search-path-group.rst | 8 - .../dev/add_custom_command-TARGET_OBJECTS.rst | 6 - Help/release/dev/add_library-TARGET_OBJECTS.rst | 5 - Help/release/dev/bundle-genex.rst | 12 - Help/release/dev/cmake-xcode-schemes.rst | 6 - Help/release/dev/compiler_archiving_tools.rst | 8 - .../dev/cpack-archive-per-component-filename.rst | 6 - .../cpack-rpm-debuginfo-honor-package-filename.rst | 5 - Help/release/dev/cpackifw-i18n.rst | 7 - Help/release/dev/cpackifw-search-algorithm.rst | 7 - Help/release/dev/ctest-disable-tests.rst | 5 - Help/release/dev/ctest_submit_headers.rst | 5 - .../dev/ctest_test-ignore-skipped-tests.rst | 7 - Help/release/dev/cuda-vs.rst | 5 - Help/release/dev/deprecate-policy-old.rst | 7 - Help/release/dev/doxygen-improvements.rst | 10 - Help/release/dev/enable_ptx_compilation.rst | 6 - Help/release/dev/excludeFixtures.rst | 9 - Help/release/dev/file-GENERATE-TARGET_OBJECTS.rst | 6 - .../release/dev/find_library-custom-lib-suffix.rst | 6 - Help/release/dev/gcc-ipo.rst | 7 - .../dev/include_external_msproject-map-config.rst | 6 - Help/release/dev/install-TARGET_OBJECTS.rst | 8 - Help/release/dev/install_name_policy.rst | 11 - .../dev/interprocedural_optimization_policy.rst | 8 - Help/release/dev/macos-hidpi-qt-dialog.rst | 5 - .../module-def-and-WINDOWS_EXPORT_ALL_SYMBOLS.rst | 8 - Help/release/dev/ninja-loosen-object-deps.rst | 8 - Help/release/dev/productbuild_component_plist.rst | 7 - Help/release/dev/productbuild_resources.rst | 7 - Help/release/dev/project_description.rst | 5 - Help/release/dev/prop-is-multi-config.rst | 6 - Help/release/dev/remove-vs7.1-generator.rst | 4 - Help/release/dev/remove-xcode-2.rst | 5 - Help/release/dev/separgs-native.rst | 5 - Help/release/dev/split-sysroot.rst | 5 - Help/release/dev/update-curl.rst | 6 - Help/release/dev/vs-nasm.rst | 5 - Help/release/dev/vs8-deprecate.rst | 5 - Help/release/dev/wix-attributes-patch.rst | 7 - Help/release/dev/wix-custom-root-id.rst | 7 - Help/release/dev/x32-abi.rst | 6 - Help/release/index.rst | 1 + Modules/GoogleTest.cmake | 46 ++- Tests/GoogleTest/Test/CMakeLists.txt | 15 +- Tests/GoogleTest/Test/main2.h | 15 + Utilities/Release/consolidate-relnotes.bash | 27 ++ 63 files changed, 579 insertions(+), 382 deletions(-) create mode 100644 Help/dev/maint.rst create mode 100644 Help/release/3.9.rst delete mode 100644 Help/release/dev/Autogen_build_dir.rst delete mode 100644 Help/release/dev/Autogen_depends.rst delete mode 100644 Help/release/dev/Autogen_json.rst delete mode 100644 Help/release/dev/Autogen_source_group.rst delete mode 100644 Help/release/dev/Autogen_uic_paths.rst delete mode 100644 Help/release/dev/CMAKE_INTERPROCEDURAL_OPTIMIZATION.rst delete mode 100644 Help/release/dev/CheckIPOSupported.rst delete mode 100644 Help/release/dev/ExtractGTestMacro.rst delete mode 100644 Help/release/dev/FeatureSummary_description.rst delete mode 100644 Help/release/dev/FindMPI-add-imported-targets.rst delete mode 100644 Help/release/dev/FindProtobuf-export-macro.rst delete mode 100644 Help/release/dev/FindProtobuf-static-libs.rst delete mode 100644 Help/release/dev/FindProtobuf-targets.rst delete mode 100644 Help/release/dev/PackageRoot-search-path-group.rst delete mode 100644 Help/release/dev/add_custom_command-TARGET_OBJECTS.rst delete mode 100644 Help/release/dev/add_library-TARGET_OBJECTS.rst delete mode 100644 Help/release/dev/bundle-genex.rst delete mode 100644 Help/release/dev/cmake-xcode-schemes.rst delete mode 100644 Help/release/dev/compiler_archiving_tools.rst delete mode 100644 Help/release/dev/cpack-archive-per-component-filename.rst delete mode 100644 Help/release/dev/cpack-rpm-debuginfo-honor-package-filename.rst delete mode 100644 Help/release/dev/cpackifw-i18n.rst delete mode 100644 Help/release/dev/cpackifw-search-algorithm.rst delete mode 100644 Help/release/dev/ctest-disable-tests.rst delete mode 100644 Help/release/dev/ctest_submit_headers.rst delete mode 100644 Help/release/dev/ctest_test-ignore-skipped-tests.rst delete mode 100644 Help/release/dev/cuda-vs.rst delete mode 100644 Help/release/dev/deprecate-policy-old.rst delete mode 100644 Help/release/dev/doxygen-improvements.rst delete mode 100644 Help/release/dev/enable_ptx_compilation.rst delete mode 100644 Help/release/dev/excludeFixtures.rst delete mode 100644 Help/release/dev/file-GENERATE-TARGET_OBJECTS.rst delete mode 100644 Help/release/dev/find_library-custom-lib-suffix.rst delete mode 100644 Help/release/dev/gcc-ipo.rst delete mode 100644 Help/release/dev/include_external_msproject-map-config.rst delete mode 100644 Help/release/dev/install-TARGET_OBJECTS.rst delete mode 100644 Help/release/dev/install_name_policy.rst delete mode 100644 Help/release/dev/interprocedural_optimization_policy.rst delete mode 100644 Help/release/dev/macos-hidpi-qt-dialog.rst delete mode 100644 Help/release/dev/module-def-and-WINDOWS_EXPORT_ALL_SYMBOLS.rst delete mode 100644 Help/release/dev/ninja-loosen-object-deps.rst delete mode 100644 Help/release/dev/productbuild_component_plist.rst delete mode 100644 Help/release/dev/productbuild_resources.rst delete mode 100644 Help/release/dev/project_description.rst delete mode 100644 Help/release/dev/prop-is-multi-config.rst delete mode 100644 Help/release/dev/remove-vs7.1-generator.rst delete mode 100644 Help/release/dev/remove-xcode-2.rst delete mode 100644 Help/release/dev/separgs-native.rst delete mode 100644 Help/release/dev/split-sysroot.rst delete mode 100644 Help/release/dev/update-curl.rst delete mode 100644 Help/release/dev/vs-nasm.rst delete mode 100644 Help/release/dev/vs8-deprecate.rst delete mode 100644 Help/release/dev/wix-attributes-patch.rst delete mode 100644 Help/release/dev/wix-custom-root-id.rst delete mode 100644 Help/release/dev/x32-abi.rst create mode 100755 Utilities/Release/consolidate-relnotes.bash hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 5 10:45:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 5 Jun 2017 10:45:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.8.2-1409-gc095e90 Message-ID: <20170605144507.85191FA7F6@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via c095e90f3af78fb3421c80b725ebc6ad9ec85999 (commit) via fc812c0dcba77c9e2d57a2404cc1cc83c52de52c (commit) via 344f9ed96a4cc457810ca84cf6549f7a4218fd8a (commit) via 9450d1309995c0222c0c653bb32ca760f14ca2ce (commit) from d025faf436c86ee9cc033fbb324a9bc2c18757fa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c095e90f3af78fb3421c80b725ebc6ad9ec85999 commit c095e90f3af78fb3421c80b725ebc6ad9ec85999 Author: Brad King AuthorDate: Mon Jun 5 10:41:19 2017 -0400 Commit: Brad King CommitDate: Mon Jun 5 10:41:19 2017 -0400 Begin post-3.9 development diff --git a/Help/release/dev/0-sample-topic.rst b/Help/release/dev/0-sample-topic.rst new file mode 100644 index 0000000..e4cc01e --- /dev/null +++ b/Help/release/dev/0-sample-topic.rst @@ -0,0 +1,7 @@ +0-sample-topic +-------------- + +* This is a sample release note for the change in a topic. + Developers should add similar notes for each topic branch + making a noteworthy change. Each document should be named + and titled to match the topic name to avoid merge conflicts. diff --git a/Help/release/index.rst b/Help/release/index.rst index 8222d0c..7f481a3 100644 --- a/Help/release/index.rst +++ b/Help/release/index.rst @@ -5,6 +5,8 @@ CMake Release Notes This file should include the adjacent "dev.txt" file in development versions but not in release versions. +.. include:: dev.txt + Releases ======== diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 22b58a9..ff1e260 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 9) -set(CMake_VERSION_PATCH 0) -set(CMake_VERSION_RC 1) +set(CMake_VERSION_PATCH 20170605) +#set(CMake_VERSION_RC 1) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fc812c0dcba77c9e2d57a2404cc1cc83c52de52c commit fc812c0dcba77c9e2d57a2404cc1cc83c52de52c Merge: d025faf 344f9ed Author: Brad King AuthorDate: Mon Jun 5 10:40:18 2017 -0400 Commit: Brad King CommitDate: Mon Jun 5 10:40:18 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- Utilities/Release/upload_release.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 5 10:45:11 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 5 Jun 2017 10:45:11 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.8.2-1407-g344f9ed Message-ID: <20170605144511.763CBFA966@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via 344f9ed96a4cc457810ca84cf6549f7a4218fd8a (commit) via 9450d1309995c0222c0c653bb32ca760f14ca2ce (commit) via d025faf436c86ee9cc033fbb324a9bc2c18757fa (commit) via c26c69498e980a8009a4aa5748d08ae33b98e89c (commit) via 2d3d88f3bb7076a26d9147f63453931595133aa1 (commit) via 92bbb70695893b617aa5addc1d3747d9146a9f2b (commit) via c6ea3f01c3e78145b8fd3dd534d8803d8f7e7bd7 (commit) via 8a68a2ceb355621da21983c2571ead15d2b98dea (commit) via 00639f2d5d41bb44f6ead5165b249bcd9e2b95b3 (commit) via 5875140c57bc3160970d640070ae1e9ab19111db (commit) via 1fa165359fd7ed3989b1a8350726038a55deab5c (commit) via 7ff29fb37924038315870ffc8afa977e2538a12e (commit) via b1ec5deaf15be459658b8fb0392e4d4a4ec1a0dd (commit) via 8d7b3ef5d42c07dffe1f84af14b0055d288e4376 (commit) via 0068224fdd7569f02dffe9fd8de2e6ce0c7abc28 (commit) via 422c67e4f76358e34b26ec4fa641a682f160a22f (commit) via 913736f17dfb2e51423861c9a74be3a9be3211c8 (commit) via a44d3cc6ede7d4ef520151fdef5e5cf0a02707b7 (commit) via 4e52809edfbff7565fe19edad5b1c3054f2e2dfe (commit) via c913ab61aea87439d6822632a8e74a28a287a460 (commit) via f59d729c7cb03babafac0cee792b9a3127e51d4d (commit) via 945cb9aa93c1b42b63867d59d396d8723fa24c04 (commit) via 7bc264305037b9aa7a6f58400c81b33879dac369 (commit) via 3216c2178cfcc75d48f383a76ccff4aa052b5fdc (commit) via 78d1a2d0bbda1798ffc71b11a181d376914bdc3c (commit) via 0a082be80086931557df57a7171e80187ddf8aa8 (commit) via 2088ca0ca03900ced937d248dcd4129b0b821915 (commit) via db2d46e2ddbdf1c5d942e70b341e085f84e79c13 (commit) via 8b6f439ef20cf882b4f3deba48f34a01a98963d9 (commit) via 389ed56f63653e89b3d640cf7aebdc8ebe7ca643 (commit) via 9fe4a9e2aed8457d7124d86e31a272180794ac61 (commit) via 594a9fcf6fa1ad9bcfe91abe7d94df2e92f3d11b (commit) via 74ef363dd7e46fc883b9822f3516002d9345293e (commit) via 6a42b9609f1d0a047394a8d63fb8ddb803abce34 (commit) via 860db083cafb1337147923f7dd21b57767abbee3 (commit) via c80148c77e552a43b0648bad02de86e6b6d2b61d (commit) via 59234fa2da4387fe9849d91fb9ad401d47a9b45c (commit) via 4b31267abfab1378e61b8406c9270284857810c1 (commit) via 987216062e8718e0c37970c7ea595703057ce344 (commit) via 75850db66758ccdb4500ca0d580a2b97215a9357 (commit) via 09e10f0937f971a5314a0b8f46c961c8c6e7fb2c (commit) via 82badfffc34f043521ff3314047a3831e0fb17c7 (commit) via 3c1ecb5214afa45a44742ad2b1e24517925e858a (commit) via f70b0bb36545befdf5c5d9d524d51a6ff14021f1 (commit) via 6181a9e00ef50a44d873c771c028f2ca88fd6be5 (commit) via c5ff50fc19ac8393be3cad5f7c1578a6a8c64819 (commit) via e7d690492a0ef55709185e7ca7ede659a002530b (commit) via 9bb8b88904bcdd02fae883808f1b60468b1ec01c (commit) via ff77f4613a059cf24f34a5ea1733891ae54325bf (commit) via 52d0983a88a28709ced63dc0a9ad955d75cdbfe8 (commit) via 5e9bd8a2ea759c4f7e412a8591ee55fe057313dc (commit) via 50988f6d763d99dc7d016000157528fa0ab20086 (commit) via 78841f27e3bee38961817b83b520c3b4a375f4c6 (commit) via de16ff3e58b0518c707ae877e80b6f81e26a4326 (commit) via 47281310bf610f3ab975d00831e9f3fe713ddde1 (commit) via ff56a2f7201d71c741717ee4651075d0accfd9fe (commit) via 926ef3ee032146b764e216d33270a6a9a65d1d5a (commit) via 3251da6fa270f138920570aac89e8a5c65861661 (commit) via b3379e63e04836d629bcecaa37f2f044ec11f523 (commit) via 6a2f8335638605d34f066f4e1f2fc646e324564e (commit) via 781eb380f47c743ddb9f3ad65c6f7d3eda7af171 (commit) via ed77c5c5bd8c3ac9ca172db39019ec71cd243a8a (commit) via b398e716f990a39ae1b47246c181a7d20a7c2f0e (commit) via da2330bd32860b87448e420b3b27066076a87a21 (commit) via 0bb67499c3f00a507be7af9ed524d21b0c469ad0 (commit) via 5dd0b5312c3cafb6a8d9ad2baf641ca4d88b2415 (commit) via 3fb4f33c346aa31e077e672d15e0826d0bb5ec1e (commit) via f34f7815e3e6d15dafb8df5264b588a23d293638 (commit) via be55f069f926472369627a99c1b7b5d01aee47c5 (commit) via 220ede74ff5dcd8a8078057c1ba71ecfa768f475 (commit) via a40e6ba88dfe88df9a9665325636b0e01a4beb5c (commit) via 9b112a848a2063c81fe758984351d765e712a2bc (commit) via 9685d0773c1290ad9e7238f6e24395dac3f18a3d (commit) via bd9ec9d1d07c4a24f537264e06c735c7a8b33810 (commit) via cf70c1efb1b47cba7adcef0d536fc4aa6f3a3593 (commit) via 7bd63e4d6d700e1d2c69034b97d54ba941a600ba (commit) via 63fdc2f12bd00472a8108c2e234f84a0ce95a42c (commit) via 3ed14cb3ac03e7df53b9f9f987d5180e74dc2b64 (commit) via 37221529c7d032599cd7f8a4bb6778a55b8bc5a8 (commit) via e556f1b909a910f7124bd26f82e4b42dd2142c17 (commit) via 20ffa14708e5e1b324ac954fd06a1415b9398b7c (commit) via 5bb7429166240ffaf6f53f834bbb1a4973df8e1d (commit) via e75ac5aa03934d259adf5d9300c24539161131af (commit) via 39fc348f5779cdb7892aa70435fa0b8e04539964 (commit) via 7a9a1e04530a7b4ae8fc8fa0bbe8ae1da67fa7f2 (commit) via d375618921e16c229e748c87ea16190f2de74337 (commit) via ff1563199cfa36fca21889fce8a6b89bcb7db241 (commit) via f8642f953d3d8547bd31fcb35a4737fa91d9126f (commit) via f9ea6247c10fa0b39977f9b75d266e7282b19a1b (commit) via 5a0fa11fec8f9cf4ad53defdb4b389aab77ccb2f (commit) via 8b96e31ca3e9481da9a110c0891bff19744fd432 (commit) via a9eaefaa1ef77bcfb1ee563e4312b2fe01784df5 (commit) via bc341a9d5e3863dd80393144eae88f27883db764 (commit) via e6c7c420b1b5bf03902e34e15f5eb796e05c8a04 (commit) via 6357a22355f758df422046aef2f5b2d40d9445f1 (commit) via 478ce1c7b4e46d7a370844921c2138e61d61c4a4 (commit) via 1ebb421bfc8eb21a4e5e56e501a62d000a9f59db (commit) via 362435f02a52008a90a1c19862f09b01f1b5bd7f (commit) via 370d0d25315cc2fae38e1c6397b0094d43384c16 (commit) via f1f21e3077cd6f1519d9a2b50e211b4c233d12cd (commit) via 9316120c80119c64a8d201bd70d7c58852ff6d7e (commit) via 783fbb77e7b48d5816f16773f977250453cd43ee (commit) via 2c2bb5f527b4c0e0eca7867492c046be23818c9a (commit) via 1e4e2f993c5914d329cbee355035166e12151081 (commit) via 25486156305dc0693366c0c7e5dc6c7035ab49a9 (commit) via 86dc86dd6c66a6d61234efcddddddf466a6597d2 (commit) via 1ee2019239751f91958a390aa3dfa24ea603f2f5 (commit) via cc329a01258ecc7f4debbae94baf067136617c65 (commit) via bc407ba6ba28293b5fc0025fa08e8fe71365eab8 (commit) via 6f74bbaffec687dce755ee985b3bf69e915d3a8d (commit) via 5b8ac116c398366947348e3d4772a19d9acdf01d (commit) via fa0a3210ee95f5a683cab60f05731fe7bbfe2389 (commit) via 256481499d56589e98659bd069d7f8a2fd653546 (commit) via e3e692caeaae920a920aebebdd229f4d5ddf0af8 (commit) via dbda590628868e37956838c1d93d54050ab3e7c1 (commit) via 0965002e57f7461d290792252b289fda9247d530 (commit) via fc51b92c802f64dc028cf99f4caa879b1571773a (commit) via 83e4a8e63713c3e99f81aac2973763c6252846bc (commit) via 542d9d5e25bfc6e4841f626f37cf4f425cd0e03b (commit) via eb0cfd2847b234dbb1b0bd42587201d83f04513b (commit) via 048f0065bf7f76d2c58bb5a0ec4e6cd7bd965dd3 (commit) via 1f6509142d4ace26ce134e1c768e5f2249b8a08b (commit) via def409af76c3222d3635b64398121190345f7c70 (commit) via 1aa9eb33e048df243f94200348a2bb7a65f0cdb8 (commit) via d6df882addb0780ca324b3e6490221d7801acf86 (commit) via a9b11235a89296c662523c3624d54297200ba5d3 (commit) via 690acadc17263621f5361d48057c6f938e698a58 (commit) via 867b17428a02b3cfb337624988206ed9500aa646 (commit) via 402c6c121c924e68c17ce04de8dc5d28dac6fa6e (commit) via bc2cfd7c98d6a238710504172f78321d099d0eaa (commit) via 60afab9e44db242afe915afd73fb6f4924d69069 (commit) via 76bdb4076277cda0e68e1d80cdf715020eab5a7a (commit) via 30675ec49bf960d58f75030a6ccaad771ea10b0f (commit) via aa7e9a9674ac2317579442fe9e102e5c3be7fd39 (commit) via 43d9b296f5688b865bc2c40ea0af3b042047dfe8 (commit) via 9f552e2e5aa1b7ff9604e88d19fa0515a9b37be1 (commit) via 20b892d9a29880de9c0bb4f07f3f347c30b88bb1 (commit) via 5e0858cc15d91cb1364f7fcba2cd92519adf0a19 (commit) via 56f87f179a026f1955994804b998485ee7910bec (commit) via 59ffabfeece31db8026aaa715f3ab0dbfbf8bb7e (commit) via d303465448504d3f91e2991e80a72a3d569f3866 (commit) via d0b9d1cceb37a58bc953385e7a33c6dff543a14b (commit) via d9df805f6a9433e579bc292c65b59efa5a87bceb (commit) via 6f3341591dfbb85f69e224b66bb9f7d4fa7f05cc (commit) via 47a8ff3491cf4892eb2b28048b5f987a4ec1187a (commit) via ae5f98a5e36da8cf3c75625ffb9a1d34aa2407cb (commit) via 150d9daf89ab8148bdf90213ecf1cc90c2425d75 (commit) via 346f1c0cf3dc543414692a56cb1b7bb4caf5417a (commit) via 590c92d1250f0d89fb45d287984b84bbbfebe21a (commit) via 68ea936ff5650155c31438da8e7838e05d0e119f (commit) via c3c77d662a608ced362c95f1a20c882ca7915706 (commit) via 4edcc3750d27a2a939b56e8f8cabdd25fe403a94 (commit) via 4131d1b58ee1b868c139685f9f2a5cd5ebc4f84c (commit) via ab358d6a859d8b7e257ed1e06ca000e097a32ef6 (commit) via b520b18c733c8ed6036fe6488c27e1ee2630fd97 (commit) via a5ccddf05758daa0652ed6674581a871fc683a39 (commit) via 73038a85ea5d290bffc40a28ca8fa5a8d74c472c (commit) via 8ca236592b9c3b1e6695e3df6f08d067a05b999e (commit) via c9d9a3fb39ff36dd2818238916697f685b6ccea7 (commit) via a152e97e2354a0396ab8f8433d61e8f8da7da7f5 (commit) via a748916f5e14687e31d2bd6d7dab5a8d5b7aa2b3 (commit) via 1b7c18a2f36c30182330c0a937760b09a89635c5 (commit) via 527e67eef2faf6c74d0045cb2a73aeeee3f60a4f (commit) via 4eb15824b3092866f9c30d7af3221487c60fab07 (commit) via a94ae96e6e1b8ef4e169c7c23cf95e0894e648cb (commit) via c2c2d366198118a807fe6bf1820a32c13a6648ad (commit) via c4e7c130d8d1ff14332f9688b54d405e500eab5a (commit) via 6867b882ec2167f6da5d9cdc22409eb7acba179d (commit) via 555f234fa28b1dde4edfaca644de680391941cd4 (commit) via caba59b8faadaf971f0a16a8abc44c9e50b198f3 (commit) via 561e5edc3c63495bb7f9d09b5b1fda136bc07cf4 (commit) via a2f1c8bd98decaaf7402519217dbf0fd386f92ff (commit) via 47732280619c188da05ce5fa13527714cbe65b91 (commit) via f74f01fe69a30f0b343c1b80e564cd4518c10f26 (commit) via fe8f08d268e0a7551e82524da8f0e38e2c04a56f (commit) via de41f3b38c0d5e8d7045cd5e6e96eef72c388d5b (commit) via 94cd4505f7d6884c9ed9b596dcb34112483d42e4 (commit) via 87a37e647587d4891b36db92bd33950ccc864c6b (commit) via 5a913794d2931c3de00464cf261215a173f5ab8b (commit) via 70c6557285793d9944f4177d3bee3f1570ace308 (commit) via 37627217082be815cb42611d1d23721ad0799c5c (commit) via bc7d64f896d6e180970cb404cc7699732db34adc (commit) via 44f8f839cbdddcb756bdb561b0905933e7551867 (commit) via 10371cd6dcfc1bf601fa3e715734dbe66199e2e4 (commit) via 21916a4784f06f14d1acb800d72758921120699b (commit) via a38176b1775138049eefebc5b4e63a5e44029ba9 (commit) via b86c5e8003aa27ad359ec60802d9ee218eccdf78 (commit) via 23b3d46e96f88ff66bdd064e484c0ba9ffa10ebc (commit) via cb8325fb4a63509dcebad8a00446fb13f8526247 (commit) via 373887162654781c25c9ddd9f6f671da4c65d206 (commit) via 6b1e35d2072b9846d7bee473dfdde60327703a27 (commit) via d7e32c1cd6ce8f85ccb6b4c94671759a28f83223 (commit) via e4e1d194bd6dcda2f5eb759dd4a1356a8b02df5d (commit) via f29635b66746324e1d6e1f17097dd7bd4ed347b0 (commit) via d1233a38cb70e6ca6c4e6062407d8f95379b877a (commit) via 1bfe37201a0b5fb25f775ec34e25a2a184529489 (commit) via 2e6cbd987119f74fe3454213a73ef049bd1b0926 (commit) via fb6142ab2f88a89bdc915772e2a3a6e8c77c4b04 (commit) via 9e24af01375d370ae84c40a95501aa5a33d3fe97 (commit) via 1c25adb210f709e228c86a778a8a3213b251a2a9 (commit) via 3e41abbda11b3416a33d0bb9fea2c5618ae92d77 (commit) via 3f25f873f8f0cd4c9c8d5dce29535c6b2757eaea (commit) via 9e06e97d30faf0916bec404c81922334139cf177 (commit) via 57744ca9c0119fccbb89d08f5ef34394b4df1a81 (commit) via ef3d360a3de4a290c92c34827a3b68a8ce160840 (commit) via 16ebd9f6152fedd1804f13c91ed14e8963e53d3f (commit) via 7be70ca6cc888df532d2f1560e74d13642730ee5 (commit) via 6b05e028f1a3afc7906908bd48d58993da02a9d9 (commit) via 8d754ad5e74a3b0edf3f6cb9ea2db6abf5cfec74 (commit) via b554caf75331ef8f185cdd8c7e7b5672acd8e6d7 (commit) via e69e4448fb7e85c1148f145575c4748860d48520 (commit) via 8475734cb3050ac05ef040952d67d0c5bf59a4c5 (commit) via ef8ac5ad5af699d87d876a546be43b7f6b744fac (commit) via 0789a8be08005d076568695ff3f85fb47f94620a (commit) via 80e0ef4082d999e629688e9a6639ac498634b5ed (commit) via 67d5593efaecc706bf5f0bac5e34cb7a09227e10 (commit) via 252c2f5ee20d3c4dcd44c00d218a4d4e32c1932c (commit) via 300979e7889b34d61803675c560fe450c7404447 (commit) via 46f48467c5177d0dc6e99b03447ba8c813108f35 (commit) via 223d92e0f9c3b9468fff29d3b9b501e57cb201d6 (commit) via 1867856f6adb5d9743cfa28e7b10809e23dd0d51 (commit) via 0fb0f346c04f36e1bd93bdf304232d41b5f697a8 (commit) via 6edd1806ddbfc4138dc9987d2a9c7c4fed56306b (commit) via c608000a2a57faaac6e1789f8502e734db5ddb0e (commit) via b8e707a6a1c5c486644132df01b7995740abfbd2 (commit) via eeb47fbeb203117111bee8f6690a5f272209d104 (commit) via 471779764757a3a6e4b5fb1db9b8943630b18f3d (commit) via dd89b24b9b637ee58ffe60b24f6c3b3ddec5132c (commit) via bedd098a65f30139eb2c1520d1d4b005e3b2c059 (commit) via cda0baea495056c12c97262701c832e9b2a62bb4 (commit) via ed17516b31404dd42eab61c599c84933af485b34 (commit) via 12a78bc824655524d817508d6107ef4dcf8e3626 (commit) via 3c515e192211a787bd35b99eb839cccd7cc60635 (commit) via 52fbae0a59d05f2724e77aff75c7761b685bae03 (commit) via 263840681331b0b75ee179b27ec33bb909f4c98c (commit) via 6949b71ff13e222925c0939c50f669e23b6da785 (commit) via 3eb0f08084173f344851a36876864c58a301d5ea (commit) via 6a6cbd47fba7630844ed144aaf24f415afbdc72e (commit) via 75accaae8b6a691b031f268f8afc368791a53030 (commit) via 0816ebcc079e328394d3f9fff73b2281e7449fda (commit) via b95fbbe55328d583f77280eca862a7951d19d836 (commit) via ab39dd11f5ba134b56dc802584f33c2c46df7f09 (commit) via 9d5fecde6a329a3fdbedb780cec25c4057feb57a (commit) via 72ac7ad98da17f5f13dba9ab70ccddc18bd12ff5 (commit) via 2e293c39da969cc0c39503e1fef6310b4ef85d85 (commit) via 836cb52e9aec83f88841cb5b45abb1d32bb02214 (commit) via 793b223c02bfbb9d5bd03194a7f9748f6cecf2f2 (commit) via 592206a157a57da031cd44d86269a92cfb17a736 (commit) via 040de18b36cddba470684e73f3a6bdcaa28474bd (commit) via 8843120ded39b90423afd48ebfde4c059d9495ed (commit) via 9ab81c4a9b1ffde12663388975759bd757a4f825 (commit) via 91d987e15c3249f35bb1151a2a3b7e487c61f095 (commit) via e0e414d6593d952facb2ce2364d17b34afac8760 (commit) via 5d13fe282255d828f7aaf7765a1b069839161ee8 (commit) via e1e8f27ff284a59b8e57e802a6c159940367c51e (commit) via a1218f59d9164407c6e28f816b0f11314b64fe5c (commit) via 4ba25a823e62271a74dfd1845f535400e2da125b (commit) via a44dab461ffe269618f008f16e249d9101c5bd88 (commit) via c734c8501b5e8865b8a2e92a8834644becb181e4 (commit) via bd14e46400aaeb3afc826c6316b376eba6f082b2 (commit) via 587084052bbecc812de00e75aac389faef6b7eed (commit) via 036ffe815acd1ea4ee5cafb1b9547930bfbdbebf (commit) via a890ca2f8dfc640f7096f3ad89a2429315d8b71a (commit) via 95d3ebcc4880c0b69108c6155b38abbbc6ca5e15 (commit) via 11ba72c6d604db44e12b0f67f20a0e192d69b970 (commit) via 299975908ada992800791fac7f3739050e0ae2a9 (commit) via fd7d521c9d70655618db8232d45e5aaf81700f91 (commit) via 5af9c8e2451afd8e63d6b05e69cd141af543a164 (commit) via 8e2f3582eb9cf75c78fbe8232cdacce2357f7efc (commit) via 20c838da6bac1123cba65845f3ea730cd5ca51ab (commit) via 66b81d8ddd4f9696b549494ac6cac4ebe4ef2bb0 (commit) via 4c638930b37c7f0e65e617f332f32b5323de9ee6 (commit) via c2ea011830ea35cfefa7957e607c049ba8109041 (commit) via e736dd9389b21eb26486a30caebaa40e299eb32b (commit) via 9b79d2a35730a51e3cb022f3c68e01944405dce0 (commit) via 99b1ff714b45d34ad84a5d897b4fce30a9ec3041 (commit) via f1b9fe5fc4af1bab7d551c48600ca3ebb717db8f (commit) via 1cd40bd2264bed272d404796f20b5c77155f5a1f (commit) via 67c9f47901f4b2b287c1bb46fe5c746ab0abbb95 (commit) via 608cc887c798d750e8ba7dcb51ddfb7f49c68e2c (commit) via fdd341ebfdf1da3e53332303eb93d5db1feaed6d (commit) via a8f04a6f9cd76ebc034a4596c70d4ce0e2cb17a2 (commit) via 469813cce049e18357ab274316aac0cdb4ca6688 (commit) via 8cc9e07a2ca7018feb0dbc286f1db23a4294eeec (commit) via d43eb3aec2419284c8491b0f8334ca47d0a6e334 (commit) via 882ef5f33f75b5315fe471a1b58a8c07c2b57dec (commit) via 8c2a3691054d16d070abdf3be8f8b61cfa2170f8 (commit) via 07e30f082c73fe9fbeadafb97ca479e03f46c9bb (commit) via 8a19ce47679580445a5ae291ecfbb3e88c8c6aeb (commit) via 53f1f55599808bf9771a32df35ac4d7a83f4007b (commit) via 730cd10c64679bd0a8325bf7f0e9febda613bb8a (commit) via 67a8d907adbc587021e9eba603cb789da09926d8 (commit) via 0c519c70297bd2fd6e139d74c6b175c304c09192 (commit) via 543cf13406f478557c6ecf2279b6ab1fd3bdde30 (commit) via 53e89b6ab0cae7b9ba0316b3806abd986794a22c (commit) via 32400110fe7ea1b624d19625b5ae606f5f47814d (commit) via b69e061b8073efbd2c356f4508ea401c85e8dae3 (commit) via fcf60ec1bcb0fa3224bfe80f8279c29670cefd19 (commit) via 5e0e03d953c03e1703708f4f579d903990edecb9 (commit) via d49aa10768fba4c2cb113d49629138140b37d560 (commit) via 776929b3c46ef593fc70cf792e0f4e99d6bc88b9 (commit) via 1019789f2aadce6896182c1696aabf883dce4905 (commit) via 44c0b2b75a1c67a8bede285368f617f2c8e1dd77 (commit) via da8faa8c7e54df0abbdfd50c29235320164453aa (commit) via c3f41af2be49c1850c526eeac381b0c5989d7f15 (commit) via c2c2bbb3d49837361ea02483e90e10a632975688 (commit) via c36d63cd48fbfda57cd8cf25c029a3a175e10299 (commit) via 8986dec05dade19ee0f779c6c498dc0e04a8f8ee (commit) via 9b541aaeaa16204c3bf158fa88244c9b8d3d7d80 (commit) via 80ca9ac84b2a6b24e40306a9f8afedfe67511d30 (commit) via ec5c6bc9bc9bd4e53f511f18cb2da569ea6508e2 (commit) via 59f844521912605b16183da300ab98ad029ca06d (commit) via 2731a91c98ad8b48aaecc2fa3039cc9601d48fbc (commit) via 86edc5b6a5f9ef74d8807a6b90d209cce4e3a2d7 (commit) via 7b2d529bdef9f6a5fa2bc3665a6b88cf52b110e1 (commit) via 22d0a83a4cc2188119e008ed346a10f7b0b32f8e (commit) via 141b8ccf2cddc6b5d3c3c7258cefb181c09e5ce9 (commit) via 733555020988e7f9362ebb9ef2cca5ec227244d5 (commit) via 0361ca52f66fa3dbc369b7930c1d44f063d337e6 (commit) via b05688db47e04de9a5c873ee531f02d31468a508 (commit) via 2f087606b799c9c7706f094ce0026e35d540731e (commit) via 9fe8abbe033588665da5a21d39e4fd09b2324ea0 (commit) via 830637192d0c751161d1131061b1f67dc4ffe8f6 (commit) via 4c17299647c62ab698942bf1134f0e61c1ce07a2 (commit) via 033eafcf44a1337e26de52c7d2896c3f48788b12 (commit) via 41f479467b84856ab14000dfae210fed4c8b4c08 (commit) via 93f119ed251f970ef83496b3a7775130bae835b2 (commit) via 2cfea104a632badc453364ec5babf97db7aa01e1 (commit) via 17981e0946021a415e87daedd5d84a18eacd70cb (commit) via 50dd15af58aa9fd69549f769916955b46fdad4eb (commit) via f3e216131b7b0a889507c3c4100b298c75ad3d84 (commit) via 9535823b2cff81b05e4c6b64016a95e2264ecda5 (commit) via 6a91ee026547b2c9e2906a42c03fc49656470beb (commit) via 7165065f03625df4ede55a04a7e957cc5dd15a40 (commit) via e446fa4eb46a1419767c01dcd9084b63fb13ab4c (commit) via fb31229e9928534162c2f14d23c45bb939eaffd9 (commit) via d59e3509850329096a7d6dfbc037d721b70034c9 (commit) via d47190ba4694dbd64decf50bedc75a86cae9c65e (commit) via d52a4256b2e75aace7d4a7dd160aa1be89083d28 (commit) via b259fe84ab5797076e56155d9198fc17afc32ba7 (commit) via 6b0bc4328100b5ec9e0d4a36487c82dc8cab91ae (commit) via b08d2d993c8bcebf6b68222fb5b8e55fee047503 (commit) via e1ae739e1f4b868dffcb4a08cfacde3680dca3aa (commit) via b605bdfd03ccb0c7003a110004afe7981853bc76 (commit) via 5a9f1b87c30870a6a705f882039b2b4e98126813 (commit) via 053c0f1e44cc6900bb215b8eb2866f68211ebfe5 (commit) via 718f0c24f7c0ea9170c8843e17d88fb8eee70235 (commit) via d90bf11e2fbae39d8fc939ad77c8a8ec2c3a3dce (commit) via 422359fe79b9313a45aff6cdbb6ef36d6fc52a46 (commit) via 1ffe47e37f734620825b6eb6f3147b53f091ca83 (commit) via 726b3b6f756e8b486549271062c40d53f996e404 (commit) via 377d4df2795ad501aa7a08cf5c2ac0ef1208c362 (commit) via a57b30bb6037977cb0c8023e758a0850915334eb (commit) via 7a0e239240ceb58230a11b64fe8c8a63d6854c30 (commit) via 0e967e3b1dd8a705e304b4d94f1556249622d747 (commit) via 1a09a7d9922502ea0a49be6aa6647bc9097082fd (commit) via 1a7d00bd12f261428edb8fef09461bee8067ceee (commit) via d0c3e47d806ea3a25be2e7d190e479a6ccd8faa0 (commit) via 894ff96c06e2598f88795458b70443b60cf4758a (commit) via 30cb24f39cb5bd4dc053662d4cf1b124813e63d8 (commit) via 3e027d9def0f2d9f542cb71eda12e9527c418c9e (commit) via f5a3ec4d76f24e15995d70736f671fa55c1ee798 (commit) via a83250880ad511d92d96bfd860873b9c79c0f462 (commit) via 71595858b83b37bc855028b5eefaa0dfcc94a511 (commit) via ef9c9c92f5b5fcb48dc0713fb15dfad9c3929dfe (commit) via ec526768ac5f1e00a39075cd07fd93cffa1f1818 (commit) via f15f905babad5977aa422e1753fe1aa658c77fa2 (commit) via ea6bb8293f50ecc93f42b6ea6525baa0252712a5 (commit) via da9076e422667322ceb04afa1ff43f69bba4c879 (commit) via b888104e44b48628eecfb56e8b74704c04b44f5e (commit) via 9c13e8eb6fcc249afaf905d67e24b63884c4aa2f (commit) via 84d0841ed7d06779b68a3950054b636f6ef4af74 (commit) via 01cd88c0e5e3388c2abf67e259c81e1e6fdc5db2 (commit) via 1fe2dc5ef2a1f262b125a2ba6a85f624ce150dd2 (commit) via bf3c08d648c398026eef363bb43d3f8bfaf2a286 (commit) via f1e91c694b1581b4ae923b3bd4a243372cb29023 (commit) via 96820279541017402c1fe0852444aac68179ddb7 (commit) via 0d8273fa32bdeb7f8bd939864ba6d6ea147e642d (commit) via e335771157a1361e250989a5f2d7540144409e78 (commit) via 7e75568b001e29a7428d7489c57cebd909359571 (commit) via 0225417f60ebaa9de96dd9a9846c2ef7105a39f1 (commit) via 3960038ea225bf23ad738f988e6ee3ddac71ccab (commit) via d908987634ad1dd1295ac585ffe7c810bda69415 (commit) via 174c02e149ab4bcc9bc98d4e4042eb0b24e2f2ee (commit) via 08fa2ba8d0682e0c9c307b572afbcee05cc93477 (commit) via 0198502ff4fa3dec9cbd3249f6f458f53a8087f3 (commit) via d1aa2b3f607b35dc5dbf613b2334b6d243ec2bda (commit) via 87b9d6d93f2e5e6076992cae7395647359de306d (commit) via ccd7d98b38de3246ac238777aa7e592693a22e4c (commit) via a9e48968bb0f6b3919cb4ae3f00379631b98df5d (commit) via 4804c7f30ff659420cc0be5491bb77faa47a2f0c (commit) via 8fba1f4a0314dba983dee55190b8f903148a08fe (commit) via 96a8b68d5a5d5ded8d4477c1185d41dd86d626ea (commit) via 737d05b8f8764f86558ab9a8f2a522035eebc21b (commit) via 96ad8fe60810a25b267cba6fa45f725e2614a003 (commit) via 7a8068fccd4907c76f065aaa64c7e4bd438a4c4d (commit) via 9b97cb5562317ecb6fe65e6185eb6fda2b0ad7d7 (commit) via daae564d87044950edece389f09bde423e6ad867 (commit) via 25e83ce580d7e6821a07198ce13338a82b966c0b (commit) via 1de7084501aa094858d344f92dd2c9fe744a4e9a (commit) via c273906f48f6e0a84917351288b68a1ec0da64cd (commit) via c1b2b7c03c899c9b066840600ec15b16ae2fa9ac (commit) via e17b1791843b473d0d57ccdbe98689d1be8228e2 (commit) via d037be122e15fb3860869e07a0b6ccd8e7d4d94a (commit) via b115bc49ff26da9db3e9238a98030fd94847d0d0 (commit) via 2dec4695b7711126832f61f5e86cc3120cb419d4 (commit) via 750d58bf61e7ddc48d61d40fa2afa8716eb7fabd (commit) via e80e8eb609cc7dd8c4dca46b9c2819afd2293229 (commit) via 79f4a772dc268cdd5d2bc4ec51b5f57cf26b1751 (commit) via a2a13e8b48b5b55f2c6fd4e457936f91fe23f699 (commit) via 6b7ec8ea1c3cfbfeb46c5f12a3304f292a1b88bb (commit) via 033d4f37a7a31c640294924f732d0f735bdcacbc (commit) via 7382523f85ff365d18908eb906cd5502443df3b5 (commit) via e3858dd50b521d1abf466ac5bc55e70a3fdcc5db (commit) via 7f4eaf234820be3e62217c4a7597d7ef96179e97 (commit) via 9bad0dfccedcc1cd71ee2579486f6729cb9d7749 (commit) via 8927e913f780fa62c540063b8a5cfe0dcbfdd288 (commit) via 6555286c5551e3e051ba9814e9f02f62b2963446 (commit) via 54a4d28dcffddda52b886af091ddeb3d955c0b17 (commit) via 7d057b2738e229192ae5afe71d50354681813235 (commit) via d828d0eb084cf094119d2b47dae0053267aba138 (commit) via 2911d4701675d17b817f8fbe607bb5a493cacf0c (commit) via b61e9f8382de26ffe8cc137dfd6d63556d0bf66f (commit) via 12512bdb518ca1278a59997c959272625d7f6b6b (commit) via 34a083a1951306aa9d0c0a5f14ac17706f475546 (commit) via b13bc8659f87567b1b091806d42f5023b2a6b48b (commit) via 02d11868827417e88cbbee795703421dfdb342f6 (commit) via 47990f9fef31eb4369bb01d72a6d86de332ae196 (commit) via a8667467ea6337faddb0eeb7a8d0b08154338ac0 (commit) via f320907b3d288930c80411a8e97f63eef0e8ec8b (commit) via f0ae821681a0a0b4f411a0feb4a6f6e458475999 (commit) via 6887c1174f6a16d6d51189954cb3b0dbf49a971f (commit) via a7d9666d5d1c9a33ae58bb1f5a95fde57b2c69cc (commit) via 6cc5bf3dfae3b5d3d294e63a9f726fd1ec963203 (commit) via 7402bd38714e7930810f6bd61e20b836268be814 (commit) via f38147aebc19cdca17df101a9ca6a10337508485 (commit) via 7c31ac668986ca4753f091258321e7928b3e904a (commit) via 06d34c4ae73278dc208ff764badbb69f4747df1a (commit) via ef205e04d4b06b4cc1456c2bca91d3859e5cb85c (commit) via 5081dfca8332957a4894bce0653c86ba1b7b2bfe (commit) via f4c23ee244768bc53f2e77d20a1d19b13cfd37cb (commit) via 493671a5212c6548b2d7376c7065f5f76692a792 (commit) via d272c4d5f7c3090855683d517e987934bd7fe176 (commit) via afb21342ead475a12636f29f7cd77cbe38d05ed1 (commit) via 28d83837978aefc7f6e467b41ff792817da9ec95 (commit) via 2a207aaca1d8414624dd4cfe8fcb19d03fe84546 (commit) via 81841426fc12864008999893c11e555df06df292 (commit) via 370a6b1bc525aa5b3a7308caf3347dd4b4267db0 (commit) via 7146a6042991ca5ac49d400cf94d0feb2b8ae4ab (commit) via 8fb85c68bb0090b44df22c27dabc03da63602e5e (commit) via a36fb229ba04321be3d0a2472a944c05fea987e9 (commit) via 41b84b2220ef147d76f5b1291601c069397f854b (commit) via ffb77367b4645cc83de76fe0daf2745b5892a1b3 (commit) via 380232e10519d97a382bb50a048baa3044d3d170 (commit) via f03bbc3970ce71ca4dd11b26ffab02e9ac62b7fe (commit) via 434f5cef657a001bcfbaa5e8b5c4fba80215efb5 (commit) via 6d1be6e3826a98ffbcd3bf7d951024e34d69e452 (commit) via e1b67d0373b3cdc8e53836601b9b0f6372f84e70 (commit) via 9a740f1b595c7e68aa4670745097d2ca907513b9 (commit) via a168b4ccc2b479d32455d7bb63c97a9a9d4dee68 (commit) via 1ef22a26c97e2661f0670b5794c47b5339b64da7 (commit) via ba8571ff2deb3a29bb980e109abef0e7290de56a (commit) via 8985c1dfd79804d6318e6dae6e47597a7b71dcd4 (commit) via 008570150ccd23bbaa42d7543e49fbfa5d28ade4 (commit) via d0b70e676e286cfa7fe1b72cafdf5f704e1038d2 (commit) via 993ebdc72d5e7303008ecc2fc42b151b630a9ca2 (commit) via bfa92e5725121d2c770fa6f0f47383c0436d768a (commit) via 74672e2ffaaa7f6c0efa1884a3f8d239d36ec7bf (commit) via 7dca104e14519be4ff28978a1553a3395ecaf6d2 (commit) via 959ad1d5e8bbd07b4111630c347ca3d69353f48b (commit) via 31f7dc4b11f92467c19a14f1d424538977aad554 (commit) via 56deb34b27cb7964ef3fceb872e8ad42cf3bea05 (commit) via 99ac0940ade3172d7b91a2215c8fb14cb8c0de1f (commit) via bb032c1bf583d2f26e0840b791fee07f8c7145d1 (commit) via 75d91e9c85a26796a291a8fb4ba289802313f917 (commit) via 60e48295ae95535af7e245f308cf204a3ca9680d (commit) via 8ed663791bdda4e726f7b3764bc75f8856724d6f (commit) via 594d3d6fffac33062629bafb819a5df7c1326824 (commit) via 759c6752127092447e8978a978eefde451024b28 (commit) via d6f0006c0b12c74df2d93170262a017f15949320 (commit) via 851b6c1595363c8916f24b7da8db991cf6fc3f25 (commit) via 25a7f14fe2ddd3555c8d8a8f33dea7abbd7061e6 (commit) via ab8bbef9c6e588bc023ec8a773c78e33e3a61813 (commit) via 664bb3672939150f640b003a81b5f1126ade450b (commit) via 3cb7048b521395fdc863dacacb85c6f7f28a1bc7 (commit) via 58cf9d417e8b3d4d76597b9950a5af4860d3512c (commit) via 03628bb699956d92676c610e9a24d159aa591900 (commit) via 80362f7e31233c2525f47a954084b89e320c38fa (commit) via 2455d735a1fe4c9068515ff0795ebb3f45b8e739 (commit) via 96b202fad52fe89a9b1c736c26d25df8c38e5d21 (commit) via fd79ace021f39a580b350ad16d7abcc0563392ed (commit) via dc6632b9da0b804e6c00b71f06b26f561475858d (commit) via 96b2637474c261dbbaab52b05af153f24f3094dd (commit) via 0039ddb6f2a4604d90e15041aca8eb1b048063af (commit) via 096c3bacea33a3a1192d065d88f9bc6c995846ee (commit) via 3ade7a306e0d002a6bfc89b20b7b1483643877ea (commit) via aaeb01ef9bfa600e072be79792be53186c395a8c (commit) via 1e31359565ddfb3d2f5ec13d5aa48467c4ec5a77 (commit) via 305e628284fc647087cc8b1e1d7074f826358de6 (commit) via fa338c97d7e1cd320f79a6eed3b7913fd88ee890 (commit) via 8b0016ab658e2b96211c33055b8cf38b6d4a6d94 (commit) via 4c2ae38b0b25e7908c25ae939ba235dcaf336c39 (commit) via 8494aa7adf3ed2403528af05aed80dea61911b35 (commit) via 7373b389ebf482fd16c70ff0e8b5abf403b4be07 (commit) via 97d25404f38cbcf35f1a793b90f926f54f4b0d59 (commit) via d040459679371a234cb24ebed3701cd464cc5fc5 (commit) via 7c5f5f1a209952828ddce26827b96ab9b9143949 (commit) via 1d5ed679ced9126f7cf686dd614e02b473d16b5e (commit) via e4a235653fbe27120f518b2a97af95d2b9831309 (commit) via 9d9e17fa21bc184d0f11ee73e8bdcd40910d719e (commit) via 65290169f277a5759226929cf457f45610f89d92 (commit) via 344a6d8448d16e2d28a318e4809ea0ff2a544c0d (commit) via 5965a589154e64ba3997c28a718652f54a84c631 (commit) via 46ba6abe498f1fd6cd286213ab7a4a9dfa6f15fb (commit) via 5d1671324bbcf0826b32c4c1691ae0f1041430ed (commit) via e9d1ca782ec8668681e2e88a6112af40409e5b50 (commit) via 99d50d2b25d20ffe34bb081fb386b39612d938d7 (commit) via 44b8debff4fb2fff6f784c0e5dd4fcb78f113d21 (commit) via 73bedfea3871235ba842979625053f706d9dcd49 (commit) via e6c606c7ba0ab1f9649de6a93aed5f98237276db (commit) via 8d090ff253eff158cf6cbf63d8b7c2189a03f39c (commit) via a8a9577e468b92f690b72e1ed03891a2df0cd2f9 (commit) via bf955e58f7b44d0371ff224738cff25274202ba4 (commit) via b44659f5e8c66d9a4fc8345f083530442ea240c1 (commit) via 7284b15f8c9bb20618e5286b41ff2f13245dfb9c (commit) via e99dd765b750e666975837143986237f2e33138a (commit) via d921e8eb6c0ae7e8ad2db1f599de1d5c08dd92ea (commit) via 41a97653861596b2ead1a078eccee876abec735d (commit) via a5d85a31d954e6f6ee03bf2ac1f91d90da3e5164 (commit) via 202a44a4cab0ebf2c89fb878cd2ee634fb83906c (commit) via a28894e4d412000a4b9850fe9f41c7b1c1499a8d (commit) via 765822add7896f256078006191b2629bcf778849 (commit) via 0d0995b7f8bc3ca6b88e8794ab03b0c7a1c2a8ca (commit) via 44963b509b08b59081bbe3f0a55e806fa2c3152b (commit) via 3f677f207653b33ff55d82e4d03653e146df3910 (commit) via b799ca42b8a2fdf7d92a75c0edc3292934a3926a (commit) via 7d6090aec41770414c4f8b9fd78823f1322381d8 (commit) via d286d24af3eeb0e8726bb175cde342f496d40a3f (commit) via aecba65241ae837759472f1104442d299b42d571 (commit) via 4f5bbbeab9bbe7dd3aa3bd9be5d201ed2447bad1 (commit) via ece4f647491eb81d3be55881a47752ce4ff88da9 (commit) via 6d4fa0210e49c29ab0f159b069174aa7d310b978 (commit) via 81f9c9e892e6b4ee873361b3750a87760ebe8a2d (commit) via eaf53849ec760ecc1000ab6f56519f203c9b4ff5 (commit) via 3d1bd0111447909bec0582e8c0128a427a5eeaba (commit) via 5969048d1dbd531902f187699e47754115274564 (commit) via 0bee006602f07e26d052ba30541e6ce61a621b63 (commit) via 789c8de3df0c18fe8b0912286e4c1810542a79e9 (commit) via 294cf948dc37799e1980685afbf1fa585ad5b0fb (commit) via 1d8f0f918178c50e8ef66b01546f34cd2a126a6d (commit) via d96e5d9a19d613de108ab399663f76a8dd964172 (commit) via 664591ce59792f6508d6376aca916ab0f02d213f (commit) via adf60b28384025d5b83c2df5a66f2190753e2695 (commit) via 01c5bb9551ff0322f2cb4d5439a2ab9a94c87815 (commit) via 7f947b602f00ea94161c98b2887479e445d9bc92 (commit) via e9827eba686c431e393cea6dcd71fe25f1eda98f (commit) via b57b7d8e55f5380a70c98dd5feeb01c40325f403 (commit) via 0ad8e4ea658ed992841c81dca2c5eb31abc40983 (commit) via ecf94cbc51629eca98ea602e03f5a3e2e6ff36ce (commit) via 744f80976553503ba9b480996a1b290596b74bd4 (commit) via 59f07efd592330be3018fcaa253498475055a4af (commit) via 5b241d0ae86569399275e1fc57b403cfb13f7c35 (commit) via 718daeb4e6b93527ea8fa0b87091008737b0a897 (commit) via b5a5b227f9a3d88e1c493427e3983aee28c284eb (commit) via bcf066435ca30a685002bcfbc6677eaaa74a6190 (commit) via 2b7aecba1663f86148b8c2f1033cfcbd87453ad3 (commit) via 73020305afea789519b42ae59a5940e1dbc26e1a (commit) via b432e933cb0b2b162149b7e3aeb6a37b00e78d5f (commit) via 012972a926713cdf235c1c24d7b9059c3179855f (commit) via b26577c92ae59fa23be49bcaa3404efe36646e1a (commit) via 1b0c7bca5ede6eb3965cb23471c6530a08d0d2d5 (commit) via 22729eae17d316e709de555d2692c9c8c33918bd (commit) via 93219c40031bbac73c160500f63134e71ff4f455 (commit) via d88a511da345d25cbb905add9ceb258ecc9cf2ba (commit) via a139b81a52d6bfb33ea660dff2f89fdb8a2e8ace (commit) via 23691d789e198c228e5c2bb7016b3b1194fd0635 (commit) via e832c32ca821b04c8bfca80c5c07adca470ef000 (commit) via 40814a7ce9859d6ad9e6cda3d541cf302c75b164 (commit) via cf320f7cd74eeb87437f737e6e977f2231e109a1 (commit) via e8b77084dfaaa211913acaec871e8f9fc0cedd88 (commit) via 0903531964cff8888dd1cbf2a9c82ac6bb9a522f (commit) via b4d3cdc8c504ddc5d2618203a831c950f8d0102a (commit) via 24b04b51341c0575d9492d9d09a405112317e2cf (commit) via 6c7460bc48be10a774f54271340711bcfdef8fb5 (commit) via 01d72391b3974b63a348b59a0ad2c528f4e68bb4 (commit) via 96246fb9aff11c354d8b9e297f2864a70ab69000 (commit) via 09e3864b4b087c3484a8c81abc67d19599f8730b (commit) via 3452f8b209176873288139572ac9a47f216ecfa1 (commit) via caabb6e1f3756f317a1b856ec43d77ea80295e04 (commit) via 0fd255adf52592e6443c15a68c09cfa7fc26e85b (commit) via ffdde4a9aeb7a93f1f608d92e15540a7ca43a1e6 (commit) via 540b4cdc2bd7cb824c6cf7403857844b4fce4d6e (commit) via c94f1bcf92bf5de100a1513cf1dd7f4eaf0122d4 (commit) via a4452fd82df79c579ab3996e3c56c59964bf69ea (commit) via 6e66fe5f977c3d8e0a4b24236a00b31f325ef5a3 (commit) via bbb5c3efe2a17d046506b7c27008c77ea244f0bc (commit) via 44f0d2d9913595e214048b6d5a2b9ab2e9d1cf46 (commit) via 9db9bb27ea3f3dd3db3913c2bc2233f03018d5b0 (commit) via a7e0453a3238cbd617cf2fff7388fd3d879dfd65 (commit) via 334efdebb8c69e6327fecb42ed1ae3cfcdb1cad6 (commit) via c79e7e09a83cb6cd8bfde600ce492f0429236a02 (commit) via 89310b0b2025c0ceee7a3e6c50da88b6e2cf92ca (commit) via 872d08ad348eba019e56c3eb7c1cc4929c417eba (commit) via 697a5d64d86d73b1353a90a5bfc9f444b97fedd7 (commit) via 5785482ce0be9187ff94c1042f8978d2f11285e8 (commit) via 3d3144bb023a98392594038973576cfbf046c039 (commit) via 9e338b57b7a7094b150e10512e6fd758e19eac8c (commit) via 2790ffc96f4e52017718bd1ce3fe1ef70ccae2d2 (commit) via f1e51ec3a5b3ed54dec054aa422fdd7a81b078b3 (commit) via eb08e1febba1cdc71bea2aee6431b5ed8f711af2 (commit) via 8dd997526370c4d1232bcde46e0eb2a751dfa3fd (commit) via a0091a697e275a86a493e4fd87902a0eb9067d55 (commit) via 3022545f14a38d07105de0555c75e445c5b587a6 (commit) via eeb58c5c34a888acbb422e66ff7895cb35c9322a (commit) via 3ed9f63551c2b51af60088b85625c4ce71512aa8 (commit) via eec93bceec5411e4409b5e3ee5dc301fca6fcbfd (commit) via 93c89bc75ceee599ba7c08b8fe1ac5104942054f (commit) via ac0cf7ff4f5a846381593cf28ebbc9cfaf107149 (commit) via 8577978c580d09abc56fa39f387a3991c91c31ba (commit) via 26cfd039a9479959da1d893bcee5b2aa879da6c0 (commit) via 25f3f22a1a952b98e7dc6772ef5fedd4932d0901 (commit) via d596c5504e8ee9e1cc51ddbf7a29815dd07fc05f (commit) via 930042f2d95e83047231457f4d9134c74b8744fc (commit) via afc492d58f0af07d57256be3ac45ac70afecc256 (commit) via f7e3a34d3ca4cfa924a991b3e7f3e8c1d462456a (commit) via eedcaf44bc29ce9506075da77dd4ffb76dbf5eb2 (commit) via 59ffd81f174f812b4bfb182f1c50194b5e3b9cdc (commit) via a3636dde5777fac3dd8975257cbb8d07cbad6b15 (commit) via c6a41a13bc025a30252ff569532fd2ca5768b8e9 (commit) via 86787633f8440fcb3bd3fd96018134a6c5157e9c (commit) via 470437f6f93fb7c26afd38176a9779505c7922e5 (commit) via 11ab003b3aa3c7a11ae9f63946e9730c8dfab5d9 (commit) via 3ab4681efa6db7339af36218fffea165ad1186f3 (commit) via be2c45f2a98d69cc9952b592777bb506f69149a2 (commit) via c003f1b996fdc6ff9e2542c21578d5cf04153247 (commit) via ddd2b02455db9b0ef3604af1b9b10c22af56bff9 (commit) via d4db7a2ec0c4f1ebbfc98984672793f5d9eb2744 (commit) via c0323cbf5f407e9a231c8e7d55801ef3723748bd (commit) via 5e616fcf9ac1675fa4f3e7c1dc7f0e3dfb014df3 (commit) via eb974170cbfbbc202ba7bd3688879a239544f1e2 (commit) via f23bede8b556d9d72b6bd5501e82ce1c8f3ce1c2 (commit) via 86979bb533a7835fc20f87b1f9d74590ebec4915 (commit) via d9d280f531897aa6a40e315a980052d9352e6e7e (commit) via 049be8b95f6ef3ce3add8de841adf0957969306b (commit) via f653c6702a38eca61a441145dae2670e99f8a1ec (commit) via d97978b887c087e5c727de514476e6d9b924d61a (commit) via 286e4f1087fab8adc43a4da361e95dbababaead0 (commit) via 99b90dbf3c6ddb1093dfd867c6810003a61cdde7 (commit) via dadf1570d919a8dd79547b8a01644d03ae607040 (commit) via ca697bfc264e4058de26942590aeaca25182ce15 (commit) via e44a8d2c322ba82c594740a2d2e49f89afdcc244 (commit) via 97cc29c7662f51f0e532f92e37070f9b44791b88 (commit) via 2f6f6f0c153f19f7efab96b2a4c3c9c05362372b (commit) via 888c8af6cbfcbaffeca2fb65a0da864141ffff7b (commit) via 40aa6c059c3beebabf8fa433b768192300331e50 (commit) via d2b0a47c6fc4f3f4c9c869111c0750f6d5a9d574 (commit) via e155fba644d4686ac8b4f43dfe31c749bba30c67 (commit) via 0d928d2fed11472ac1d8cb64e469b3ac86bf4975 (commit) via 2cb98329f1e1175fb24d7ea3daf969f1de8a2a21 (commit) via 26b5f7defe10edeaac763487a26ab9a101f2ed8f (commit) via 9a5dcc32676a24a2dd282330839ce48d84c3da67 (commit) via 8456ec833ad9b4d7e62ac91db6d2c06ee610f7e4 (commit) via f79b8fad096b08f1fbe8346e1d338cca2c444ccb (commit) via 229abfc8f945421c9ad491dff674e41d283ca80f (commit) via 63fbf587509c63395c024026b7bf264dbae446a1 (commit) via 1afacebee9c42a0dccaf554db9cb048204913d38 (commit) via fee011946e4fe0fc20f2f6bf016851402241d554 (commit) via b80c6d120c4f780d579071545ddc7e642b6e6276 (commit) via 7f8b93ab0adb941bfc461c3a16476c5dda333f2f (commit) via 91233d563b196fe0ee6c4d1dec0b20990723946b (commit) via b416d3e696f5976ecc80f79e39715f35114e41fd (commit) via 85841e8bd5e678f69271272db7f838f873347812 (commit) via ada8e0cac4b50d07f4d07ecd584bf00e7afd3ac5 (commit) via fddd559406558a2037733e5b760e9dd04e9edfd1 (commit) via 80ea73f288ab2ca89ecc3c775a321f01b8598b02 (commit) via 9c03f503a7ee9ff9809fa1241ad1723bd90053b4 (commit) via 35d81b69fa4b1f6dc774530a4d87165bc61f10a2 (commit) via 6f7f567eeea38fe5df38b6eadc231060ac5afd6e (commit) via 135611176c5d4958b9b5a36c63fada8a9e4fb1ef (commit) via 1d829c862cf9d7f813f8e7e1a43f0125a4de7220 (commit) via 26ee9e42916b15150cbd02ec9eec81825b0e4611 (commit) via 5afac50f6852332698fbc9be4209f1c90a011d66 (commit) via 5a53e18e244a629cf5a06027400eea269730365c (commit) via 93542c897d7f8fddcfe5e3eb26591c76c922e403 (commit) via a2e91af99ddc3e3c38c68be758d05300244bf22b (commit) via a77158b25f95c065af73a1578db88e537ef72c72 (commit) via 8c346bbc6ec3321c8ac99a5495cf4d842c71e260 (commit) via 5f4e26dfc8c4ae26e9226236a05d20b826100db9 (commit) via 5b29fd6d4df4eea8ac04a3f6287f721e28b6b5b4 (commit) via b1eb493c11f38f651c2a8f0489918f3a55feeb99 (commit) via ff4fa70c201236d5355d55c386cc04cb143bde10 (commit) via 6e68d014d522eafb854505594a78d8ac26ed6dd2 (commit) via 3b4848717aa23d0238e97fb7d381829e6e47f722 (commit) via 85d2434826f464de06f6a1fec6821605b736d1fb (commit) via f4af14add40d851f7c8ef92aad2d549dcbbacf1f (commit) via 10772c51b4b0eea35d78a2dd3aa45b92daab7ef2 (commit) via 22829a130482511f8310caf74e190baee7ec763b (commit) via d9140305077c13defa04774b4a8f5233a76f8399 (commit) via e086b0e081d10f491dfe67fe065586423524942a (commit) via 0419ecbcad7719614349a07189b45e341a8f2c69 (commit) via b08d2092df1e2736fe07544b1a5f1f115903e964 (commit) via dafddda4794ab37a2d5a29b821f8f4fba1c373d5 (commit) via 1136cbd4763ca573a3c073de282a39fbc11b4402 (commit) via 23fccf30b01bb59c18ce2c8ac5a924ce5f2bcab5 (commit) via 7b51c1c789657384f56103944248c639193e8276 (commit) via 5e95a9908858cbfeb46c456f14a1f6c9e9041b1c (commit) via 54d8c0db00d0eeb27dc7abf9d67df74801c8d907 (commit) via 9d15d3c7486ae2d60709617f3fac9ac8bfb289b3 (commit) via 730a5480555ddf142e489ec4d4f3828824008a8f (commit) via 74075b5502ec492705b60ba2ad06df7c977d865b (commit) via 333c565acefef652d2593d6eadc97551865a67e6 (commit) via c8208c95a706fcfddb46f35c0b77e3c0d93ad750 (commit) via fe81c03ed04d5aaeca1a354091e288e66e359c81 (commit) via 60307c5056476962d7656ea9122ada79a07aa58f (commit) via a9784d0e26a9d9c881248326b2385cefbb732de7 (commit) via b8fc447c1df34eeca1d66acd0e17ca743256d6c2 (commit) via 0ae79e4c9548c25fdfb7184c361875ae6f4c214e (commit) via 8bb5c14fd8aadc43580625bba0e1be6c93456131 (commit) via 2ec40c746fd1f6e5cdae5cd8d8123152c4eeb99b (commit) via 6115875bf0faef61c558e46395e67bdfd4ad48e1 (commit) via 43381b4de7dcc7ac35532141a75f50951cc0603f (commit) via 8187b884717db85a4c413f8a32f72dceff8f9b8a (commit) via da9fe11b98ae9b176c1fbee8afb2cacddacf0c11 (commit) via 0ef6b24988c1ea94760f4cbaf68862b5a2534f0e (commit) via a6530f3ee2415f3d194f71d90a9baad502fe6183 (commit) via 5d4db33e7011e7aa3ada95c1aafb51f2f15d6ec5 (commit) via c216e80308c21c3c17b964f50f9f615121783ce6 (commit) via 227de0b95d6fd12e47da502ce34e8aea6d57cc43 (commit) via 4cd815f0b314197ddabea94017e0ce8b15836c17 (commit) via 333ff168eb04e12d5d118a2e9cf50d600c508db5 (commit) via d9bd7adfdfa0e06ec77507933664f7ae344dcf1a (commit) via fe263c9882c820fbcf969b9be6e18087e91e4ae1 (commit) via 0d17a82b0b703847cd78f33a9461286876e1d0dc (commit) via 8e6014f51d7c65d09b1f3ed640dff59e730cb22a (commit) via 6e9dc960c56b0baaf7599d21bb09d1a7e653d4f7 (commit) via 820af5f7974734e78db9896b4f182d667a491c4f (commit) via 4046cb2d109bb91a16f53962219ad25c80d30755 (commit) via 52ffedff1c4a076a8cbe64d188a1015f90113e69 (commit) via 3ecbe76e60293275b7d6753d551fb003fceb2cab (commit) via fde8dfa417e1862e6ca7f6b1e9cb5c4ed9f86b9c (commit) via fb22ba6327355c7de2f54edffdd5bfc2ee814418 (commit) via 1b1ad2a2f4c1fa1369be7f192d1fc1a790aa5503 (commit) via 01826231f8916057ad06555a3677c1806a2fb3be (commit) via 38fd5866c04d734ea78a4327de7a9ce08b6b8341 (commit) via 9f41bfd7b9e6e8a7545f741f872949d2ae801978 (commit) via 87199ea66b171708736e85989bf9b0af89a805c1 (commit) via c92fd25661c08ff991a2482b8a5e42c8490cb3c2 (commit) via 1180fdb6565dcc5f94930a399feed803e7871e46 (commit) via 348519cce59928b1aa09a540d3becffa7dd75947 (commit) via fb3f6fd3fe8eb2ebef26c6fa20624f32ee272760 (commit) via d34daca368d8b7659bce24baee49df8ffedc1593 (commit) via 1c8775c99f84f94010d04b4418ab83f29a6e0b6d (commit) via bc04c6ba1e1442a973d652df94a2548005c97b24 (commit) via 0f51d44aea0e469543b4c19fd1a04f8c3b817b63 (commit) via c792926b35d85fa504611fc921746db633f655b2 (commit) via 48fa291469e5e8b3ae88fb846750df72468eb58a (commit) via 4b9e15fb47fcc85f92031a4220d37addb3207726 (commit) via fe21ccc4860d38bdb80f4dc8a0785661484e7024 (commit) via 12a781301c41f187b8d91ffd4461820c42bdaf5a (commit) via 73934188446d2f8b149d5458008e1b267b37c3d9 (commit) via c2c22862287971035157fb732faf925df7832dbb (commit) via 53e9c2d2a31f33f5d72c2df5558ffa7213a54a04 (commit) via 8bc545c24c8b22250150e03abfaff880a1403266 (commit) via 1e83154f08805ca761e53471f571d93060057653 (commit) via 5ee415207b50a98831910fbe32c5055e30aa5dd2 (commit) via 7c93f6f21dc3517d89169eac40083b55b75f01f5 (commit) via 2c37b263c5464229966cc08a989af15e7dc5b4b9 (commit) via b2feb958ac29d37bfba419043250939c90d36dca (commit) via 20326cff8f8a7e469c481767074e343006d7d901 (commit) via 8243fe7c46075c1e310f9ad761b9906b0fb4400b (commit) via 716f8c88c9c94dc58f22ae770d613a4fec51c276 (commit) via a1221905092c09603c0b59dd0ed05bfe9f1f22ef (commit) via c791fb12544926bc5870a61735dc2ec62940a6f6 (commit) via 4a553ecb8e52dfd3ca605cd94ef8033e5febe937 (commit) via a466d6f60abe13ddf5eb6bad7cca9743ef67f2f5 (commit) via 8772fc81c4ab745eb5abbae58c6a69706f610429 (commit) via 60dde287e71efbad71b107902991098a6c77556d (commit) via d1dac1acc502af2f2b766cc9b262a4f1294be39b (commit) via d02709d7f76624d9ec5e178d79cf3658d551f197 (commit) via 013ffe76e7d67fdb05fe29c82421b0a000feb468 (commit) via 32e9d0ca233439c0381abc5acee8a5acd30be494 (commit) via dfa8263f4be4f1413b73c81649fdc4567a71e56a (commit) via 1588a577d16cfb1a689a444b1db1df3ccff2cc3d (commit) via 2c9f35789d4955bf77436091d1535ed8761a15d2 (commit) via ec670408969b1abcce6acead9b062c7f0c59683e (commit) via 3e2f6bd96219ac096826fbc2ea6bc8fe8f0b4a88 (commit) via a75757004bda0ff32a152a0d9d6379c02b1338ce (commit) via e05835c35b5d31f31e1a55baf415c075b24a27ad (commit) via c26885066b2a7a76e5ae97f2bfc7282f8182bed8 (commit) via cb0f3cbb8e2e34e1948598355e151aee4953f7f6 (commit) via 1cc918a770bf6dc763b593df39946667dc572c7d (commit) via a820327d1ae7c32df46cfa5b3caf56184d46eb72 (commit) via d66081b546c55c2066da0eac473b7a1d1d040936 (commit) via 2f359787f6a5d6da20621fb1a161c8cac49902bc (commit) via 7a6ab42f4712adf788156f127aacdad3e1c49cab (commit) via 7bb8b38cce0715c758aa3eb252a9dfc0bda1e2c7 (commit) via f6d802b5bcd201f48c7af47f27ec9e1dd0062171 (commit) via 01a8a201a7549369ea331516f8c6caa459074a8a (commit) via 48cfb295a2810e541bd286f352d77d840be345f7 (commit) via 90bb5f64a48265cee1ec6c1f57c5ac57b632fd68 (commit) via ab5f4e81f305e48234546583a2c8c4334cea78f0 (commit) via f8ed8bef84dcd4746ee223bd34f05b7c995cb363 (commit) via 8647c6cd6825764b8cd69828c185bad14ffc8a7e (commit) via 21a6ed49f2d06982e080eb5fc2f0a7d1c2ea0846 (commit) via a2275bdd636987abcf002fad000c4f02d615d219 (commit) via b070947dffd141d50227c59feed4c3d784b39157 (commit) via 6a5a214f43cccc83fbe3dd6de4747aba43088701 (commit) via 6dc7262bf77f551a7f3c36d7ca3023c63ef20af8 (commit) via 4a6a27ad85a4be666a3bb4260105a54ba1cea0eb (commit) via 2b9086d26614787bbc47b8ee47514583f6814e5d (commit) via ece20f7ae84db12b4ba95768e6aa5cc7e8832585 (commit) via 862482df274121e6f80dca925fb01d996710ed5e (commit) via 3ca6f70f8b27c08ad3470542705701e6e8e6ea05 (commit) via 3e4e6594da5668d7f80a1192594d9ee4fc790eb8 (commit) via 8e8f1118b947905e0e881ea3d9cc881f5fdce89d (commit) via 62b85c940622bdcc25964ed95bec68a562de59ee (commit) via 7a411dfbf6d9987869fd39e57f38f6a9c3d548aa (commit) via cdd2875ad2f1d5e0b0bc92ca1dff4f0c14d3424b (commit) via e9c5505bf9c51c34dea703b86a293ff04475db54 (commit) via cc4fbda1a9fffd8927de870643f167f066b26bcd (commit) via 3d3eacbb6115f39ba40f8c2fa48f9cf84ba210e9 (commit) via 83199f8daf13328a4fb97c16476c3a0da4228ead (commit) via 4d970868489e7a7a45419ad74444afe2ab8239ee (commit) via 21499431e05b0defb134b10b1753488c0516bafd (commit) via 42c68aadf81a47d563392421636e14ef77644e03 (commit) via 89e2c92f546c3d1b702b2c0ca206eabfc3f7caab (commit) via 42b7d132a8a20f06fec3a8a7d1dc1820f95e6896 (commit) via 341b42024b066d4cfcc178f53b2caf2eaacfabb8 (commit) via ba3798555d7e018ddd384f6990645a8407893f54 (commit) via 0ff8f127fbbc6bd1fac84bd6f5118ad1efd0e786 (commit) via bb27f72d676f0e24c97891a9fd4c0ade9b2140f9 (commit) via deec8919ba8e2a0f469346a4a47300e618f6e83c (commit) via d6ef21cf702793b8c1ca74e1243c357e651b6adf (commit) via f237f5f851df64e009f97304e6569f7e259d44e6 (commit) via 3ac205f7dcbb0e0b0aa058cc9b8d84f0318d02d5 (commit) via e9fc7ff5052f3ab40c2b39ba653506c5346d4582 (commit) via ea2a91a43279616a602b641d827e07912ac9c0b9 (commit) via fda80fde76c230dda8372bf9d7208520c40f3611 (commit) via 64490637840b05da7f0829aa52cae7f3923b805e (commit) via f1a5583901e051ef4627bf8be08565c4b331e99a (commit) via 6c09c5d64cad9c7d1c6be414ce918ac2d090b864 (commit) via 3142808f15b0dabca8a5d66535c3f795ed470bac (commit) via 97662babe958748d0e1f827b8066d4abe93f159a (commit) via 70d8f0d0f4b85f234902a8ae4f380ca8b1edda85 (commit) via 954185d414641b7d314683bae7399f8b7f920139 (commit) via 09a80c4be6f53d10ce07c24d30d2361d2546142d (commit) via 8047bd6c0d935d8c0cc303b26d75ee62973d2b7f (commit) via 5bded841b4d66bea70c932184eac0a44b82d03fe (commit) via 0f4420e0a80993ccd6ce7d51eeb96e904b8bd9f8 (commit) via 8b25d8e23c1415a99c0cd270f6fe8c4b26749870 (commit) via 1898f7c7d329d9b2f32f3b7957430533b697d591 (commit) via 0fe705a2c33dc6491bd61bbdb91dbbd13190cfd5 (commit) via 080350b622e4315e91f87921485512a95bdf7458 (commit) via ede8db109cabae485e53002c3350eb4d531ab076 (commit) via 6cd8aa3c2a2fc6ecee9b8efea300b3b978660c35 (commit) via 41ec352832037d316c34b3eba336eeb7f4163d86 (commit) via 72ea66b1cf28bba68f2b81637864a330e3ae715f (commit) via 2a827b8244d451071c02e3a3c8398bcb8b0e01fd (commit) via bcd08aa383e92b3fe53faa23cb7509796b9dd8db (commit) via 35e8a6de86790c10a5157bbb90c730b47bc552fa (commit) via b5189fda244112f47e71c820bf1498d500026cd0 (commit) via c51c2cfac619ac9efb9829f8b4decf9756891609 (commit) via d40fc8856d3cc3cd40e091d858df4fb1725f1406 (commit) via f0f60c548a3c3156f6488c1921f5b64ea33f5410 (commit) via 677b3cbf28eb528f18777276035a223c565d8add (commit) via f673623130df6eafe5f691d67089cb75b320eea5 (commit) via cfa55fd428360776c442a5e3c5724c6253265fed (commit) via a1440504ffd18f155404b8bf44466172e9a8054d (commit) via e978a2e5b135e25d6654570a6ed948bd5b0f33dc (commit) via 922b7770bda42a365b062f942b9fc08b2a443709 (commit) via 82db83d2f143fa90c13be2a63fe0273e7e80bd09 (commit) via 060be58c6f9ffe11235341bc10c8f5d808e31b3d (commit) via 97c605fd5bca193d0aeb90a4985fbccc884401ec (commit) via 484ccb0c454afa36da6b36e4ca5e0258e1739b3d (commit) via 7a8860afbc614f2215e083adadb25963fe8f4dfe (commit) via 9a733c7bd626f457a71632da46934995da7bbd4b (commit) via 88d32ef095c06d9ff8044ccd782701951d03e65a (commit) via da802afd6e88d6cb4b562a816eee1f85e9ad1e8c (commit) via 72f534ca15674424e7e3974042921178d6b1c64c (commit) via 2192247e336364731cbeafcd63a92d3ec58c38d2 (commit) via 5d2f30f5acbcf572a464f6f45fafaea23c7ae75a (commit) via e24ed7ad870730304431f5cb09d90c980136639c (commit) via 6ce7e587378781931d36b17cf9e3aaf6ebc8c8fa (commit) via 84a96aa0a57959f8552b4329d59329be6c645a4c (commit) via 10cbb87fa3a5f81dc9dedd24580a64e062047887 (commit) via 56c39d88363b3a0518bde1569d18ef1bdbeb01e7 (commit) via 53e2ef1bb4434081bedce3742105e378452c4c38 (commit) via b5d8a6de4815ead8b342f7862cd0726b13a03a47 (commit) via 59032a38471c27c547ed76730c2643a5457e6abd (commit) via 989484d51fa78f0fc0014212148b52c90872f57e (commit) via 053317480a12464d405490502dfde75c5fc17b1f (commit) via edac95b955afdea2d129b32b029bf845dc29cb71 (commit) via e1ee7b4305bdf2b50640c4c500705bb4bbff47bf (commit) via 7ebbe4f9d853a5823ef47a13b53ef7e1f469bd2e (commit) via 564add478dd49f3c444b0f92b22991ea02da30b5 (commit) via 5fe3630677a9525428de0f5cd40d4846bd6b9113 (commit) via dc4d6efa5a507db0a0ba9e22a3c92c6430bdbc85 (commit) via 7d22203912bdab5eeefe532d7e644f43c6446925 (commit) via 2c55c143c8648869ef4042bc980b55f76a51d3a9 (commit) via 63c0ba5ff136bcca413567e2073d4a8c7702f416 (commit) via 6c8326749fccd37afd5343d926d650c87ecdfb9f (commit) via 48dc2d122d74f47ea323066df7be33165a34fa57 (commit) via 3eda6a97aea4447113d5ca2274ba7d125c6f4bd5 (commit) via f589e636ebc5d55ac70f4190a86c826e46efcf86 (commit) via 075f6454092ae058add228eda8220a3680b2f9e4 (commit) via 21c4ec4ffe1c40382f6b435ff49eade31e1137f2 (commit) via 24361a455a2a3bd904433ec3b0107493d29d98ba (commit) via 845c482448e5b60f4934a48eea9c8c1e466f8fea (commit) via 0e8b83a1b75b64cd6985595d396a77446ec49e56 (commit) via 5c6feab206c3b267ad2facbf4898d7e238efd5fe (commit) via 851a5d1d3a80e4c3c4812bcb8073511f98c2ccea (commit) via 3be5896e013492cbe1cf65c1c61822b68d9d59c4 (commit) via 09f85c98c0f52a8f58cde0ffc3949316e4c874a2 (commit) via 01bdc2cc43def6797e40037859cb72981c7342b8 (commit) via e145cfe2e9d4afac060754097dee0b9439d470d7 (commit) via f89678f60948241355959fedc2d6239db1bedcd6 (commit) via e22dbdb7df8b50b2e274e0bf3519edb81f99f2d1 (commit) via a5931b61e9dc8d8c6324f50837ef16aa1683ba0a (commit) via baba0a435a9f715c3f3e399b8284f25e558a5bad (commit) via 14f0378e103fd24915712cb94c98265ad18c8736 (commit) via 45851e850041d891fad3e45e22393f24e6aa12a9 (commit) via 9eb05b48cd8e19988e5a579996598802e2bacdea (commit) via 850eb734f558442310521418dc2cd2ee6a161142 (commit) via af1354d6c14097f9ec9dda25460e9228fa592fbc (commit) via 379cf11b3073caeb97727b17db48766624290caa (commit) via 0b668e52a91b7f03f312c691e5b1c54a371d0316 (commit) via 2a8c2af4d4ca1ec653c87c11a3f79a241b6b27e7 (commit) via 7eb1f5b7aca1500e68a8be7ba158ed616a8595df (commit) via e781223c8887fa2602b40744c67cdc77f972a93b (commit) via 2e900f1ec56b82b08fcd1a847a3c7317ebad2e2f (commit) via b557f3e106274cfb4a08a48d2dd3b6d4f3f67bb7 (commit) via 4b49c9a245db870ab2359495083a6839be3ed9df (commit) via 4d3f120c5fec71b12e8d1cab1e509e2545012475 (commit) via 598400a3e7148c75f83e1adf995cd6c1a3857d58 (commit) via ccec62c6aa8ac44aaa9908ca5d72c396c5f068c0 (commit) via c0c8450386b08b5c764500dcced767bab0706a01 (commit) via 3df2506fb549d57802ba2c7d99724210970791de (commit) via 60546b4829ecaa34da88c9a0993b38b967d25925 (commit) via 35c5cddcc51b8e2e6caaebc969ce3d7ae810dee3 (commit) via 7df38939f9cc21d955c2daf5b6dc2cf70bbfca74 (commit) via c750b28220ebe3cacb087935871c7750758fc225 (commit) via 10f444a5c6015a10ef0b520c32ad65097facba2b (commit) via 9e226d96ade46b4b6a53dc88c1d3067919aae9c9 (commit) via 2a1f3dff6f5d4a77359c2259b7a0662ab345ad95 (commit) via 053475aff71ea75810bbc6841b3473c33b87623e (commit) via 2591e89c14cf3e0e14312c5bfee8397cf31efdd2 (commit) via 3806e186d1ac3efabcbd3237927fc660645fdc26 (commit) via 22908e4be83679deb32cf771df9d7793681814fd (commit) via b46fa35824f2e8716032b3ec3201d0a0ee445f86 (commit) via abfc55a362bd2ad5ea45f7f8f228adf516f389ad (commit) via abbc0b839f70354804a222fbb10f96e378927486 (commit) via ff5188481a43f024db0e8ac385eed398be401d90 (commit) via ac59ec7dc19fe4bfcab81169d6f597c4852f096e (commit) via 3fd9f4ab0595f15588055fef1ad8dd8612945e22 (commit) via cf13e495447662624c3389dc075fe48342f5e593 (commit) via ce0704e41958378381ca6fd24591f81df5232191 (commit) via fdb2ba2521998397d97d466b10a8ac2458363625 (commit) via 6a4e189b6814c6b1a103186c611dfe7ecd374fe9 (commit) via 83be64d99c5a545f17d1a19da6159ac853942843 (commit) via 8ba8b5537cdee251d412c331267822badc8fafdc (commit) via 7a2de256c49e5ac2d78646dd9f3075f0842902bc (commit) via 0b2438118ad93479de09f0d7a0e9b77859f9a9c3 (commit) via 10fcef02752ad46b53dd22025420048a0278322d (commit) via ac0786cb9ae40f73323b448e405b053a83770de0 (commit) via a52faa1fcb7b54026ecfbef573d05568846e1aba (commit) via 8fc934de0e9667a83712ab7b460d63c309b86571 (commit) via 65481a60a06b4238d342f64b5fed52e252ee191b (commit) via 8cae24a1d0277fe3fdd0f2fa9e9a76906ad6c016 (commit) via 6ca4f2229234ab7543597ca19bda09c51297eee6 (commit) via 94255511a6d59b14159544e2489905c62dab9fca (commit) via 253594d0aec0cbe34694cac59ef1a8e42a532118 (commit) via 4def02a3852eb211e26951819646f8cd8ee6c00c (commit) via 29f07b08671ea8a8cf2b32c6b740a2ecaa58168c (commit) via b966f489c1b35cbc897720f1f9b68bd9b69175c7 (commit) via b64b4629ea8aa669d652ffb32fe7a7336bd8ea8c (commit) via 041ebda25bef6c142ac80135b0b59d88acbc0f1f (commit) via 13433b135759edaa65bd1cb31c3b124c244866d7 (commit) via 82521e359f9afbb1644d1b8eae58f27a51407df3 (commit) via 80e982d7ad571ce308708d36a531df7a91ffe0f8 (commit) via f7bb40c92dceedd65965c4c475b5395239e630ea (commit) via a05fc93ee6ce563bbc6bb23e4540cd7bc2f4e52a (commit) via 895b89046601e61f6fb76bf17c5306ea102b9bf6 (commit) via a650dbb280859bdbadb9a7bba5636955190ec18a (commit) via 62b308515abe01fbe03ce0e1c7fee4879ca665b1 (commit) via 5164e9a6510137eaac1c7b736a6b24fe02ce17a9 (commit) via 83bf980c9601c2e5d6a6247867606539d8a14528 (commit) via 29ec8d65f2815bbe4b47c59c5483a9934b92898b (commit) via 6b586e2c13b36a5847671fad7ea5d04dde0ab1a9 (commit) via 7bd58bd67d204a73e40090ebe9a31b368cd73fb0 (commit) via 4f90e7931487195b5d540fbaa5dad1c90b26cee1 (commit) via f36eaf6a6eb8a7ef1127ad43e419896be89f0e39 (commit) via 25d261efa7c80ce7d9cbcb8b94d5d4a77cb12aaf (commit) via 1e0a9ac45d51e0076222026b9c44604b287a6eae (commit) via 21499ee0a3b4ba0f69e9b37ad18d248cc4b71041 (commit) via c4f9d104269938d8111030a05268b19a0f493098 (commit) via 31f3531856ab8ee0cdeaf427224b51abd7714ccc (commit) via c0e46d42a35d9394d856b958e17d015f4b521940 (commit) via ae0f7dfa954e97d8b62cf83f0063e37171b457f8 (commit) via dcbe8ad42bed8077ad23e1c521963f059ee6c584 (commit) via b9d36826c5676bf3d0bb55fb47c6ce62f4f3470d (commit) via d9bdcf34efa79dcdea4ded8e90b80a55db69fbf6 (commit) via 7e8b08ec6446649c9bcf4e48ff7810f4a0379bbe (commit) via 0f5e76df0cc97808f7dacdeb4376fe249af6c919 (commit) via 0a312e2271710554f8e73518dc4b28bd1d0d1d7a (commit) via 45ca6e739aa70a5e85ac39cef88cd1c2d0485025 (commit) via c912b72458e94528a560929038a653d6d46cd408 (commit) via 83f9c6275d8f2d20da924a929d659135335a213a (commit) via 49afdb1e8270f7ee60760cae4ff43ebb6864ce2c (commit) via 87f04b9572d64f1b96638c70a5a5b4e81478ae50 (commit) via c87be0c0358c4cad12cdcdea719e2f583f788bc8 (commit) via 5b6d354f70e1faddb006a7c98479f5d655a07b87 (commit) via bed9c73decfcda0366984d990045e588928440ec (commit) via 462cf254270fbd56bffc73b00dc28882fdb0bdd6 (commit) via 613b3e49a009c4b3c39909c803d2c8b383a8c14f (commit) via f5c4dada1bf8bf6463d1128065b3f85e78935ecf (commit) via 52d39264b49c18f6f1e98a2348e69cd679e389bc (commit) via 2927e437e0f6001270783958b5c3e447339e3cc7 (commit) via b55e19dd1f6a4d679d36ba9f006a10c291f6b5db (commit) via 322425faca3fa6dca1356cdcb4c44ea8d46bc32a (commit) via dca58fa27995e5579b8ff52efbc0a20d00f9918d (commit) via 3bccdd89c88864839a0c8d4ea56bd069c90fa02b (commit) via e66eec143c86cb36bc468b78583f689840156d99 (commit) via 632534104c4c094d07ab085fc10f2e3e35961ae0 (commit) via 696c75e99124728d35339d1465e3e8edbed7fd04 (commit) via 1e1cb41c46d5247c437b384fa702cfe774aaf501 (commit) via fda91f4099d4ebf1b53592e56a29694a7837810e (commit) via eb44f00192f635fc209b37d35d57ebbcc453ce11 (commit) via 51fbaa30997d2bc22d3483065ea04165526dc025 (commit) via ef3c319b971de36eabdc4180243a07e3581f84b7 (commit) via 7f9baf579033e13a25fb9c4db4c79d8f7bb0b47e (commit) via 81656b92107b798d2e78929042812248d12853be (commit) via d9a7ef80aaff4373baf4c864c97efbbf20337dea (commit) via 89780663b3f64eddf7dda2b5565935b73d92c146 (commit) via 9cad44dce264b509afc4b50b540b3a8594cf3217 (commit) via 60274e1d94c8409f810332345339de5dd449056b (commit) via 8f2ad9c4a06029d6d2859119f957a83c6082b14e (commit) via ea3bc1e5b04fd420c4627e520af2e913b88e1100 (commit) via e3af6bec6733fb21206998c0c8f155e6d13b4367 (commit) via 699321bfd5a997aceb64649c83ce78044ce11cc1 (commit) via a28ae16e3cd6d42ab068b5bc0bedf5725a6ce743 (commit) via 0d9a5baa0e96fb2d14838ebeb6a86eec62acf100 (commit) via 47dbe9267eea47e7be656da409a9ee8ced691422 (commit) via e2f25d3e8218fe0ae02680966b71cba8755d38de (commit) via 9662b9efb747192b6825100e5d06fe63c0893484 (commit) via 8c5ed37e0815b2fca234cf5d4b85eedf02ec8daf (commit) via 957bdb9e6e4d8e0855f3a9d98cbc6a196bb07293 (commit) via c6bef559f308ea6715a3395562ee66e8f8825b9d (commit) via add3b1ee4f798fe667b53a521eb18a623e64f0e0 (commit) via aba92ffd92bb1cc4bbe898b7abe65347b0468d33 (commit) via 047a5e4d6656f362151b855b34c259708b8419ba (commit) via 89891bcb9e226cc6216227634d0272adbc080c72 (commit) via c3304fa510fa0dba380190cfb775be2fafcd8527 (commit) via a55ed1a37c74a7a112e6c355af0658b5d89dede1 (commit) via 9f40ba259a1d55e9277e0d0c2b706272a0ee75ee (commit) via 01d5963552ca375f04cfdaf21f24aa0d51574a43 (commit) via d96d971ac048acc8fa266b2e1320cc7f0470aeae (commit) via 9a1ee04dd5b7da3bda7159500b3eeda16ee86fb0 (commit) via e7e939058d568a7aac9952386057fc869c240a9e (commit) via 6cd3079ce8072203a71f9dc8d3f0b578f9ad063c (commit) via 75da91ab952ad770c2d1fe9a96aa630a4d02738e (commit) via 1cc73e9a6c6dca38a163a8e61208b6ab74839441 (commit) via 9a65b1272c94cfbaa929e674db55c67485a2cf2a (commit) via 205ac0f034b9fac9d220b2c24a17738708f3068b (commit) via 9360e6c6a0197e9ac05d085221eb7ec31be3c2eb (commit) via 4e8ffb952c41e19a5a4b24cdcbc504dba3f03f11 (commit) via d9f54b565a80c0811f31374d6359085874d6b23c (commit) via 2b52c6cde5933d7e46b2d85788ba67b20069ab86 (commit) via 2ccf879ab4efca38bb2918bfb4ba5946328f8bb1 (commit) via 71d9861a42e591d609fce20ea334eedc80f8b199 (commit) via 4e537aa42c7d5731272d75b4a298271e26d36cee (commit) via 79b017f23cb012aaaad361c5e4478dcfa7bcc829 (commit) via 24c0e229efd92392a877ba5c7c52d74fb9fdf689 (commit) via 1e0841c67244c70641a18c348cd8a274f4789010 (commit) via 06ef23c3e0abf79f451cf69fbd3ac646b7e17c27 (commit) via 6b6191d8754fd6a805a83c2a10f521aa92e26175 (commit) via c1fb7213edaf512774eb74adb0a89b4984f88904 (commit) via 6c332bd84ce320e4163130a052af7b9950b38318 (commit) via 5d81817b7168d16190848807d2cfb73ed14b8ee7 (commit) via 6d9ab1eff7bd8a1374429c61627157dda4bb127b (commit) via 2187818706241201b067605138bbcaea420411b5 (commit) via 3bf28f5ed057b2fe4d90c601065188055bb052a1 (commit) via 154d8339f77e5cd31466e5a4258c27a8aa31ff1c (commit) via ac77fa35c0250f2f7593fd2fc499b27bf395e5a6 (commit) via 662ad240db50792361aa042c60559c1c48042a6b (commit) via 5adf22bbd23185808dc3295766b25b4aa15e1612 (commit) via 36fa535d922f891deed4333b30ddbf429291ca06 (commit) via 6d7c02db34a3a8ca9cf14fa936b5835014c46739 (commit) via 1cdf7c1be24f87e2854204aa5bc7de4dc22af1a3 (commit) via 110c1bf475e2d1df27189936a1e7b66b48afb5a9 (commit) via 5228d36aac11e23c795019b28eba57195392b51c (commit) via a52d35b8ef75ea4b6c9411d24450fc17706fdc9f (commit) via d33de80c8a9e3e5e56012cbfe640004f7cb1550f (commit) via 09475c298b83cbbaae2ca7ba6f52c0fa74607568 (commit) via 503f25d490e56dfc1d3dc894e1fc1bd3e7e89e81 (commit) via db431ecfe33dbfa9eb43e4edd72ebc35b2c7c563 (commit) via ebc28c156ee56c878990c53cbd62779249b139bb (commit) via 66bdc792a0500e0e5ad57a55bee4f3d4cc25999e (commit) via f782b31368059ce17aee9758de5709ffa43841bf (commit) via 86563cf7c8e6dd4fa98a35b9153e4108e8a2286f (commit) via 4fc64ce76d9981674ababaa3279952544ba8ac01 (commit) via a9113ae37bae72ee2f7a765da732f2b21d1491ce (commit) via 2186b323c0bc43b7eecec0f906cff9fe2e57fc0f (commit) via 16f1dd0d16365448f9d483a5d00aba356eb2906b (commit) via b2de6da2f161cde26178e568974fa5ef7f7480fc (commit) via 003c91385a050fc3b469e9f4d1ccf22e70f0f709 (commit) via bf67fff0356f1d0d6996a52eb6fda2358b17b57c (commit) via e629be4a7affe8615c2321b1a08bebb42bb81b15 (commit) via 1c7a9119d29568a1e3da82e8e96c8db464d599ab (commit) via e9cfe63dfca48688064b56777508ab20c5f2aed4 (commit) via 54a48c6781dd02f2ebbdb19a77c9a4fb59e67735 (commit) via f4977d056b2295679ce723c639f16823cfe489d5 (commit) via 7202db5db46bfe7499244af315249820e883c8cf (commit) via 5995082101a1959f303f9f3d6c0a1e483630749e (commit) via 6a54d28e44c3e539a0f6b45a5bdd748df5ef29ca (commit) via 8250a520aacdeab2c22a24bbd31c23fee787b86e (commit) via 4b847f12f645b953feada796de66bc40b876f4f5 (commit) via f566ab2747d24468a16daca919b472fc9de33a54 (commit) via 85e08370d0774397f42a7d45d07f22b3a817fe10 (commit) via 78104bd7bca4bd9b4b7a5c17622838a33843138e (commit) via 2ca029d9a896433c6b8681930ee0bd8d87a21122 (commit) via 30243e7fafee60a8ef6ffc6fb8eed09548a86aa9 (commit) via dda1805f27c40028924cf367492d6990dcf31e96 (commit) via 322472e571f75f803c148a8ebba25c6d0247fc82 (commit) via 0aec4d38642570cc38440b5368fec4de02e09a6a (commit) via 7238a052b9238dc4405e90389a16a4dc61f848a6 (commit) via ffb8817b370937b02c384d9d1fd91c4e9d799553 (commit) via 6403cda149e5213608b8f4889676c1e69aaf498a (commit) via 6a8da1d7773ac3d50a450b1043f453406528ae29 (commit) via 09a81e29fee15bb6781d66769497fa320765fed9 (commit) via fd6b260c40509e1ab8a6b548e47634388b84d56b (commit) via a333570914ffb9756c94c31afdbc4a8429e8eaa7 (commit) via e4ac7c2b4f9523330c4811ff03da69e334665f98 (commit) via 8d71fa92838f9fd3d444963c6ea6ea0d7be39cf3 (commit) via 8bfa6a00ea7181b49ca4f604c6b8eeab277f0e7e (commit) via ae6607af470e1f3faa287310dc80f1fcd6d18ab8 (commit) via f77420cfc934303ffc3d65e798b64e1631eb5d98 (commit) via 99d6de6c1a5871ba03fa008c984cd5408940c3cd (commit) via c1aaf8a61defe3e01e8526b99d8919b9618d1ba9 (commit) via 73a6d4566a9fa13ffaef2f1111be808a220ba867 (commit) via ded616bdad46a445ea7ae05d47ae8f32026b13b5 (commit) via cdb6d7df970fcaaf6cda1bef9955351222e1bcde (commit) via aa45291e7f90749cd6e0f1d7d02f9536c30731ce (commit) via f79efeac7939663e0fd67b4087f6ead08402189f (commit) via e348d8db559fd1d79f936d42582eb628779d23ad (commit) via 9b02283a1fdb63b0cf9755ae37a0d22fc6f4dbf4 (commit) via 73909e242138ba01c1ce5ebe04fa16a9a8e2e675 (commit) via 29528cc33e929b3c034b1491842ddaf91b3855cf (commit) via 62d0e22325d36e5f9d61ccfbef0d68cfe1935f1b (commit) via 059aa805c9c0cb34c92eb69abf66febc40ab62db (commit) via 5fee76606b7a1f252e75e95c3d8303777459938d (commit) via adcade6088a8bbe19002ac88f724d25ac95597c5 (commit) via 48b56504bf2c9be2151cc507aaf5d59e50f456ae (commit) via c9b3c5625a4b35235bfe19e95db8e7d0dfbde59c (commit) via f06986926ae2ed76023956e6594711f9e65b4106 (commit) via 5651257fffc4482861c2ed6a67721fd00f0da6c0 (commit) via b35a949bb6ce6ae5204de2cf867dac903cb71262 (commit) via 01347954187ebccf83fc7540163f150a5f430c36 (commit) via da915157b0ac1194e5290ca92695fc0afc073e1b (commit) via 160ebe58b53d542f44f2aac6b69d4cf02ec40c15 (commit) via 52a3022df62c0b2ec6c51f70e8eb862dbcde3c9a (commit) via badc2c44d8d1c5367c54b2ae67aff84ecef178fe (commit) via fd14f8733934469a524d3f2be595aba20c47c82c (commit) via 32f13fbe09fc8a5814bb3137abf2158cf1e24807 (commit) via 58ec4932e348814d70d70f7e60ad0c2fcb2240f7 (commit) via 17c151965d4c8f7d5a75e82341403fa43c7ca42f (commit) via 0b0e28d30b1b3b91150ce88a3cb94c8bf39fa7ce (commit) via 31282e7854dfa4f28ebe26839599104b4f0b7008 (commit) via f104fe45fc9179e96065f576b0cc3529b29cd624 (commit) via 33f636264a5d830f67316dc6184f4056b3a3629f (commit) via 8429068d7c37d06e53b871811760419ab3e36455 (commit) via 32cb4172bd6b98810f9638076e978a6bc569f6ae (commit) via 356068cd2e3c395fa824568613c1de315fa8b05b (commit) via 9dc7a2ed2cbc36d9b6a9286822020a5da2536df2 (commit) via 62a1e292f29d740d0b193e45f0acd37f7ffaced6 (commit) via e98465cfed68f6511af552ac8ab0d168791f4302 (commit) via 96f6f392e3d2ba95c11d0b77fbb5da485e626ed4 (commit) via 3f8e94f71effc552fd13d4d37a5ae367fe896644 (commit) via d23f4414c44b977abc3f9ff49aa06f709a3d9db1 (commit) via e68aad3eb88b910266b7af3f80f9ee8a6370401c (commit) via e2717d69df8eee036cfa5be431e019e117b94efe (commit) via 0c14db2558a3792b59da08ebeccdc1f3acba945a (commit) via 7788db9c4ee673fda9181de656363884d790592a (commit) via d49176e91e4fb4ae31be1011c1029ca07d2cf494 (commit) via ce8f117fe2c10f1ebd56cb8adec0dcde1fc62457 (commit) via e0f725f821f251165c17a7580c2000342ac505a2 (commit) via ae4861ec2214cb025f8bf2426376a4aca9809d73 (commit) via fecb70dd34b5ba244263e72c42f90701775e132f (commit) via 77cbcb76bb5d75254c6ced0ed782152024f51d8c (commit) via eacf7decbf78a184cdad7a6fd533aa4f433ec27f (commit) via 624021a09e7850b1f6cb75af40b17a38d98c95e3 (commit) via 5da9266af50af3c2c1a827a1d162c8a9b16e7fd9 (commit) via 94e3f82cf114d12b190d1999a72838018eb171c9 (commit) via 70ebf35cdaaf391138df7564a07cd205de4af971 (commit) via 2a6fd4328adfad4cae0097d6d71e571c122fc0d1 (commit) via e9a8a207ad6817cc93eab2b878de090b5ece8bfe (commit) via e80ac953035703dde6e03e2c32ba9fded8c69f2a (commit) via 9293e57d9cef75a5abb6f28d5bf712106471a137 (commit) via 33a1d727d5aafeaa0d9e729119d7d43ea9fcb370 (commit) via b803d00bc1a6b5ff37867ea70cc3c0bda018ee2c (commit) via dfebdd6218d8f146277d75597fccde74b45cdbd2 (commit) via dc32ad198819a1f25487daa1787f08825bbafef8 (commit) via 8aac0ae7c52c6f1937f6192620933f546574c730 (commit) via 28df39ca8efbd3380e81977954aeda93ce53db10 (commit) via 741b7621b3c71406359d75098f9bdf8d3567662f (commit) via 1f661e87a6a8304edb77bd30b546e5d113477c59 (commit) via 3ccad39000281c40e2a7a5e078adc4f977e462dd (commit) via f5d6d27168fefe3ef05bd1863c25c3e9505e4b04 (commit) via 48ef9c5ae64da6cfe1470f4420abd29263ec2c92 (commit) via 29d96633a405c2848a70ce5931973be2d518b56f (commit) via d60f1ddc39e55f0d2e9d073fe5cca19ced6d08f6 (commit) via cdb72127dcd281fdce8e349118d7de717b7154b2 (commit) via 8b13a52c4964b09f663e462af7882cbd01b8202a (commit) via 9d1db7d7c3696108fd0fa1162893076d9a59b652 (commit) via 0ab817fa1e1c9bae8aa63c331d4483d9d9b190c5 (commit) via 754d431813fb4726ca2460641d826240387eb718 (commit) via cd74daf06f3b12f78bf7aed95ed06ff221a28da3 (commit) via 39c4819eaa4f680411a63701b1303d79a088aece (commit) via 50805693ba987fbf86bb5e8263d7b427cd4da0c2 (commit) via c23206b6c17a5c70580355904fc12fd64c26ef79 (commit) via 347572cf5ea2c653cba6150b5e6d6fa083a68cb0 (commit) via 03df033bfa551e83c2a265cc22f6f5278c80528b (commit) via 3ec230de1f45f48a8bbb8eca49674f0e0c99dfa1 (commit) via 41fb64e719817ce877565e6e11198df2f7e7e63d (commit) via 175c89004425cdbb151d4e85876e2a2076432f28 (commit) via 80a007534f6287cd2e88c1b8fd72b68fc688da4e (commit) via f379fdbb9ee17b62ac8b4a8d4b9fab562ba37253 (commit) via ddf940725e8af095b1c02606aeea64cc9baaf572 (commit) via 71c5ae253cb5498da319e36bcf49869509b6603c (commit) via 5308f954c9ad13cfc6cc84f1f1255fb5faff48c6 (commit) via 887e40034161589b63fdb14bfaee7f66374b9b83 (commit) via 4c60099fea2b06229900cc16fed907185c4fe2ef (commit) via 815a05cf12499b42acea70b5a9534e10e1701417 (commit) via 3270091210c0cfdddb133209b232a1d0a1fa48da (commit) via 793c9a7925dfa3aaa2b15212f4ba0246d1fbf83c (commit) via 25dbfbc2a937379ca78328dfabdf54043340dbd3 (commit) via 3cc42863a43cd4256efdeb2eda2d235d5533bad9 (commit) via 8209b3238f07f5f4e8bd52d9e7f9b7c8af6ac7ba (commit) via 3c0de6db2d9e0580f23cc95c4a1e00a8f66108c9 (commit) via 66094d12241417d9a1080c2f059bd053cda6dc82 (commit) via 5d17b68c675e0d05cd45835f366c62119ec7d7c8 (commit) via 168420f35cbcbd1ef0b2d24f3b254064e21c018e (commit) via 53a1ec631ddd59f4f4eaaf1633a784045e455342 (commit) via d58d28a94142bfd290ea8053a60927138ac98d4d (commit) via 07953c18f3cf64ae599d38bcf3cdc2408fb5533b (commit) via f918b053b257690db4405a302da39fa5de14f1d9 (commit) via a59a7ee95601f3496ec9ba9ae1283a8d980460bf (commit) via c206211af647dd1f7039da91c34c9c72e50aefdf (commit) via cdce7c619c58ec0947c036b93013445bb93e4be8 (commit) via d36016a8ff67fe72e9a388467f3fce456225c3ec (commit) via 717e1f3056b45e79dcb433b1098e8b6fd813d07b (commit) via 0bbd993f618e4ded1d949e64ba778dfab3106262 (commit) via 074534a56d4d6146c2389fd256299197e5bad027 (commit) via a51f1a91d9733c596113f799154ef45d647e7764 (commit) via b2063fd70fa6955acb2b9f02507097d03e2011a7 (commit) via 10beb4a0345f673feaeec798d452a48797c6820a (commit) via f37f1a647d5aba4de5903a3a3dc7700be55c99ec (commit) via 5bb997c24a7ba8b6f252cc7914858f5c12a543b6 (commit) via a9e3c903b6f74d181c76d1a2014a3af2babe6e41 (commit) via 2f3ecd4ea9518b2a110b995fe9ac171f026ccad5 (commit) via 739592c9256fb6f89ee15081c3944d42515ef8db (commit) via ad1f21313f553ecc7064accf582986112dc678d1 (commit) via 2296a2e9ee04fc83a294d51421038dca40b3150f (commit) via d3a9887149d638dd23df2b46ff67a90cd91d33fe (commit) via 6ae09b7c1473836236275e553fe9ff77f48306c1 (commit) via 9a7c9efeea0c2c2dfa20eb46dc75359c7f787629 (commit) via 86c2b552ad7bb3af97bb3c59576ddc7cac841d26 (commit) via 2fed7bcc1f4a19f4942cddfdd42278f1c20feccc (commit) via c29950cc1f532d78158b146c50b0c49b8d41c47a (commit) via 74a2fcff50356dcdcd4004664a2b2b81a8142660 (commit) via 21886ff66a8a84c20a3c7f24601b5a353d8c7d06 (commit) via 22faeef2626e10b281c82d10ba2653ecd940f398 (commit) via 32d0ee3576c9203104a17c6a75bfc1bf13192045 (commit) via 119876e6d5e71fb8a3f72ba35593ee43fd124203 (commit) via c88a3f72289a1fdfb9b47cdea025d50efee94501 (commit) via 25f0c2e14b0285d81ad0c6be401398e12e7ea89e (commit) via 763f717ce2251a7237e85a0ad9a4c86c94942642 (commit) via 3ee2b1623ecbef3164c412bb6a1d826ba788002b (commit) via ec24dcdb36db7b460113b2ce3f7a954800d41e90 (commit) via 6b31416d6c9bdc8b89a918f217a6678cc6083fed (commit) via 1bd74130f2a804d073081f7e3e4f307c3fecb07c (commit) via 96b6afdc4289a3f04983ee5f5af82c83b422c583 (commit) via 74e83c5ff5238af2c4dbb0001160a6b90a008ed6 (commit) via b74314c6fdfcc1520dff6ac93d7150c8bf3f75f4 (commit) via 74404df4405528d4d156d8761f71566d80ba4119 (commit) via e7168c087f6b7a917099cd196959d39f44fb0412 (commit) via ee72803e9f2988d2cf493a6d096c2a0d483fc547 (commit) via 734581f49fc0eac4c49e941c0cc450a04c866896 (commit) via d32f9debc80e1fc90efb07392f829d998cbbc2c5 (commit) via 3287ba02540ae94d6b0105f84e930aa19cf61b19 (commit) via dbdd25bc95af100633008a31f1bbdf7146e211f7 (commit) via c58b0926a7941096e77a7d75760f68523cb01107 (commit) via f3e8a89a9b9a859b0e55abe474f85858a3cb2f40 (commit) via 988c63527ded3cfcb0469532a00c12abe7bc8d0c (commit) via 5febec7a4b3069f3661887ecc0e6b24d7d169fcf (commit) via 261b5785adbadd994c5f8869766f5c1017cbf721 (commit) via b6c9a851cba4f28bf0614b145803dc46096b6cde (commit) via 761ea20518081de976a40e590577056f23188fbd (commit) via 1728b9c076a34ef017f10499e5b637d025b2afd8 (commit) via fe75e140d617dd2d8401a85c718d03a6466a8bd9 (commit) via c508fd8481d87aef7843942ba186d3dea4246c7f (commit) via 1f9c879759a92a4bdbb264aafacac05d2da89132 (commit) via 9b78dca3a909ce3161d235718f935bf2fb9b7f64 (commit) via f10b2f72f6979ccb16410d97bac98c440eb7f992 (commit) via ef399f9bc6b8e2ff917a5f2809346fb81fd954ae (commit) via bb4730dc5add8c5ac54b41efa5375189636429f3 (commit) via 160083b04ddde9904e90cbf8146193e28eb58124 (commit) via fb3fd78d580d0ad0aa138fd8edd7f81f44a3f275 (commit) via 60b5616af7966076ffce43610559d8a0bf7a9550 (commit) via aa18d5befec57e69628106cc5d95829a687bfd5c (commit) via 5d5be3bd96f4521b38774855fb70e4238e346db2 (commit) via d1530cc9a5bf16c83d7ad9246d6a7e35a0235b3e (commit) via b9229944cf1b9f27e1fc97921e736ca17fc4eb0c (commit) via ac0962cead1db76b44cbb9d9a413956ca31a7982 (commit) via 109b8a6fd32be9886de71f98170e0c512ac9883f (commit) via bd5ea6993c8376cd3612100019e15ee256a758d8 (commit) via 3936a2886efc1fd46560352f3a48d6a656f95367 (commit) via 20ae76b1da82d87792fb54335dbf95e871261f52 (commit) via 72cfb3c3d2e8f6167cf08289691f7b0c61d0d331 (commit) via 8ff87662325b2f2c216111100da03fb78bca142c (commit) via 6a5e5a926817f7318a2a80822aa2ce28674344f4 (commit) via 99ca1e27e2453977d9b6e1b2a886c5b767fa9606 (commit) via e853dfed6aef2dccc6bf05b6d19a5911e76f51c6 (commit) via 8ba5c21db774cb23d223612ba67963723010e9f3 (commit) via 75040fc103b763092e54274d088659da792e72e8 (commit) via f773933f2630a17ce6b3b2aa6f8d7d8b65eb336c (commit) via d9e2b9a909b5f5b51ef3a106ed1d60a8d4cb795a (commit) via 8b155a6c092d2b5e5355d6488fd7fa7e71f58207 (commit) via 1ba91291e3237e5535a46c6ff1bce6a33d298a76 (commit) via f7b9bf41c5386dfc38b7a722f75b0e23a02d542b (commit) via 4bff2d14fd3010ba4aa1bfc3eda2fb2cdcc5da0f (commit) via 7c29a0c860c4bf92a941f6752e0b5c4ebf4c88f3 (commit) via f7e5c6820a6eed8e6f29f7a5634a30b4f42a43aa (commit) via 8ba6dc362dd1c5b073c68f8a873a91ddd2743e34 (commit) via 1d04d2ce3609da4c4f8d59ccfabd8848a6e765d4 (commit) via 34ce3017b530595753b5987bd0702aceded683be (commit) via 5af61d446d53517a90806ce45060f48b511d263d (commit) via 1009e1d708212d939feda5e761ce758d20fb3752 (commit) via 33a65941fa5d7c12d79f9a4e002fed418ba6adc7 (commit) via fa5188d0edf081396ca0134d07cd8706549ddede (commit) via ff843dbd547d06b9dcb25c3970e857fe395f2dcf (commit) via ced3396d048c8389327f661a99986fef51ee8a3f (commit) via 624fb9d7175ee011f8a86c8d7614be4806a53184 (commit) via 03be8ccbf607b378c7ffcfd2ffe6797612837efa (commit) via dc58d9f06d921e3e5d03b9adf9a4d9ec5359d9ba (commit) via b7d8d80a62d2e2c31863efedd41945c2e9db9bcf (commit) via 31e96ccca23a034700e780470bf48cff0d7fd15e (commit) via 11e9605179e340833d95115fb0178d2ee84b3e24 (commit) via e0f3931226d6f947572bce7a4b98c55812bba105 (commit) via 72dcbbe5c017a4c071187259f9594ccf02f7b466 (commit) via 7fb14775a3cce73dc0cb0d759b96059a95f7104b (commit) via 615e2a17e499b2bd53cce8da1a0cfae36d67b24a (commit) via 45b49099d9dd034fd1e7344b3bae88b0e3d3427a (commit) via 5396bc92d0162fa9a9462e15ccaae8764da8ff98 (commit) via 38bfe65eba21c697d05e8bed79635fc125cdac17 (commit) via 7da1cde3aedd3f09dffaadbe5815a04aa71d411a (commit) via 0c4379353fb82e0d5223e82faeaf14f4dcc7a80b (commit) via 0cab748cf84a844df36623f03c5ed7b8065ceb5a (commit) via 26662fc3d38f93b5aaebdcb59d8937f9661020f9 (commit) via 6c8d65963104451b15aa331a6914173af42a224c (commit) via c3800e54583208ac4a6435884bb8832e72af3183 (commit) via 166b3393875e4f6752907b9b06c2518dce0432e9 (commit) via cbe4d5957b526f9a9bb6954d0c6944ad7642bb90 (commit) via 8731701cb636317df2691359361562f32adfe759 (commit) via 0ae5386aa953d1670074c2f1bfc9a04ddb382684 (commit) via ce19607fed3990b8e828330e77f09061c99aa113 (commit) via 008ed80dcf1d03640879b4168f4fba956aa03196 (commit) via c0d7bb8368c3d157d1a2758b620fc726355e554d (commit) via 21a125cdbff24efa746249a3b8ccc6296c5f0aff (commit) via eebb2be8b0db17bb5f760e7fa04c020406e6f6eb (commit) via 84f3c87b030037646c1110b1e4237f597ad3dd88 (commit) via ee3295e91740033ebe9d9a0c800c0a3070108624 (commit) via 0a30938848518a0e5095a5dd7e4739922a78b743 (commit) via bb72fff2f09ef307b74de35ab00dfc08e6da83ee (commit) via f236c9cff9dcb4d4534e5532a9792e648d48d921 (commit) via d4da4755cdab41679ae7c2fa6ef2984a2d6837ec (commit) via 14c771530a12feb4f92fb0ab466b40ff68997b05 (commit) via 46c6489850ca9029bb75d17ed652563fc58a0082 (commit) via ada0bc21f42e25882ddf5a8aab10eaf3ea7e0b89 (commit) via 90a55bb1d2b18d14eec3c972e1b045205acfd708 (commit) via e2ee0971474ce92766f77d77025319ef575aa303 (commit) via 787c5f37dde5982dea71b34339b9f546907bb368 (commit) via 82e5ab9e14b81e0d21ef61f503a2b4c8638776e8 (commit) via 7e42a43c1413e46e43d657a025dae726735dfcda (commit) via 5ba2c9e5e08cb391c366065210a95a46ac74f310 (commit) via 73ae67006c952b8804f2566e868bc3acf7539857 (commit) via 1df9d5f91944e0b5ba00815d55bb7dc545053b4c (commit) via 4cc2908fdaaf1ab8afe5c2ae5dbb3401859a9aab (commit) via f4a3290ae7ae096f8b92f7adfba7088e6918bc0b (commit) via 9837ed96992a0a5e151c4cb5d4cbe6c7890d7db4 (commit) via 9bd017d20ec4a2f9f4ceb2a39aa764b584026026 (commit) via 6dec5d5fb83a02f534d681d39c9caba87f3cf9c7 (commit) via c756ad9e73e1432d8596caf7dd6ade298ce84946 (commit) via 4dbd03f6ef60a88e76b4a716782fb186c19fd6d6 (commit) via 7642ca21b7d21f41b41703a6d1bef1d6f3c1e564 (commit) via 0a09717ea3171bf9dda97e22e796c4cdbeed717b (commit) via a3f71349deaf533201d3cb2e8076bb4e7edfbbf6 (commit) via 558a69fc90b5037c13c8335af41bbc9ec03b004e (commit) via 28e87033a3f3f997334c45b19b2292ed3821f59e (commit) via 6f62c66b2c5f0595ff0a51ca97f3b5e1d0924523 (commit) via f9bc8cfeeb956a5abbf293d8a26fb5b15aeec1d7 (commit) via fddc01bab3352d12c0eba1ff781b359a7dec529c (commit) via 370e20c90ee8382bbf8ab6d629072c3e84011ae0 (commit) via 72ed051b12d983d298b9447d3464a38f5e0f918c (commit) via c2645e1979f83b1550d977cee0cdb80122daf8e0 (commit) via 95983ed8453f9167077821aea347ba1a87e92eac (commit) via 0f4dae0a4da92af5079eb730443ec188b3b46f8e (commit) via c9bb3530dc6117b495237113d38dc7d812b23b72 (commit) from 0d5a2252ef8a586f4fc70a66aabd17fb3fd52110 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: .clang-tidy | 30 + Auxiliary/cmake.m4 | 4 +- Auxiliary/vim/cmake.vim.in | 48 +- Auxiliary/vim/extract-upper-case.pl | 27 +- Auxiliary/vim/indent/cmake.vim | 1 + Auxiliary/vim/syntax/cmake.vim | 411 +- CMakeLists.txt | 78 +- CONTRIBUTING.rst | 24 +- CompileFlags.cmake | 16 +- Help/command/FIND_XXX.txt | 35 +- Help/command/add_custom_command.rst | 2 +- Help/command/add_executable.rst | 3 + Help/command/add_library.rst | 15 +- Help/command/ctest_memcheck.rst | 3 + Help/command/ctest_submit.rst | 10 +- Help/command/ctest_test.rst | 17 + Help/command/find_file.rst | 3 + Help/command/find_library.rst | 18 + Help/command/find_package.rst | 30 +- Help/command/find_path.rst | 3 + Help/command/find_program.rst | 2 + Help/command/if.rst | 3 +- Help/command/include_external_msproject.rst | 4 + Help/command/install.rst | 23 +- Help/command/project.rst | 5 + Help/command/separate_arguments.rst | 9 +- Help/command/string.rst | 52 +- Help/dev/README.rst | 49 + Help/dev/maint.rst | 171 + Help/dev/review.rst | 350 ++ Help/dev/source.rst | 60 + Help/dev/testing.rst | 42 + Help/generator/VS_TOOLSET_HOST_ARCH.txt | 8 +- Help/generator/Visual Studio 7 .NET 2003.rst | 10 +- Help/generator/Visual Studio 8 2005.rst | 9 +- Help/generator/Xcode.rst | 2 + Help/manual/OPTIONS_BUILD.txt | 24 +- Help/manual/cmake-buildsystem.7.rst | 12 +- Help/manual/cmake-commands.7.rst | 133 +- Help/manual/cmake-compile-features.7.rst | 2 +- Help/manual/cmake-developer.7.rst | 24 - Help/manual/cmake-generator-expressions.7.rst | 15 +- Help/manual/cmake-modules.7.rst | 3 + Help/manual/cmake-policies.7.rst | 9 + Help/manual/cmake-properties.7.rst | 14 + Help/manual/cmake-qt.7.rst | 46 +- Help/manual/cmake-variables.7.rst | 67 +- Help/manual/cmake.1.rst | 5 +- Help/manual/ctest.1.rst | 17 + Help/module/CPackArchive.rst | 1 + Help/module/CheckIPOSupported.rst | 1 + Help/module/GoogleTest.rst | 1 + Help/policy/CMP0068.rst | 35 + Help/policy/CMP0069.rst | 92 + Help/prop_dir/VS_GLOBAL_SECTION_POST_section.rst | 2 +- Help/prop_dir/VS_GLOBAL_SECTION_PRE_section.rst | 2 +- Help/prop_gbl/AUTOGEN_SOURCE_GROUP.rst | 15 + Help/prop_gbl/AUTOGEN_TARGETS_FOLDER.rst | 4 +- Help/prop_gbl/AUTOMOC_SOURCE_GROUP.rst | 7 + Help/prop_gbl/AUTORCC_SOURCE_GROUP.rst | 7 + Help/prop_gbl/FIND_LIBRARY_USE_LIB32_PATHS.rst | 2 + Help/prop_gbl/FIND_LIBRARY_USE_LIB64_PATHS.rst | 2 + Help/prop_gbl/FIND_LIBRARY_USE_LIBX32_PATHS.rst | 12 + Help/prop_gbl/GENERATOR_IS_MULTI_CONFIG.rst | 9 + Help/prop_sf/HEADER_FILE_ONLY.rst | 15 + Help/prop_sf/MACOSX_PACKAGE_LOCATION.rst | 7 + Help/prop_test/DISABLED.rst | 15 + Help/prop_tgt/AUTOGEN_BUILD_DIR.rst | 17 + Help/prop_tgt/AUTOMOC.rst | 75 +- Help/prop_tgt/AUTOMOC_DEPEND_FILTERS.rst | 45 + Help/prop_tgt/AUTORCC.rst | 3 + Help/prop_tgt/AUTOUIC.rst | 14 +- Help/prop_tgt/AUTOUIC_OPTIONS.rst | 2 +- Help/prop_tgt/AUTOUIC_SEARCH_PATHS.rst | 12 + Help/prop_tgt/BUILD_WITH_INSTALL_NAME_DIR.rst | 13 + Help/prop_tgt/BUILD_WITH_INSTALL_RPATH.rst | 18 +- Help/prop_tgt/CUDA_PTX_COMPILATION.rst | 12 + Help/prop_tgt/CUDA_RESOLVE_DEVICE_SYMBOLS.rst | 15 + Help/prop_tgt/EXCLUDE_FROM_DEFAULT_BUILD.rst | 2 +- Help/prop_tgt/IMPORTED_OBJECTS.rst | 11 + Help/prop_tgt/IMPORTED_OBJECTS_CONFIG.rst | 7 + Help/prop_tgt/INTERPROCEDURAL_OPTIMIZATION.rst | 4 + .../INTERPROCEDURAL_OPTIMIZATION_CONFIG.rst | 4 + Help/prop_tgt/MAP_IMPORTED_CONFIG_CONFIG.rst | 45 + Help/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.rst | 7 + Help/release/3.9.rst | 304 + Help/release/index.rst | 1 + Help/variable/CMAKE_AUTOMOC_DEPEND_FILTERS.rst | 12 + Help/variable/CMAKE_AUTOUIC_SEARCH_PATHS.rst | 11 + .../variable/CMAKE_BUILD_WITH_INSTALL_NAME_DIR.rst | 7 + Help/variable/CMAKE_CFG_INTDIR.rst | 2 +- .../CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX.rst | 12 + Help/variable/CMAKE_GENERATOR_PLATFORM.rst | 15 +- Help/variable/CMAKE_GENERATOR_TOOLSET.rst | 45 +- Help/variable/CMAKE_HOST_WIN32.rst | 4 +- .../CMAKE_INTERPROCEDURAL_OPTIMIZATION.rst | 8 + .../CMAKE_INTERPROCEDURAL_OPTIMIZATION_CONFIG.rst | 8 + Help/variable/CMAKE_LANG_COMPILER_AR.rst | 7 + Help/variable/CMAKE_LANG_COMPILER_RANLIB.rst | 7 + Help/variable/CMAKE_LANG_COMPILER_VERSION.rst | 4 + Help/variable/CMAKE_MATCH_COUNT.rst | 7 +- Help/variable/CMAKE_MATCH_n.rst | 10 + Help/variable/CMAKE_MFC_FLAG.rst | 2 +- Help/variable/CMAKE_PROJECT_DESCRIPTION.rst | 7 + Help/variable/CMAKE_SYSROOT.rst | 3 + Help/variable/CMAKE_SYSROOT_COMPILE.rst | 9 + Help/variable/CMAKE_SYSROOT_LINK.rst | 9 + Help/variable/CMAKE_VS_DEVENV_COMMAND.rst | 2 +- .../CMAKE_VS_INTEL_Fortran_PROJECT_VERSION.rst | 2 +- Help/variable/CMAKE_VS_PLATFORM_NAME.rst | 1 + Help/variable/CMAKE_VS_PLATFORM_TOOLSET.rst | 2 + Help/variable/CMAKE_VS_PLATFORM_TOOLSET_CUDA.rst | 12 + .../CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst | 5 + Help/variable/CMAKE_XCODE_GENERATE_SCHEME.rst | 11 + Help/variable/PROJECT_DESCRIPTION.rst | 6 + Modules/AutogenInfo.cmake.in | 37 +- Modules/BundleUtilities.cmake | 13 +- Modules/CMakeASMCompiler.cmake.in | 2 + Modules/CMakeASMInformation.cmake | 6 +- Modules/CMakeBackwardCompatibilityC.cmake | 6 - Modules/CMakeCCompiler.cmake.in | 3 + Modules/CMakeCInformation.cmake | 6 +- Modules/CMakeCXXCompiler.cmake.in | 3 + Modules/CMakeCheckCompilerFlagCommonPatterns.cmake | 1 + Modules/CMakeCommonLanguageInclude.cmake | 6 +- Modules/CMakeCompilerABI.h | 4 + Modules/CMakeCompilerIdDetection.cmake | 8 +- Modules/CMakeDetermineASMCompiler.cmake | 16 +- Modules/CMakeDetermineASM_NASMCompiler.cmake | 17 +- Modules/CMakeDetermineCCompiler.cmake | 9 + Modules/CMakeDetermineCSharpCompiler.cmake | 2 +- Modules/CMakeDetermineCUDACompiler.cmake | 58 +- Modules/CMakeDetermineCXXCompiler.cmake | 9 + Modules/CMakeDetermineCompilerId.cmake | 85 +- Modules/CMakeDetermineFortranCompiler.cmake | 7 +- Modules/CMakeDetermineSystem.cmake | 18 +- Modules/CMakeFindBinUtils.cmake | 4 + Modules/CMakeFindDependencyMacro.cmake | 38 +- Modules/CMakeFortranCompiler.cmake.in | 2 + Modules/CMakeFortranCompilerId.F.in | 5 + Modules/CMakeParseImplicitLinkInfo.cmake | 23 +- Modules/CMakeVS7BackwardCompatibility.cmake | 16 - Modules/CPack.cmake | 16 +- Modules/CPackArchive.cmake | 39 + Modules/CPackComponent.cmake | 69 +- Modules/CPackIFW.cmake | 162 +- Modules/CPackProductBuild.cmake | 8 + Modules/CPackRPM.cmake | 61 +- Modules/CPackWIX.cmake | 35 +- Modules/CTest.cmake | 6 +- Modules/CheckIPOSupported.cmake | 230 + Modules/CheckIPOSupported/CMakeLists-C.txt.in | 8 + Modules/CheckIPOSupported/CMakeLists-CXX.txt.in | 8 + .../CheckIPOSupported/CMakeLists-Fortran.txt.in | 8 + Modules/CheckIPOSupported/foo.c | 4 + Modules/CheckIPOSupported/foo.cpp | 4 + Modules/CheckIPOSupported/foo.f | 2 + Modules/CheckIPOSupported/main.c | 6 + Modules/CheckIPOSupported/main.cpp | 6 + Modules/CheckIPOSupported/main.f | 3 + Modules/CheckLanguage.cmake | 2 + Modules/CheckSymbolExists.cmake | 73 +- Modules/CheckTypeSize.cmake | 4 +- Modules/Compiler/AppleClang-C.cmake | 27 +- Modules/Compiler/AppleClang-CXX.cmake | 31 +- Modules/Compiler/CMakeCommonCompilerMacros.cmake | 93 + Modules/Compiler/Clang-C.cmake | 31 +- Modules/Compiler/Clang-CXX.cmake | 30 +- Modules/Compiler/Clang-FindBinUtils.cmake | 25 + Modules/Compiler/Clang.cmake | 52 + Modules/Compiler/Cray-C.cmake | 21 + Modules/Compiler/Cray-CXX.cmake | 19 + Modules/Compiler/Cray.cmake | 10 + Modules/Compiler/GNU-C.cmake | 31 +- Modules/Compiler/GNU-CXX.cmake | 33 +- Modules/Compiler/GNU-FindBinUtils.cmake | 33 + Modules/Compiler/GNU.cmake | 41 + Modules/Compiler/IAR-C.cmake | 2 +- Modules/Compiler/IAR-CXX.cmake | 2 +- Modules/Compiler/Intel-C.cmake | 59 +- Modules/Compiler/Intel-CXX.cmake | 79 +- Modules/Compiler/Intel.cmake | 4 + Modules/Compiler/MSVC-CXX.cmake | 32 +- Modules/Compiler/NVIDIA-CUDA.cmake | 6 + Modules/Compiler/PGI-C.cmake | 13 + Modules/Compiler/PGI-CXX.cmake | 19 + Modules/Compiler/PGI.cmake | 12 +- Modules/Compiler/QCC.cmake | 8 + Modules/Compiler/SunPro-C-FeatureTests.cmake | 14 + Modules/Compiler/SunPro-C.cmake | 21 + Modules/Compiler/SunPro-CXX-FeatureTests.cmake | 4 + Modules/Compiler/SunPro-CXX.cmake | 38 +- Modules/Compiler/SunPro-Fortran.cmake | 4 +- Modules/Compiler/SunPro.cmake | 10 + Modules/Compiler/XL-C.cmake | 39 +- Modules/Compiler/XL-CXX.cmake | 44 +- Modules/Compiler/XL.cmake | 2 + Modules/CompilerId/VS-10.vcxproj.in | 12 +- Modules/CompilerId/Xcode-1.pbxproj.in | 120 - Modules/CompilerId/Xcode-2.pbxproj.in | 119 - Modules/CompilerId/Xcode-3.pbxproj.in | 2 +- Modules/ExternalData.cmake | 2 +- Modules/ExternalProject.cmake | 27 +- Modules/FeatureSummary.cmake | 61 +- Modules/FindBoost.cmake | 50 +- Modules/FindCUDA.cmake | 23 +- Modules/FindCygwin.cmake | 4 +- Modules/FindDevIL.cmake | 6 +- Modules/FindDoxygen.cmake | 1121 +++- Modules/FindGLEW.cmake | 2 +- Modules/FindGLUT.cmake | 8 +- Modules/FindGSL.cmake | 11 +- Modules/FindGTK2.cmake | 2 + Modules/FindGTest.cmake | 60 +- Modules/FindHDF5.cmake | 93 +- Modules/FindIce.cmake | 2 +- Modules/FindImageMagick.cmake | 23 +- Modules/FindJava.cmake | 3 + Modules/FindKDE3.cmake | 2 + Modules/FindMPI.cmake | 127 +- Modules/FindOpenAL.cmake | 2 +- Modules/FindOpenCL.cmake | 7 +- Modules/FindOpenGL.cmake | 4 +- Modules/FindOpenMP.cmake | 541 +- Modules/FindOpenSSL.cmake | 1 + Modules/FindPackageHandleStandardArgs.cmake | 4 +- Modules/FindPkgConfig.cmake | 43 +- Modules/FindProtobuf.cmake | 129 +- Modules/FindPythonInterp.cmake | 7 +- Modules/FindXCTest.cmake | 4 + Modules/FindXMLRPC.cmake | 30 +- Modules/FindwxWidgets.cmake | 22 + Modules/FortranCInterface/CMakeLists.txt | 11 +- Modules/FortranCInterface/Detect.cmake | 5 +- Modules/FortranCInterface/MYMODULE.c | 3 + Modules/FortranCInterface/MY_MODULE.c | 3 + Modules/GNUInstallDirs.cmake | 44 +- Modules/GenerateExportHeader.cmake | 8 +- Modules/GetPrerequisites.cmake | 13 +- Modules/GoogleTest.cmake | 226 + Modules/InstallRequiredSystemLibraries.cmake | 6 + Modules/Internal/FeatureTesting.cmake | 10 + Modules/MacOSXBundleInfo.plist.in | 4 + Modules/Platform/AIX-GNU.cmake | 2 +- Modules/Platform/AIX-XL-C.cmake | 3 + Modules/Platform/AIX-XL-CXX.cmake | 3 + Modules/Platform/BlueGeneP-dynamic-XL-C.cmake | 3 + Modules/Platform/BlueGeneP-dynamic-XL-CXX.cmake | 3 + Modules/Platform/BlueGeneP-static-XL-C.cmake | 3 + Modules/Platform/BlueGeneP-static-XL-CXX.cmake | 3 + Modules/Platform/BlueGeneQ-dynamic-XL-C.cmake | 3 + Modules/Platform/BlueGeneQ-dynamic-XL-CXX.cmake | 3 + Modules/Platform/BlueGeneQ-static-XL-C.cmake | 3 + Modules/Platform/BlueGeneQ-static-XL-CXX.cmake | 3 + Modules/Platform/CYGWIN-GNU.cmake | 2 +- Modules/Platform/CYGWIN.cmake | 10 + Modules/Platform/Darwin-XL-C.cmake | 3 + Modules/Platform/Darwin-XL-CXX.cmake | 3 + Modules/Platform/HP-UX-GNU.cmake | 2 +- Modules/Platform/Linux-GNU.cmake | 1 + Modules/Platform/Linux-Intel.cmake | 6 + Modules/Platform/Linux-PGI.cmake | 1 + Modules/Platform/Linux-TinyCC-C.cmake | 1 + Modules/Platform/SunOS.cmake | 5 + Modules/Platform/UnixPaths.cmake | 32 +- Modules/Platform/Windows-MSVC.cmake | 4 +- Modules/Platform/Windows-PGI-C.cmake | 2 + Modules/Platform/Windows-PGI-Fortran.cmake | 2 + Modules/Platform/Windows-PGI.cmake | 48 + Modules/Platform/Windows-df.cmake | 2 +- Modules/TestBigEndian.cmake | 26 +- Modules/UseEcos.cmake | 4 +- Modules/UseJava.cmake | 38 +- Modules/UseSWIG.cmake | 3 + Modules/WriteCompilerDetectionHeader.cmake | 23 +- Source/.gitattributes | 19 - Source/CMakeLists.txt | 125 +- Source/CMakeVersion.cmake | 6 +- Source/CPack/IFW/cmCPackIFWCommon.cxx | 137 + Source/CPack/IFW/cmCPackIFWCommon.h | 81 + Source/CPack/IFW/cmCPackIFWGenerator.cxx | 340 +- Source/CPack/IFW/cmCPackIFWGenerator.h | 34 +- Source/CPack/IFW/cmCPackIFWInstaller.cxx | 388 +- Source/CPack/IFW/cmCPackIFWInstaller.h | 19 +- Source/CPack/IFW/cmCPackIFWPackage.cxx | 531 +- Source/CPack/IFW/cmCPackIFWPackage.h | 27 +- Source/CPack/IFW/cmCPackIFWRepository.cxx | 220 +- Source/CPack/IFW/cmCPackIFWRepository.h | 18 +- Source/CPack/OSXScriptLauncher.cxx | 9 +- Source/CPack/WiX/cmCPackWIXGenerator.cxx | 56 +- Source/CPack/WiX/cmCPackWIXGenerator.h | 6 +- Source/CPack/WiX/cmWIXAccessControlList.cxx | 4 +- Source/CPack/WiX/cmWIXAccessControlList.h | 4 +- Source/CPack/WiX/cmWIXDirectoriesSourceWriter.h | 2 +- Source/CPack/WiX/cmWIXFeaturesSourceWriter.cxx | 4 +- Source/CPack/WiX/cmWIXFeaturesSourceWriter.h | 2 +- Source/CPack/WiX/cmWIXFilesSourceWriter.cxx | 14 +- Source/CPack/WiX/cmWIXFilesSourceWriter.h | 2 +- Source/CPack/WiX/cmWIXPatch.cxx | 8 +- Source/CPack/WiX/cmWIXPatchParser.cxx | 30 +- Source/CPack/WiX/cmWIXPatchParser.h | 10 +- Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx | 2 +- Source/CPack/WiX/cmWIXRichTextFormatWriter.h | 4 +- Source/CPack/WiX/cmWIXShortcut.h | 2 +- Source/CPack/WiX/cmWIXSourceWriter.cxx | 4 +- Source/CPack/WiX/cmWIXSourceWriter.h | 4 +- Source/CPack/cmCPack7zGenerator.h | 2 +- Source/CPack/cmCPackArchiveGenerator.cxx | 67 +- Source/CPack/cmCPackArchiveGenerator.h | 7 +- Source/CPack/cmCPackBundleGenerator.h | 3 +- Source/CPack/cmCPackComponentGroup.h | 6 +- Source/CPack/cmCPackCygwinBinaryGenerator.cxx | 2 +- Source/CPack/cmCPackCygwinSourceGenerator.cxx | 4 +- Source/CPack/cmCPackDebGenerator.cxx | 4 +- Source/CPack/cmCPackDebGenerator.h | 2 +- Source/CPack/cmCPackDragNDropGenerator.cxx | 49 +- Source/CPack/cmCPackDragNDropGenerator.h | 3 +- Source/CPack/cmCPackGenerator.cxx | 28 +- Source/CPack/cmCPackGenerator.h | 31 +- Source/CPack/cmCPackGeneratorFactory.cxx | 2 +- Source/CPack/cmCPackGeneratorFactory.h | 2 +- Source/CPack/cmCPackLog.cxx | 2 +- Source/CPack/cmCPackLog.h | 14 +- Source/CPack/cmCPackNSISGenerator.cxx | 8 +- Source/CPack/cmCPackNSISGenerator.h | 2 +- Source/CPack/cmCPackOSXX11Generator.cxx | 2 +- Source/CPack/cmCPackOSXX11Generator.h | 3 +- Source/CPack/cmCPackPKGGenerator.h | 3 +- Source/CPack/cmCPackPackageMakerGenerator.cxx | 4 +- Source/CPack/cmCPackPackageMakerGenerator.h | 2 +- Source/CPack/cmCPackProductBuildGenerator.cxx | 21 +- Source/CPack/cmCPackProductBuildGenerator.h | 3 +- Source/CPack/cmCPackRPMGenerator.h | 2 +- Source/CPack/cmCPackSTGZGenerator.cxx | 7 +- Source/CPack/cmCPackSTGZGenerator.h | 2 +- Source/CPack/cmCPackTGZGenerator.h | 2 +- Source/CPack/cmCPackTXZGenerator.h | 2 +- Source/CPack/cmCPackTarBZip2Generator.h | 2 +- Source/CPack/cmCPackTarCompressGenerator.h | 2 +- Source/CPack/cmCPackZIPGenerator.h | 2 +- Source/CPack/cpack.cxx | 12 +- Source/CTest/cmCTestBZR.cxx | 18 +- Source/CTest/cmCTestBZR.h | 10 +- Source/CTest/cmCTestBatchTestHandler.h | 6 +- Source/CTest/cmCTestBuildAndTestHandler.cxx | 18 +- Source/CTest/cmCTestBuildAndTestHandler.h | 4 +- Source/CTest/cmCTestBuildCommand.h | 2 +- Source/CTest/cmCTestBuildHandler.cxx | 10 +- Source/CTest/cmCTestBuildHandler.h | 6 +- Source/CTest/cmCTestCVS.cxx | 4 +- Source/CTest/cmCTestCVS.h | 2 +- Source/CTest/cmCTestConfigureCommand.h | 2 +- Source/CTest/cmCTestConfigureHandler.h | 2 +- Source/CTest/cmCTestCoverageCommand.h | 2 +- Source/CTest/cmCTestCoverageHandler.cxx | 49 +- Source/CTest/cmCTestCoverageHandler.h | 4 +- Source/CTest/cmCTestCurl.cxx | 27 +- Source/CTest/cmCTestCurl.h | 9 +- Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h | 10 +- Source/CTest/cmCTestGIT.cxx | 20 +- Source/CTest/cmCTestGIT.h | 10 +- Source/CTest/cmCTestGenericHandler.cxx | 2 +- Source/CTest/cmCTestGenericHandler.h | 2 +- Source/CTest/cmCTestGlobalVC.cxx | 7 +- Source/CTest/cmCTestGlobalVC.h | 6 +- Source/CTest/cmCTestHG.cxx | 14 +- Source/CTest/cmCTestHG.h | 10 +- Source/CTest/cmCTestHandlerCommand.cxx | 9 +- Source/CTest/cmCTestHandlerCommand.h | 7 +- Source/CTest/cmCTestLaunch.cxx | 13 +- Source/CTest/cmCTestLaunch.h | 4 +- Source/CTest/cmCTestMemCheckCommand.cxx | 1 + Source/CTest/cmCTestMemCheckCommand.h | 9 +- Source/CTest/cmCTestMemCheckHandler.cxx | 10 +- Source/CTest/cmCTestMemCheckHandler.h | 2 +- Source/CTest/cmCTestMultiProcessHandler.cxx | 31 +- Source/CTest/cmCTestMultiProcessHandler.h | 4 +- Source/CTest/cmCTestP4.cxx | 18 +- Source/CTest/cmCTestP4.h | 10 +- Source/CTest/cmCTestReadCustomFilesCommand.h | 7 +- Source/CTest/cmCTestRunScriptCommand.h | 7 +- Source/CTest/cmCTestRunTest.cxx | 75 +- Source/CTest/cmCTestRunTest.h | 2 +- Source/CTest/cmCTestSVN.cxx | 47 +- Source/CTest/cmCTestSVN.h | 17 +- Source/CTest/cmCTestScriptHandler.cxx | 51 +- Source/CTest/cmCTestScriptHandler.h | 4 +- Source/CTest/cmCTestSleepCommand.h | 7 +- Source/CTest/cmCTestStartCommand.h | 7 +- Source/CTest/cmCTestSubmitCommand.cxx | 16 + Source/CTest/cmCTestSubmitCommand.h | 4 +- Source/CTest/cmCTestSubmitHandler.cxx | 39 +- Source/CTest/cmCTestSubmitHandler.h | 8 +- Source/CTest/cmCTestTestCommand.cxx | 18 +- Source/CTest/cmCTestTestCommand.h | 5 +- Source/CTest/cmCTestTestHandler.cxx | 333 +- Source/CTest/cmCTestTestHandler.h | 8 +- Source/CTest/cmCTestUpdateCommand.h | 2 +- Source/CTest/cmCTestUpdateHandler.cxx | 6 +- Source/CTest/cmCTestUpdateHandler.h | 2 +- Source/CTest/cmCTestUploadCommand.h | 2 +- Source/CTest/cmCTestUploadHandler.h | 2 +- Source/CTest/cmCTestVC.cxx | 14 +- Source/CTest/cmCTestVC.h | 6 +- Source/CTest/cmParseBlanketJSCoverage.cxx | 38 +- Source/CTest/cmParseBlanketJSCoverage.h | 2 +- Source/CTest/cmParseCacheCoverage.cxx | 4 +- Source/CTest/cmParseCacheCoverage.h | 2 +- Source/CTest/cmParseCoberturaCoverage.cxx | 4 +- Source/CTest/cmParseCoberturaCoverage.h | 2 +- Source/CTest/cmParseDelphiCoverage.cxx | 83 +- Source/CTest/cmParseDelphiCoverage.h | 2 +- Source/CTest/cmParseGTMCoverage.cxx | 8 +- Source/CTest/cmParseGTMCoverage.h | 2 +- Source/CTest/cmParseJacocoCoverage.cxx | 8 +- Source/CTest/cmParseJacocoCoverage.h | 2 +- Source/CTest/cmParseMumpsCoverage.cxx | 6 +- Source/CTest/cmParseMumpsCoverage.h | 2 +- Source/CTest/cmParsePHPCoverage.cxx | 4 +- Source/CTest/cmParsePHPCoverage.h | 2 +- Source/CTest/cmProcess.cxx | 6 +- Source/CTest/cmProcess.h | 4 +- Source/Checks/cm_cxx_attribute_fallthrough.cxx | 11 + Source/Checks/cm_cxx_eq_delete.cxx | 14 + Source/Checks/cm_cxx_fallthrough.cxx | 11 + Source/Checks/cm_cxx_features.cmake | 35 +- Source/Checks/cm_cxx_gnu_fallthrough.cxx | 11 + Source/CursesDialog/ccmake.cxx | 6 +- Source/CursesDialog/cmCursesBoolWidget.h | 8 +- .../CursesDialog/cmCursesCacheEntryComposite.cxx | 1 - Source/CursesDialog/cmCursesCacheEntryComposite.h | 7 +- Source/CursesDialog/cmCursesDummyWidget.h | 8 +- Source/CursesDialog/cmCursesFilePathWidget.h | 8 +- Source/CursesDialog/cmCursesForm.cxx | 2 - Source/CursesDialog/cmCursesForm.h | 9 +- Source/CursesDialog/cmCursesLabelWidget.h | 8 +- Source/CursesDialog/cmCursesLongMessageForm.cxx | 3 +- Source/CursesDialog/cmCursesLongMessageForm.h | 7 +- Source/CursesDialog/cmCursesMainForm.cxx | 9 +- Source/CursesDialog/cmCursesMainForm.h | 7 +- Source/CursesDialog/cmCursesOptionsWidget.h | 6 +- Source/CursesDialog/cmCursesPathWidget.h | 7 +- Source/CursesDialog/cmCursesStandardIncludes.h | 2 +- Source/CursesDialog/cmCursesStringWidget.h | 7 +- Source/CursesDialog/cmCursesWidget.cxx | 2 - Source/CursesDialog/cmCursesWidget.h | 7 +- Source/CursesDialog/form/form.h | 2 +- Source/LexerParser/.clang-tidy | 6 + Source/LexerParser/.gitattributes | 17 + .../{ => LexerParser}/cmCommandArgumentLexer.cxx | 0 Source/{ => LexerParser}/cmCommandArgumentLexer.h | 0 .../{ => LexerParser}/cmCommandArgumentLexer.in.l | 0 Source/LexerParser/cmCommandArgumentParser.cxx | 1723 ++++++ Source/LexerParser/cmCommandArgumentParser.y | 191 + Source/LexerParser/cmCommandArgumentParserTokens.h | 82 + Source/{ => LexerParser}/cmDependsJavaLexer.cxx | 0 Source/{ => LexerParser}/cmDependsJavaLexer.h | 0 Source/{ => LexerParser}/cmDependsJavaLexer.in.l | 0 Source/LexerParser/cmDependsJavaParser.cxx | 6421 ++++++++++++++++++++ Source/LexerParser/cmDependsJavaParser.y | 3214 ++++++++++ Source/LexerParser/cmDependsJavaParserTokens.h | 264 + Source/{ => LexerParser}/cmExprLexer.cxx | 0 Source/{ => LexerParser}/cmExprLexer.h | 0 Source/{ => LexerParser}/cmExprLexer.in.l | 0 Source/LexerParser/cmExprParser.cxx | 1698 ++++++ Source/LexerParser/cmExprParser.y | 164 + Source/{ => LexerParser}/cmExprParserTokens.h | 0 Source/{ => LexerParser}/cmFortranLexer.cxx | 0 Source/{ => LexerParser}/cmFortranLexer.h | 0 Source/{ => LexerParser}/cmFortranLexer.in.l | 0 Source/LexerParser/cmFortranParser.cxx | 1988 ++++++ Source/LexerParser/cmFortranParser.y | 247 + Source/LexerParser/cmFortranParserTokens.h | 149 + Source/LexerParser/cmListFileLexer.c | 2688 ++++++++ Source/LexerParser/cmListFileLexer.in.l | 564 ++ Source/Modules/FindLibUV.cmake | 2 +- Source/QtDialog/CMakeLists.txt | 21 +- Source/QtDialog/CMakeSetup.cxx | 10 +- Source/QtDialog/CMakeSetupDialog.cxx | 15 +- Source/QtDialog/Compilers.h | 2 +- Source/QtDialog/FirstConfigure.cxx | 2 +- Source/QtDialog/QCMake.cxx | 6 +- Source/QtDialog/QCMake.h | 2 +- Source/QtDialog/QCMakeCacheView.cxx | 26 +- Source/QtDialog/QCMakeWidgets.cxx | 8 +- Source/QtDialog/QCMakeWidgets.h | 2 +- Source/QtDialog/RegexExplorer.h | 2 +- .../QtDialog/{CMake.desktop => cmake-gui.desktop} | 0 Source/bindexplib.cxx | 503 +- Source/bindexplib.h | 4 +- Source/cmAddCompileOptionsCommand.h | 8 +- Source/cmAddCustomCommandCommand.cxx | 2 +- Source/cmAddCustomCommandCommand.h | 8 +- Source/cmAddCustomTargetCommand.cxx | 6 +- Source/cmAddCustomTargetCommand.h | 8 +- Source/cmAddDefinitionsCommand.h | 8 +- Source/cmAddDependenciesCommand.cxx | 2 +- Source/cmAddDependenciesCommand.h | 8 +- Source/cmAddExecutableCommand.cxx | 2 +- Source/cmAddExecutableCommand.h | 8 +- Source/cmAddLibraryCommand.cxx | 15 +- Source/cmAddLibraryCommand.h | 8 +- Source/cmAddSubDirectoryCommand.cxx | 5 +- Source/cmAddSubDirectoryCommand.h | 8 +- Source/cmAddTestCommand.h | 8 +- Source/cmAlgorithms.h | 13 +- Source/cmArchiveWrite.cxx | 8 +- Source/cmArchiveWrite.h | 2 +- Source/cmAuxSourceDirectoryCommand.cxx | 8 +- Source/cmAuxSourceDirectoryCommand.h | 8 +- Source/cmBase32.cxx | 2 +- Source/cmBase32.h | 2 +- Source/cmBreakCommand.cxx | 2 +- Source/cmBreakCommand.h | 13 +- Source/cmBuildCommand.cxx | 4 +- Source/cmBuildCommand.h | 8 +- Source/cmBuildNameCommand.cxx | 8 +- Source/cmBuildNameCommand.h | 5 +- Source/cmCLocaleEnvironmentScope.h | 4 +- Source/cmCMakeHostSystemInformationCommand.cxx | 4 +- Source/cmCMakeHostSystemInformationCommand.h | 16 +- Source/cmCMakeMinimumRequired.h | 13 +- Source/cmCMakePolicyCommand.h | 13 +- Source/cmCPackPropertiesGenerator.cxx | 2 +- Source/cmCPackPropertiesGenerator.h | 6 +- Source/cmCTest.cxx | 69 +- Source/cmCTest.h | 39 +- Source/cmCacheManager.cxx | 11 +- Source/cmCacheManager.h | 4 +- Source/cmCallVisualStudioMacro.h | 2 +- Source/cmCommand.cxx | 25 +- Source/cmCommand.h | 28 +- Source/cmCommandArgumentParser.cxx | 1811 ------ Source/cmCommandArgumentParser.y | 231 - Source/cmCommandArgumentParserHelper.cxx | 3 - Source/cmCommandArgumentParserHelper.h | 26 +- Source/cmCommandArgumentParserTokens.h | 83 - Source/cmCommandArgumentsHelper.h | 2 +- Source/cmCommands.cxx | 344 +- Source/cmCommands.h | 11 +- Source/cmCommonTargetGenerator.cxx | 33 +- Source/cmCommonTargetGenerator.h | 10 +- Source/cmComputeComponentGraph.h | 2 +- Source/cmComputeLinkDepends.cxx | 2 +- Source/cmComputeLinkDepends.h | 4 +- Source/cmComputeLinkInformation.cxx | 32 +- Source/cmComputeLinkInformation.h | 10 +- Source/cmComputeTargetDepends.cxx | 18 +- Source/cmComputeTargetDepends.h | 3 +- Source/cmConditionEvaluator.cxx | 8 +- Source/cmConditionEvaluator.h | 2 +- Source/cmConfigure.cmake.h.in | 26 +- Source/cmConfigureFileCommand.cxx | 4 +- Source/cmConfigureFileCommand.h | 13 +- Source/cmContinueCommand.cxx | 2 +- Source/cmContinueCommand.h | 13 +- Source/cmCoreTryCompile.cxx | 15 +- Source/cmCoreTryCompile.h | 2 +- Source/cmCreateTestSourceList.h | 7 +- Source/cmCryptoHash.cxx | 6 +- Source/cmCryptoHash.h | 4 +- Source/cmCurl.h | 4 +- Source/cmCustomCommand.cxx | 2 +- Source/cmCustomCommand.h | 2 +- Source/cmCustomCommandGenerator.cxx | 2 +- Source/cmCustomCommandGenerator.h | 2 +- Source/cmCustomCommandLines.h | 2 +- Source/cmDefinePropertyCommand.cxx | 18 +- Source/cmDefinePropertyCommand.h | 8 +- Source/cmDefinitions.cxx | 2 +- Source/cmDefinitions.h | 8 +- Source/cmDepends.cxx | 16 +- Source/cmDepends.h | 8 +- Source/cmDependsC.cxx | 6 +- Source/cmDependsC.h | 10 +- Source/cmDependsFortran.cxx | 2 +- Source/cmDependsFortran.h | 8 +- Source/cmDependsJava.h | 8 +- Source/cmDependsJavaParser.cxx | 6006 ------------------ Source/cmDependsJavaParser.y | 3212 ---------- Source/cmDependsJavaParserHelper.cxx | 4 +- Source/cmDependsJavaParserHelper.h | 19 +- Source/cmDependsJavaParserTokens.h | 254 - Source/cmDisallowedCommand.cxx | 31 + Source/cmDisallowedCommand.h | 51 + Source/cmDocumentation.cxx | 21 +- Source/cmDocumentation.h | 2 +- Source/cmDocumentationEntry.h | 2 +- Source/cmDocumentationFormatter.h | 2 +- Source/cmDocumentationSection.h | 2 +- Source/cmDynamicLoader.cxx | 10 +- Source/cmDynamicLoader.h | 10 +- Source/cmELF.cxx | 21 +- Source/cmELF.h | 2 +- Source/cmEnableLanguageCommand.h | 8 +- Source/cmEnableTestingCommand.h | 8 +- Source/cmExecProgramCommand.cxx | 2 +- Source/cmExecProgramCommand.h | 13 +- Source/cmExecuteProcessCommand.cxx | 2 +- Source/cmExecuteProcessCommand.h | 13 +- Source/cmExecutionStatus.h | 31 +- Source/cmExpandedCommandArgument.h | 2 +- Source/cmExportBuildAndroidMKGenerator.h | 2 +- Source/cmExportBuildFileGenerator.cxx | 65 +- Source/cmExportBuildFileGenerator.h | 2 +- Source/cmExportCommand.cxx | 17 +- Source/cmExportCommand.h | 9 +- Source/cmExportFileGenerator.cxx | 34 +- Source/cmExportFileGenerator.h | 2 +- Source/cmExportInstallAndroidMKGenerator.h | 2 +- Source/cmExportInstallFileGenerator.cxx | 26 +- Source/cmExportInstallFileGenerator.h | 2 +- Source/cmExportLibraryDependenciesCommand.cxx | 9 +- Source/cmExportLibraryDependenciesCommand.h | 7 +- Source/cmExportSet.h | 2 +- Source/cmExportSetMap.h | 2 +- Source/cmExportTryCompileFileGenerator.h | 2 +- Source/cmExprParser.cxx | 1696 ------ Source/cmExprParser.y | 162 - Source/cmExprParserHelper.cxx | 2 +- Source/cmExprParserHelper.h | 21 +- Source/cmExternalMakefileProjectGenerator.h | 2 +- Source/cmExtraCodeBlocksGenerator.cxx | 8 +- Source/cmExtraCodeBlocksGenerator.h | 2 +- Source/cmExtraCodeLiteGenerator.cxx | 109 +- Source/cmExtraCodeLiteGenerator.h | 6 +- Source/cmExtraEclipseCDT4Generator.cxx | 6 +- Source/cmExtraEclipseCDT4Generator.h | 2 +- Source/cmExtraKateGenerator.h | 2 +- Source/cmExtraSublimeTextGenerator.cxx | 2 +- Source/cmExtraSublimeTextGenerator.h | 2 +- Source/cmFLTKWrapUICommand.h | 8 +- Source/cmFileCommand.cxx | 178 +- Source/cmFileCommand.h | 14 +- Source/cmFileLock.h | 7 +- Source/cmFileLockPool.h | 18 +- Source/cmFileLockResult.h | 2 +- Source/cmFileMonitor.cxx | 20 +- Source/cmFileMonitor.h | 4 + Source/cmFilePathChecksum.cxx | 4 +- Source/cmFilePathChecksum.h | 6 +- Source/cmFileTimeComparison.cxx | 4 +- Source/cmFileTimeComparison.h | 2 +- Source/cmFindBase.cxx | 24 +- Source/cmFindBase.h | 3 +- Source/cmFindCommon.cxx | 40 +- Source/cmFindCommon.h | 7 +- Source/cmFindFileCommand.h | 4 +- Source/cmFindLibraryCommand.cxx | 39 +- Source/cmFindLibraryCommand.h | 13 +- Source/cmFindPackageCommand.cxx | 258 +- Source/cmFindPackageCommand.h | 16 +- Source/cmFindPathCommand.cxx | 6 +- Source/cmFindPathCommand.h | 13 +- Source/cmFindProgramCommand.cxx | 3 +- Source/cmFindProgramCommand.h | 15 +- Source/cmForEachCommand.cxx | 2 +- Source/cmForEachCommand.h | 13 +- Source/cmFortranParser.cxx | 1984 ------ Source/cmFortranParser.h | 9 +- Source/cmFortranParser.y | 243 - Source/cmFortranParserImpl.cxx | 3 +- Source/cmFortranParserTokens.h | 149 - Source/cmFunctionCommand.cxx | 23 +- Source/cmFunctionCommand.h | 13 +- Source/cmGeneratedFileStream.cxx | 2 +- Source/cmGeneratedFileStream.h | 6 +- Source/cmGeneratorExpression.cxx | 8 +- Source/cmGeneratorExpression.h | 14 +- Source/cmGeneratorExpressionDAGChecker.h | 2 +- Source/cmGeneratorExpressionEvaluationFile.cxx | 10 +- Source/cmGeneratorExpressionEvaluationFile.h | 9 +- Source/cmGeneratorExpressionEvaluator.h | 5 +- Source/cmGeneratorExpressionLexer.h | 2 +- Source/cmGeneratorExpressionNode.cxx | 171 +- Source/cmGeneratorExpressionNode.h | 2 +- Source/cmGeneratorExpressionParser.h | 2 +- Source/cmGeneratorTarget.cxx | 1173 ++-- Source/cmGeneratorTarget.h | 211 +- Source/cmGetCMakePropertyCommand.cxx | 2 +- Source/cmGetCMakePropertyCommand.h | 13 +- Source/cmGetDirectoryPropertyCommand.cxx | 3 +- Source/cmGetDirectoryPropertyCommand.h | 13 +- Source/cmGetFilenameComponentCommand.cxx | 6 +- Source/cmGetFilenameComponentCommand.h | 13 +- Source/cmGetPropertyCommand.cxx | 1 + Source/cmGetPropertyCommand.h | 13 +- Source/cmGetSourceFilePropertyCommand.cxx | 4 +- Source/cmGetSourceFilePropertyCommand.h | 11 +- Source/cmGetTargetPropertyCommand.cxx | 4 +- Source/cmGetTargetPropertyCommand.h | 8 +- Source/cmGetTestPropertyCommand.cxx | 4 +- Source/cmGetTestPropertyCommand.h | 8 +- Source/cmGhsMultiGpj.h | 2 +- Source/cmGhsMultiTargetGenerator.cxx | 8 +- Source/cmGlobalCommonGenerator.h | 2 +- Source/cmGlobalGenerator.cxx | 95 +- Source/cmGlobalGenerator.h | 28 +- Source/cmGlobalGeneratorFactory.h | 2 +- Source/cmGlobalGhsMultiGenerator.cxx | 2 +- Source/cmGlobalKdevelopGenerator.cxx | 6 +- Source/cmGlobalKdevelopGenerator.h | 2 +- Source/cmGlobalMSYSMakefileGenerator.cxx | 2 +- Source/cmGlobalNinjaGenerator.cxx | 71 +- Source/cmGlobalNinjaGenerator.h | 17 +- Source/cmGlobalUnixMakefileGenerator3.h | 4 +- Source/cmGlobalVisualStudio10Generator.cxx | 373 +- Source/cmGlobalVisualStudio10Generator.h | 24 +- Source/cmGlobalVisualStudio11Generator.h | 2 +- Source/cmGlobalVisualStudio12Generator.cxx | 16 +- Source/cmGlobalVisualStudio12Generator.h | 6 +- Source/cmGlobalVisualStudio14Generator.cxx | 49 +- Source/cmGlobalVisualStudio14Generator.h | 2 +- Source/cmGlobalVisualStudio15Generator.h | 2 +- Source/cmGlobalVisualStudio71Generator.cxx | 83 +- Source/cmGlobalVisualStudio71Generator.h | 33 +- Source/cmGlobalVisualStudio7Generator.cxx | 34 +- Source/cmGlobalVisualStudio7Generator.h | 6 +- Source/cmGlobalVisualStudio8Generator.cxx | 24 +- Source/cmGlobalVisualStudio8Generator.h | 7 +- Source/cmGlobalVisualStudioGenerator.cxx | 102 +- Source/cmGlobalVisualStudioGenerator.h | 4 +- Source/cmGlobalWatcomWMakeGenerator.h | 2 +- Source/cmGlobalXCodeGenerator.cxx | 872 ++- Source/cmGlobalXCodeGenerator.h | 22 +- Source/cmGraphAdjacencyList.h | 19 +- Source/cmGraphVizWriter.cxx | 4 +- Source/cmGraphVizWriter.h | 4 +- Source/cmHexFileConverter.cxx | 2 +- Source/cmIDEFlagTable.h | 3 + Source/cmIDEOptions.cxx | 10 +- Source/cmIDEOptions.h | 16 +- Source/cmIfCommand.cxx | 26 +- Source/cmIfCommand.h | 15 +- Source/cmIncludeCommand.h | 13 +- Source/cmIncludeDirectoryCommand.cxx | 2 +- Source/cmIncludeDirectoryCommand.h | 8 +- Source/cmIncludeExternalMSProjectCommand.h | 11 +- Source/cmIncludeRegularExpressionCommand.h | 11 +- Source/cmInstallCommand.cxx | 86 +- Source/cmInstallCommand.h | 8 +- Source/cmInstallCommandArguments.cxx | 2 +- Source/cmInstallCommandArguments.h | 2 +- Source/cmInstallDirectoryGenerator.cxx | 6 +- Source/cmInstallDirectoryGenerator.h | 10 +- Source/cmInstallExportGenerator.cxx | 4 +- Source/cmInstallExportGenerator.h | 8 +- Source/cmInstallFilesCommand.cxx | 6 +- Source/cmInstallFilesCommand.h | 8 +- Source/cmInstallFilesGenerator.cxx | 6 +- Source/cmInstallFilesGenerator.h | 9 +- Source/cmInstallGenerator.cxx | 2 +- Source/cmInstallGenerator.h | 6 +- Source/cmInstallProgramsCommand.h | 8 +- Source/cmInstallScriptGenerator.h | 2 +- Source/cmInstallTargetGenerator.cxx | 115 +- Source/cmInstallTargetGenerator.h | 37 +- Source/cmInstallTargetsCommand.h | 8 +- Source/cmInstalledFile.cxx | 2 +- Source/cmInstalledFile.h | 2 + Source/cmLinkDirectoriesCommand.cxx | 1 + Source/cmLinkDirectoriesCommand.h | 8 +- Source/cmLinkItem.h | 13 +- Source/cmLinkLibrariesCommand.h | 8 +- Source/cmLinkLineComputer.cxx | 2 +- Source/cmLinkLineComputer.h | 6 +- Source/cmLinkLineDeviceComputer.cxx | 34 +- Source/cmLinkLineDeviceComputer.h | 17 +- Source/cmLinkedTree.h | 2 +- Source/cmListCommand.cxx | 2 +- Source/cmListCommand.h | 13 +- Source/cmListFileCache.cxx | 22 +- Source/cmListFileCache.h | 14 +- Source/cmListFileLexer.c | 2684 -------- Source/cmListFileLexer.h | 1 + Source/cmListFileLexer.in.l | 564 -- Source/cmLoadCacheCommand.cxx | 2 +- Source/cmLoadCacheCommand.h | 8 +- Source/cmLoadCommandCommand.cxx | 25 +- Source/cmLoadCommandCommand.h | 4 +- Source/cmLocalCommonGenerator.cxx | 12 +- Source/cmLocalCommonGenerator.h | 3 +- Source/cmLocalGenerator.cxx | 162 +- Source/cmLocalGenerator.h | 21 +- Source/cmLocalNinjaGenerator.cxx | 30 +- Source/cmLocalNinjaGenerator.h | 6 +- Source/cmLocalUnixMakefileGenerator3.cxx | 44 +- Source/cmLocalUnixMakefileGenerator3.h | 2 +- Source/cmLocalVisualStudio10Generator.cxx | 2 +- Source/cmLocalVisualStudio10Generator.h | 2 +- Source/cmLocalVisualStudio7Generator.cxx | 206 +- Source/cmLocalVisualStudio7Generator.h | 6 +- Source/cmLocalVisualStudioGenerator.cxx | 24 +- Source/cmLocalVisualStudioGenerator.h | 2 +- Source/cmLocalXCodeGenerator.h | 3 +- Source/cmLocale.h | 7 +- Source/cmMSVC60LinkLineComputer.cxx | 6 +- Source/cmMSVC60LinkLineComputer.h | 6 +- Source/cmMachO.cxx | 2 +- Source/cmMachO.h | 2 +- Source/cmMacroCommand.cxx | 26 +- Source/cmMacroCommand.h | 13 +- Source/cmMakeDirectoryCommand.h | 13 +- Source/cmMakefile.cxx | 121 +- Source/cmMakefile.h | 33 +- Source/cmMakefileExecutableTargetGenerator.cxx | 25 +- Source/cmMakefileExecutableTargetGenerator.h | 4 +- Source/cmMakefileLibraryTargetGenerator.cxx | 80 +- Source/cmMakefileLibraryTargetGenerator.h | 2 +- Source/cmMakefileTargetGenerator.cxx | 103 +- Source/cmMakefileTargetGenerator.h | 7 +- Source/cmMakefileUtilityTargetGenerator.h | 2 +- Source/cmMarkAsAdvancedCommand.cxx | 2 +- Source/cmMarkAsAdvancedCommand.h | 16 +- Source/cmMathCommand.h | 13 +- Source/cmMessageCommand.h | 13 +- Source/cmMessenger.cxx | 2 +- Source/cmMessenger.h | 2 +- Source/cmNewLineStyle.cxx | 2 +- Source/cmNewLineStyle.h | 2 +- Source/cmNinjaLinkLineComputer.cxx | 3 +- Source/cmNinjaLinkLineComputer.h | 6 +- Source/cmNinjaNormalTargetGenerator.cxx | 170 +- Source/cmNinjaNormalTargetGenerator.h | 2 +- Source/cmNinjaTargetGenerator.cxx | 76 +- Source/cmNinjaTargetGenerator.h | 5 +- Source/cmNinjaTypes.h | 8 +- Source/cmNinjaUtilityTargetGenerator.h | 2 +- Source/cmOSXBundleGenerator.cxx | 35 +- Source/cmOSXBundleGenerator.h | 2 +- Source/cmOptionCommand.h | 13 +- Source/cmOrderDirectories.cxx | 2 +- Source/cmOrderDirectories.h | 4 +- Source/cmOutputConverter.cxx | 4 +- Source/cmOutputConverter.h | 6 +- Source/cmOutputRequiredFilesCommand.cxx | 13 +- Source/cmOutputRequiredFilesCommand.h | 4 +- Source/cmParseArgumentsCommand.h | 13 +- Source/cmPathLabel.h | 2 +- Source/cmPolicies.cxx | 18 +- Source/cmPolicies.h | 15 +- Source/cmProcessOutput.h | 2 +- Source/cmProcessTools.cxx | 2 +- Source/cmProcessTools.h | 2 +- Source/cmProjectCommand.cxx | 74 +- Source/cmProjectCommand.h | 8 +- Source/cmProperty.cxx | 2 +- Source/cmProperty.h | 2 +- Source/cmPropertyDefinition.h | 2 +- Source/cmPropertyDefinitionMap.h | 2 +- Source/cmPropertyMap.cxx | 2 +- Source/cmPropertyMap.h | 2 +- Source/cmQTWrapCPPCommand.h | 8 +- Source/cmQTWrapUICommand.h | 8 +- Source/cmQtAutoGeneratorCommon.cxx | 216 + Source/cmQtAutoGeneratorCommon.h | 39 + Source/cmQtAutoGeneratorInitializer.cxx | 1288 ++-- Source/cmQtAutoGeneratorInitializer.h | 2 +- Source/cmQtAutoGenerators.cxx | 2314 ++++--- Source/cmQtAutoGenerators.h | 255 +- Source/cmRST.cxx | 22 +- Source/cmRST.h | 4 +- Source/cmRemoveCommand.cxx | 2 +- Source/cmRemoveCommand.h | 13 +- Source/cmRemoveDefinitionsCommand.h | 8 +- Source/cmReturnCommand.cxx | 2 +- Source/cmReturnCommand.h | 13 +- Source/cmRulePlaceholderExpander.cxx | 26 +- Source/cmRulePlaceholderExpander.h | 5 +- Source/cmScriptGenerator.cxx | 14 +- Source/cmScriptGenerator.h | 18 +- Source/cmSearchPath.h | 2 +- Source/cmSeparateArgumentsCommand.cxx | 7 + Source/cmSeparateArgumentsCommand.h | 13 +- Source/cmServer.cxx | 21 +- Source/cmServer.h | 7 +- Source/cmServerConnection.cxx | 3 +- Source/cmServerConnection.h | 12 +- Source/cmServerProtocol.cxx | 58 +- Source/cmServerProtocol.h | 16 +- Source/cmSetCommand.h | 13 +- Source/cmSetDirectoryPropertiesCommand.h | 16 +- Source/cmSetPropertyCommand.cxx | 12 +- Source/cmSetPropertyCommand.h | 13 +- Source/cmSetSourceFilesPropertiesCommand.h | 11 +- Source/cmSetTargetPropertiesCommand.cxx | 3 +- Source/cmSetTargetPropertiesCommand.h | 8 +- Source/cmSetTestsPropertiesCommand.cxx | 3 +- Source/cmSetTestsPropertiesCommand.h | 8 +- Source/cmSiteNameCommand.cxx | 2 +- Source/cmSiteNameCommand.h | 13 +- Source/cmSourceFile.h | 2 +- Source/cmSourceFileLocation.cxx | 2 +- Source/cmSourceFileLocation.h | 2 +- Source/cmSourceGroup.h | 4 +- Source/cmSourceGroupCommand.cxx | 1 + Source/cmSourceGroupCommand.h | 8 +- Source/cmStandardIncludes.h | 53 - Source/cmStandardLexer.h | 4 +- Source/cmState.cxx | 158 +- Source/cmState.h | 44 +- Source/cmStateDirectory.h | 2 +- Source/cmStatePrivate.h | 7 +- Source/cmStateSnapshot.cxx | 12 +- Source/cmStateSnapshot.h | 4 +- Source/cmStateTypes.h | 11 +- Source/cmStringCommand.cxx | 24 +- Source/cmStringCommand.h | 13 +- Source/cmSubdirCommand.h | 8 +- Source/cmSubdirDependsCommand.cxx | 5 - Source/cmSubdirDependsCommand.h | 4 +- Source/cmSystemTools.cxx | 163 +- Source/cmSystemTools.h | 26 +- Source/cmTarget.cxx | 199 +- Source/cmTarget.h | 10 +- Source/cmTargetCompileDefinitionsCommand.h | 11 +- Source/cmTargetCompileFeaturesCommand.h | 5 +- Source/cmTargetCompileOptionsCommand.h | 8 +- Source/cmTargetDepend.h | 4 +- Source/cmTargetExport.h | 3 +- Source/cmTargetIncludeDirectoriesCommand.h | 11 +- Source/cmTargetLinkLibrariesCommand.h | 8 +- Source/cmTargetPropCommandBase.cxx | 2 +- Source/cmTargetPropCommandBase.h | 2 +- Source/cmTargetPropertyComputer.h | 2 +- Source/cmTargetSourcesCommand.h | 8 +- Source/cmTest.h | 2 +- Source/cmTestGenerator.cxx | 14 +- Source/cmTestGenerator.h | 17 +- Source/cmTimestamp.cxx | 2 +- Source/cmTimestamp.h | 2 +- Source/cmTryCompileCommand.h | 8 +- Source/cmTryRunCommand.cxx | 2 +- Source/cmTryRunCommand.h | 8 +- Source/cmUnexpectedCommand.h | 7 +- Source/cmUnsetCommand.h | 13 +- Source/cmUseMangledMesaCommand.cxx | 10 +- Source/cmUseMangledMesaCommand.h | 6 +- Source/cmUtilitySourceCommand.cxx | 12 +- Source/cmUtilitySourceCommand.h | 4 +- Source/cmUtils.hxx | 2 +- Source/cmUuid.h | 2 +- Source/cmVS10CudaFlagTable.h | 51 + Source/cmVS10CudaHostFlagTable.h | 35 + Source/cmVS10MASMFlagTable.h | 76 +- Source/cmVS10NASMFlagTable.h | 50 + Source/cmVS11MASMFlagTable.h | 76 +- Source/cmVS12MASMFlagTable.h | 76 +- Source/cmVS14MASMFlagTable.h | 76 +- Source/cmVariableRequiresCommand.cxx | 10 +- Source/cmVariableRequiresCommand.h | 4 +- Source/cmVariableWatch.cxx | 2 +- Source/cmVariableWatch.h | 2 +- Source/cmVariableWatchCommand.cxx | 2 +- Source/cmVariableWatchCommand.h | 13 +- Source/cmVersion.h | 2 +- Source/cmVisualStudio10TargetGenerator.cxx | 745 ++- Source/cmVisualStudio10TargetGenerator.h | 25 +- Source/cmVisualStudio10ToolsetOptions.h | 2 +- Source/cmVisualStudioGeneratorOptions.cxx | 177 +- Source/cmVisualStudioGeneratorOptions.h | 29 +- Source/cmVisualStudioSlnData.h | 2 +- Source/cmVisualStudioSlnParser.cxx | 2 +- Source/cmVisualStudioSlnParser.h | 2 +- Source/cmVisualStudioWCEPlatformParser.h | 2 +- Source/cmWhileCommand.cxx | 2 +- Source/cmWhileCommand.h | 13 +- Source/cmWorkingDirectory.cxx | 24 + Source/cmWorkingDirectory.h | 25 + Source/cmWriteFileCommand.cxx | 9 +- Source/cmWriteFileCommand.h | 13 +- Source/cmXCode21Object.h | 2 +- Source/cmXCodeObject.cxx | 4 +- Source/cmXCodeObject.h | 2 +- Source/cmXCodeScheme.cxx | 227 + Source/cmXCodeScheme.h | 50 + Source/cmXMLParser.cxx | 4 +- Source/cmXMLParser.h | 2 +- Source/cmXMLSafe.h | 2 +- Source/cmXMLWriter.cxx | 13 +- Source/cmXMLWriter.h | 10 +- Source/cm_auto_ptr.hxx | 12 +- Source/cm_codecvt.cxx | 290 +- Source/cm_codecvt.hxx | 30 +- Source/cm_sys_stat.h | 14 + Source/cm_unordered_map.hxx | 4 +- Source/cm_unordered_set.hxx | 4 +- Source/cm_utf8.c | 2 +- Source/cmake.cxx | 85 +- Source/cmake.h | 22 +- Source/cmakemain.cxx | 29 +- Source/cmakexbuild.cxx | 9 +- Source/cmcldeps.cxx | 4 +- Source/cmcmd.cxx | 74 +- Source/cmcmd.h | 2 +- Source/ctest.cxx | 24 +- Source/kwsys/.gitattributes | 17 +- Source/kwsys/Base64.c | 10 - Source/kwsys/CMakeLists.txt | 21 +- Source/kwsys/CONTRIBUTING.rst | 10 +- Source/kwsys/CommandLineArguments.cxx | 88 +- Source/kwsys/ConsoleBuf.hxx.in | 12 +- Source/kwsys/Directory.cxx | 9 +- Source/kwsys/DynamicLoader.cxx | 34 - Source/kwsys/Encoding.hxx.in | 13 +- Source/kwsys/EncodingCXX.cxx | 66 +- Source/kwsys/FStream.hxx.in | 10 +- Source/kwsys/Glob.cxx | 12 - Source/kwsys/MD5.c | 10 - Source/kwsys/Process.h.in | 73 +- Source/kwsys/ProcessUNIX.c | 233 +- Source/kwsys/ProcessWin32.c | 253 +- Source/kwsys/SharedForward.h.in | 18 - Source/kwsys/System.c | 4 - Source/kwsys/SystemInformation.cxx | 423 +- Source/kwsys/SystemInformation.hxx.in | 30 +- Source/kwsys/SystemTools.cxx | 247 +- Source/kwsys/SystemTools.hxx.in | 41 +- Source/kwsys/Terminal.c | 10 - Source/kwsys/kwsysPlatformTestsC.c | 3 - Source/kwsys/testConsoleBuf.cxx | 23 +- Source/kwsys/testConsoleBufChild.cxx | 1 - Source/kwsys/testEncoding.cxx | 86 +- Source/kwsys/testFStream.cxx | 3 - Source/kwsys/testSystemInformation.cxx | 2 +- Source/kwsys/testSystemTools.cxx | 107 +- Templates/MSBuild/nasm.props.in | 17 + Templates/MSBuild/nasm.targets | 41 + Templates/MSBuild/nasm.xml | 110 + Templates/TestDriver.cxx.in | 2 +- Tests/BuildDepends/CMakeLists.txt | 2 +- .../target_compile_features/CMakeLists.txt | 70 +- .../target_compile_features/dummy.cpp | 5 - .../CMakeCommands/target_link_libraries/empty.cpp | 4 +- Tests/CMakeLib/CMakeLists.txt | 10 - Tests/CMakeLib/PseudoMemcheck/CMakeLists.txt | 15 - Tests/CMakeLib/PseudoMemcheck/NoLog/CMakeLists.txt | 8 - Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in | 2 +- Tests/CMakeLib/run_compile_commands.cxx | 2 +- Tests/CMakeLib/testEncoding.cxx | 8 +- Tests/CMakeLib/testRST.cxx | 2 +- Tests/CMakeLists.txt | 63 +- Tests/CMakeOnly/AllFindModules/CMakeLists.txt | 5 +- Tests/CMakeOnly/CMakeLists.txt | 17 +- Tests/CMakeOnly/find_library/CMakeLists.txt | 31 +- .../find_library/lib/{64 => A/libXYZ}/libtest2.a | 0 .../lib/A/{lib32 => libx32}/libtest3.a | 0 .../find_library/lib/{A/lib => XYZ}/libtest1.a | 0 .../find_library/lib/{64 => x32}/libtest2.a | 0 .../{lib32/A/lib32 => libXYZ/A/lib}/libtest4.a | 0 .../{lib/32 => libXYZ/A/libXYZ}/libtest5.a | 0 .../find_library/libXYZ/A/libtest6.a} | 0 .../find_library/libXYZ/libtest7.a} | 0 .../{lib/64 => libx32/A/lib}/libtest2.a | 0 .../{lib/A/lib => libx32/A}/libtest1.a | 0 .../{lib/A/lib => libx32/A/libx32}/libtest1.a | 0 .../find_library/{lib/A/lib => libx32}/libtest1.a | 0 Tests/CMakeTestAllGenerators/RunCMake.cmake | 57 +- Tests/CMakeTests/CMakeLists.txt | 6 +- Tests/CMakeTests/CompilerIdVendorTest.cmake.in | 4 +- Tests/CMakeTests/FileDownloadBadHashTest.cmake.in | 5 +- Tests/CMakeTests/FileDownloadTest.cmake.in | 5 +- Tests/CMakeTests/FileUploadTest.cmake.in | 5 +- Tests/CMakeTests/GetPrerequisitesTest.cmake.in | 7 +- Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in | 105 +- Tests/CMakeTests/SeparateArgumentsTest.cmake.in | 25 - Tests/CMakeTests/ToolchainTest.cmake.in | 1 - Tests/CPackComponents/CMakeLists.txt | 2 +- Tests/CheckFortran.cmake | 2 + Tests/CompileFeatures/CMakeLists.txt | 33 +- Tests/CompileFeatures/default_dialect.c | 3 +- Tests/Cuda/Complex/CMakeLists.txt | 8 + Tests/Cuda/Complex/dynamic.cu | 43 +- Tests/Cuda/Complex/file3.cu | 36 +- Tests/Cuda/Complex/main.cpp | 12 +- Tests/Cuda/Complex/mixed.cu | 36 +- Tests/Cuda/ObjectLibrary/CMakeLists.txt | 5 + Tests/Cuda/ObjectLibrary/main.cpp | 8 +- Tests/Cuda/ObjectLibrary/static.cu | 4 +- Tests/CudaOnly/CMakeLists.txt | 2 + Tests/CudaOnly/ExportPTX/CMakeLists.txt | 82 + Tests/CudaOnly/ExportPTX/bin2c_wrapper.cmake | 19 + Tests/CudaOnly/ExportPTX/kernelA.cu | 7 + Tests/CudaOnly/ExportPTX/kernelB.cu | 8 + Tests/CudaOnly/ExportPTX/main.cu | 28 + Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt | 52 + .../ResolveDeviceSymbols}/file1.cu | 0 .../ResolveDeviceSymbols}/file1.h | 0 Tests/CudaOnly/ResolveDeviceSymbols/file2.cu | 25 + .../ResolveDeviceSymbols}/file2.h | 0 Tests/CudaOnly/ResolveDeviceSymbols/main.cu | 85 + Tests/CudaOnly/ResolveDeviceSymbols/verify.cmake | 14 + Tests/CudaOnly/SeparateCompilation/CMakeLists.txt | 33 +- Tests/CudaOnly/SeparateCompilation/main.cu | 53 + Tests/CudaOnly/WithDefs/CMakeLists.txt | 11 +- Tests/CudaOnly/WithDefs/main_for_vs.cu | 1 + Tests/CustomCommandByproducts/ninja-check.cmake | 2 +- Tests/CustomCommandWorkingDirectory/CMakeLists.txt | 2 + Tests/ExportImport/Export/CMakeLists.txt | 13 +- Tests/ExportImport/Export/sub/testLib8C.c | 4 + Tests/ExportImport/Export/testLib8A.c | 4 + Tests/ExportImport/Export/testLib8B.c | 4 + Tests/ExportImport/Export/testLibNoSONAME.c | 2 +- Tests/ExportImport/Import/A/CMakeLists.txt | 10 + Tests/ExportImport/Import/A/imp_testExe1.c | 24 +- Tests/ExportImport/Import/A/imp_testLib8.c | 8 + Tests/ExternalProject/CMakeLists.txt | 10 + Tests/FindDoxygen/CMakeLists.txt | 20 + .../DotComponentTestTest/CMakeLists.txt | 18 + Tests/FindDoxygen/SimpleTest/CMakeLists.txt | 59 + Tests/FindDoxygen/SimpleTest/main.cpp | 4 + Tests/FindDoxygen/SimpleTest/spaces_in_name.cpp.in | 4 + Tests/FindGTest/Test/CMakeLists.txt | 3 - Tests/FindMPI/CMakeLists.txt | 21 + Tests/FindMPI/Test/CMakeLists.txt | 41 + Tests/FindMPI/Test/main.c | 7 + Tests/FindMPI/Test/main.f90 | 7 + Tests/FindOpenMP/CMakeLists.txt | 21 + Tests/FindOpenMP/Test/CMakeLists.txt | 69 + Tests/FindOpenMP/Test/main.c | 7 + Tests/FindOpenMP/Test/main.f90.in | 5 + Tests/FindOpenMP/Test/scalprod.c | 16 + Tests/FindOpenMP/Test/scalprod.f90.in | 19 + Tests/FindOpenMP/Test/scaltest.c | 20 + Tests/FindOpenMP/Test/scaltest.f90.in | 21 + Tests/FindProtobuf/CMakeLists.txt | 10 + Tests/FindProtobuf/Test/CMakeLists.txt | 32 + Tests/FindProtobuf/Test/main-protoc.cxx | 8 + Tests/FindProtobuf/Test/main.cxx | 8 + Tests/FindTIFF/Test/CMakeLists.txt | 3 - Tests/FindXalanC/Test/CMakeLists.txt | 3 - Tests/FindXercesC/Test/CMakeLists.txt | 3 - Tests/GeneratorExpression/CMakeLists.txt | 16 + Tests/GeneratorExpression/check_object_files.cmake | 26 + Tests/GeneratorExpression/objlib1.c | 4 + Tests/GeneratorExpression/objlib2.c | 4 + Tests/GoogleTest/CMakeLists.txt | 10 + Tests/GoogleTest/Test/CMakeLists.txt | 95 + Tests/GoogleTest/Test/main1.cxx | 30 + Tests/GoogleTest/Test/main2.cxx | 1 + Tests/GoogleTest/Test/main2.h | 21 + Tests/GoogleTest/Test/main3.cxx | 11 + Tests/GoogleTest/Test/main4.cxx | 1 + Tests/GoogleTest/Test/main4.h | 6 + Tests/JavaExportImport/BuildExport/CMakeLists.txt | 5 +- Tests/JavaExportImport/Import/CMakeLists.txt | 2 +- .../JavaExportImport/InstallExport/CMakeLists.txt | 1 + Tests/Module/CheckIPOSupported-C/CMakeLists.txt | 19 + Tests/Module/CheckIPOSupported-C/foo.c | 4 + Tests/Module/CheckIPOSupported-C/main.c | 9 + Tests/Module/CheckIPOSupported-CXX/CMakeLists.txt | 19 + Tests/Module/CheckIPOSupported-CXX/foo.cpp | 4 + Tests/Module/CheckIPOSupported-CXX/main.cpp | 9 + .../CheckIPOSupported-Fortran/CMakeLists.txt | 19 + Tests/Module/CheckIPOSupported-Fortran/foo.f | 2 + Tests/Module/CheckIPOSupported-Fortran/main.f | 3 + .../WriteCompilerDetectionHeader/CMakeLists.txt | 13 +- Tests/Module/WriteCompilerDetectionHeader/main.cpp | 3 + .../WriteCompilerDetectionHeader/multi_files.cpp | 3 + Tests/ModuleDefinition/CMakeLists.txt | 9 +- Tests/ModuleDefinition/example_exe.c | 6 +- Tests/ModuleDefinition/split_dll.c | 9 + Tests/ModuleDefinition/split_dll_1.def | 2 + Tests/ModuleDefinition/split_dll_2.def | 2 + Tests/ObjectLibrary/CMakeLists.txt | 6 +- Tests/Plugin/CMakeLists.txt | 6 +- Tests/Preprocess/CMakeLists.txt | 10 +- Tests/QtAutoUicInterface/CMakeLists.txt | 10 +- Tests/QtAutogen/CMakeLists.txt | 248 +- Tests/QtAutogen/automoc_rerun/CMakeLists.txt | 27 - Tests/QtAutogen/automoc_rerun/test1.cpp | 5 - Tests/QtAutogen/automoc_rerun/test1.h.in1 | 8 - Tests/QtAutogen/automoc_rerun/test1.h.in2 | 7 - Tests/QtAutogen/autorcc_depends/CMakeLists.txt | 27 - Tests/QtAutogen/autorcc_depends/res1.qrc.in | 5 - Tests/QtAutogen/mocDepends/CMakeLists.txt | 45 + Tests/QtAutogen/mocDepends/invalid.hpp.in | 1 + Tests/QtAutogen/mocDepends/object.hpp.in | 14 + Tests/QtAutogen/mocDepends/simpleLib.cpp.in | 9 + Tests/QtAutogen/mocDepends/simpleLib.hpp.in | 11 + Tests/QtAutogen/mocDepends/test1.cpp | 9 + Tests/QtAutogen/mocDepends/test2.cpp | 10 + Tests/QtAutogen/mocDepends/test2.hpp | 16 + Tests/QtAutogen/mocInclude/ObjA.cpp | 24 + Tests/QtAutogen/mocInclude/ObjA.hpp | 13 + Tests/QtAutogen/mocInclude/ObjB.cpp | 25 + Tests/QtAutogen/mocInclude/ObjB.hpp | 13 + Tests/QtAutogen/mocInclude/ObjC.cpp | 26 + Tests/QtAutogen/mocInclude/ObjC.hpp | 13 + Tests/QtAutogen/mocInclude/ObjD.cpp | 26 + Tests/QtAutogen/mocInclude/ObjD.hpp | 13 + Tests/QtAutogen/mocInclude/subA/SubObjA.cpp | 27 + Tests/QtAutogen/mocInclude/subA/SubObjA.hpp | 16 + Tests/QtAutogen/mocInclude/subB/SubObjB.cpp | 27 + Tests/QtAutogen/mocInclude/subB/SubObjB.hpp | 16 + Tests/QtAutogen/mocInclude/subC/SubObjC.cpp | 27 + Tests/QtAutogen/mocInclude/subC/SubObjC.hpp | 16 + Tests/QtAutogen/mocIncludeRelaxed/CMakeLists.txt | 18 + Tests/QtAutogen/mocIncludeRelaxed/main.cpp | 14 + Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt | 18 + Tests/QtAutogen/mocIncludeStrict/main.cpp | 14 + Tests/QtAutogen/mocPlugin/CMakeLists.txt | 33 + Tests/QtAutogen/mocPlugin/StyleA.cpp | 6 + Tests/QtAutogen/mocPlugin/StyleA.hpp | 17 + Tests/QtAutogen/mocPlugin/StyleA.json | 1 + Tests/QtAutogen/mocPlugin/StyleA_Custom.json | 1 + Tests/QtAutogen/mocPlugin/StyleB.cpp | 6 + Tests/QtAutogen/mocPlugin/StyleB.hpp | 17 + Tests/QtAutogen/mocPlugin/StyleC.cpp | 6 + Tests/QtAutogen/mocPlugin/StyleC.hpp | 17 + Tests/QtAutogen/mocPlugin/StyleCommon.hpp | 7 + Tests/QtAutogen/mocPlugin/StyleD.cpp | 6 + Tests/QtAutogen/mocPlugin/StyleD.hpp | 17 + Tests/QtAutogen/mocPlugin/StyleE.cpp | 6 + Tests/QtAutogen/mocPlugin/StyleE.hpp | 17 + Tests/QtAutogen/mocPlugin/jsonIn/StyleB.json | 1 + .../QtAutogen/mocPlugin/jsonIn/StyleB_Custom.json | 1 + Tests/QtAutogen/mocPlugin/jsonIn/StyleC.json | 1 + Tests/QtAutogen/mocPlugin/jsonIn/StyleD.json | 1 + Tests/QtAutogen/mocPlugin/main.cpp | 6 + Tests/QtAutogen/mocRerun/CMakeLists.txt | 34 + .../{automoc_rerun => mocRerun}/input.txt | 0 Tests/QtAutogen/mocRerun/main.cpp.in | 18 + .../QtAutogen/{automoc_rerun => mocRerun}/res1.qrc | 0 Tests/QtAutogen/mocRerun/test1a.h.in | 8 + Tests/QtAutogen/mocRerun/test1b.h.in | 7 + Tests/QtAutogen/rccDepends/CMakeLists.txt | 35 + .../test_res1.cpp => rccDepends/main.cpp} | 0 .../input.txt.in => rccDepends/res/input1.txt.in} | 0 Tests/QtAutogen/rccDepends/res/input2.txt.in | 1 + Tests/QtAutogen/rccDepends/res1a.qrc.in | 5 + Tests/QtAutogen/rccDepends/res1b.qrc.in | 6 + Tests/QtAutogen/rccDepends/res2a.qrc.in | 5 + Tests/QtAutogen/rccDepends/res2b.qrc.in | 6 + Tests/QtAutogen/sameName/CMakeLists.txt | 11 + Tests/QtAutogen/uicInclude/CMakeLists.txt | 8 + Tests/QtAutogen/uicInclude/PageC.ui | 24 + Tests/QtAutogen/uicInclude/dirA/PageA.ui | 24 + Tests/QtAutogen/uicInclude/dirB/sub/PageB.ui | 24 + Tests/QtAutogen/uicInclude/main.cpp | 10 + Tests/QtAutogen/uicInclude/main.hpp | 6 + Tests/RunCMake/AutoExportDll/AutoExport.cmake | 6 + Tests/RunCMake/AutoExportDll/foo.c | 2 + Tests/RunCMake/AutoExportDll/nop.asm | 12 + Tests/RunCMake/AutoExportDll/say.cxx | 14 + .../RunCMake/BuildDepends/MakeCustomIncludes.cmake | 13 + Tests/RunCMake/BuildDepends/MakeCustomIncludes.cxx | 6 + .../BuildDepends/MakeCustomIncludes.step1.cmake | 3 + .../BuildDepends/MakeCustomIncludes.step2.cmake | 3 + Tests/RunCMake/BuildDepends/RunCMakeTest.cmake | 10 +- Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt | 10 + Tests/RunCMake/CMP0022/CMP0022-WARN-tll-stderr.txt | 4 +- Tests/RunCMake/CMP0022/CMP0022-WARN-tll.cmake | 2 + .../CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt | 10 + .../CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt | 10 + Tests/RunCMake/CMP0026/CMP0026-OLD-stderr.txt | 10 + Tests/RunCMake/CMP0026/CMP0026-OLD.cmake | 12 + Tests/RunCMake/CMP0026/RunCMakeTest.cmake | 1 + .../CMP0026/clear-cached-information-stderr.txt | 10 + .../RunCMake/CMP0028/CMP0028-OLD-iface-stderr.txt | 10 + Tests/RunCMake/CMP0028/CMP0028-OLD-stderr.txt | 10 + .../CMP0068-NEW-result.txt} | 0 Tests/RunCMake/CMP0068/CMP0068-NEW.cmake | 6 + .../CMP0068-OLD-result.txt} | 0 Tests/RunCMake/CMP0068/CMP0068-OLD.cmake | 6 + .../CMP0068-WARN-result.txt} | 0 Tests/RunCMake/CMP0068/CMP0068-WARN-stderr.txt | 12 + Tests/RunCMake/CMP0068/CMP0068-WARN.cmake | 12 + Tests/RunCMake/CMP0068/CMakeLists.txt | 3 + Tests/RunCMake/CMP0068/RunCMakeTest.cmake | 5 + .../Export => RunCMake/CMP0068}/empty.cpp | 0 .../CMP0069-NEW-cmake-result.txt} | 0 .../RunCMake/CMP0069/CMP0069-NEW-cmake-stderr.txt | 4 + Tests/RunCMake/CMP0069/CMP0069-NEW-cmake.cmake | 6 + .../CMP0069-NEW-compiler-result.txt} | 0 .../CMP0069/CMP0069-NEW-compiler-stderr.txt | 4 + Tests/RunCMake/CMP0069/CMP0069-NEW-compiler.cmake | 7 + .../CMP0069-NEW-generator-result.txt} | 0 .../CMP0069/CMP0069-NEW-generator-stderr.txt | 4 + Tests/RunCMake/CMP0069/CMP0069-NEW-generator.cmake | 7 + Tests/RunCMake/CMP0069/CMP0069-OLD.cmake | 4 + Tests/RunCMake/CMP0069/CMP0069-WARN-stderr.txt | 9 + Tests/RunCMake/CMP0069/CMP0069-WARN.cmake | 4 + Tests/RunCMake/CMP0069/CMakeLists.txt | 3 + Tests/RunCMake/CMP0069/RunCMakeTest.cmake | 10 + .../TestProject => RunCMake/CMP0069}/main.cpp | 0 Tests/RunCMake/CMakeLists.txt | 44 +- .../CPack/ArchiveCommon/common_helpers.cmake | 2 +- Tests/RunCMake/CPack/RunCMakeTest.cmake | 4 +- Tests/RunCMake/CPack/STGZ/Helpers.cmake | 2 +- Tests/RunCMake/CPack/VerifyResult.cmake | 6 +- .../CPack/tests/CUSTOM_NAMES/ExpectedFiles.cmake | 3 + Tests/RunCMake/CPack/tests/CUSTOM_NAMES/test.cmake | 3 + .../CPack/tests/DEBUGINFO/ExpectedFiles.cmake | 8 +- Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake | 10 + .../tests/EXTRA_SLASH_IN_PATH/ExpectedFiles.cmake | 16 + .../tests/EXTRA_SLASH_IN_PATH/VerifyResult.cmake | 7 + .../CPack/tests/EXTRA_SLASH_IN_PATH/test.cmake | 37 + .../CPack/tests/SYMLINKS/ExpectedFiles.cmake | 13 + .../CPack/tests/SYMLINKS/TGZ-Prerequirements.cmake | 5 + .../CPack/tests/SYMLINKS/VerifyResult.cmake | 26 + Tests/RunCMake/CPack/tests/SYMLINKS/test.cmake | 14 + Tests/RunCMake/CheckIPOSupported/CMakeLists.txt | 7 + .../RunCMake/CheckIPOSupported/RunCMakeTest.cmake | 13 + .../cmp0069-is-old-result.txt} | 0 .../CheckIPOSupported/cmp0069-is-old-stderr.txt | 5 + .../CheckIPOSupported/cmp0069-is-old.cmake | 6 + .../default-lang-none-result.txt} | 0 .../CheckIPOSupported/default-lang-none-stderr.txt | 7 + .../CheckIPOSupported/default-lang-none.cmake | 1 + .../not-supported-by-cmake-result.txt} | 0 .../not-supported-by-cmake-stderr.txt | 6 + .../CheckIPOSupported/not-supported-by-cmake.cmake | 3 + .../not-supported-by-compiler-result.txt} | 0 .../not-supported-by-compiler-stderr.txt | 6 + .../not-supported-by-compiler.cmake | 4 + .../not-supported-by-generator-result.txt} | 0 .../not-supported-by-generator-stderr.txt | 6 + .../not-supported-by-generator.cmake | 6 + .../CheckIPOSupported/save-to-result.cmake | 22 + .../unparsed-arguments-result.txt} | 0 .../unparsed-arguments-stderr.txt | 5 + .../CheckIPOSupported/unparsed-arguments.cmake | 1 + .../user-lang-unknown-result.txt} | 0 .../CheckIPOSupported/user-lang-unknown-stderr.txt | 6 + .../CheckIPOSupported/user-lang-unknown.cmake | 1 + .../CommandLine/DeprecateVS71-WARN-ON-stderr.txt | 5 - .../CommandLine/DeprecateVS8-WARN-OFF.cmake | 0 .../CommandLine/DeprecateVS8-WARN-ON-stderr.txt | 5 + .../CommandLine/DeprecateVS8-WARN-ON.cmake | 0 Tests/RunCMake/CommandLine/RunCMakeTest.cmake | 23 +- .../reject_fifo-result.txt} | 0 Tests/RunCMake/CommandLine/reject_fifo-stderr.txt | 2 + .../LinkImplementationFeatureCycle.cmake | 5 +- Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake | 5 +- .../DisallowedCommands/CMP0029-OLD-stderr.txt | 10 + .../DisallowedCommands/CMP0030-OLD-stderr.txt | 13 +- .../FeatureSummaryCustomDescription-stdout.txt | 91 + .../FeatureSummaryCustomDescription.cmake | 158 + .../FeatureSummaryDefaultDescription-stdout.txt | 46 + .../FeatureSummaryDefaultDescription.cmake | 82 + Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake | 2 + .../File_Generate/OutputConflict-stderr.txt | 5 +- .../OutputNameMatchesObjects-stderr.txt | 7 +- .../File_Generate/OutputNameMatchesObjects.cmake | 1 + Tests/RunCMake/File_Generate/RunCMakeTest.cmake | 2 +- .../FindPkgConfig_CMAKE_APPBUNDLE_PATH.cmake | 5 +- .../FindPkgConfig_CMAKE_FRAMEWORK_PATH.cmake | 5 +- .../FindPkgConfig_PKGCONFIG_PATH.cmake | 5 +- ..._PKGCONFIG_PATH_NO_CMAKE_ENVIRONMENT_PATH.cmake | 5 +- ...indPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH.cmake | 5 +- Tests/RunCMake/FindPkgConfig/dummy-pkg-config.bat | 11 +- Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh | 32 +- .../pkgconfig/.placeholder | 0 .../libx32}/pkgconfig/.placeholder | 0 Tests/RunCMake/Framework/FrameworkLayout.cmake | 13 +- .../Framework/FrameworkTypeSHARED-build-stdout.txt | 4 +- .../Framework/FrameworkTypeSTATIC-build-stdout.txt | 3 +- .../Framework/OSXFrameworkLayout-build-check.cmake | 17 +- Tests/RunCMake/Framework/RunCMakeTest.cmake | 11 +- .../RunCMake/Framework/deepresource.txt | 0 .../RunCMake/Framework/flatresource.txt | 0 .../Framework/iOSFrameworkLayout-build-check.cmake | 17 +- .../hello.f => Tests/RunCMake/Framework/some.txt | 0 Tests/RunCMake/GNUInstallDirs/Common.cmake | 4 +- Tests/RunCMake/GNUInstallDirs/Opt-BSD-stderr.txt | 30 + Tests/RunCMake/GNUInstallDirs/Opt-stderr.txt | 2 + Tests/RunCMake/GNUInstallDirs/Root-BSD-stderr.txt | 30 + Tests/RunCMake/GNUInstallDirs/Root-stderr.txt | 2 + Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake | 19 +- Tests/RunCMake/GNUInstallDirs/Usr-BSD-stderr.txt | 30 + Tests/RunCMake/GNUInstallDirs/Usr-stderr.txt | 2 + .../GNUInstallDirs/UsrLocal-BSD-stderr.txt | 30 + Tests/RunCMake/GNUInstallDirs/UsrLocal-stderr.txt | 2 + Tests/RunCMake/GenerateExportHeader/GEH.cmake | 2 +- ...tedTarget-TARGET_BUNDLE_CONTENT_DIR-result.txt} | 0 ...rtedTarget-TARGET_BUNDLE_CONTENT_DIR-stderr.txt | 8 + .../ImportedTarget-TARGET_BUNDLE_CONTENT_DIR.cmake | 2 + .../ImportedTarget-TARGET_BUNDLE_DIR-result.txt} | 0 .../ImportedTarget-TARGET_BUNDLE_DIR-stderr.txt | 8 + .../ImportedTarget-TARGET_BUNDLE_DIR.cmake | 2 + ...lidTarget-TARGET_BUNDLE_CONTENT_DIR-result.txt} | 0 ...alidTarget-TARGET_BUNDLE_CONTENT_DIR-stderr.txt | 8 + .../NonValidTarget-TARGET_BUNDLE_CONTENT_DIR.cmake | 9 + .../NonValidTarget-TARGET_BUNDLE_DIR-result.txt} | 0 .../NonValidTarget-TARGET_BUNDLE_DIR-stderr.txt | 8 + .../NonValidTarget-TARGET_BUNDLE_DIR.cmake | 9 + .../GeneratorExpression/RunCMakeTest.cmake | 4 + .../BadToolsetFormat-result.txt} | 0 .../GeneratorToolset/BadToolsetFormat-stderr.txt | 10 + .../BadToolsetFormat.cmake} | 0 .../GeneratorToolset/BadToolsetHostArch-stderr.txt | 4 +- .../BadToolsetHostArchTwice-result.txt} | 0 .../BadToolsetHostArchTwice-stderr.txt | 10 + .../BadToolsetHostArchTwice.cmake} | 0 .../BadToolsetHostArchXcode-result.txt} | 0 ...derr.txt => BadToolsetHostArchXcode-stderr.txt} | 0 .../BadToolsetHostArchXcode.cmake} | 0 Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake | 19 +- .../TestToolsetCudaBoth-stdout.txt | 2 + .../GeneratorToolset/TestToolsetCudaBoth.cmake | 2 + .../TestToolsetCudaOnly-stdout.txt | 2 + .../GeneratorToolset/TestToolsetCudaOnly.cmake | 2 + Tests/RunCMake/Ninja/AssumedSources.cmake | 20 + Tests/RunCMake/Ninja/CommandConcat.cmake | 14 + Tests/RunCMake/Ninja/LooseObjectDepends.cmake | 26 + Tests/RunCMake/Ninja/RunCMakeTest.cmake | 45 +- Tests/RunCMake/Ninja/dep.c | 4 + Tests/RunCMake/Ninja/top.c | 7 + Tests/RunCMake/ObjectLibrary/Dependencies.cmake | 7 + Tests/RunCMake/ObjectLibrary/Export-result.txt | 1 - Tests/RunCMake/ObjectLibrary/Export-stderr.txt | 4 - .../ExportNotSupported-result.txt} | 0 .../ObjectLibrary/ExportNotSupported-stderr.txt | 5 + .../{Export.cmake => ExportNotSupported.cmake} | 0 Tests/RunCMake/ObjectLibrary/Import-result.txt | 1 - Tests/RunCMake/ObjectLibrary/Import-stderr.txt | 4 - Tests/RunCMake/ObjectLibrary/Import.cmake | 11 + .../ImportNotSupported-result.txt} | 0 .../ObjectLibrary/ImportNotSupported-stderr.txt | 5 + .../{Import.cmake => ImportNotSupported.cmake} | 0 Tests/RunCMake/ObjectLibrary/Install-result.txt | 1 - Tests/RunCMake/ObjectLibrary/Install-stderr.txt | 4 - .../InstallNotSupported-result.txt} | 0 .../ObjectLibrary/InstallNotSupported-stderr.txt | 5 + .../{Install.cmake => InstallNotSupported.cmake} | 0 Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake | 37 +- Tests/RunCMake/ObjectLibrary/b.c | 4 + Tests/RunCMake/ObjectLibrary/depends_lib.c | 7 + Tests/RunCMake/ObjectLibrary/depends_main.c | 7 + Tests/RunCMake/ObjectLibrary/depends_obj0.c | 4 + Tests/RunCMake/ObjectLibrary/depends_obj1.c | 4 + Tests/RunCMake/RunCMake.cmake | 6 +- Tests/RunCMake/TargetObjects/BadContext-result.txt | 1 - Tests/RunCMake/TargetObjects/BadContext-stderr.txt | 27 - .../NoTarget-result.txt} | 0 Tests/RunCMake/TargetObjects/NoTarget-stderr.txt | 24 + .../{BadContext.cmake => NoTarget.cmake} | 0 .../NotObjlibTarget-result.txt} | 0 .../TargetObjects/NotObjlibTarget-stderr.txt | 8 + Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake | 3 + Tests/RunCMake/TargetObjects/RunCMakeTest.cmake | 3 +- Tests/RunCMake/TargetObjects/empty.cpp | 4 + .../RunCMake/TargetPolicies/PolicyList-stderr.txt | 2 + .../TargetSources/CMP0026-LOCATION-stderr.txt | 10 + Tests/RunCMake/TargetSources/RunCMakeTest.cmake | 2 +- Tests/RunCMake/VSSolution/RunCMakeTest.cmake | 2 +- Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 16 + Tests/RunCMake/XcodeProject/XcodeBundles.cmake | 24 + .../XcodeProject/XcodeSchemaGeneration.cmake | 5 + .../RunCMake/ctest_disabled_test/CMakeLists.txt.in | 6 + .../ctest_disabled_test/CTestConfig.cmake.in | 1 + .../DisableAllTests-result.txt} | 0 .../DisableAllTests-stderr.txt} | 0 .../ctest_disabled_test/DisableAllTests-stdout.txt | 2 + .../DisableCleanupTest-stdout.txt | 11 + .../DisableFailingTest-stdout.txt | 9 + .../DisableNotRunTest-result.txt} | 0 .../DisableNotRunTest-stderr.txt | 1 + .../DisableNotRunTest-stdout.txt | 17 + .../DisableRequiredTest-stdout.txt | 13 + .../DisableSetupTest-stdout.txt | 13 + .../DisabledTest-result.txt} | 0 .../ctest_disabled_test/DisabledTest-stderr.txt | 1 + .../ctest_disabled_test/DisabledTest-stdout.txt | 17 + .../ctest_disabled_test/RunCMakeTest.cmake | 89 + Tests/RunCMake/ctest_disabled_test/test.cmake.in | 16 + Tests/RunCMake/ctest_fixtures/CMakeLists.txt.in | 2 +- Tests/RunCMake/ctest_fixtures/RunCMakeTest.cmake | 50 + .../ctest_fixtures/exclude_any_bar-stdout.txt | 15 + .../ctest_fixtures/exclude_any_foo-stdout.txt | 13 + .../ctest_fixtures/exclude_any_foobar-stdout.txt | 9 + .../ctest_fixtures/exclude_cleanup_bar-stdout.txt | 15 + .../ctest_fixtures/exclude_cleanup_foo-stdout.txt | 15 + .../ctest_fixtures/exclude_setup_bar-stdout.txt | 17 + .../ctest_fixtures/exclude_setup_foo-stdout.txt | 15 + Tests/RunCMake/ctest_fixtures/test.cmake.in | 2 +- .../RunCMake/ctest_skipped_test/CMakeLists.txt.in | 12 + .../ctest_skipped_test/CTestConfig.cmake.in | 1 + .../RunCMake/ctest_skipped_test/RunCMakeTest.cmake | 51 + .../ctest_skipped_test/SkipCleanupTest-stdout.txt | 11 + .../ctest_skipped_test/SkipRequiredTest-stdout.txt | 13 + .../ctest_skipped_test/SkipSetupTest-stdout.txt | 13 + .../ctest_skipped_test/SkipTest-stdout.txt | 11 + Tests/RunCMake/ctest_skipped_test/skip.bat | 1 + Tests/RunCMake/ctest_skipped_test/skip.sh | 3 + Tests/RunCMake/ctest_skipped_test/test.cmake.in | 16 + .../CDashSubmitHeaders-result.txt} | 0 ...et-stderr.txt => CDashSubmitHeaders-stderr.txt} | 0 .../ctest_submit/CDashSubmitHeaders-stdout.txt | 1 + .../CDashUploadHeaders-result.txt} | 0 .../ctest_submit/CDashUploadHeaders-stderr.txt | 1 + .../ctest_submit/CDashUploadHeaders-stdout.txt | 1 + Tests/RunCMake/ctest_submit/RunCMakeTest.cmake | 2 + Tests/RunCMake/file/DOWNLOAD-hash-mismatch.cmake | 5 +- Tests/RunCMake/file/DOWNLOAD-unused-argument.cmake | 5 +- .../INSTALL-FILES_FROM_DIR-bad-result.txt} | 0 .../file/INSTALL-FILES_FROM_DIR-bad-stderr.txt | 15 + .../RunCMake/file/INSTALL-FILES_FROM_DIR-bad.cmake | 5 + .../file/INSTALL-FILES_FROM_DIR-stdout.txt | 8 + Tests/RunCMake/file/INSTALL-FILES_FROM_DIR.cmake | 7 + Tests/RunCMake/file/INSTALL-SYMLINK-stdout.txt | 3 + Tests/RunCMake/file/INSTALL-SYMLINK.cmake | 13 + .../READ_ELF-result.txt} | 0 Tests/RunCMake/file/READ_ELF-stderr.txt | 2 + Tests/RunCMake/file/READ_ELF.cmake | 2 + Tests/RunCMake/file/RunCMakeTest.cmake | 4 + Tests/RunCMake/file/UPLOAD-unused-argument.cmake | 5 +- .../hello.f => Tests/RunCMake/file/from/a.txt | 0 .../hello.f => Tests/RunCMake/file/from/a/b.txt | 0 .../hello.f => Tests/RunCMake/file/from/a/b/c.txt | 0 Tests/RunCMake/find_dependency/CMakeLists.txt | 1 - .../find_dependency/EXACT-no-version-result.txt | 1 - .../find_dependency/EXACT-no-version-stderr.txt | 6 - .../find_dependency/EXACT-no-version.cmake | 4 - Tests/RunCMake/find_dependency/RunCMakeTest.cmake | 13 +- .../bad-version-exact-result.txt} | 0 .../find_dependency/bad-version-exact-stderr.txt | 11 + .../find_dependency/bad-version-exact.cmake | 5 + .../bad-version-fuzzy-result.txt} | 0 .../find_dependency/bad-version-fuzzy-stderr.txt | 11 + .../find_dependency/bad-version-fuzzy.cmake | 5 + Tests/RunCMake/find_dependency/basic.cmake | 5 + .../find_dependency/empty-arg-3-result.txt | 1 - .../find_dependency/empty-arg-3-stderr.txt | 5 - Tests/RunCMake/find_dependency/empty-arg-3.cmake | 4 - .../find_dependency/empty-version-result.txt | 1 - .../find_dependency/empty-version-stderr.txt | 5 - Tests/RunCMake/find_dependency/empty-version.cmake | 4 - .../RunCMake/find_dependency/extra-args-result.txt | 1 - .../RunCMake/find_dependency/extra-args-stderr.txt | 5 - Tests/RunCMake/find_dependency/extra-args.cmake | 4 - .../find_dependency/invalid-arg-3-result.txt | 1 - .../find_dependency/invalid-arg-3-stderr.txt | 5 - Tests/RunCMake/find_dependency/invalid-arg-3.cmake | 4 - .../invalid-arg-result.txt} | 0 .../find_dependency/invalid-arg-stderr.txt | 5 + Tests/RunCMake/find_dependency/invalid-arg.cmake | 5 + Tests/RunCMake/find_dependency/realistic.cmake | 3 + .../{ => share/cmake}/Pack1/Pack1Config.cmake | 0 .../cmake}/Pack1/Pack1ConfigVersion.cmake | 0 .../share/cmake/Pack2/Pack2Config.cmake | 6 + .../share/cmake/Pack2/Pack2ConfigVersion.cmake} | 0 .../RunCMake/find_package/MissingConfig-stderr.txt | 15 - .../RunCMake/find_package/MissingConfig-stdout.txt | 1 + .../find_package/MissingConfigNormal-stdout.txt | 1 + .../find_package/MissingConfigOneName-stderr.txt | 10 - .../find_package/MissingConfigOneName-stdout.txt | 1 + .../find_package/MissingConfigVersion-stderr.txt | 13 - .../find_package/MissingConfigVersion-stdout.txt | 1 + Tests/RunCMake/find_package/PackageRoot-stderr.txt | 319 + Tests/RunCMake/find_package/PackageRoot.cmake | 143 + .../find_package/PackageRoot/FindBar.cmake | 6 + .../find_package/PackageRoot/FindFoo.cmake | 7 + .../PackageRoot/bar/cmake_root/bin/bar.exe | 0 .../PackageRoot/bar/cmake_root/include/bar.h | 0 .../PackageRoot/bar/env_root/bin/bar.exe | 0 .../PackageRoot/bar/env_root/include/bar.h | 0 .../PackageRoot/foo/cmake_root/bin/bar.exe | 0 .../PackageRoot/foo/cmake_root/bin/foo.exe | 0 .../PackageRoot/foo/cmake_root/include/bar.h | 0 .../PackageRoot/foo/cmake_root/include/foo.h | 0 .../PackageRoot/foo/env_root/bin/bar.exe | 0 .../PackageRoot/foo/env_root/bin/foo.exe | 0 .../PackageRoot/foo/env_root/include/bar.h | 0 .../PackageRoot/foo/env_root/include/foo.h | 0 Tests/RunCMake/find_package/RunCMakeTest.cmake | 1 + .../RunCMake/find_package/SetFoundFALSE-stderr.txt | 9 - .../RunCMake/find_package/SetFoundFALSE-stdout.txt | 1 + .../RunCMake/get_property/IsMultiConfig-stdout.txt | 1 + Tests/RunCMake/get_property/IsMultiConfig.cmake | 2 + .../get_property/NotMultiConfig-stdout.txt | 1 + Tests/RunCMake/get_property/NotMultiConfig.cmake | 1 + Tests/RunCMake/get_property/RunCMakeTest.cmake | 6 + Tests/RunCMake/if/RunCMakeTest.cmake | 4 + .../duplicate-deep-else-result.txt} | 0 Tests/RunCMake/if/duplicate-deep-else-stderr.txt | 4 + Tests/RunCMake/if/duplicate-deep-else.cmake | 7 + .../duplicate-else-after-elseif-result.txt} | 0 .../if/duplicate-else-after-elseif-stderr.txt | 4 + .../RunCMake/if/duplicate-else-after-elseif.cmake | 5 + .../duplicate-else-result.txt} | 0 Tests/RunCMake/if/duplicate-else-stderr.txt | 4 + Tests/RunCMake/if/duplicate-else.cmake | 4 + .../misplaced-elseif-result.txt} | 0 Tests/RunCMake/if/misplaced-elseif-stderr.txt | 4 + Tests/RunCMake/if/misplaced-elseif.cmake | 4 + .../CustomConfig-check.cmake | 1 + .../include_external_msproject/CustomConfig.cmake | 3 + .../CustomGuid-check.cmake | 2 +- .../CustomGuidTypePlatform-check.cmake | 2 +- .../CustomTypePlatform-check.cmake | 2 +- .../include_external_msproject/RunCMakeTest.cmake | 1 + .../include_external_msproject/check_utils.cmake | 27 +- Tests/RunCMake/install/EXPORT-OldIFace.cmake | 1 + .../install/FILES-TARGET_OBJECTS-all-check.cmake | 1 + Tests/RunCMake/install/FILES-TARGET_OBJECTS.cmake | 3 + Tests/RunCMake/install/RunCMakeTest.cmake | 20 +- Tests/RunCMake/install/obj1.c | 4 + Tests/RunCMake/install/obj2.c | 4 + .../RunCMake/project/ProjectDescription-stdout.txt | 1 + Tests/RunCMake/project/ProjectDescription.cmake | 6 + .../ProjectDescription2-result.txt} | 0 .../project/ProjectDescription2-stderr.txt | 1 + Tests/RunCMake/project/ProjectDescription2.cmake | 2 + Tests/RunCMake/project/RunCMakeTest.cmake | 2 + .../{CMP0054 => separate_arguments}/CMakeLists.txt | 0 .../RunCMake/separate_arguments/EmptyCommand.cmake | 6 + .../separate_arguments/NativeCommand.cmake | 19 + .../RunCMake/separate_arguments/PlainCommand.cmake | 8 + .../RunCMake/separate_arguments/RunCMakeTest.cmake | 7 + .../RunCMake/separate_arguments/UnixCommand.cmake | 8 + .../separate_arguments/WindowsCommand.cmake | 8 + Tests/Server/cmakelib.py | 5 +- Tests/Server/server-test.py | 1 + Tests/SimpleInstall/CMakeLists.txt | 1 + Tests/VSNASM/CMakeLists.txt | 10 + Tests/VSNASM/foo.asm | 7 + Tests/VSNASM/include/foo-proc.asm | 7 + Tests/{VSMASM => VSNASM}/main.c | 0 Tests/VSResource/CMakeLists.txt | 5 +- Tests/Wrapping/fakefluid.cxx | 4 +- Tests/XCTest/CMakeLists.txt | 16 + Tests/XCTest/StaticLibExample/StaticLibExample.c | 6 + Tests/XCTest/StaticLibExample/StaticLibExample.h | 1 + Tests/XCTest/StaticLibExampleTests/Info.plist | 24 + .../StaticLibExampleTests/StaticLibExampleTests.m | 16 + Utilities/.clang-tidy | 6 + Utilities/CMakeLists.txt | 3 + Utilities/GitSetup/config | 9 +- Utilities/IWYU/mapping.imp | 161 + Utilities/KWIML/test/CMakeLists.txt | 2 + Utilities/Release/consolidate-relnotes.bash | 27 + Utilities/Release/hythloth_release.cmake | 10 - Utilities/Release/linux64_release.cmake | 1 + Utilities/Release/osx_release.cmake | 2 +- Utilities/Release/release_cmake.cmake | 9 +- Utilities/Release/release_cmake.sh.in | 6 +- Utilities/Release/upload_release.cmake | 2 +- Utilities/Scripts/update-curl.bash | 3 +- Utilities/Scripts/update-kwsys.bash | 2 + Utilities/Scripts/update-libarchive.bash | 2 +- Utilities/Scripts/update-third-party.bash | 8 + Utilities/SetupForDevelopment.sh | 5 +- Utilities/Sphinx/CMakeLists.txt | 26 +- Utilities/Sphinx/conf.py.in | 24 +- Utilities/Sphinx/templates/layout.html | 12 + Utilities/cmcurl/CMake/CurlTests.c | 16 + Utilities/cmcurl/CMake/FindGSS.cmake | 2 +- Utilities/cmcurl/CMake/FindMbedTLS.cmake | 13 + Utilities/cmcurl/CMake/OtherTests.cmake | 25 +- Utilities/cmcurl/CMake/Utilities.cmake | 13 + Utilities/cmcurl/CMakeLists.txt | 223 +- Utilities/cmcurl/COPYING | 2 +- Utilities/cmcurl/include/curl/curl.h | 116 +- Utilities/cmcurl/include/curl/curlrules.h | 25 +- Utilities/cmcurl/include/curl/curlver.h | 10 +- Utilities/cmcurl/include/curl/easy.h | 4 +- Utilities/cmcurl/include/curl/stdcheaders.h | 6 +- Utilities/cmcurl/include/curl/system.h | 484 ++ Utilities/cmcurl/include/curl/typecheck-gcc.h | 58 +- Utilities/cmcurl/lib/Makefile.inc | 4 +- Utilities/cmcurl/lib/asyn-ares.c | 35 +- Utilities/cmcurl/lib/asyn-thread.c | 24 +- Utilities/cmcurl/lib/conncache.c | 61 +- Utilities/cmcurl/lib/conncache.h | 4 +- Utilities/cmcurl/lib/connect.c | 103 +- Utilities/cmcurl/lib/connect.h | 19 +- Utilities/cmcurl/lib/content_encoding.c | 28 +- Utilities/cmcurl/lib/cookie.c | 60 +- Utilities/cmcurl/lib/curl_addrinfo.c | 62 +- Utilities/cmcurl/lib/curl_addrinfo.h | 2 +- Utilities/cmcurl/lib/curl_config.h.cmake | 12 + Utilities/cmcurl/lib/curl_des.c | 2 +- Utilities/cmcurl/lib/curl_endian.c | 18 +- Utilities/cmcurl/lib/curl_endian.h | 18 +- Utilities/cmcurl/lib/curl_fnmatch.c | 8 +- Utilities/cmcurl/lib/curl_gethostname.c | 8 +- Utilities/cmcurl/lib/curl_gssapi.c | 2 +- Utilities/cmcurl/lib/curl_hmac.h | 26 +- Utilities/cmcurl/lib/curl_memory.h | 4 +- Utilities/cmcurl/lib/curl_ntlm_core.c | 14 +- Utilities/cmcurl/lib/curl_ntlm_core.h | 27 +- Utilities/cmcurl/lib/curl_ntlm_wb.c | 15 +- Utilities/cmcurl/lib/curl_sasl.c | 22 +- Utilities/cmcurl/lib/curl_sec.h | 16 +- Utilities/cmcurl/lib/curl_setup.h | 17 +- Utilities/cmcurl/lib/curl_threads.c | 5 +- Utilities/cmcurl/lib/curl_threads.h | 5 +- Utilities/cmcurl/lib/dict.c | 2 +- Utilities/cmcurl/lib/easy.c | 60 +- Utilities/cmcurl/lib/escape.c | 13 +- Utilities/cmcurl/lib/file.c | 10 +- Utilities/cmcurl/lib/formdata.c | 166 +- Utilities/cmcurl/lib/formdata.h | 2 +- Utilities/cmcurl/lib/ftp.c | 304 +- Utilities/cmcurl/lib/ftp.h | 2 +- Utilities/cmcurl/lib/ftplistparser.c | 18 +- Utilities/cmcurl/lib/getinfo.c | 29 +- Utilities/cmcurl/lib/gopher.c | 6 +- Utilities/cmcurl/lib/hash.c | 74 +- Utilities/cmcurl/lib/hash.h | 19 +- Utilities/cmcurl/lib/hmac.c | 10 +- Utilities/cmcurl/lib/hostcheck.c | 11 +- Utilities/cmcurl/lib/hostip.c | 10 +- Utilities/cmcurl/lib/hostip.h | 10 +- Utilities/cmcurl/lib/hostip4.c | 2 +- Utilities/cmcurl/lib/http.c | 206 +- Utilities/cmcurl/lib/http.h | 4 + Utilities/cmcurl/lib/http2.c | 304 +- Utilities/cmcurl/lib/http2.h | 8 + Utilities/cmcurl/lib/http_chunks.c | 14 +- Utilities/cmcurl/lib/http_digest.c | 20 +- Utilities/cmcurl/lib/http_negotiate.c | 16 +- Utilities/cmcurl/lib/http_ntlm.c | 6 +- Utilities/cmcurl/lib/http_proxy.c | 556 +- Utilities/cmcurl/lib/http_proxy.h | 4 +- Utilities/cmcurl/lib/if2ip.c | 2 +- Utilities/cmcurl/lib/imap.c | 15 +- Utilities/cmcurl/lib/inet_ntop.c | 6 +- Utilities/cmcurl/lib/inet_pton.c | 8 +- Utilities/cmcurl/lib/krb5.c | 2 +- Utilities/cmcurl/lib/ldap.c | 46 +- Utilities/cmcurl/lib/libcurl.rc | 4 +- Utilities/cmcurl/lib/llist.c | 22 +- Utilities/cmcurl/lib/llist.h | 4 +- Utilities/cmcurl/lib/md4.c | 3 +- Utilities/cmcurl/lib/md5.c | 7 +- Utilities/cmcurl/lib/memdebug.c | 6 +- Utilities/cmcurl/lib/mprintf.c | 31 +- Utilities/cmcurl/lib/multi.c | 295 +- Utilities/cmcurl/lib/multihandle.h | 20 +- Utilities/cmcurl/lib/multiif.h | 4 +- Utilities/cmcurl/lib/non-ascii.c | 4 +- Utilities/cmcurl/lib/nonblock.c | 3 +- Utilities/cmcurl/lib/nwlib.c | 10 +- Utilities/cmcurl/lib/nwos.c | 8 +- Utilities/cmcurl/lib/pingpong.c | 20 +- Utilities/cmcurl/lib/pingpong.h | 8 +- Utilities/cmcurl/lib/pipeline.c | 81 +- Utilities/cmcurl/lib/pipeline.h | 6 +- Utilities/cmcurl/lib/pop3.c | 17 +- Utilities/cmcurl/lib/progress.c | 58 +- Utilities/cmcurl/lib/rand.c | 132 + Utilities/cmcurl/lib/rand.h | 43 + Utilities/cmcurl/lib/rtsp.c | 94 +- Utilities/cmcurl/lib/security.c | 17 +- Utilities/cmcurl/lib/select.c | 10 +- Utilities/cmcurl/lib/select.h | 8 +- Utilities/cmcurl/lib/sendf.c | 120 +- Utilities/cmcurl/lib/sendf.h | 2 + Utilities/cmcurl/lib/setup-os400.h | 52 +- Utilities/cmcurl/lib/setup-vms.h | 139 +- Utilities/cmcurl/lib/share.h | 8 +- Utilities/cmcurl/lib/smb.c | 47 +- Utilities/cmcurl/lib/smtp.c | 15 +- Utilities/cmcurl/lib/socks.c | 55 +- Utilities/cmcurl/lib/socks.h | 5 +- Utilities/cmcurl/lib/socks_gssapi.c | 24 +- Utilities/cmcurl/lib/socks_sspi.c | 11 +- Utilities/cmcurl/lib/speedcheck.c | 61 +- Utilities/cmcurl/lib/splay.c | 110 +- Utilities/cmcurl/lib/splay.h | 3 +- Utilities/cmcurl/lib/ssh.c | 357 +- Utilities/cmcurl/lib/strcase.c | 12 +- Utilities/cmcurl/lib/strcase.h | 1 + Utilities/cmcurl/lib/strdup.c | 23 + Utilities/cmcurl/lib/strdup.h | 1 + Utilities/cmcurl/lib/strerror.c | 32 +- Utilities/cmcurl/lib/strtoofft.c | 4 +- Utilities/cmcurl/lib/system_win32.c | 4 +- Utilities/cmcurl/lib/telnet.c | 60 +- Utilities/cmcurl/lib/tftp.c | 14 +- Utilities/cmcurl/lib/timeval.c | 9 +- Utilities/cmcurl/lib/timeval.h | 6 +- Utilities/cmcurl/lib/transfer.c | 62 +- Utilities/cmcurl/lib/url.c | 1454 +++-- Utilities/cmcurl/lib/url.h | 13 + Utilities/cmcurl/lib/urldata.h | 205 +- Utilities/cmcurl/lib/vauth/cleartext.c | 24 +- Utilities/cmcurl/lib/vauth/digest.c | 25 +- Utilities/cmcurl/lib/vauth/digest_sspi.c | 290 +- Utilities/cmcurl/lib/vauth/krb5_gssapi.c | 4 +- Utilities/cmcurl/lib/vauth/krb5_sspi.c | 4 +- Utilities/cmcurl/lib/vauth/ntlm.c | 34 +- Utilities/cmcurl/lib/vauth/ntlm.h | 2 +- Utilities/cmcurl/lib/vauth/spnego_sspi.c | 5 +- Utilities/cmcurl/lib/version.c | 3 + Utilities/cmcurl/lib/vtls/axtls.c | 105 +- Utilities/cmcurl/lib/vtls/axtls.h | 8 +- Utilities/cmcurl/lib/vtls/cyassl.c | 148 +- Utilities/cmcurl/lib/vtls/cyassl.h | 10 +- Utilities/cmcurl/lib/vtls/darwinssl.c | 564 +- Utilities/cmcurl/lib/vtls/darwinssl.h | 6 +- Utilities/cmcurl/lib/vtls/gskit.c | 400 +- Utilities/cmcurl/lib/vtls/gskit.h | 7 +- Utilities/cmcurl/lib/vtls/gtls.c | 446 +- Utilities/cmcurl/lib/vtls/gtls.h | 15 +- Utilities/cmcurl/lib/vtls/mbedtls.c | 250 +- Utilities/cmcurl/lib/vtls/mbedtls.h | 12 +- Utilities/cmcurl/lib/vtls/nss.c | 360 +- Utilities/cmcurl/lib/vtls/nssg.h | 11 +- Utilities/cmcurl/lib/vtls/openssl.c | 686 ++- Utilities/cmcurl/lib/vtls/openssl.h | 9 +- Utilities/cmcurl/lib/vtls/polarssl.c | 173 +- Utilities/cmcurl/lib/vtls/polarssl.h | 3 +- Utilities/cmcurl/lib/vtls/schannel.c | 211 +- Utilities/cmcurl/lib/vtls/schannel.h | 4 +- Utilities/cmcurl/lib/vtls/vtls.c | 313 +- Utilities/cmcurl/lib/vtls/vtls.h | 48 +- Utilities/cmcurl/lib/warnless.c | 5 +- Utilities/cmcurl/lib/wildcard.c | 18 +- Utilities/cmcurl/lib/wildcard.h | 9 +- Utilities/cmcurl/lib/x509asn1.c | 194 +- Utilities/cmcurl/lib/x509asn1.h | 26 +- Utilities/cmjsoncpp/CMakeLists.txt | 1 + Utilities/cmlibarchive/CMakeLists.txt | 145 +- .../build/cmake/CheckStructMember.cmake | 43 - Utilities/cmlibarchive/build/cmake/FindLZMA.cmake | 48 - Utilities/cmlibarchive/build/cmake/config.h.in | 21 + Utilities/cmlibarchive/build/version | 2 +- Utilities/cmlibarchive/libarchive/CMakeLists.txt | 18 + Utilities/cmlibarchive/libarchive/archive.h | 20 +- Utilities/cmlibarchive/libarchive/archive_acl.c | 1639 +++-- .../cmlibarchive/libarchive/archive_acl_private.h | 22 +- .../cmlibarchive/libarchive/archive_cryptor.c | 3 +- .../libarchive/archive_digest_private.h | 1 + Utilities/cmlibarchive/libarchive/archive_entry.c | 234 +- Utilities/cmlibarchive/libarchive/archive_entry.h | 91 +- .../cmlibarchive/libarchive/archive_entry_acl.3 | 335 +- .../cmlibarchive/libarchive/archive_entry_locale.h | 10 +- .../libarchive/archive_entry_strmode.c | 2 +- Utilities/cmlibarchive/libarchive/archive_hmac.c | 4 + Utilities/cmlibarchive/libarchive/archive_match.c | 14 +- .../libarchive/archive_openssl_evp_private.h | 5 +- .../libarchive/archive_openssl_hmac_private.h | 6 +- .../cmlibarchive/libarchive/archive_options.c | 11 +- .../cmlibarchive/libarchive/archive_platform.h | 28 +- .../libarchive/archive_ppmd7_private.h | 2 +- Utilities/cmlibarchive/libarchive/archive_random.c | 2 +- Utilities/cmlibarchive/libarchive/archive_rb.c | 2 +- Utilities/cmlibarchive/libarchive/archive_read.c | 16 +- .../libarchive/archive_read_add_passphrase.c | 22 +- .../libarchive/archive_read_append_filter.c | 2 - .../cmlibarchive/libarchive/archive_read_disk.3 | 6 +- .../libarchive/archive_read_disk_entry_from_file.c | 1090 +++- .../libarchive/archive_read_disk_posix.c | 135 +- .../libarchive/archive_read_disk_private.h | 12 +- .../archive_read_disk_set_standard_lookup.c | 2 + .../libarchive/archive_read_disk_windows.c | 59 +- .../libarchive/archive_read_extract2.c | 3 +- .../libarchive/archive_read_open_filename.c | 20 +- .../libarchive/archive_read_open_memory.c | 3 +- .../cmlibarchive/libarchive/archive_read_private.h | 3 +- .../libarchive/archive_read_support_filter_lz4.c | 13 +- .../libarchive/archive_read_support_filter_lzop.c | 2 +- .../archive_read_support_filter_program.c | 2 + .../libarchive/archive_read_support_filter_uu.c | 44 +- .../libarchive/archive_read_support_filter_xz.c | 194 +- .../libarchive/archive_read_support_format_7zip.c | 39 +- .../libarchive/archive_read_support_format_ar.c | 22 +- .../libarchive/archive_read_support_format_cab.c | 15 +- .../libarchive/archive_read_support_format_cpio.c | 17 +- .../archive_read_support_format_iso9660.c | 40 +- .../libarchive/archive_read_support_format_lha.c | 13 +- .../libarchive/archive_read_support_format_mtree.c | 71 +- .../libarchive/archive_read_support_format_rar.c | 5 +- .../libarchive/archive_read_support_format_tar.c | 281 +- .../libarchive/archive_read_support_format_warc.c | 241 +- .../libarchive/archive_read_support_format_xar.c | 87 +- .../libarchive/archive_read_support_format_zip.c | 122 +- Utilities/cmlibarchive/libarchive/archive_string.c | 117 +- Utilities/cmlibarchive/libarchive/archive_string.h | 8 +- .../libarchive/archive_string_composition.h | 2 +- Utilities/cmlibarchive/libarchive/archive_util.c | 2 +- .../cmlibarchive/libarchive/archive_windows.c | 4 +- .../cmlibarchive/libarchive/archive_windows.h | 4 + Utilities/cmlibarchive/libarchive/archive_write.c | 8 +- .../libarchive/archive_write_add_filter_lz4.c | 4 +- .../libarchive/archive_write_add_filter_program.c | 1 + .../libarchive/archive_write_add_filter_xz.c | 2 +- .../libarchive/archive_write_disk_acl.c | 545 +- .../libarchive/archive_write_disk_posix.c | 588 +- .../archive_write_disk_set_standard_lookup.c | 6 +- .../libarchive/archive_write_disk_windows.c | 7 +- .../cmlibarchive/libarchive/archive_write_open.3 | 11 + .../libarchive/archive_write_open_memory.c | 3 +- .../libarchive/archive_write_set_format_7zip.c | 4 +- .../libarchive/archive_write_set_format_ar.c | 3 +- .../libarchive/archive_write_set_format_cpio.c | 2 +- .../archive_write_set_format_cpio_newc.c | 5 +- .../libarchive/archive_write_set_format_gnutar.c | 14 +- .../libarchive/archive_write_set_format_iso9660.c | 60 +- .../libarchive/archive_write_set_format_mtree.c | 4 +- .../libarchive/archive_write_set_format_pax.c | 183 +- .../libarchive/archive_write_set_format_shar.c | 3 +- .../libarchive/archive_write_set_format_ustar.c | 11 +- .../libarchive/archive_write_set_format_v7tar.c | 9 +- .../libarchive/archive_write_set_format_warc.c | 2 +- .../libarchive/archive_write_set_format_xar.c | 21 +- .../libarchive/archive_write_set_format_zip.c | 12 +- Utilities/cmlibarchive/libarchive/config_freebsd.h | 2 + .../cmlibarchive/libarchive/libarchive-formats.5 | 4 +- Utilities/cmlibarchive/libarchive/tar.5 | 11 +- Utilities/cmlibarchive/libarchive/xxhash.c | 6 +- Utilities/cmliblzma/CMakeLists.txt | 4 +- Utilities/cmlibuv/CMakeLists.txt | 45 + Utilities/cmlibuv/include/pthread-barrier.h | 2 + Utilities/cmlibuv/include/uv-os390.h | 3 + Utilities/cmlibuv/include/uv-posix.h | 31 + Utilities/cmlibuv/include/uv-unix.h | 21 +- Utilities/cmlibuv/include/uv-version.h | 4 +- Utilities/cmlibuv/include/uv-win.h | 1 + Utilities/cmlibuv/include/uv.h | 12 + Utilities/cmlibuv/src/threadpool.c | 35 +- Utilities/cmlibuv/src/unix/aix.c | 93 +- Utilities/cmlibuv/src/unix/async.c | 121 +- Utilities/cmlibuv/src/unix/atomic-ops.h | 27 +- Utilities/cmlibuv/src/unix/bsd-ifaddrs.c | 139 + Utilities/cmlibuv/src/unix/core.c | 102 +- Utilities/cmlibuv/src/unix/cygwin.c | 54 + Utilities/cmlibuv/src/unix/darwin.c | 104 - Utilities/cmlibuv/src/unix/freebsd.c | 114 - Utilities/cmlibuv/src/unix/fs.c | 69 +- Utilities/cmlibuv/src/unix/fsevents.c | 3 - Utilities/cmlibuv/src/unix/internal.h | 34 +- Utilities/cmlibuv/src/unix/kqueue.c | 36 +- Utilities/cmlibuv/src/unix/linux-core.c | 102 +- Utilities/cmlibuv/src/unix/linux-inotify.c | 67 + Utilities/cmlibuv/src/unix/loop.c | 38 +- Utilities/cmlibuv/src/unix/netbsd.c | 108 - Utilities/cmlibuv/src/unix/no-fsevents.c | 42 + Utilities/cmlibuv/src/unix/no-proctitle.c | 42 + Utilities/cmlibuv/src/unix/openbsd.c | 114 +- Utilities/cmlibuv/src/unix/os390-syscalls.c | 334 + Utilities/cmlibuv/src/unix/os390-syscalls.h | 69 + Utilities/cmlibuv/src/unix/os390.c | 807 +++ Utilities/cmlibuv/src/unix/pipe.c | 15 +- Utilities/cmlibuv/src/unix/poll.c | 4 +- Utilities/cmlibuv/src/unix/posix-hrtime.c | 35 + Utilities/cmlibuv/src/unix/posix-poll.c | 324 + Utilities/cmlibuv/src/unix/process.c | 4 +- Utilities/cmlibuv/src/unix/procfs-exepath.c | 45 + Utilities/cmlibuv/src/unix/proctitle.c | 6 + Utilities/cmlibuv/src/unix/pthread-barrier.c | 3 +- Utilities/cmlibuv/src/unix/signal.c | 108 +- Utilities/cmlibuv/src/unix/stream.c | 47 +- Utilities/cmlibuv/src/unix/sunos.c | 72 +- Utilities/cmlibuv/src/unix/sysinfo-loadavg.c | 36 + Utilities/cmlibuv/src/unix/sysinfo-memory.c | 42 + Utilities/cmlibuv/src/unix/thread.c | 32 +- Utilities/cmlibuv/src/unix/udp.c | 33 +- Utilities/cmlibuv/src/uv-common.c | 12 +- Utilities/cmlibuv/src/uv-common.h | 35 +- Utilities/cmlibuv/src/win/async.c | 3 +- Utilities/cmlibuv/src/win/atomicops-inl.h | 3 +- Utilities/cmlibuv/src/win/core.c | 25 +- Utilities/cmlibuv/src/win/detect-wakeup.c | 6 +- Utilities/cmlibuv/src/win/error.c | 1 + Utilities/cmlibuv/src/win/fs-event.c | 36 +- Utilities/cmlibuv/src/win/fs.c | 14 +- Utilities/cmlibuv/src/win/getaddrinfo.c | 7 +- Utilities/cmlibuv/src/win/getnameinfo.c | 3 +- Utilities/cmlibuv/src/win/internal.h | 23 +- Utilities/cmlibuv/src/win/pipe.c | 17 +- Utilities/cmlibuv/src/win/poll.c | 10 +- Utilities/cmlibuv/src/win/process-stdio.c | 1 + Utilities/cmlibuv/src/win/process.c | 5 +- Utilities/cmlibuv/src/win/req-inl.h | 9 +- Utilities/cmlibuv/src/win/signal.c | 161 +- Utilities/cmlibuv/src/win/stream-inl.h | 3 +- Utilities/cmlibuv/src/win/stream.c | 3 +- Utilities/cmlibuv/src/win/tcp.c | 13 +- Utilities/cmlibuv/src/win/tty.c | 96 +- Utilities/cmlibuv/src/win/udp.c | 6 +- Utilities/cmlibuv/src/win/util.c | 195 +- Utilities/cmlibuv/src/win/winapi.c | 2 +- Utilities/cmlibuv/src/win/winapi.h | 4 + Utilities/cmlibuv/src/win/winsock.c | 2 +- bootstrap | 192 +- 1980 files changed, 60312 insertions(+), 39299 deletions(-) create mode 100644 .clang-tidy create mode 100644 Help/dev/README.rst create mode 100644 Help/dev/maint.rst create mode 100644 Help/dev/review.rst create mode 100644 Help/dev/source.rst create mode 100644 Help/dev/testing.rst create mode 100644 Help/module/CPackArchive.rst create mode 100644 Help/module/CheckIPOSupported.rst create mode 100644 Help/module/GoogleTest.rst create mode 100644 Help/policy/CMP0068.rst create mode 100644 Help/policy/CMP0069.rst create mode 100644 Help/prop_gbl/AUTOGEN_SOURCE_GROUP.rst create mode 100644 Help/prop_gbl/AUTOMOC_SOURCE_GROUP.rst create mode 100644 Help/prop_gbl/AUTORCC_SOURCE_GROUP.rst create mode 100644 Help/prop_gbl/FIND_LIBRARY_USE_LIBX32_PATHS.rst create mode 100644 Help/prop_gbl/GENERATOR_IS_MULTI_CONFIG.rst create mode 100644 Help/prop_test/DISABLED.rst create mode 100644 Help/prop_tgt/AUTOGEN_BUILD_DIR.rst create mode 100644 Help/prop_tgt/AUTOMOC_DEPEND_FILTERS.rst create mode 100644 Help/prop_tgt/AUTOUIC_SEARCH_PATHS.rst create mode 100644 Help/prop_tgt/BUILD_WITH_INSTALL_NAME_DIR.rst create mode 100644 Help/prop_tgt/CUDA_PTX_COMPILATION.rst create mode 100644 Help/prop_tgt/CUDA_RESOLVE_DEVICE_SYMBOLS.rst create mode 100644 Help/prop_tgt/IMPORTED_OBJECTS.rst create mode 100644 Help/prop_tgt/IMPORTED_OBJECTS_CONFIG.rst create mode 100644 Help/release/3.9.rst create mode 100644 Help/variable/CMAKE_AUTOMOC_DEPEND_FILTERS.rst create mode 100644 Help/variable/CMAKE_AUTOUIC_SEARCH_PATHS.rst create mode 100644 Help/variable/CMAKE_BUILD_WITH_INSTALL_NAME_DIR.rst create mode 100644 Help/variable/CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX.rst create mode 100644 Help/variable/CMAKE_INTERPROCEDURAL_OPTIMIZATION.rst create mode 100644 Help/variable/CMAKE_INTERPROCEDURAL_OPTIMIZATION_CONFIG.rst create mode 100644 Help/variable/CMAKE_LANG_COMPILER_AR.rst create mode 100644 Help/variable/CMAKE_LANG_COMPILER_RANLIB.rst create mode 100644 Help/variable/CMAKE_MATCH_n.rst create mode 100644 Help/variable/CMAKE_PROJECT_DESCRIPTION.rst create mode 100644 Help/variable/CMAKE_SYSROOT_COMPILE.rst create mode 100644 Help/variable/CMAKE_SYSROOT_LINK.rst create mode 100644 Help/variable/CMAKE_VS_PLATFORM_TOOLSET_CUDA.rst create mode 100644 Help/variable/CMAKE_XCODE_GENERATE_SCHEME.rst create mode 100644 Help/variable/PROJECT_DESCRIPTION.rst delete mode 100644 Modules/CMakeVS7BackwardCompatibility.cmake create mode 100644 Modules/CPackArchive.cmake create mode 100644 Modules/CheckIPOSupported.cmake create mode 100644 Modules/CheckIPOSupported/CMakeLists-C.txt.in create mode 100644 Modules/CheckIPOSupported/CMakeLists-CXX.txt.in create mode 100644 Modules/CheckIPOSupported/CMakeLists-Fortran.txt.in create mode 100644 Modules/CheckIPOSupported/foo.c create mode 100644 Modules/CheckIPOSupported/foo.cpp create mode 100644 Modules/CheckIPOSupported/foo.f create mode 100644 Modules/CheckIPOSupported/main.c create mode 100644 Modules/CheckIPOSupported/main.cpp create mode 100644 Modules/CheckIPOSupported/main.f create mode 100644 Modules/Compiler/CMakeCommonCompilerMacros.cmake create mode 100644 Modules/Compiler/Clang-FindBinUtils.cmake create mode 100644 Modules/Compiler/Cray.cmake create mode 100644 Modules/Compiler/GNU-FindBinUtils.cmake create mode 100644 Modules/Compiler/SunPro-C-FeatureTests.cmake create mode 100644 Modules/Compiler/SunPro.cmake delete mode 100644 Modules/CompilerId/Xcode-1.pbxproj.in delete mode 100644 Modules/CompilerId/Xcode-2.pbxproj.in create mode 100644 Modules/FortranCInterface/MYMODULE.c create mode 100644 Modules/FortranCInterface/MY_MODULE.c create mode 100644 Modules/GoogleTest.cmake create mode 100644 Modules/Platform/Windows-PGI-C.cmake create mode 100644 Modules/Platform/Windows-PGI-Fortran.cmake create mode 100644 Modules/Platform/Windows-PGI.cmake create mode 100644 Source/CPack/IFW/cmCPackIFWCommon.cxx create mode 100644 Source/CPack/IFW/cmCPackIFWCommon.h create mode 100644 Source/Checks/cm_cxx_attribute_fallthrough.cxx create mode 100644 Source/Checks/cm_cxx_eq_delete.cxx create mode 100644 Source/Checks/cm_cxx_fallthrough.cxx create mode 100644 Source/Checks/cm_cxx_gnu_fallthrough.cxx create mode 100644 Source/LexerParser/.clang-tidy create mode 100644 Source/LexerParser/.gitattributes rename Source/{ => LexerParser}/cmCommandArgumentLexer.cxx (100%) rename Source/{ => LexerParser}/cmCommandArgumentLexer.h (100%) rename Source/{ => LexerParser}/cmCommandArgumentLexer.in.l (100%) create mode 100644 Source/LexerParser/cmCommandArgumentParser.cxx create mode 100644 Source/LexerParser/cmCommandArgumentParser.y create mode 100644 Source/LexerParser/cmCommandArgumentParserTokens.h rename Source/{ => LexerParser}/cmDependsJavaLexer.cxx (100%) rename Source/{ => LexerParser}/cmDependsJavaLexer.h (100%) rename Source/{ => LexerParser}/cmDependsJavaLexer.in.l (100%) create mode 100644 Source/LexerParser/cmDependsJavaParser.cxx create mode 100644 Source/LexerParser/cmDependsJavaParser.y create mode 100644 Source/LexerParser/cmDependsJavaParserTokens.h rename Source/{ => LexerParser}/cmExprLexer.cxx (100%) rename Source/{ => LexerParser}/cmExprLexer.h (100%) rename Source/{ => LexerParser}/cmExprLexer.in.l (100%) create mode 100644 Source/LexerParser/cmExprParser.cxx create mode 100644 Source/LexerParser/cmExprParser.y rename Source/{ => LexerParser}/cmExprParserTokens.h (100%) rename Source/{ => LexerParser}/cmFortranLexer.cxx (100%) rename Source/{ => LexerParser}/cmFortranLexer.h (100%) rename Source/{ => LexerParser}/cmFortranLexer.in.l (100%) create mode 100644 Source/LexerParser/cmFortranParser.cxx create mode 100644 Source/LexerParser/cmFortranParser.y create mode 100644 Source/LexerParser/cmFortranParserTokens.h create mode 100644 Source/LexerParser/cmListFileLexer.c create mode 100644 Source/LexerParser/cmListFileLexer.in.l rename Source/QtDialog/{CMake.desktop => cmake-gui.desktop} (100%) delete mode 100644 Source/cmCommandArgumentParser.cxx delete mode 100644 Source/cmCommandArgumentParser.y delete mode 100644 Source/cmCommandArgumentParserTokens.h delete mode 100644 Source/cmDependsJavaParser.cxx delete mode 100644 Source/cmDependsJavaParser.y delete mode 100644 Source/cmDependsJavaParserTokens.h create mode 100644 Source/cmDisallowedCommand.cxx create mode 100644 Source/cmDisallowedCommand.h delete mode 100644 Source/cmExprParser.cxx delete mode 100644 Source/cmExprParser.y delete mode 100644 Source/cmFortranParser.cxx delete mode 100644 Source/cmFortranParser.y delete mode 100644 Source/cmFortranParserTokens.h delete mode 100644 Source/cmListFileLexer.c delete mode 100644 Source/cmListFileLexer.in.l create mode 100644 Source/cmQtAutoGeneratorCommon.cxx create mode 100644 Source/cmQtAutoGeneratorCommon.h delete mode 100644 Source/cmStandardIncludes.h create mode 100644 Source/cmVS10CudaFlagTable.h create mode 100644 Source/cmVS10CudaHostFlagTable.h create mode 100644 Source/cmVS10NASMFlagTable.h create mode 100644 Source/cmWorkingDirectory.cxx create mode 100644 Source/cmWorkingDirectory.h create mode 100644 Source/cmXCodeScheme.cxx create mode 100644 Source/cmXCodeScheme.h create mode 100644 Source/cm_sys_stat.h create mode 100644 Templates/MSBuild/nasm.props.in create mode 100644 Templates/MSBuild/nasm.targets create mode 100644 Templates/MSBuild/nasm.xml delete mode 100644 Tests/CMakeCommands/target_compile_features/dummy.cpp copy Tests/CMakeOnly/find_library/lib/{64 => A/libXYZ}/libtest2.a (100%) copy Tests/CMakeOnly/find_library/lib/A/{lib32 => libx32}/libtest3.a (100%) copy Tests/CMakeOnly/find_library/lib/{A/lib => XYZ}/libtest1.a (100%) copy Tests/CMakeOnly/find_library/lib/{64 => x32}/libtest2.a (100%) copy Tests/CMakeOnly/find_library/{lib32/A/lib32 => libXYZ/A/lib}/libtest4.a (100%) copy Tests/CMakeOnly/find_library/{lib/32 => libXYZ/A/libXYZ}/libtest5.a (100%) rename Tests/{RunCMake/CommandLine/DeprecateVS71-WARN-OFF.cmake => CMakeOnly/find_library/libXYZ/A/libtest6.a} (100%) rename Tests/{RunCMake/CommandLine/DeprecateVS71-WARN-ON.cmake => CMakeOnly/find_library/libXYZ/libtest7.a} (100%) copy Tests/CMakeOnly/find_library/{lib/64 => libx32/A/lib}/libtest2.a (100%) copy Tests/CMakeOnly/find_library/{lib/A/lib => libx32/A}/libtest1.a (100%) copy Tests/CMakeOnly/find_library/{lib/A/lib => libx32/A/libx32}/libtest1.a (100%) copy Tests/CMakeOnly/find_library/{lib/A/lib => libx32}/libtest1.a (100%) delete mode 100644 Tests/CMakeTests/SeparateArgumentsTest.cmake.in create mode 100644 Tests/CudaOnly/ExportPTX/CMakeLists.txt create mode 100644 Tests/CudaOnly/ExportPTX/bin2c_wrapper.cmake create mode 100644 Tests/CudaOnly/ExportPTX/kernelA.cu create mode 100644 Tests/CudaOnly/ExportPTX/kernelB.cu create mode 100644 Tests/CudaOnly/ExportPTX/main.cu create mode 100644 Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt copy Tests/{Cuda/Complex => CudaOnly/ResolveDeviceSymbols}/file1.cu (100%) copy Tests/{Cuda/Complex => CudaOnly/ResolveDeviceSymbols}/file1.h (100%) create mode 100644 Tests/CudaOnly/ResolveDeviceSymbols/file2.cu copy Tests/{Cuda/Complex => CudaOnly/ResolveDeviceSymbols}/file2.h (100%) create mode 100644 Tests/CudaOnly/ResolveDeviceSymbols/main.cu create mode 100644 Tests/CudaOnly/ResolveDeviceSymbols/verify.cmake create mode 100644 Tests/CudaOnly/WithDefs/main_for_vs.cu create mode 100644 Tests/ExportImport/Export/sub/testLib8C.c create mode 100644 Tests/ExportImport/Export/testLib8A.c create mode 100644 Tests/ExportImport/Export/testLib8B.c create mode 100644 Tests/ExportImport/Import/A/imp_testLib8.c create mode 100644 Tests/FindDoxygen/CMakeLists.txt create mode 100644 Tests/FindDoxygen/DotComponentTestTest/CMakeLists.txt create mode 100644 Tests/FindDoxygen/SimpleTest/CMakeLists.txt create mode 100644 Tests/FindDoxygen/SimpleTest/main.cpp create mode 100644 Tests/FindDoxygen/SimpleTest/spaces_in_name.cpp.in create mode 100644 Tests/FindMPI/CMakeLists.txt create mode 100644 Tests/FindMPI/Test/CMakeLists.txt create mode 100644 Tests/FindMPI/Test/main.c create mode 100644 Tests/FindMPI/Test/main.f90 create mode 100644 Tests/FindOpenMP/CMakeLists.txt create mode 100644 Tests/FindOpenMP/Test/CMakeLists.txt create mode 100644 Tests/FindOpenMP/Test/main.c create mode 100644 Tests/FindOpenMP/Test/main.f90.in create mode 100644 Tests/FindOpenMP/Test/scalprod.c create mode 100644 Tests/FindOpenMP/Test/scalprod.f90.in create mode 100644 Tests/FindOpenMP/Test/scaltest.c create mode 100644 Tests/FindOpenMP/Test/scaltest.f90.in create mode 100644 Tests/FindProtobuf/CMakeLists.txt create mode 100644 Tests/FindProtobuf/Test/CMakeLists.txt create mode 100644 Tests/FindProtobuf/Test/main-protoc.cxx create mode 100644 Tests/FindProtobuf/Test/main.cxx create mode 100644 Tests/GeneratorExpression/check_object_files.cmake create mode 100644 Tests/GeneratorExpression/objlib1.c create mode 100644 Tests/GeneratorExpression/objlib2.c create mode 100644 Tests/GoogleTest/CMakeLists.txt create mode 100644 Tests/GoogleTest/Test/CMakeLists.txt create mode 100644 Tests/GoogleTest/Test/main1.cxx create mode 100644 Tests/GoogleTest/Test/main2.cxx create mode 100644 Tests/GoogleTest/Test/main2.h create mode 100644 Tests/GoogleTest/Test/main3.cxx create mode 100644 Tests/GoogleTest/Test/main4.cxx create mode 100644 Tests/GoogleTest/Test/main4.h create mode 100644 Tests/Module/CheckIPOSupported-C/CMakeLists.txt create mode 100644 Tests/Module/CheckIPOSupported-C/foo.c create mode 100644 Tests/Module/CheckIPOSupported-C/main.c create mode 100644 Tests/Module/CheckIPOSupported-CXX/CMakeLists.txt create mode 100644 Tests/Module/CheckIPOSupported-CXX/foo.cpp create mode 100644 Tests/Module/CheckIPOSupported-CXX/main.cpp create mode 100644 Tests/Module/CheckIPOSupported-Fortran/CMakeLists.txt create mode 100644 Tests/Module/CheckIPOSupported-Fortran/foo.f create mode 100644 Tests/Module/CheckIPOSupported-Fortran/main.f create mode 100644 Tests/ModuleDefinition/split_dll.c create mode 100644 Tests/ModuleDefinition/split_dll_1.def create mode 100644 Tests/ModuleDefinition/split_dll_2.def delete mode 100644 Tests/QtAutogen/automoc_rerun/CMakeLists.txt delete mode 100644 Tests/QtAutogen/automoc_rerun/test1.cpp delete mode 100644 Tests/QtAutogen/automoc_rerun/test1.h.in1 delete mode 100644 Tests/QtAutogen/automoc_rerun/test1.h.in2 delete mode 100644 Tests/QtAutogen/autorcc_depends/CMakeLists.txt delete mode 100644 Tests/QtAutogen/autorcc_depends/res1.qrc.in create mode 100644 Tests/QtAutogen/mocDepends/CMakeLists.txt create mode 100644 Tests/QtAutogen/mocDepends/invalid.hpp.in create mode 100644 Tests/QtAutogen/mocDepends/object.hpp.in create mode 100644 Tests/QtAutogen/mocDepends/simpleLib.cpp.in create mode 100644 Tests/QtAutogen/mocDepends/simpleLib.hpp.in create mode 100644 Tests/QtAutogen/mocDepends/test1.cpp create mode 100644 Tests/QtAutogen/mocDepends/test2.cpp create mode 100644 Tests/QtAutogen/mocDepends/test2.hpp create mode 100644 Tests/QtAutogen/mocInclude/ObjA.cpp create mode 100644 Tests/QtAutogen/mocInclude/ObjA.hpp create mode 100644 Tests/QtAutogen/mocInclude/ObjB.cpp create mode 100644 Tests/QtAutogen/mocInclude/ObjB.hpp create mode 100644 Tests/QtAutogen/mocInclude/ObjC.cpp create mode 100644 Tests/QtAutogen/mocInclude/ObjC.hpp create mode 100644 Tests/QtAutogen/mocInclude/ObjD.cpp create mode 100644 Tests/QtAutogen/mocInclude/ObjD.hpp create mode 100644 Tests/QtAutogen/mocInclude/subA/SubObjA.cpp create mode 100644 Tests/QtAutogen/mocInclude/subA/SubObjA.hpp create mode 100644 Tests/QtAutogen/mocInclude/subB/SubObjB.cpp create mode 100644 Tests/QtAutogen/mocInclude/subB/SubObjB.hpp create mode 100644 Tests/QtAutogen/mocInclude/subC/SubObjC.cpp create mode 100644 Tests/QtAutogen/mocInclude/subC/SubObjC.hpp create mode 100644 Tests/QtAutogen/mocIncludeRelaxed/CMakeLists.txt create mode 100644 Tests/QtAutogen/mocIncludeRelaxed/main.cpp create mode 100644 Tests/QtAutogen/mocIncludeStrict/CMakeLists.txt create mode 100644 Tests/QtAutogen/mocIncludeStrict/main.cpp create mode 100644 Tests/QtAutogen/mocPlugin/CMakeLists.txt create mode 100644 Tests/QtAutogen/mocPlugin/StyleA.cpp create mode 100644 Tests/QtAutogen/mocPlugin/StyleA.hpp create mode 100644 Tests/QtAutogen/mocPlugin/StyleA.json create mode 100644 Tests/QtAutogen/mocPlugin/StyleA_Custom.json create mode 100644 Tests/QtAutogen/mocPlugin/StyleB.cpp create mode 100644 Tests/QtAutogen/mocPlugin/StyleB.hpp create mode 100644 Tests/QtAutogen/mocPlugin/StyleC.cpp create mode 100644 Tests/QtAutogen/mocPlugin/StyleC.hpp create mode 100644 Tests/QtAutogen/mocPlugin/StyleCommon.hpp create mode 100644 Tests/QtAutogen/mocPlugin/StyleD.cpp create mode 100644 Tests/QtAutogen/mocPlugin/StyleD.hpp create mode 100644 Tests/QtAutogen/mocPlugin/StyleE.cpp create mode 100644 Tests/QtAutogen/mocPlugin/StyleE.hpp create mode 100644 Tests/QtAutogen/mocPlugin/jsonIn/StyleB.json create mode 100644 Tests/QtAutogen/mocPlugin/jsonIn/StyleB_Custom.json create mode 100644 Tests/QtAutogen/mocPlugin/jsonIn/StyleC.json create mode 100644 Tests/QtAutogen/mocPlugin/jsonIn/StyleD.json create mode 100644 Tests/QtAutogen/mocPlugin/main.cpp create mode 100644 Tests/QtAutogen/mocRerun/CMakeLists.txt rename Tests/QtAutogen/{automoc_rerun => mocRerun}/input.txt (100%) create mode 100644 Tests/QtAutogen/mocRerun/main.cpp.in rename Tests/QtAutogen/{automoc_rerun => mocRerun}/res1.qrc (100%) create mode 100644 Tests/QtAutogen/mocRerun/test1a.h.in create mode 100644 Tests/QtAutogen/mocRerun/test1b.h.in create mode 100644 Tests/QtAutogen/rccDepends/CMakeLists.txt rename Tests/QtAutogen/{autorcc_depends/test_res1.cpp => rccDepends/main.cpp} (100%) rename Tests/QtAutogen/{autorcc_depends/res1/input.txt.in => rccDepends/res/input1.txt.in} (100%) create mode 100644 Tests/QtAutogen/rccDepends/res/input2.txt.in create mode 100644 Tests/QtAutogen/rccDepends/res1a.qrc.in create mode 100644 Tests/QtAutogen/rccDepends/res1b.qrc.in create mode 100644 Tests/QtAutogen/rccDepends/res2a.qrc.in create mode 100644 Tests/QtAutogen/rccDepends/res2b.qrc.in create mode 100644 Tests/QtAutogen/uicInclude/CMakeLists.txt create mode 100644 Tests/QtAutogen/uicInclude/PageC.ui create mode 100644 Tests/QtAutogen/uicInclude/dirA/PageA.ui create mode 100644 Tests/QtAutogen/uicInclude/dirB/sub/PageB.ui create mode 100644 Tests/QtAutogen/uicInclude/main.cpp create mode 100644 Tests/QtAutogen/uicInclude/main.hpp create mode 100644 Tests/RunCMake/AutoExportDll/nop.asm create mode 100644 Tests/RunCMake/BuildDepends/MakeCustomIncludes.cmake create mode 100644 Tests/RunCMake/BuildDepends/MakeCustomIncludes.cxx create mode 100644 Tests/RunCMake/BuildDepends/MakeCustomIncludes.step1.cmake create mode 100644 Tests/RunCMake/BuildDepends/MakeCustomIncludes.step2.cmake create mode 100644 Tests/RunCMake/CMP0019/CMP0019-OLD-stderr.txt create mode 100644 Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt create mode 100644 Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt create mode 100644 Tests/RunCMake/CMP0026/CMP0026-OLD-stderr.txt create mode 100644 Tests/RunCMake/CMP0026/CMP0026-OLD.cmake create mode 100644 Tests/RunCMake/CMP0026/clear-cached-information-stderr.txt create mode 100644 Tests/RunCMake/CMP0028/CMP0028-OLD-iface-stderr.txt create mode 100644 Tests/RunCMake/CMP0028/CMP0028-OLD-stderr.txt copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CMP0068/CMP0068-NEW-result.txt} (100%) create mode 100644 Tests/RunCMake/CMP0068/CMP0068-NEW.cmake copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CMP0068/CMP0068-OLD-result.txt} (100%) create mode 100644 Tests/RunCMake/CMP0068/CMP0068-OLD.cmake copy Tests/RunCMake/{CMP0022/CMP0022-WARN-empty-old-result.txt => CMP0068/CMP0068-WARN-result.txt} (100%) create mode 100644 Tests/RunCMake/CMP0068/CMP0068-WARN-stderr.txt create mode 100644 Tests/RunCMake/CMP0068/CMP0068-WARN.cmake create mode 100644 Tests/RunCMake/CMP0068/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0068/RunCMakeTest.cmake copy Tests/{ExportImport/Export => RunCMake/CMP0068}/empty.cpp (100%) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CMP0069/CMP0069-NEW-cmake-result.txt} (100%) create mode 100644 Tests/RunCMake/CMP0069/CMP0069-NEW-cmake-stderr.txt create mode 100644 Tests/RunCMake/CMP0069/CMP0069-NEW-cmake.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CMP0069/CMP0069-NEW-compiler-result.txt} (100%) create mode 100644 Tests/RunCMake/CMP0069/CMP0069-NEW-compiler-stderr.txt create mode 100644 Tests/RunCMake/CMP0069/CMP0069-NEW-compiler.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CMP0069/CMP0069-NEW-generator-result.txt} (100%) create mode 100644 Tests/RunCMake/CMP0069/CMP0069-NEW-generator-stderr.txt create mode 100644 Tests/RunCMake/CMP0069/CMP0069-NEW-generator.cmake create mode 100644 Tests/RunCMake/CMP0069/CMP0069-OLD.cmake create mode 100644 Tests/RunCMake/CMP0069/CMP0069-WARN-stderr.txt create mode 100644 Tests/RunCMake/CMP0069/CMP0069-WARN.cmake create mode 100644 Tests/RunCMake/CMP0069/CMakeLists.txt create mode 100644 Tests/RunCMake/CMP0069/RunCMakeTest.cmake copy Tests/{CTestCoverageCollectGCOV/TestProject => RunCMake/CMP0069}/main.cpp (100%) create mode 100644 Tests/RunCMake/CPack/tests/EXTRA_SLASH_IN_PATH/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/EXTRA_SLASH_IN_PATH/VerifyResult.cmake create mode 100644 Tests/RunCMake/CPack/tests/EXTRA_SLASH_IN_PATH/test.cmake create mode 100644 Tests/RunCMake/CPack/tests/SYMLINKS/ExpectedFiles.cmake create mode 100644 Tests/RunCMake/CPack/tests/SYMLINKS/TGZ-Prerequirements.cmake create mode 100644 Tests/RunCMake/CPack/tests/SYMLINKS/VerifyResult.cmake create mode 100644 Tests/RunCMake/CPack/tests/SYMLINKS/test.cmake create mode 100644 Tests/RunCMake/CheckIPOSupported/CMakeLists.txt create mode 100644 Tests/RunCMake/CheckIPOSupported/RunCMakeTest.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CheckIPOSupported/cmp0069-is-old-result.txt} (100%) create mode 100644 Tests/RunCMake/CheckIPOSupported/cmp0069-is-old-stderr.txt create mode 100644 Tests/RunCMake/CheckIPOSupported/cmp0069-is-old.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CheckIPOSupported/default-lang-none-result.txt} (100%) create mode 100644 Tests/RunCMake/CheckIPOSupported/default-lang-none-stderr.txt create mode 100644 Tests/RunCMake/CheckIPOSupported/default-lang-none.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CheckIPOSupported/not-supported-by-cmake-result.txt} (100%) create mode 100644 Tests/RunCMake/CheckIPOSupported/not-supported-by-cmake-stderr.txt create mode 100644 Tests/RunCMake/CheckIPOSupported/not-supported-by-cmake.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CheckIPOSupported/not-supported-by-compiler-result.txt} (100%) create mode 100644 Tests/RunCMake/CheckIPOSupported/not-supported-by-compiler-stderr.txt create mode 100644 Tests/RunCMake/CheckIPOSupported/not-supported-by-compiler.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CheckIPOSupported/not-supported-by-generator-result.txt} (100%) create mode 100644 Tests/RunCMake/CheckIPOSupported/not-supported-by-generator-stderr.txt create mode 100644 Tests/RunCMake/CheckIPOSupported/not-supported-by-generator.cmake create mode 100644 Tests/RunCMake/CheckIPOSupported/save-to-result.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CheckIPOSupported/unparsed-arguments-result.txt} (100%) create mode 100644 Tests/RunCMake/CheckIPOSupported/unparsed-arguments-stderr.txt create mode 100644 Tests/RunCMake/CheckIPOSupported/unparsed-arguments.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CheckIPOSupported/user-lang-unknown-result.txt} (100%) create mode 100644 Tests/RunCMake/CheckIPOSupported/user-lang-unknown-stderr.txt create mode 100644 Tests/RunCMake/CheckIPOSupported/user-lang-unknown.cmake delete mode 100644 Tests/RunCMake/CommandLine/DeprecateVS71-WARN-ON-stderr.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/DeprecateVS8-WARN-OFF.cmake (100%) create mode 100644 Tests/RunCMake/CommandLine/DeprecateVS8-WARN-ON-stderr.txt copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CommandLine/DeprecateVS8-WARN-ON.cmake (100%) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => CommandLine/reject_fifo-result.txt} (100%) create mode 100644 Tests/RunCMake/CommandLine/reject_fifo-stderr.txt create mode 100644 Tests/RunCMake/DisallowedCommands/CMP0029-OLD-stderr.txt create mode 100644 Tests/RunCMake/FeatureSummary/FeatureSummaryCustomDescription-stdout.txt create mode 100644 Tests/RunCMake/FeatureSummary/FeatureSummaryCustomDescription.cmake create mode 100644 Tests/RunCMake/FeatureSummary/FeatureSummaryDefaultDescription-stdout.txt create mode 100644 Tests/RunCMake/FeatureSummary/FeatureSummaryDefaultDescription.cmake copy Tests/RunCMake/FindPkgConfig/pc-bar/{lib/i386-linux-gnu => libx32}/pkgconfig/.placeholder (100%) copy Tests/RunCMake/FindPkgConfig/{pc-bar/lib/i386-linux-gnu => pc-foo/libx32}/pkgconfig/.placeholder (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/Framework/deepresource.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/Framework/flatresource.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/Framework/some.txt (100%) create mode 100644 Tests/RunCMake/GNUInstallDirs/Opt-BSD-stderr.txt create mode 100644 Tests/RunCMake/GNUInstallDirs/Root-BSD-stderr.txt create mode 100644 Tests/RunCMake/GNUInstallDirs/Usr-BSD-stderr.txt create mode 100644 Tests/RunCMake/GNUInstallDirs/UsrLocal-BSD-stderr.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => GeneratorExpression/ImportedTarget-TARGET_BUNDLE_CONTENT_DIR-result.txt} (100%) create mode 100644 Tests/RunCMake/GeneratorExpression/ImportedTarget-TARGET_BUNDLE_CONTENT_DIR-stderr.txt create mode 100644 Tests/RunCMake/GeneratorExpression/ImportedTarget-TARGET_BUNDLE_CONTENT_DIR.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => GeneratorExpression/ImportedTarget-TARGET_BUNDLE_DIR-result.txt} (100%) create mode 100644 Tests/RunCMake/GeneratorExpression/ImportedTarget-TARGET_BUNDLE_DIR-stderr.txt create mode 100644 Tests/RunCMake/GeneratorExpression/ImportedTarget-TARGET_BUNDLE_DIR.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => GeneratorExpression/NonValidTarget-TARGET_BUNDLE_CONTENT_DIR-result.txt} (100%) create mode 100644 Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_BUNDLE_CONTENT_DIR-stderr.txt create mode 100644 Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_BUNDLE_CONTENT_DIR.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => GeneratorExpression/NonValidTarget-TARGET_BUNDLE_DIR-result.txt} (100%) create mode 100644 Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_BUNDLE_DIR-stderr.txt create mode 100644 Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_BUNDLE_DIR.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => GeneratorToolset/BadToolsetFormat-result.txt} (100%) create mode 100644 Tests/RunCMake/GeneratorToolset/BadToolsetFormat-stderr.txt copy Tests/RunCMake/{GeneratorPlatform/BadPlatform.cmake => GeneratorToolset/BadToolsetFormat.cmake} (100%) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => GeneratorToolset/BadToolsetHostArchTwice-result.txt} (100%) create mode 100644 Tests/RunCMake/GeneratorToolset/BadToolsetHostArchTwice-stderr.txt copy Tests/RunCMake/{GeneratorPlatform/BadPlatform.cmake => GeneratorToolset/BadToolsetHostArchTwice.cmake} (100%) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => GeneratorToolset/BadToolsetHostArchXcode-result.txt} (100%) copy Tests/RunCMake/GeneratorToolset/{BadToolsetHostArch-stderr.txt => BadToolsetHostArchXcode-stderr.txt} (100%) copy Tests/RunCMake/{GeneratorPlatform/BadPlatform.cmake => GeneratorToolset/BadToolsetHostArchXcode.cmake} (100%) create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetCudaBoth-stdout.txt create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetCudaBoth.cmake create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly-stdout.txt create mode 100644 Tests/RunCMake/GeneratorToolset/TestToolsetCudaOnly.cmake create mode 100644 Tests/RunCMake/Ninja/AssumedSources.cmake create mode 100644 Tests/RunCMake/Ninja/CommandConcat.cmake create mode 100644 Tests/RunCMake/Ninja/LooseObjectDepends.cmake create mode 100644 Tests/RunCMake/Ninja/dep.c create mode 100644 Tests/RunCMake/Ninja/top.c create mode 100644 Tests/RunCMake/ObjectLibrary/Dependencies.cmake delete mode 100644 Tests/RunCMake/ObjectLibrary/Export-result.txt delete mode 100644 Tests/RunCMake/ObjectLibrary/Export-stderr.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => ObjectLibrary/ExportNotSupported-result.txt} (100%) create mode 100644 Tests/RunCMake/ObjectLibrary/ExportNotSupported-stderr.txt copy Tests/RunCMake/ObjectLibrary/{Export.cmake => ExportNotSupported.cmake} (100%) delete mode 100644 Tests/RunCMake/ObjectLibrary/Import-result.txt delete mode 100644 Tests/RunCMake/ObjectLibrary/Import-stderr.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => ObjectLibrary/ImportNotSupported-result.txt} (100%) create mode 100644 Tests/RunCMake/ObjectLibrary/ImportNotSupported-stderr.txt copy Tests/RunCMake/ObjectLibrary/{Import.cmake => ImportNotSupported.cmake} (100%) delete mode 100644 Tests/RunCMake/ObjectLibrary/Install-result.txt delete mode 100644 Tests/RunCMake/ObjectLibrary/Install-stderr.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => ObjectLibrary/InstallNotSupported-result.txt} (100%) create mode 100644 Tests/RunCMake/ObjectLibrary/InstallNotSupported-stderr.txt copy Tests/RunCMake/ObjectLibrary/{Install.cmake => InstallNotSupported.cmake} (100%) create mode 100644 Tests/RunCMake/ObjectLibrary/b.c create mode 100644 Tests/RunCMake/ObjectLibrary/depends_lib.c create mode 100644 Tests/RunCMake/ObjectLibrary/depends_main.c create mode 100644 Tests/RunCMake/ObjectLibrary/depends_obj0.c create mode 100644 Tests/RunCMake/ObjectLibrary/depends_obj1.c delete mode 100644 Tests/RunCMake/TargetObjects/BadContext-result.txt delete mode 100644 Tests/RunCMake/TargetObjects/BadContext-stderr.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => TargetObjects/NoTarget-result.txt} (100%) create mode 100644 Tests/RunCMake/TargetObjects/NoTarget-stderr.txt rename Tests/RunCMake/TargetObjects/{BadContext.cmake => NoTarget.cmake} (100%) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => TargetObjects/NotObjlibTarget-result.txt} (100%) create mode 100644 Tests/RunCMake/TargetObjects/NotObjlibTarget-stderr.txt create mode 100644 Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake create mode 100644 Tests/RunCMake/TargetObjects/empty.cpp create mode 100644 Tests/RunCMake/TargetSources/CMP0026-LOCATION-stderr.txt create mode 100644 Tests/RunCMake/XcodeProject/XcodeSchemaGeneration.cmake create mode 100644 Tests/RunCMake/ctest_disabled_test/CMakeLists.txt.in create mode 100644 Tests/RunCMake/ctest_disabled_test/CTestConfig.cmake.in copy Tests/RunCMake/{ctest_build/BuildFailure-result.txt => ctest_disabled_test/DisableAllTests-result.txt} (100%) copy Tests/RunCMake/{CTestCommandLine/test-load-fail-stderr.txt => ctest_disabled_test/DisableAllTests-stderr.txt} (100%) create mode 100644 Tests/RunCMake/ctest_disabled_test/DisableAllTests-stdout.txt create mode 100644 Tests/RunCMake/ctest_disabled_test/DisableCleanupTest-stdout.txt create mode 100644 Tests/RunCMake/ctest_disabled_test/DisableFailingTest-stdout.txt copy Tests/RunCMake/{ctest_build/BuildFailure-result.txt => ctest_disabled_test/DisableNotRunTest-result.txt} (100%) create mode 100644 Tests/RunCMake/ctest_disabled_test/DisableNotRunTest-stderr.txt create mode 100644 Tests/RunCMake/ctest_disabled_test/DisableNotRunTest-stdout.txt create mode 100644 Tests/RunCMake/ctest_disabled_test/DisableRequiredTest-stdout.txt create mode 100644 Tests/RunCMake/ctest_disabled_test/DisableSetupTest-stdout.txt copy Tests/RunCMake/{ctest_build/BuildFailure-result.txt => ctest_disabled_test/DisabledTest-result.txt} (100%) create mode 100644 Tests/RunCMake/ctest_disabled_test/DisabledTest-stderr.txt create mode 100644 Tests/RunCMake/ctest_disabled_test/DisabledTest-stdout.txt create mode 100644 Tests/RunCMake/ctest_disabled_test/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/ctest_disabled_test/test.cmake.in create mode 100644 Tests/RunCMake/ctest_fixtures/exclude_any_bar-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/exclude_any_foo-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/exclude_any_foobar-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/exclude_cleanup_bar-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/exclude_cleanup_foo-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/exclude_setup_bar-stdout.txt create mode 100644 Tests/RunCMake/ctest_fixtures/exclude_setup_foo-stdout.txt create mode 100644 Tests/RunCMake/ctest_skipped_test/CMakeLists.txt.in create mode 100644 Tests/RunCMake/ctest_skipped_test/CTestConfig.cmake.in create mode 100644 Tests/RunCMake/ctest_skipped_test/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/ctest_skipped_test/SkipCleanupTest-stdout.txt create mode 100644 Tests/RunCMake/ctest_skipped_test/SkipRequiredTest-stdout.txt create mode 100644 Tests/RunCMake/ctest_skipped_test/SkipSetupTest-stdout.txt create mode 100644 Tests/RunCMake/ctest_skipped_test/SkipTest-stdout.txt create mode 100755 Tests/RunCMake/ctest_skipped_test/skip.bat create mode 100755 Tests/RunCMake/ctest_skipped_test/skip.sh create mode 100644 Tests/RunCMake/ctest_skipped_test/test.cmake.in copy Tests/RunCMake/{ctest_build/BuildFailure-result.txt => ctest_submit/CDashSubmitHeaders-result.txt} (100%) copy Tests/RunCMake/ctest_submit/{CDashSubmitQuiet-stderr.txt => CDashSubmitHeaders-stderr.txt} (100%) create mode 100644 Tests/RunCMake/ctest_submit/CDashSubmitHeaders-stdout.txt copy Tests/RunCMake/{ctest_build/BuildFailure-result.txt => ctest_submit/CDashUploadHeaders-result.txt} (100%) create mode 100644 Tests/RunCMake/ctest_submit/CDashUploadHeaders-stderr.txt create mode 100644 Tests/RunCMake/ctest_submit/CDashUploadHeaders-stdout.txt copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => file/INSTALL-FILES_FROM_DIR-bad-result.txt} (100%) create mode 100644 Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad-stderr.txt create mode 100644 Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-bad.cmake create mode 100644 Tests/RunCMake/file/INSTALL-FILES_FROM_DIR-stdout.txt create mode 100644 Tests/RunCMake/file/INSTALL-FILES_FROM_DIR.cmake create mode 100644 Tests/RunCMake/file/INSTALL-SYMLINK-stdout.txt create mode 100644 Tests/RunCMake/file/INSTALL-SYMLINK.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => file/READ_ELF-result.txt} (100%) create mode 100644 Tests/RunCMake/file/READ_ELF-stderr.txt create mode 100644 Tests/RunCMake/file/READ_ELF.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/file/from/a.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/file/from/a/b.txt (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/file/from/a/b/c.txt (100%) delete mode 100644 Tests/RunCMake/find_dependency/EXACT-no-version-result.txt delete mode 100644 Tests/RunCMake/find_dependency/EXACT-no-version-stderr.txt delete mode 100644 Tests/RunCMake/find_dependency/EXACT-no-version.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => find_dependency/bad-version-exact-result.txt} (100%) create mode 100644 Tests/RunCMake/find_dependency/bad-version-exact-stderr.txt create mode 100644 Tests/RunCMake/find_dependency/bad-version-exact.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => find_dependency/bad-version-fuzzy-result.txt} (100%) create mode 100644 Tests/RunCMake/find_dependency/bad-version-fuzzy-stderr.txt create mode 100644 Tests/RunCMake/find_dependency/bad-version-fuzzy.cmake create mode 100644 Tests/RunCMake/find_dependency/basic.cmake delete mode 100644 Tests/RunCMake/find_dependency/empty-arg-3-result.txt delete mode 100644 Tests/RunCMake/find_dependency/empty-arg-3-stderr.txt delete mode 100644 Tests/RunCMake/find_dependency/empty-arg-3.cmake delete mode 100644 Tests/RunCMake/find_dependency/empty-version-result.txt delete mode 100644 Tests/RunCMake/find_dependency/empty-version-stderr.txt delete mode 100644 Tests/RunCMake/find_dependency/empty-version.cmake delete mode 100644 Tests/RunCMake/find_dependency/extra-args-result.txt delete mode 100644 Tests/RunCMake/find_dependency/extra-args-stderr.txt delete mode 100644 Tests/RunCMake/find_dependency/extra-args.cmake delete mode 100644 Tests/RunCMake/find_dependency/invalid-arg-3-result.txt delete mode 100644 Tests/RunCMake/find_dependency/invalid-arg-3-stderr.txt delete mode 100644 Tests/RunCMake/find_dependency/invalid-arg-3.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => find_dependency/invalid-arg-result.txt} (100%) create mode 100644 Tests/RunCMake/find_dependency/invalid-arg-stderr.txt create mode 100644 Tests/RunCMake/find_dependency/invalid-arg.cmake create mode 100644 Tests/RunCMake/find_dependency/realistic.cmake rename Tests/RunCMake/find_dependency/{ => share/cmake}/Pack1/Pack1Config.cmake (100%) rename Tests/RunCMake/find_dependency/{ => share/cmake}/Pack1/Pack1ConfigVersion.cmake (100%) create mode 100644 Tests/RunCMake/find_dependency/share/cmake/Pack2/Pack2Config.cmake copy Tests/{Module/FindDependency/packages/Pack1/Pack1ConfigVersion.cmake => RunCMake/find_dependency/share/cmake/Pack2/Pack2ConfigVersion.cmake} (100%) create mode 100644 Tests/RunCMake/find_package/MissingConfig-stdout.txt create mode 100644 Tests/RunCMake/find_package/MissingConfigNormal-stdout.txt delete mode 100644 Tests/RunCMake/find_package/MissingConfigOneName-stderr.txt create mode 100644 Tests/RunCMake/find_package/MissingConfigOneName-stdout.txt delete mode 100644 Tests/RunCMake/find_package/MissingConfigVersion-stderr.txt create mode 100644 Tests/RunCMake/find_package/MissingConfigVersion-stdout.txt create mode 100644 Tests/RunCMake/find_package/PackageRoot-stderr.txt create mode 100644 Tests/RunCMake/find_package/PackageRoot.cmake create mode 100644 Tests/RunCMake/find_package/PackageRoot/FindBar.cmake create mode 100644 Tests/RunCMake/find_package/PackageRoot/FindFoo.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/bar/cmake_root/bin/bar.exe (100%) mode change 100644 => 100755 copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/bar/cmake_root/include/bar.h (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/bar/env_root/bin/bar.exe (100%) mode change 100644 => 100755 copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/bar/env_root/include/bar.h (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/foo/cmake_root/bin/bar.exe (100%) mode change 100644 => 100755 copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/foo/cmake_root/bin/foo.exe (100%) mode change 100644 => 100755 copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/foo/cmake_root/include/bar.h (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/foo/cmake_root/include/foo.h (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/foo/env_root/bin/bar.exe (100%) mode change 100644 => 100755 copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/foo/env_root/bin/foo.exe (100%) mode change 100644 => 100755 copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/foo/env_root/include/bar.h (100%) copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/find_package/PackageRoot/foo/env_root/include/foo.h (100%) delete mode 100644 Tests/RunCMake/find_package/SetFoundFALSE-stderr.txt create mode 100644 Tests/RunCMake/find_package/SetFoundFALSE-stdout.txt create mode 100644 Tests/RunCMake/get_property/IsMultiConfig-stdout.txt create mode 100644 Tests/RunCMake/get_property/IsMultiConfig.cmake create mode 100644 Tests/RunCMake/get_property/NotMultiConfig-stdout.txt create mode 100644 Tests/RunCMake/get_property/NotMultiConfig.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => if/duplicate-deep-else-result.txt} (100%) create mode 100644 Tests/RunCMake/if/duplicate-deep-else-stderr.txt create mode 100644 Tests/RunCMake/if/duplicate-deep-else.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => if/duplicate-else-after-elseif-result.txt} (100%) create mode 100644 Tests/RunCMake/if/duplicate-else-after-elseif-stderr.txt create mode 100644 Tests/RunCMake/if/duplicate-else-after-elseif.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => if/duplicate-else-result.txt} (100%) create mode 100644 Tests/RunCMake/if/duplicate-else-stderr.txt create mode 100644 Tests/RunCMake/if/duplicate-else.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => if/misplaced-elseif-result.txt} (100%) create mode 100644 Tests/RunCMake/if/misplaced-elseif-stderr.txt create mode 100644 Tests/RunCMake/if/misplaced-elseif.cmake create mode 100644 Tests/RunCMake/include_external_msproject/CustomConfig-check.cmake create mode 100644 Tests/RunCMake/include_external_msproject/CustomConfig.cmake create mode 100644 Tests/RunCMake/install/FILES-TARGET_OBJECTS-all-check.cmake create mode 100644 Tests/RunCMake/install/FILES-TARGET_OBJECTS.cmake create mode 100644 Tests/RunCMake/install/obj1.c create mode 100644 Tests/RunCMake/install/obj2.c create mode 100644 Tests/RunCMake/project/ProjectDescription-stdout.txt create mode 100644 Tests/RunCMake/project/ProjectDescription.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => project/ProjectDescription2-result.txt} (100%) create mode 100644 Tests/RunCMake/project/ProjectDescription2-stderr.txt create mode 100644 Tests/RunCMake/project/ProjectDescription2.cmake copy Tests/RunCMake/{CMP0054 => separate_arguments}/CMakeLists.txt (100%) create mode 100644 Tests/RunCMake/separate_arguments/EmptyCommand.cmake create mode 100644 Tests/RunCMake/separate_arguments/NativeCommand.cmake create mode 100644 Tests/RunCMake/separate_arguments/PlainCommand.cmake create mode 100644 Tests/RunCMake/separate_arguments/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/separate_arguments/UnixCommand.cmake create mode 100644 Tests/RunCMake/separate_arguments/WindowsCommand.cmake create mode 100644 Tests/VSNASM/CMakeLists.txt create mode 100644 Tests/VSNASM/foo.asm create mode 100644 Tests/VSNASM/include/foo-proc.asm copy Tests/{VSMASM => VSNASM}/main.c (100%) create mode 100644 Tests/XCTest/StaticLibExample/StaticLibExample.c create mode 100644 Tests/XCTest/StaticLibExample/StaticLibExample.h create mode 100644 Tests/XCTest/StaticLibExampleTests/Info.plist create mode 100644 Tests/XCTest/StaticLibExampleTests/StaticLibExampleTests.m create mode 100644 Utilities/.clang-tidy create mode 100644 Utilities/IWYU/mapping.imp create mode 100755 Utilities/Release/consolidate-relnotes.bash delete mode 100644 Utilities/Release/hythloth_release.cmake create mode 100644 Utilities/cmcurl/CMake/FindMbedTLS.cmake create mode 100644 Utilities/cmcurl/include/curl/system.h create mode 100644 Utilities/cmcurl/lib/rand.c create mode 100644 Utilities/cmcurl/lib/rand.h delete mode 100644 Utilities/cmlibarchive/build/cmake/CheckStructMember.cmake delete mode 100644 Utilities/cmlibarchive/build/cmake/FindLZMA.cmake create mode 100644 Utilities/cmlibuv/include/uv-posix.h create mode 100644 Utilities/cmlibuv/src/unix/bsd-ifaddrs.c create mode 100644 Utilities/cmlibuv/src/unix/cygwin.c create mode 100644 Utilities/cmlibuv/src/unix/no-fsevents.c create mode 100644 Utilities/cmlibuv/src/unix/no-proctitle.c create mode 100644 Utilities/cmlibuv/src/unix/os390-syscalls.c create mode 100644 Utilities/cmlibuv/src/unix/os390-syscalls.h create mode 100644 Utilities/cmlibuv/src/unix/posix-hrtime.c create mode 100644 Utilities/cmlibuv/src/unix/posix-poll.c create mode 100644 Utilities/cmlibuv/src/unix/procfs-exepath.c create mode 100644 Utilities/cmlibuv/src/unix/sysinfo-loadavg.c create mode 100644 Utilities/cmlibuv/src/unix/sysinfo-memory.c hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 5 13:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 5 Jun 2017 13:05:05 -0400 (EDT) Subject: [Cmake-commits] CMake annotated tag, v3.9.0-rc1, created. v3.9.0-rc1 Message-ID: <20170605170505.4879EFAB57@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The annotated tag, v3.9.0-rc1 has been created at 814f213d4cc83be823eb5eb33ff140a319c156eb (tag) tagging 344f9ed96a4cc457810ca84cf6549f7a4218fd8a (commit) replaces v3.8.2 tagged by Brad King on Mon Jun 5 12:59:05 2017 -0400 - Log ----------------------------------------------------------------- CMake 3.9.0-rc1 -----BEGIN PGP SIGNATURE----- iQJKBAABCAA0FiEExsJlMku+vcNQtRPQLSzvEDSSFoQFAlk1jdkWHGJyYWQua2lu Z0BraXR3YXJlLmNvbQAKCRAtLO8QNJIWhBGbD/0aX9jzIZKgz2bCPUDmhtxIcQg+ C06eV1Ts9hVAZx/hKVzsdwUKA2yC6m6Kp4Cm35ezPbidSvpZS6RFfDuD8lPpKtnM nIf2ic6glMa5SyXqS+H0LT2UmxoOvkj+6x2xVoyAHshSRthzI/jIxpP8ZcCUfTUQ 65CniohInqi1dHQyCYNj23TocuaPbCGBRFTzhbRMBXRh42VxFUGwRiXDEDsvTNYq XiXr1pfKNX1NMlxGotCd906DeFhDQnJ1iMyX+DWt2WSaqhg4cZXNdd/kwPzhK40g zWnfJ/kd4XPGBdIyRZo6LcNoxeNtTjMZ1Hjen40Jc25Yqge/FEXLLT5k/sv0hpHv UFb1B6U/PTe+l9uFP9t9jgra4clCvDeXZZZBOruP5hQEHnBvkOBYw5I/xvtcRwHj IgMF2u+i1zkBo83Sa4S6MmWT2t1y1oOFQmmY4sIHkRJbW3Y1RKxfI/316PNuq4qf g7m4qiYjQfUEfhuqeTguac0sY9cWqs7WOKXftVJxKuDRcV3HftwVUA0QW68vUxKz l7GzFzlSvTsvToJa5KC/7YE8+DdVxhuFdqXhPOwKK/VovLu2HijHpGJP+7udwEZU iqFKTg1cjo9kkWrc7rRj3/4fWCuEk8pGku8eY4I2OMoofyFRKPNvEGfMWnhK9R12 NP8Pmh8QfZBckCsnHw== =6XjL -----END PGP SIGNATURE----- Albert Ziegenhagel (1): bindexplib: Skip symbols containing a dot (.) Aleix Pol (1): Autogen: Pass explicit predefines header to moc if possible Alex Turbov (4): project: Add `DESCRIPTION` parameter Boost Fiber actually require at least C++11. Improve Doxygen support FindBoost: Simplify search in lists. Andreas Weis (1): Added space after IAR response file flag Andr? Apitzsch (3): FindProtobuf: add targets FindProtobuf: add tests FindProtobuf: add optional export declaration macro to generated cpp files Bastien Schatt (2): Add GENERATOR_IS_MULTI_CONFIG global property Do not initialize CMAKE_BUILD_TYPE on multi-config generators Beeble (2): VS: Pass whole target to WriteProjectConfigurations include_external_msproject: Honor MAP_IMPORTED_CONFIG_ Ben Boeckel (29): ExternalProject: only append `COMMAND` if actually adding a command OSXScriptLauncher: remove unused variable cmCTest, cmCTestCoverageHandler: remove cwd dance cmWorkingDirectory: add class for changing the workdir cmWorkingDirectory: use the new class cmStateTypes: document that the ordering of targets is important GenerateExportHeader: always fill in _EXPORT macros Help/dev: mention how the robot performs its checks cmExportBuildFileGenerator: use HasImportLibrary kwsys: remove extra attribute update-kwsys: apply changes made in CMake to the import kwsys: match upstream changes Merge branch 'upstream-KWSys' into kwsys-import-cleanup ninja: describe the intermediate order depends target better ninja: remove duplicate order-only dependencies RunCMake.Ninja: support passing arguments when running ninja ninja: break unnecessary target dependencies RunCMake.Ninja: add a test for assumed sources Tests: use BYPRODUCTS in the CustomCommandWorkingDirectory test cmCTestTestCommand: defer getting the global timeout cmCTestTestHandler: use pointers to static memory cmCTestRunTest: do not count skipped tests as failed cmCTestTestHandler: count skipped tests as disabled Help: add release notes cmCTestTestHandler: indicate why a test did not run c++: prefer vectors over lists Tests/Server: import print_function from the future FPHSA: remove extra space Help/dev: note that unstaging before an update is unnecessary Bernhard Burgermeister (2): Ninja: support response file for cmake_ninja_depends on Windows Ninja: Fix command concatenation on Windows Bertrand Bellenot (1): bindexplib: Add method for parsing and integrating `.def` files Betsy McPhail (2): CTest: Improve 'Completion Status' reported to CDash for 'Not Run' tests Add 'DISABLED' test property Brad King (743): Merge branch 'release' Begin post-3.8 development Merge branch 'upstream-KWSys' into update-kwsys Merge topic 'FeatureSummary-doc-cleanup' Merge branch 'release' Merge topic 'update-kwsys' Merge topic 'wix-custom-root-id' Merge topic 'FeatureSummary_description' Merge topic 'FindProtobuf-static-libs' Merge topic 'determine_id_without_user_specified_flags' curl: Update script to get curl 7.52.1 Merge branch 'upstream-curl' into update-curl curl: Fix passing _WINSOCKAPI_ macro to compiler Utilities/Sphinx: Add option for cmake.org version switch to html Merge topic 'doc-cmake.org-version-switch' Merge topic 'sphinx-1.4' Tests: Fix `file://` URLs given to curl Help: Add notes for topic 'update-curl' Merge topic 'gcc-cpp98' Merge topic 'update-curl' Merge topic 'ExtractGTestMacro' Merge topic 'vs-nasm' Merge topic 'erase-if' Merge topic 'cuda_tests_improve_error_reporting' Merge branch 'release' Merge topic 'execute_process-default-encoding' Merge topic 'cmake_provide_include_dir_for_toolkit' Merge topic 'command-cleanup' Merge branch 'release' Help: Format BUILD_WITH_INSTALL_RPATH documentation Merge branch 'upstream-KWSys' into update-kwsys Merge branch 'backport-clang-format-cuda' into clang-format-cuda Tests: Run clang-format on CUDA code Merge branch 'backport-clang-format-cuda' into clang-format-cuda Merge topic 'clang-format-cuda' Merge branch 'release' VS: Refactor parsing of CMAKE__STANDARD_LIBRARIES VS: Place CMAKE__STANDARD_LIBRARIES after other libraries VS: De-duplicate PreprocessorDefinitions tag name CMakeDetermineCUDACompiler: Drop out-of-date comment Tests: Split out RunCMake.GeneratorToolset Xcode checks VS: Refactor generator toolset parsing Merge topic 'update-kwsys' Merge topic 'cuda-no-Os' Merge topic 'cuda-with-c' Merge topic 'cuda-drop-comment' Merge topic 'vs-dedup-tag' Merge topic 'vs-refactor-libs' Merge branch 'release' cmDisallowedCommand: Forward final pass too cmIDEOptions: Add SpaceAppendable flag table type cmVisualStudioGeneratorOptions: Add PrependInerhitedString method VS: Refactor AdditionalOptions generation Merge topic 'cuda-msvc-flags' Merge topic 'autogen_fix_3.8' Merge topic 'fix-ctest_update-svn' Merge topic 'command-cleanup-fix' Merge topic 'TestBigEndian-cxx-only' Merge topic 'vs-refactor-toolset-parsing' Merge topic 'vs-refactor-unknown-flags' ctest_update: Refactor internal APIs to support more failure cases ctest_update: Capture failure of svn to load revisions and local mods Merge branch 'release-3.7' Merge branch 'release' Merge topic 'capture-ctest_update-svn-failures' Merge topic 'FindOpenSSL-crypto-name' Merge topic 'bison3' Merge topic 'install_name_policy' Merge topic 'FindHDF5-include-dir-advanced' Merge topic 'FindHDF5-fix-header-langs' Make CMAKE_ROOT independent of case of path used to invoke cmake libarchive: Update script to get 3.3.0 Merge branch 'upstream-LibArchive' into update-libarchive Merge topic 'fix-CMP0017-path-case' Merge topic 'fix-CMAKE_ROOT-case' Merge topic 'productbuild_resources' Merge topic 'productbuild_component_plist' Merge topic 'iwyu' Merge topic 'cuda-separable-bool' Merge topic 'FindGTK2-old-sigc++' Merge topic 'cmake-host-system-name' Merge branch 'upstream-libuv' into update-libuv Merge topic 'ExternalProject-update-docs' Merge topic 'vs2017-fallback-sdk' Merge topic 'autogen_json' Merge branch 'release' Update CMake pre-cached values for libarchive 3.3.0 libarchive: Define __LA_DEPRECATED consistently libarchive: Fix use of ssize_t in archive_entry.h libarchive: Avoid declaration after statement in C code libarchive: Avoid using isblank cmServerConnection.h: Include cmConfigure.h first Merge topic 'cmake_m4_find_package_var_check' Merge topic 'FindCUDA-fix-init' Merge topic 'clang-format-attrs' Merge topic 'doc-cmake-language-makefile-vars' Merge topic 'update-libuv' Merge topic 'update-libarchive' Merge topic 'cmake-server-aix' Merge topic 'autogen_depends' Merge topic 'find_openmp_clang_patch' Merge topic 'vcxproj-indentation' Merge topic 'dragndrop-format' Merge topic '16615-xcode-object-libraries-depends' Merge topic 'GetPrerequisites-find_item_basename' Merge branch 'release' Merge branch 'ninja-no-full-path' into release-3.7 Tests: Fix RunCMake.ObjectLibrary dependency delay Tests: Change RunCMake.ObjectLibrary dependencies case to C libuv: automatically skip ifaddrs on Solaris 10 libuv: Implement mkdtemp on Solaris 10 libuv: Link to 'rt' library on Solaris 10 to get semaphores libarchive: Update script to get 3.3.1 Merge branch 'upstream-LibArchive' into update-libarchive libarchive: Remove liblzma from introspection tests Merge topic 'ninja-no-full-path' Merge topic 'test-objlib-deps-cleanup' Merge topic 'object-library-compile-pdb' Merge topic 'ExternalProject-checkout-clarify' Merge branch 'release-3.7' Merge branch 'release' Fix CMAKE_HOST_SYSTEM_NAME on SunOS Merge branch 'upstream-KWIML' into update-kwiml libuv: Compile as C 90 on Solaris 10 Enable libuv on Solaris 10 Merge topic 'cmake-host-system-name' Merge topic 'libuv-solaris-10' Merge topic 'update-libarchive' Merge topic 'update-kwiml' Merge topic 'cmake-xcode-schemes' Merge topic 'cache-xaml-resx-headers' Merge topic 'ExternalProject-fix-download-log' Merge topic '16607-error-out-on-non-seekable-input-files' Merge topic 'kwiml-test-gcc-format-security' Merge branch 'release' Merge branch 'find-libarch-not-symlink' into release-3.7 Merge topic 'autogen_json_fix' Merge topic 'find-libarch-not-symlink' Merge topic 'export-executable-symbols' Merge topic 'FindPkgConfig-version-ops' Merge branch 'release-3.7' Merge branch 'release' Help/dev: Exclude this directory from user-facing documentation Merge branch 'backport-implicit-dir-symlinks' into release-3.7 Merge topic 'xcode-enhance-schemes' Merge topic 'FindHDF5-updates' Merge topic 'csproj_add_free_source_tags' Merge topic 'find_library-custom-lib-suffix' Merge topic 'autogen_uic_paths' Merge branch 'release' Merge topic 'implicit-dir-symlinks' Merge topic 'FindVulkan-update' Merge topic 'ipo-variable' Merge branch 'release-3.7' Merge branch 'release' Merge topic 'FindJNI-archlinux-jvm-paths' Merge branch 'release' Merge branch 'release' Help/dev: Document the CMake Review Process CONTRIBUTING: Add note about running developer setup script CONTRIBUTING: Add link to development documentation README CONTRIBUTING: Add link to review process document Merge topic 'doc-development-process' SetupForDevelopment: Drop cmake.org remote repo configuration Merge topic 'developer-setup' Utilities/Release: Fetch from gitlab.kitware.com repository Merge topic 'binaries-from-gitlab-repo' Merge topic 'FindHDF5-fix-definitions' Merge topic 'FindVulkan-fix-win-32' Merge topic 'doc-map-config-prop-example' Merge topic 'doc-sort-cmake-variables' Merge topic 'FindHDF5-lang-include-dirs' Merge topic 'autogen_common' Merge topic 'cpack_nsis_sign_uninstaller' Merge topic 'working-directory-fixes' Merge topic 'revert-CTestTestfile-removal' Merge branch 'release' Help/dev: Revise README to have a bullet list of available documents Help/dev: Document the CMake Testing Process Merge topic 'doc-dev-testing' cmFileMonitor.h: Include cmConfigure.h first CUDA: Fix spelling of CudaOnly.SeparateCompilation test targets Help: Add notes for topic 'x32-abi' Merge topic 'cuda-test-spelling' Merge topic 'cmake-server-aix' Merge topic 'target-type-ordering-comment' Merge topic 'fix_csharp_custom_targets' Merge topic 'fix-static-assert' Merge branch 'release' CheckLanguage: Pass generator platform and toolset into check Tests: Pass generator platform and toolset into check for Fortran Tests: Fix CPackComponents NSIS install root Merge topic 'CheckLanguage-platform-toolset' Merge topic 'doc-vs15-MSVC_VERSION' Merge topic 'master' Merge topic 'x32-abi' Refactor module definition source enumeration Refactor module definition file selection Refactor WINDOWS_EXPORT_ALL_SYMBOLS implementation bindexplib: Revise coding style of CMake-specific methods Merge topic 'test-CPackComponents-fix-NSIS-root' Merge topic 'pr.gcc_ar' VS: Find the MSBuild value for VCTargetsPath VS: Provide an option to specify CUDA toolset version VS: Select highest available CUDA toolset by default VS: Refactor compiler id detection project file template VS: Add more placeholders to compiler id detection project file template VS: Add method to clear flag tables of option parser VS: Add method to re-parse specific option parser fields VS: Add method to take a value out of the option parser flag map VS: Add support for determining CUDA compiler id VS: Record in global generator whether CUDA is enabled VS: Add placeholder CUDA flag tables VS: Add basic infrastructure for CUDA generation VS: Do not use absolute paths to CUDA sources VS: Do not pass CUDA compile options to C compiler VS: Place CUDA host compiler options in proper project file fields VS: Select the CUDA runtime library VS: Select CUDA code generation architectures VS: Add support for the CUDA_SEPARABLE_COMPILATION property VS: Add more CUDA flag table entries CUDA: Work around VS limitation in CudaOnly.WithDefs test GNU-FindBinUtils: Avoid setting policy CMP0054 Merge topic 'GNU-FindBinUtils-no-policy' Merge branch 'upstream-KWSys' into update-kwsys Merge topic 'FindGit-avoid-vs-2017-git' Merge topic 'update-kwsys' Merge topic 'refactor-module-def' Merge topic 'cuda-vs' Merge topic 'xcode-test-schema-generation' Merge topic 'BundleUtilities-elf-rpath' Merge topic 'x32-abi-tests' Merge branch 'release' Help: Add notes for topic 'cuda-vs' Merge topic 'cuda-vs' Merge topic 'doc-toolset-host-arch-typo' Help: Move generator platform support details to variable docs Help: Move generator toolset support details to variable docs Help: Cross-reference generator platform variables Help: Cross-reference generator toolset variables Help: Document VS generator toolset specification syntax Merge topic 'doc-vs-toolset-options' Merge branch 'release' Merge topic 'cpack-rpm-extra-slash-in-path' Merge topic 'autogen_source_group' Merge topic 'geh-visibility-flag' Merge topic 'move-platform-specific-paths' Merge topic 'CSharpUtilities-doc' Merge topic 'FindBoost-1.64' Merge topic 'FindHDF5-fix-quoting' bindexplib: Add support for parsing and integrating `.def` files cmGlobalVisualStudioGenerator: Simplify __create_def command generation Support WINDOWS_EXPORT_ALL_SYMBOLS with `.def` files Merge topic 'windows-include-order' Merge branch 'release' Merge topic 'CPackComponent-use-cmake_parse_arguments' FindHDF5: Improve HDF5_ROOT and HDF5_FIND_DEBUG documentation Merge branch 'backport-FindHDF5-optional-no-config' into FindHDF5-optional-no-config Merge topic 'check-method-docs' Help/dev: Document `Topic-rename:` description trailer Merge topic 'doc-dev-topic-rename' Merge topic 'cpack-rpm-debuginfo-multiple-files-fix' Merge topic 'module-def-and-WINDOWS_EXPORT_ALL_SYMBOLS' Merge topic 'libarchive-backport-rc4-crypto-rec' Merge topic 'cuda_no_ninja_response_support' Merge topic 'FindHDF5-optional-no-config' Merge topic 'add-CheckIPOSupported-module' Merge topic 'ninja-fortran-depfile-fix' Merge branch 'release' Merge topic '16624-blas-lapack-documentation' Merge branch 'release' Merge topic '14335-duplicate-else' Help/dev: Make `Do: check` cross-reference more specific Help/dev: Document `Do: reformat` action Merge topic 'doc-dev-do-reformat' Merge topic 'FindBoost-1.64' Merge branch 'release' Merge topic 'cpack_nsis_sign_uninstaller' Merge topic 'FindwxWidgets-vs-2017' Merge topic 'avoid-MSVC-per-version-vars' Merge topic 'doc-prefer-MSVC_VERSION' Merge topic 'InstallRequiredSystemLibraries-refactor' Merge topic 'server-mode-fix-home-dir-check' Merge branch 'release' Merge topic 'suppress-xcode-error' Merge topic 'make_sure_cuda_tests_run' Merge topic 'InstallRequiredSystemLibraries-vs2017' Merge topic 'cpack-rpm-correct-error-message-debug-lengths' Merge topic 'autogen_rcc_test' Merge topic '16680-ios-bundle-resources' Merge topic 'iwyu' Merge branch 'release' Utilities/Release: Fetch stage/master/head Tests: Activate InstallRequiredSystemLibraries OpenMP libs Merge topic 'binaries-from-gitlab-repo' Merge branch 'release' update-third-party: Add helper to disable custom gitattributes update-kwsys: Disable custom gitattributes during import Merge branch 'upstream-KWSys' into update-kwsys Merge topic 'InstallRequiredSystemLibraries-test-openmp' Merge topic 'update-kwsys' Merge topic 'cpack-rpm-debuginfo-docs-cleanup' Merge topic 'cm-sys-stat' Merge topic 'cpack-rpm-tests-handle-build-id-links' Merge topic 'cpack-rpm-debuginfo-honor-package-filename' Merge topic 'ninja-fix-sysconf-non-limit' Merge topic 'InstallRequiredSystemLibraries-vs2017' Merge topic 'libarchive-backport-zip-dir-fix' Merge branch 'release' Merge branch 'upstream-KWSys' into update-kwsys Merge topic 'sphinx-cmake-theme' Merge topic 'vfproj-object-libs-fix' Merge topic 'update-kwsys' Merge topic 'vs-rc-defines' Merge branch 'release' Merge topic '16742-swift-3.0' Merge topic 'FindBoost-1.64-deps' Merge topic 'cmake-file-install-symlink-on-nonexistng-path' Merge topic 'iwyu' Merge topic 'sdcc-compiler-id' Merge topic 'ctest-disable-tests' Merge topic '10749-aix-version' Merge branch 'release' Merge branch 'release' Merge topic 'ipo-policy-CMP0069' Merge topic 'libuv-name-fix' Merge topic 'vfort-object-linker-lang' Merge topic '16733-bundle-genex' Xcode: Detect CURRENT_ARCH for use by generator Tests: Add option to customize LinkInterfaceLoop timeout Merge topic 'intel-compile-features' Merge topic 'test-fix-CTestTestChecksum-dir' Merge topic 'test-LinkInterfaceLoop-custom-timeout' Merge topic 'ExternalProject-fix-remote-branch' Merge branch 'release' Tests: Fix CMake.GetPrerequisites test config message ExternalProject: Run `git checkout` with `--` to clarify arguments Tests: Optionally skip local packages versions in CMakeOnly.AllFindModules Merge topic 'xcode-current-arch' Merge topic 'test-CMake.GetPrerequisites-config-message' Merge topic 'test-CMakeOnly.AllFindModules-local-exclude' Merge topic 'server-mode-test-no-pyc' Merge topic 'mac-implicit-link-no-lto-flag' Merge topic 'FindBoost-vs-toolset-fallback' Merge branch 'release' Merge topic 'ExternalProject-checkout-clarify' Tests: Add case for GENERATOR_IS_MULTI_CONFIG Revert "CPack/NSIS: Sign the uninstaller" Merge topic 'bindexplib-arm' Merge topic 'lang-specific-binutils' Merge topic 'CheckIPOSupported-Fortran' Merge topic 'FindCUDA-tll-keywords' Merge topic 'revert-cpack_nsis_sign_uninstaller' Merge topic 'cpack-wix-root' Merge topic 'prop-is-multi-config' Merge topic 'fix-genex-example' bindexplib: Run clang-format on header file Merge topic 'bindexplib-format' Merge topic 'codelite-virtual-dirs' Merge topic 'include_external_msproject-map-config' Help/dev: Document preferred page for MR comments Merge topic 'doc-dev-review-comments' Merge topic 'FindBoost-fix-release-names' Merge topic 'multi-config-no-build-type' cmGeneratorTarget: Remove unnecessary condition cmGeneratorTarget: Replace source classifier implementation Merge topic 'refactor-source-classification' Merge topic 'FindwxWidgets-new-syslibs' Merge topic 'clarifyRemoveDocs' Merge topic 'clarifyFileGenerateDocs' Merge topic 'emulatorTargetPropertyDocs' Merge topic 'packaging-qtsdk' Merge branch 'release' Merge topic 'vs-rc-defines' Merge branch 'release' Merge branch 'release' cmMakefile: Create an explicit "Object Libraries" source group VS: Simplify use of object libraries in WINDOWS_EXPORT_ALL_SYMBOLS VS: Simplify logic collecting object library files as sources Merge topic 'FindPythonInterp-3.6-windows' Merge topic 'vs-remove-UseObjectLibraries' cmGlobalGenerator: Abort generation earlier on export() error Xcode: Refactor internal architecture list construction Xcode: Refactor object directory name computation Xcode: Compute a concrete object file arch dir if possible VS: Refactor loop over classified sources cmGeneratorTarget: Drop unused GetIDLSources method Merge branch 'upstream-KWIML' into update-kwiml Merge topic 'macos-hidpi-qt-dialog' Merge topic 'doc-cmake-E-copy-no-wildcards' Merge topic 'update-kwiml' Merge topic 'xcode-object-arch-dir' Merge topic 'vs-refactor-source-loop' Merge branch 'upstream-KWSys' into update-kwsys CheckSymbolExists: Convert docs to bracket comment syntax CheckSymbolExists: Format documentation CheckSymbolExists: Document that intrinsics may not be detected VS: Refactor Win 10 Kits root detection to support multiple roots VS: Add an environment variable for the Windows 10 kits directory Xcode: Do not add Object Libraries source group on Xcode >= 5 Xcode: Inline relevant parts of UseObjectLibraries cmGeneratorTarget: Drop unused UseObjectLibraries method Merge topic 'include-style' Merge topic 'update-kwsys' Merge topic 'project-description' Merge topic 'CheckSymbolExists-update-docs' Merge topic 'xcode-remove-UseObjectLibraries' cmGeneratorTarget: Add method to collect all sources for all configs VS: List config-specific object library files on link lines Xcode: Use config-specific object library files on link lines VS: Teach generators how to mark per-config source files Xcode: Refactor loop over all sources cmGeneratorTarget: Drop obj libs from GetConfigCommonSourceFiles file: Refactor COPY/INSTALL relative path handling file: Add COPY/INSTALL option for fixed layout relative to a directory CMP0026: Fix OLD behavior with file written during configure step Merge topic 'vs-custom-kits-dir' Merge topic 'simpler-import-lib-check' Merge topic 'iwyu-mapping' Merge topic 'file-copy-relative-from' Merge topic 'prepare-per-config-objects' cmGeneratorTarget: Drop default GetLinkerLanguage config argument Merge topic 'fix-CMP0026-old' Merge topic 'findmpi-mark-library-advanced' Merge topic 'cpackifw-search-algorithm' Merge topic 'ipo-var-per-config' Merge topic 'tcc-enable_exports' cmGeneratorTarget: Factor out a GetTargetObjectNames method cmGeneratorTarget: Add method to get the object file directory cmGlobalGenerator: Add method to check if object file location is known cmInstallTargetGenerator: Re-order GenerateScriptForConfig logic Genex: Reject TARGET_OBJECTS on non-object libraries earlier Help: Document find command search path separators Help: Format string() command regex specification docs Help: Link from if(MATCHES) to regex specification docs Help: Document CMAKE_MATCH_ variables Tests: Fix CMakeTestAllGenerators generator list Tests: Run CMakeTestAllGenerators serially Tests: Drop machine-specific logic from CMakeTestAllGenerators Merge branch 'upstream-KWSys' into update-kwsys Merge topic 'cmake-gui-desktop-icon-wayland' Merge topic 'doc-find-path-sep' Merge topic 'findmpi-add-imported-targets' Merge topic 'doc-CMAKE_MATCH_n' Merge topic 'fix-CMakeTestAllGenerators' Merge topic 'test-CheckIPOSupported' Merge topic 'objlib-extend' cmGlobalVisualStudio8Generator: Drop unused GetDocumentation method cmGlobalVisualStudioGenerator: Drop VS7 enumeration value Drop Visual Studio 7 .NET 2003 generator Help/dev: Add a CMake Source Code Guide placeholder Help/dev: Adopt clang-format instructions in coding guide Help/dev: Adopt C++ subset rules in coding guide Merge topic 'update-kwsys' Merge topic 'doc-dev-source-code' Merge topic 'FindOpenSSL-more-precompiled' Merge topic 'FindBoost-fix-backslash-tolerance' Merge topic 'remove-vs7.1-generator' Merge branch 'release' Merge topic 'autogen-fixes' Merge topic '16795-xcode-system-header-search-paths' Merge topic 'FindwxWidgets-verify-wx-config' Merge topic 'unified-commandline-length' Merge topic '16760-refactor-get-mac-content-directory' Merge topic 'fix-vs2017-guid-braces' Merge topic 'GNUInstallDirs-add-RUNSTATEDIR' Merge topic 'kwsys-import-cleanup' Merge topic 'cpack-rpm-buildrequires-docs' Ninja: Order Fortran dyndep file generation explicitly Merge topic 'enable_ptx_compilation' Merge branch 'release' Xcode: Compute version number earlier Deprecate Visual Studio 8 2005 generator Add deprecation warnings for policies CMP0036 and below Merge branch 'backport-source_group-TREE-alt-root' into source_group-TREE-alt-root Xcode: Drop support for Xcode versions below 3 Merge topic 'clang-tidy' Merge topic 'loosen-object-deps' Merge topic 'source_group-TREE-alt-root' Merge topic 'fix-test-all-find-modules' Merge topic 'namespace-jar-exports' Merge topic 'vs8-deprecate' Merge topic 'ctest-minor-fixups' Merge topic 'findmpi-improvements' Merge topic 'remove-xcode-2' Merge topic 'clazy' Merge topic 'clazy-2' Merge topic 'eq-delete' Merge topic 'autogen_once' Merge branch 'release' UseSWIG: Fall back to empty PREFIX for unknown languages Merge topic 'FindBoost-backport-fixes' Merge topic 'wix-attributes-patch' Merge topic 'hostwin32-doc-fix' Merge branch 'release' Merge topic 'use-disable-copy' Merge topic 'deprecate-policy-old' Merge topic 'ninja-dyndep-response-file' Merge topic 'doc-eq-delete' FindGLUT: Add library dependencies only if they exist Tests: Split RunCMake.BuildDepends make-only condition Tests: Add case for IMPLICIT_DEPENDS in custom target Merge topic 'findopenmp-modernized' Merge topic 'xctest_static_framework' Merge topic 'vs2017-sdk-detection' Merge branch 'release' Tests: Generalize RunCMake.install internal infrastructure Tests: Add case for install(FILES) with TARGET_OBJECTS Merge topic 'ctest_test-ignore-skipped-tests' Merge topic 'clang-tidy-2' Merge topic 'FindGLUT-optional-deps' Merge topic 'test-makefile-custom-target-includes' Merge topic 'cuda-device-link-ar' Merge topic 'test-install-objects-as-files' Merge topic 'UseSWIG-fallback-prefix' Merge topic 'elf-runpath-def' Merge topic 'cpackifw-framework-version' Add IPO compiler flags more consistently in generators Inline and remove AddFeatureFlags method Merge topic 'bindexplib-consts' Merge topic 'separgs-native' Merge topic 'FindBoost-compile-features' Merge topic 'fix-qhalt-for-xl' Merge topic 'refactor-ipo-flags' Merge topic 'xl-enhancements' Merge topic 'ipo-clang' Merge topic 'qt-clang-tidy' Merge topic 'yacclex-clang-tidy' Merge branch 'upstream-KWSys' into update-kwsys Features: Refactor _STANDARD update cmLocalGenerator: Add a hook for compiler flags used at link time Features: On SunPro link with language standard compiler flag Utilities/Sphinx: Build documentation independently by default Merge topic 'FindMatlab-2017a' Merge topic 'update-kwsys' Merge topic 'sunpro-c++11-link' Merge topic 'excludeFixtures' Merge topic 'doc-no-depend' Merge topic 'add-language-standards-to-more-compilers' Merge branch 'release' Merge branch 'release' Merge topic 'fix-typo-in-pgi-files' Merge topic 'port-language-default-to-common-macro' Merge topic 'ipo-xcode' Merge topic 'update-vim-syntax' Features: Record standards and features for SunPro 5.14 Merge topic 'remove-top-level-xcode-groups' Merge topic 'cpackifw-part-refactoring' Merge topic 'FindOpenCL-AMDAPPSDKROOT' Merge topic 'sunpro-5.14' Merge topic 'vs-masm-flags' Merge topic 'findjava-openjdk9' Merge topic 'clang-tidy-config' Merge topic 'add-more-sunpro-c-flags' Merge topic 'vector-over-list' Merge topic 'ctest_submit_headers' libuv: Compile as C 90 on Solaris 5.10 with SunPro 5.14 libuv: Compile as C 99 on Solaris 5.11 jsoncpp: Exclude from include-what-you-use Merge topic 'libuv-solaris' Merge topic 'clazy-cleanup' Merge topic 'FindOpenCL-AMDAPPSDKROOT' Merge topic 'pgi-fix-linux' Merge topic 'pgi-rdynamic-fix' Merge topic 'nag-fortran-version' Merge topic 'jsoncpp-no-iwyu' Merge topic 'f2c-int-fix' Merge topic 'c++11-iwyu' cmBase32: Cast pointer subtraction result to size explicitly Choose compiler-specific flags earlier in CMake's own build Update SunPro flags used for CMake itself to support C++11 Tests: Fix RunCMake.Framework expectation for universal binaries VS: Fix .vcxproj ProjectGuid element case Features: On SunPro link feature check with lang std flag Merge topic 'test-macos-framework-type-universal-binary' Merge topic 'suncc-cxx11' Add options for separate compile and link sysroots Merge topic 'separate-command-registration' Merge topic 'ninja-windows-command-concat' Merge topic 'doc-HEADER_FILE_ONLY-use-case' Merge topic 'findopenmp-new-search' Merge topic 'test-lang-fix' Merge topic 'vs-project-guid' Merge topic 'sunpro-c++11-link' TestDriver: Remove unused local variable initialization Merge topic 'dead-code-removal' Merge topic 'CMP0069-no-warn-try_compile' Merge topic 'TestDriver-remove-unused-init' Merge topic 'cpackifw-access-refactoring' Merge topic 'print-function-server-tests' Merge topic 'fix-typo-in-pgi-lang-std' Merge topic 'sunpro-fpp-fix' Merge topic 'split-sysroot' curl: Update script to get curl 7.54.0 Merge branch 'upstream-curl' into update-curl curl: Skip building docs within CMake curl: Set TLS/SSL build options the way we need for CMake Features: Record features for SunPro C 5.13 and 5.14 Merge topic 'lexerparser-fix-bootstrap' Merge topic 'update-curl' Merge topic 'sunpro-c-features' Merge topic 'add_cuda_cxx14_flag' Merge topic 'getprerequisites-fix' Merge topic 'command-name' Merge branch 'upstream-libuv' into update-libuv Merge topic 'FindPkgConfig-fix-lib-search' Merge topic 'cpack-components-handle-symlinks' Merge topic 'autogen_settings' Merge topic 'fix-target-alias-doc-typo' cmLocalCommonGenerator: Save CMAKE_BUILD_TYPE on construction Xcode: Refactor internal decision for scheme generation Xcode: Work around xcodebuild spurious hangs in try_compile libuv: Update build within CMake Merge topic 'FindDevIL-compat' Merge topic 'FindOpenSSL-crypto-only' Merge topic 'vs_fix_cpp_debugging_with_cs_enabled' Merge topic 'mingw-w64-compile' Merge topic 'GNU-FindBinUtils-patterns' Merge topic 'extra-fphsa-space' Merge topic 'cpackifw-i18n' Merge topic 'early-config-name' Merge topic 'xcode-try_compile-scheme' Merge branch 'release' Merge branch 'upstream-KWSys' into update-kwsys Utilities/Release: Switch macOS binary to Qt 5.6.2 liblzma: Fix HAVE_INLINE and HAVE___INLINE checks Merge topic 'note-unstage-before-update' Merge topic 'update-libuv' Merge topic 'gtest_add_tests' Merge topic 'removeSetModulePath' Merge topic 'ninja-compile_commands.json' Merge topic 'update-kwsys' Merge topic 'fix-invalid-export-name' Merge topic 'rel-osx-qt-version' Merge topic 'vs14-GNUtoMS' Merge topic 'source_group-TREE-relative-path' Merge topic 'cpack-archive-per-component-filename' Merge topic 'string-append' Help: Add notes for topic 'FindProtobuf-targets' Tests: Fix RunCMake.CMP0022 tll case for Debug configuration cmComputeTargetDepends: Avoid computing with empty configuration cmComputeTargetDepends: Avoid nested loops over configurations Check C++ features even without CMAKE_CXX_STANDARD for CMake itself Merge topic 'liblzma-fix-inline' Merge topic 'FindProtobuf-targets' Merge topic 'solaris_testLibSONAME' Merge topic 'solarisEmptyFileFix' Merge topic 'target-depends-per-config' Merge topic 'cxx-features-check-always' Merge topic 'UseEcos-update' Merge topic 'pgi-fix-windows' Merge topic 'add-findpackage-root-prefix' Merge branch 'release' FindProtobuf: Rename imported targets to match upstream names VS: Write UseOfMfc tag only if CMAKE_MFC_FLAG is present Merge topic 'FindProtobuf-targets' Merge topic 'FindImageMagick-support-v7' Merge topic 'darwin-bootstrap' Merge topic 'vs-reduce-UseOfMfc' Merge branch 'upstream-KWSys' into update-kwsys Merge topic 'update-kwsys' Merge topic 'IAR-response-flag-space' Merge topic 'vs15-GNUtoMS' Merge branch 'release' cmServer: Fix compiler -Wdouble-promotion warning VS: Fix indentation of .vcxproj files Merge branch 'upstream-KWSys' into update-kwsys codecvt: Re-implement do_out and do_unshift Merge topic 'find_package-shorter-message' Merge topic 'find_dependency-improvements' Merge topic 'server-fix-warning' Merge topic 'FindDoxygen-add-docs-function' Merge topic 'FindCygwin-alt-arch' Merge topic 'c++11-iwyu-decay-and-strip' Merge topic 'update-kwsys' Merge topic 'vs-vcxproj-indent' Merge topic 'cpacklog-string-cref' Merge topic 'findxmlrpc_fix' Merge topic 'codecvt-revise' Tests: Compile entire Plugin test with the same language standard Merge branch 'upstream-libuv' into update-libuv libuv: Update build within CMake Merge topic 'update-libuv' Build with libuv on Cygwin to enable server-mode Merge topic 'FindProtobuf-export-macro' Merge topic 'autogen_config' Merge topic 'FindBoost-use-IN_LIST' Merge topic 'reduce-string-copying' Merge topic 'intel-std-flags' Merge topic 'sunpro-std-flags' Merge topic '16917-c-compiler-version-variable-hint' Merge topic 'libuv-cygwin' Merge topic 'bootstrap-drop-irix' Help/dev: Document buildbot lint-iwyu-tidy builder Tests: Fix XCTest build configuration Tests: Fix Qt5Autogen test on Xcode Merge topic 'iwyu-gcc-7.1' Merge topic 'doc-dev-buildbot-lints' cmVisualStudio10ToolsetOptions: Remove unused include cmVisualStudio10TargetGenerator: Remove shadowing local variable cmQtAutoGeneratorInitializer: Remove unused local variable Tests: Fix VSResource test on MinGW with Ninja and a space in the path Ninja: Fix escaping of path to depfile Merge topic 'fix-Qt5Autogen-xcode' Merge topic 'fix-XCTest-build-config' Merge topic 'bootstrap-drop-osf' Merge topic 'minor-cleanups' Merge topic 'ninja-mingw' Merge branch 'upstream-KWSys' into update-kwsys Tests: Skip BootstrapTest if testing external CMake Utilities/Release: Drop unused release script Utilities/Release: Skip BootstrapTest for Linux binary Merge branch 'release' Tests: Fix CustomCommandByproducts regex for phony rules Ninja: Fix CMP0058 on MinGW Merge topic 'update-kwsys' Merge topic 'test-external-no-bootstrap' Merge topic 'rel-no-bootstrap-test' Merge topic 'FindGSL-debug-postfix' Merge topic 'bootstrap-std-flags' Merge topic 'add-common-record-features-macros' Merge topic 'ninja-mingw' Merge branch 'upstream-KWSys' into update-kwsys cmParseBlanketJSCoverage: Pass unmodified parameter as const& cmLocalUnixMakefileGenerator3: Remove unnecessary local variable Merge topic 'update-kwsys' Merge topic 'string-npos-cleanup' Merge branch 'release-3.8' Help: Consolidate 3.9 release notes Help: Organize and revise 3.9 release notes Utilities/Release: Add script to consolidate release notes Help/dev: Add a CMake Maintainer Guide document Help/dev: Add release branch creation to maintainer guide Tests: Fix RunCMake.GNUInstallDirs on BSD platforms Merge topic 'display-ctest-disabled' Merge topic 'test-GNUInstallDirs-FreeBSD' Merge topic 'cm_fallthrough' Merge topic 'lint-function-args' Merge topic 'GoogleTest-disabled-tests' Merge topic 'doc-dev-maint' Merge topic 'doc-3.9-relnotes' Help: Drop development topic notes to prepare release CMake 3.9.0-rc1 version update Bradley Lowekamp (1): GoogleTest: Add module to contain gtest_add_tests independently Bryan Donlan (1): FindJava: Add support for OpenJDK early access builds Christian Pfeiffer (26): VS: Fix OBJECT library support in Intel Fortran projects FindLibUV: Add Windows library name VS: Decide project type by linker lang as fallback FindMPI: Mark old MPI library entries as advanced FindMPI: Add IMPORTED targets FindMPI: Add test case Ninja,Makefile: Unify command line limit logic FindMPI: MPIEXEC handling improvements FindMPI: Modernize documentation Help: Fix CMAKE_HOST_WIN32 documentation FindOpenMP: Complete overhaul. FindOpenMP: Add tests separgs: Migrate tests to RunCMake tests separgs: Add a NATIVE_COMMAND mode separgs: Use NATIVE_COMMAND where appropriate Do not assume GCC libs are linked by all compilers Linux-PGI: Prevent -rdynamic ending up in flags FortranCInt: Pass CONFIG flags to try_compile FortranCInterface: Add support for PGI on Windows FindOpenMP: Refine list of flags to try FindOpenMP: Cache compilation results TestFindOpenMP,MPI: Disable default languages SunPro: Use -fpp to process all files ImplicitLinkInfo: Add support for PGI on Windows Windows-PGI: Adapt default compiler flags Windows-PGI: Add platform definitions Christian Schmidbauer (2): find_library: Allow custom lib suffix be used as find path Tests: Fix CMakeOnly.find_library test logic for libx32 case Christoph Gr?ninger (2): cmFindPackageCommand: Split condition to improve readability find_package: shorten output for missing package in config mode Chuck Atkins (33): Unix: Consolidate path components into prefixes SunOS: Move solaris-specific paths to the solaris platform Cygwin: Move Cygwin-specific paths to the cygwin platform XL: Fix the use of the -qhalt flag for varying OSs XL: Add additional regex for bogus compile options XL: Add C and C++ language level flags Compilers: Add common macros to be used by various compilers CompileFeatures: Let STD compile options be a list Cray: Add language standards for the Cray compiler PGI: Add language standards for PGI XL: Use common compiler macros for language standard default GNU: Use common compiler macros for language standard default Intel: Use common compiler macros for language standard default Clang: Use common compiler macros for language standard default SunPro: Use common compiler macros for language standard default AppleClang: Use common compiler macros for language standard default PGI: Fix typo in logic for C standard flags SunPro: Add more flags for C language standards PGI: Fix typo in compiler version test for language standards find_*: Add a new PackageRoot search path group find_*: Add tests for PackageRoot search path group find_*: Add docs for PackageRoot search path group Compilers: Add default cmake_record_{c,cxx}_compile_features macros Tests: Allow test macro to take no executable arguments CompileFeatures: Makes tests work with meta-feature only MSVC: Add empty definitions for std compile options Compilers: Port to use default cmake_record_lang_compile_features macros Clang: Fix language defaults for 2.1 GNU: Fix language defaults for 3.4 SunPro: Make sure all known versions get CXX98 defaults Intel: Fix missing C std default for 12.0 <= ver < 12.1 ctest: Display disabled status when ctest -N is called GoogleTest: Add support for disabled tests Clinton Stimpson (5): Apple: Refactor support for using INSTALL_NAME_DIR. Apple: Add BUILD_WITH_INSTALL_NAME_DIR target property Add policy CMP0068 separate install_name and RPATH settings on macOS cmCPackDragNDropGenerator: Improving handling of temporary dmg images cmake-gui: Fix display of icon under Wayland. Craig Scott (5): Add ctest options for limiting which tests fixtures add GoogleTest: Expand capabilities of gtest_add_tests() Tests: Remove unnecessary setting of CMAKE_MODULE_PATH Tests: Ensure Solaris linker never sees empty contents Tests: Make function name not match SONAME Curl Upstream (2): curl 2016-12-22 (44b9b4d4) curl 2017-04-19 (d957e218) Daniel Pfeifer (116): cmAlgorithms: add cmEraseIf function cmCommand: remove member Helper cmCommand: make noncopyable cmCommand: Don't prefix error message with command name cmDisallowedCommand: extract policy checking from cmCommand split Default commands into Scripting and Project cmCommands: add commands directly to cmState cmCommandArgumentParser: Port to bison 3 cmDependsJavaParser: Port to bison 3 cmCommandArgumentParser: reformat grammar fix some include-what-you-use diagnostics cmExprParser: include what you use cmCommandArgumentParser: include what you use cmDependsJavaParser: include what you use cmFortranParser: include what you use remove file cmStandardIncludes.h ParserHelper: Move macros to bottom of files WriteCompilerDetectionHeader: fix STATIC_ASSERT fix include order of windows.h CPackComponent: use cmake_parse_arguments cmCTest: Move macros to bottom of file cmCPackGenerator: Move macros to bottom of file Autogen: include what you use IWYU: use pragma export Add self-sufficient wrapper for cmFileCommand: remove unnecessary friend declaration cmFileCommand: add include testEncoding: include on Windows only testEncoding: use cmsys::ifstream cmFortranParserImpl: remove unnecessary include cmCommandArgumentParserHelper: remove unnecessary include cmFortranParser: remove unnecessary typedef cmConfigure: Ensure separate include block in headers CPack: drop CPack prefix for includes Use quotes for non-system includes Add include-what-you-use mapping clang-tidy: remove else after break and continue clang-tidy: remove reduntant .data() calls clang-tidy: use .empty() to check emptyness clang-tidy: avoid copy cmCLocaleEnvironmentScope: make noncopyable cmSystemTools::SaveRestoreEnvironment: make noncopyable cmAlgorithms: pass std::string by const ref cmGraphEdge: remove custom copy ctor cmLocaleRAII: make noncopyable cmListFileArgument: remove custom copy ctor cmake: pass cmStateSnapshot by const ref cmCommandArgumentParserHelper: make noncopyable cmDefinitions::Def: remove custom copy ctor cmStateDetail::PolicyStackEntry: remove custom copy ctor cmMakefile::ScopePushPop: make noncopyable cmScriptGenerator: make noncopyable cmScriptGenerator: pass Indent by value cmCryptoHash: make noncopyable cmComputeLinkInformation::Item: remove custom copy ctor cmLinkItem: remove custom copy ctor cmLinkImplItem: remove custom copy ctor cmGeneratorTarget::SourceFileFlags: remove custom copy ctor cmTargetDepend: pass by value cmGlobalGenerator::DirectoryContent: remove custom copy ctor cmLinkLineComputer: make noncopyable cmConfigure: provide macros CM_EQ_DELETE and CM_DISABLE_COPY Use CM_DISABLE_COPY Help/dev: Document CM_EQ_DELETE and CM_DISABLE_COPY clang-tidy: use operators for string comparison cmDocumentation: use ofstream local variable cmServerProtocol: avoid copies in range for Disable clang-tidy checks on files generated by Qt CMakeLists: remove option to regenerate yacc/lex LexerParser: move to custom directory LexerParser: disable clang-tidy checks auto_ptr: silence clang-tidy warnings clang-tidy: add option CMake_RUN_CLANG_TIDY cmFileMonitor: use cmDeleteAll QtDialog: add missing emit keywords QCMakeCacheView: avoid temporary containers for iteration QtDialog: add reference in foreach QCMakeCacheView: prever QVector over QList CMakeSetupDialog: use multi-arg cmInstalledFile: add cmConfigure.h as first #include IWYU: add mapping for cm::auto_ptr IWYU: map system symbols to libuv cmServer: include what you use QtDialog: block include-what-you-use ctest: remove unused cmake instance cmake: initialize with Role that controls which commands to register cmake: register fake project commands in -P mode cmMakefile: don't check IsScriptable cmState: remove RemoveUnscriptableCommands cmCommand: remove IsScriptable bootstrap: Remove leftovers from cmBootstrapCommands cmExecutionStatus: Remove arguments from setters cmFindCommon: remove unused function SetMakefile cmakemain: use script role for -P cmState: introduce methods for adding builtin commands cmCommands: use new methods for builtin commands CTest: use new methods for builtin commands cmState: introduce method for adding scripted commands cmState: separate builtin and scripted commands cmCommand: remove unused methods from interface and all implementations bootstrap: fix Bad substitution Use string(APPEND) in Modules bootstrap: prefer Clang over GNU on Darwin IWYU: add mapping for std::__decay_and_strip cmCPackLog: pass std::string by const& Intel: avoid variables in language standard flags SunPro: add standard compile option for C++03 SunPro: set -library=stlport as standard compile option for C++98 SunPro: update flags used for CMake itself bootstrap: remove support for IRIX IWYU: update mapping for gcc 7.1 bootstrap: remove explicit support for Tru64 UNIX bootstrap: prefer to use standard flags for C and CXX C++ feature checks: check output for '[Ww]arning' Provide and use CM_FALLTHROUGH Pass large types by const&, small types by value Daniele E. Domenichelli (3): FeatureSummary: Add DEFAULT_DESCRIPTION option to feature_summary FeatureSummary: Add FeatureSummary__DESCRIPTION global properties FeatureSummary: Update release notes Dmitry Kochkin (1): VS: Cache the list of xaml and resx headers Domen Vrankar (8): CPack/RPM: handle extra slashes CPack/RPM honor package file name on debuginfo enabled CPack/RPM: support for debuginfo package renaming handle non-existing symlink creation locations Improved CPack tests error logging CPack unify component/monolithic package symlink handling CPack test symlinks in package CPack/Archive: per component filenames support Evgeny Fimochkin (1): VS: Add support for ASM_NASM language Felix Geyer (1): GNUInstallDirs: Add RUNSTATEDIR variable Florian Apolloner (3): file: Add READ_ELF command to parse ELF binaries BundleUtilities: Teach `get_item_rpaths` to parse ELF binaries BundleUtilities: Fix bundle verification on Unix by considering rpaths. Florian Schmaus (1): UseEcos: Fix for separate and placeholders Gautier Pelloux-Prayer (1): FindPkgConfig: use new version checking "library >= version" syntax Gregor Jasny (31): Make CMAKE_HOST_SYSTEM_NAME available in scripting context Use looked up uname path for command execution Makefile: Allow adding post-build rules to object libraries Xcode: Collect dummy rules during iteration and emit afterwards Xcode: Record dependency information also for object libraries Xcode: Always track object library dependencies via hacky Makefile Add test for object library dependencies cmListFileLexer: bail out on seek-errors Xcode: Add documentation for schema generator Xcode: Use proper indentation for schemes Xcode: Do not autocreate schemes Xcode: Fix schema container location calculation Xcode: Select executable target for execution in schema Xcode: Use proper buildable name for schema Xcode: Control schema generation via variable Xcode: Add test for schema generation cmIfCommand: Reject duplicate else() and misplaced elseif() Xcode: Properly handle non-resource Bundle files on iOS Xcode: Properly handle Bundle Resources with more than one hierarchy level Apple: Fix Resources location for all generators Apple: Add test for bundle resource layout RunCMake: Ignore xcodebuild bug warnings in tests AIX: Properly detect host system version cmGeneratorTarget: Use enum to describe bundle directory query level cmGeneratorTarget: Call GetFrameworkDirectory in GetFullNameInternal Genex: Add `TARGET_BUNDLE_[CONTENT_]_DIR` generator expressions Xcode: Execute RunCMake.Framework also for Xcode generator Xcode: Use SYSTEM_HEADER_SEARCH_PATHS attribute for system includes Replace boolean `implib` parameters with enum Help: Fix typo in add_library(... ALIAS ...) text Help: Add a hint about C and C++ compiler version variable Guillaume Campagna (1): XCTest: Add support for static frameworks Guillaume Dumont (1): GetPrerequisites: Only recurse on resolved unseen prerequisites Gusts Kaksis (1): Xcode: Write shared schemes based on the default files generated by Xcode Jan Mr?zek (1): FindwxWidgets: Verify existence of libraries reported by wx-config Jeremy Tellaa (1): FindOpenCL: add AMDAPPSDKROOT into paths for OpenCL library John Donoghue (1): cmake.m4: do not set _XXXFLAGS or _LIBS var if already set KWIML Upstream (2): KWIML 2017-02-27 (aa3a7733) KWIML 2017-04-11 (ffc22537) KWSys Upstream (14): KWSys 2017-02-06 (ef673998) KWSys 2017-02-14 (5c6f7836) KWSys 2017-03-07 (5da8cfe0) KWSys 2017-03-24 (7e9f7b7b) KWSys 2017-03-28 (34999b6a) KWSys 2017-04-12 (23a4c211) KWSys 2017-04-19 (9f6ffaff) KWSys 2017-04-20 (8785f84f) KWSys 2017-05-01 (3ec3252c) KWSys 2017-05-16 (fe1f22ce) KWSys 2017-05-23 (411e958f) KWSys 2017-05-25 (160bed45) KWSys 2017-05-31 (bd0bbad7) KWSys 2017-06-01 (8243fefa) Keith Holman (2): wix: fix spelling error in function name wix: adds ability to modify attributes with patch Kevin Puetz (1): Ninja: List compile_commands.json as generated by CMake Kevin Whitaker (1): FindOpenSSL: Add another name for libcrypto with MSVC Kirill Mavreshko (1): FindOpenCL: Add missing PATHS keyword Kitware Robot (119): CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp CMake Nightly Date Stamp Konstantin Podsvirov (7): CPackIFW: Improved QtIFW search algorithm CPackIFW: Added new QtIFW versions for search CPackIFW: Framework version cmCPackIFWInstaller: fix validation of WizardStyle option CPackIFW: Refactor out some commonly used code CPackIFW: Access refactoring CPackIFW: Internationalization Support Kris Thielemans (10): FindHDF5: hide HDF5_DIR if HDF5 was found in another way FindHDF5: add HDF5_FIND_DEBUG variable to get debugging output FindHDF5: remove mark_as_advanced for non-cached variables FindHDF5: fix typo in comment FindHDF5: recognize hdf5:: prefix when using hdf5-config.cmake FindHDF5: do not cache library locations when using hdf5-config.cmake FindHDF5: use import libraries when using hdf5-config.cmake on Windows FindHDF5: document HDF5__DEFINITIONS FindHDF5: initialize HDF5_DEFINITIONS when using hdf5-config.cmake FindHDF5: set HDF5__INCLUDE_DIRS in all cases LibArchive Upstream (2): LibArchive 2017-02-19 (100ee75a) LibArchive 2017-02-25 (d6b1bb9f) Lucas Czech (1): FindOpenMP: Add iomp5 variant of Clang OpenMP flags Matt Stevens (1): Xcode: Remove the top-level Sources and Resources groups Matthew Woehlke (4): Utilities/Sphinx: Use brighter colors for html theme UseJava: Support namespaced exports Tests: Test namespaces with exported JARs Improve find_dependency argument handling Maya Rashish (2): cmELF: Define DT_RUNPATH if it isn't already defined cmELF: Remove now-redundant check for DT_RUNPATH's existence Michael Maltese (2): CMakeDetermineCompilerId: check with and without user-specified flags GetPrerequisites: also try to resolve just the basename Mikhail Paulyshka (4): bindexplib: clang-format bindexplib: remove unused code bindexplib: add ARM support bindexplib: fix constants symbols export Niklas Simons (1): FindXMLRPC: handle QUIETLY and REQUIRED correctly Nils Gladitz (4): CPackWIX: Introduce new CPACK_WIX_ROOT_FOLDER_ID variable CPackWIX: Fix variable documentation indentations CPackWIX: Add documentation for CPACK_WIX_ROOT Help: Fix error in $ example Patrick Boettcher (1): Merge branch 'upstream-vim-cmake-syntax' Pavel Solodovnikov (7): Change std::basic_string to std::string Add const-reference qualifications Improved checking for number of arguments passed Remove unused variables Remove unnecessary operator<< usage Access string npos without instance Remove second arg: npos in substr usages Peter Ivanyi (2): VS: Fix MASM flag tables VS: Use tool-specific flag table for COMPILE_FLAGS parsing Pierre Moreau (10): Tests/Cuda: Print error message if an error occurred Tests/Cuda: Add identifiers to error messages Tests/Cuda: Print error message if mixed_kernel failed Tests/Cuda: Print asynchronous error messages, if any Tests/Cuda: Output error messages to std::cerr instead of std::cout Tests/Cuda: Fix missing CUDA static library at runtime on macOS Tests/Cuda: Add missing separable compilation property Tests/Cuda: Use memory allocated on the GPU in the kernels Tests/Cuda: Return a non-zero code if errors occurred Tests/Cuda: Select a CUDA device supporting compute 3.0 Robert Dailey (2): FindPythonInterp: Add `-32` and `-64` registry entry variants FindImageMagick: Update to work with v7 Robert Maynard (9): CUDA: ObjectLibrary test executable now runs on OSX Tests: ExportImport C code should use explicit (void) in prototypes Genex: Allow TARGET_OBJECTS to be used everywhere Allow OBJECT libraries to be installed, exported, and imported CUDA: Allow sources to be compiled to .ptx files CUDA: Visual Studio now properly delays device linking CUDA: Makefile uses relative path for device linking status messages CUDA: Static libraries can now explicitly resolve device symbols CUDA: Add support for the C++14 standard flag. Roger Leigh (2): FindBoost: Allow testing for multiple compiler suffixes FindBoost: Support prebuilt Windows binaries from SourceForge Rolf Eike Beer (1): g++ knows about C++98 selection flags since at least 3.4 Roman Lebedev (1): Help: Document HEADER_FILE_ONLY use case Roman W?ger (2): CPack/NSIS: Sign the uninstaller CPack/NSIS: Avoid a race condition when generating the installer Ruslan Baratov (19): Add variable 'CMAKE_INTERPROCEDURAL_OPTIMIZATION' Help: Add example to MAP_IMPORTED_CONFIG_ docs Help: Sort cmake-variables.7 toctree Add 'CMAKE_GCC_AR' and 'CMAKE_GCC_RANLIB' variables CheckIPOSupported: New module to check for compiler/cmake IPO support Tests for 'CheckIPOSupported' module CheckIPOSupported: Visual Studio and Xcode generators do not support IPO Refactoring: s,GetFeatureAsBool,IsIPOEnabled, Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATION Implement interprocedural optimization for GNU compilers Rename CMAKE_GCC_{AR,RANLIB} to CMAKE_LANG_COMPILER_{AR,RANLIB} CheckIPOSupported: Move '_CMakeLTOTest-*' under 'CMakeFiles' CheckIPOSupported: Add Fortran support Support CMAKE_INTERPROCEDURAL_OPTIMIZATION_ Tests: Add cases for typical CheckIPOSupported usage Clang IPO (LTO) support Xcode: Support IPO (LTO) CMP0069: Suppress warning if we are in 'try_compile' GCC: more patterns for ar/ranlib Sebastian Holtermann (109): Autogen: Rename GenerateFooAll variables to GenerateAllFoo Autogen: Add GenerateAllAny flag test method Autogen: Remove unnecessary test Autogen: Rename settings file read/write methods Autogen: Rename settings string generation methods Autogen: Rename settings key variables Autogen: Simplify settings read method Autogen: Simplify settings write method Autogen: Generate empty settings string for disabled feature Autogen: Add FooEnabled() utility methods Autogen: Use FooEnabled() utility methods Autogen: Single point of return in MocGenerateFile Autogen: Single point of return in UicGenerateFile Autogen: Single point of return in RccGenerateFile Autogen: LogWarning method fix Autogen: Use cmSystemTools::Stdout/err instead of std::cout/err Autogen: Use nested loops instead of code duplication Autogen: Add method for checksum based path generation cmFilePathChecksum: Make methods const useable Autogen: Make methods const Autogen: Rename settings string variables Autogen: Inline settings string generation methods Autogen: Rename variables read from info file Autogen: Split moc compile options info string immediately Autogen: Split moc options info string immediately Autogen: Rename SkipFoo variables/methods to FooSkip Autogen: Move method declarations; Remove comments Autogen: Synchronize variable names Autogen: Inline string generation Autogen: Overhaul moc include list generation Autogen: Rename moc related variables Autogen: Indentation fix Autogen: Don't list all search paths in error message Autogen: Overhaul FindMatchingHeader function Autogen: Acquire and store header extensions in Init() Autogen: Error message tweaks Autogen: Issue a warning if moc isn't required in strict mode Autogen: Loop based macro detection instead of code duplication Autogen: Split moc include paths on info reading Autogen: Synchronize header/source argument names Autogen: Add FindInIncludeDirectories method Autogen: Sort includes before composing include options Autogen: Search moc includes in include directories Autogen: Use GetRealPath in central places only Autogen: Rebuild moc when Q_PLUGIN_METADATA json file changes Autogen: Only touch an unchanged moc_compilation.cpp Autogen: Log simplifications Autogen: Tests: Clean comments Autogen: Tests: Add moc include tests Autogen: Tests: Add Q_PLUGIN_METADATA test Autogen: Sort AutogenInfo.cmake.in Autogen: Optimize GetCompileDefinitionsAndDirectories function Autogen: Overhaul and simplify AutogenInfo.cmake file generation Autogen: Tests: Set different compression levels in rcc test Autogen: Add release notes for Q_PLUGIN_METADATA support Autogen: Documentation update Autogen: Don't use .moc include in Q_PLUGIN_METADATA test Autogen: Log simplifications Autogen: Single point of return in Run() method Autogen: Add AUTOMOC_DEPEND_FILTERS support Autogen: Add AUTOMOC_DEPEND_FILTERS test Autogen: Add AUTOMOC_DEPEND_FILTERS documentation Autogen: Add Quote function and use it for logging Autogen: Add hint to SKIP_AUTOMOC in error message Autogen: Fix for Q_PLUGIN_METADATA change detection test Autogen: Merge FindInIncludeDirectories into FindIncludeFile Autogen: Add subDirPrefix function Autogen: Add AUTOUIC_SEARCH_PATHS support Autogen: Add AUTOUIC_SEARCH_PATHS test Autogen: Add AUTOUIC_SEARCH_PATHS documentation Autogen: Add AUTOUIC_SEARCH_PATHS release notes Autogen: Rename and merge moc related methods Autogen: Add missing return on error Autogen: Parse enabled feature configuration only Autogen: New short InfoGet functions Autogen: Add cmQtAutogeneratorCommon class with shared types and functions Autogen: Remove unused variables Autogen: Embrace qrc file lists in braces in AutogenInfo.cmake Autogen: Add support for generated .qrc files Autogen: Initializer cleanups Autogen: Add AUTOMOC/UIC support for generated source files Autogen: Error return when a scan file is not readable Autogen: Add RunCommand method with built in logging Autogen: Test: Rename autorcc_depends test to rccDepends Autogen: Test: Rename automoc_rerun test to mocRerun Autogen: Test: Add timestamp comparison to moc rerun test Autogen: Test: Add generated file to moc rerun test Autogen: Test: Add generated qrc file to rccDepends test Autogen: Test: Add mocDepends test Autogen: Add generator type enum Autogen: Add AUTOGEN_SOURCE_GROUP support Autogen: Add AUTOGEN_SOURCE_GROUP documentation Autogen: Add AUTOGEN_SOURCE_GROUP release notes Autogen: Tests: More rigorous rcc rebuild tests Autogen: Overhaul class variable names and sorting Autogen: Determine settings file name only once Autogen: MakeParentDirectory logPrefix parameter Autogen: Add FileDiffers and FileWrite methods Autogen: Use FileDiffers and FileWrite for AUTOMOC Autogen: New QuotedCommand function for logging Autogen: Uppercase function name Autogen: Generate moc_predefs.h only on demand Autogen: Save the hash of the old settings string only Autogen: Use FileWrite to write the settings file Autogen: Include moc/uic/rcc binary in settings hash Autogen: Add -DWIN32 to definitions list on demand Autogen: Pass build directory in Info file Autogen: Per-config file suffixes. New AUTOGEN_BUILD_DIR target property. Autogen: Test adaptions Silvio Traversaro (1): FindGSL: recognize libraries name with debug postfix as debug libraries Steven Newbury (3): Add support for x32-abi Modules: Add x32-abi support to hard-coded paths Tests: Add x32 tests to test suite S?bastien GALLOU (1): FindProtobuf: Add option to find static libraries on UNIX Taylor Braun-Jones (1): FindCUDA: Add option to use modern form of target_link_libraries Tibor Szabo (1): FindCygwin: Use find_program instead of find_path Tim (1): Help: Add note about cmake -E copy not supporting wildcards Tim Hutt (2): CPack: Add option to specify --component-plist for productbuild CPack: Add support for CPACK_PRODUCTBULID_RESOURCES_DIR Tom Clune (2): NAG: Extend compiler tool selection with NAG Fortran NAG: Detect compiler version of NAG Fortran Uwe Koloska (1): TestBigEndian: Fix to work with CXX without C Yuriy Khokhulya (1): FindPkgConfig: Fix pkg_check_modules() non-standard location search Zack Galbreath (1): ctest_submit: Add HTTPHEADER option Zsolt Parragi (1): bindexplib: Always export executable symbols, even they are also readable hsc (1): TinyCC: Support ENABLE_EXPORT property libuv upstream (3): libuv 2017-02-21 (52ae8264) libuv 2017-05-09 (e11dcd43) libuv 2017-05-25 (dc596109) rahmjan (1): CodeLite: Distribute source files into folders (virtual directories) vim-cmake-syntax upstream (1): vim-cmake-syntax 2017-05-02 (15526199) yume todo (1): FindBoost: Fix release name candidate list construction ?ubom?r Carik (1): macOS: Enable Hi-DPI support in applications by default ----------------------------------------------------------------------- hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 6 00:05:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 6 Jun 2017 00:05:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc1-3-g1c9ff4a Message-ID: <20170606040506.750DEFAAD1@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 1c9ff4a9642d3af346f5891ce525dc4240edc5d6 (commit) from c095e90f3af78fb3421c80b725ebc6ad9ec85999 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c9ff4a9642d3af346f5891ce525dc4240edc5d6 commit 1c9ff4a9642d3af346f5891ce525dc4240edc5d6 Author: Kitware Robot AuthorDate: Tue Jun 6 00:01:06 2017 -0400 Commit: Kitware Robot CommitDate: Tue Jun 6 00:01:06 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index ff1e260..000e310 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 9) -set(CMake_VERSION_PATCH 20170605) +set(CMake_VERSION_PATCH 20170606) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 7 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 7 Jun 2017 00:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc1-4-g9530f41 Message-ID: <20170607040504.24665FAA91@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 9530f410298804f23ffa3700500f97bae877192c (commit) from 1c9ff4a9642d3af346f5891ce525dc4240edc5d6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9530f410298804f23ffa3700500f97bae877192c commit 9530f410298804f23ffa3700500f97bae877192c Author: Kitware Robot AuthorDate: Wed Jun 7 00:01:07 2017 -0400 Commit: Kitware Robot CommitDate: Wed Jun 7 00:01:07 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 000e310..6dde0f2 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 9) -set(CMake_VERSION_PATCH 20170606) +set(CMake_VERSION_PATCH 20170607) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 7 10:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 7 Jun 2017 10:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc1-10-g5b1d0ae Message-ID: <20170607140505.05354FAB27@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 5b1d0aeffe337e8109d267d88f7533807fb76c31 (commit) via 1ee7a4ec77fe9d3be8160de19ded53e3afe9ce95 (commit) via 0f0a4d43f46cf62c4db17880e60c6c06fe6ea151 (commit) via df18cd1dd57bf661ca81e5b5a5679697047811d7 (commit) via f4ce396254eff94446df92f9900dc501fad65ad8 (commit) via e7869e80ce6ffc538f559aa12dd54bb90ea9945e (commit) from 9530f410298804f23ffa3700500f97bae877192c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5b1d0aeffe337e8109d267d88f7533807fb76c31 commit 5b1d0aeffe337e8109d267d88f7533807fb76c31 Merge: 1ee7a4e f4ce396 Author: Brad King AuthorDate: Wed Jun 7 13:59:08 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 7 09:59:12 2017 -0400 Merge topic 'fix-vs2017-featuredetect' f4ce3962 C++ feature checks: Do not match "0 Warning(s)" as a warning Acked-by: Kitware Robot Merge-request: !930 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ee7a4ec77fe9d3be8160de19ded53e3afe9ce95 commit 1ee7a4ec77fe9d3be8160de19ded53e3afe9ce95 Merge: 0f0a4d4 df18cd1 Author: Brad King AuthorDate: Wed Jun 7 13:56:42 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 7 09:56:44 2017 -0400 Merge topic 'FindGTest-main-debug' df18cd1d FindGTest: Add gtestd_main variant of debug library Acked-by: Kitware Robot Merge-request: !931 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f0a4d43f46cf62c4db17880e60c6c06fe6ea151 commit 0f0a4d43f46cf62c4db17880e60c6c06fe6ea151 Merge: 9530f41 e7869e8 Author: Brad King AuthorDate: Wed Jun 7 13:55:25 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 7 09:55:54 2017 -0400 Merge topic 'cmake_host_system_information-extend' e7869e80 cmake_host_system_information: Add more keywords Acked-by: Kitware Robot Merge-request: !912 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df18cd1dd57bf661ca81e5b5a5679697047811d7 commit df18cd1dd57bf661ca81e5b5a5679697047811d7 Author: Brad King AuthorDate: Tue Jun 6 09:04:00 2017 -0400 Commit: Brad King CommitDate: Tue Jun 6 09:05:17 2017 -0400 FindGTest: Add gtestd_main variant of debug library Current distributions name the debug library variant as `gtestd_main` rather than `gtest_maind`. Fixes: #16940 diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake index c4b4535..0dbf77f 100644 --- a/Modules/FindGTest.cmake +++ b/Modules/FindGTest.cmake @@ -134,12 +134,12 @@ if(MSVC AND GTEST_MSVC_SEARCH STREQUAL "MD") _gtest_find_library(GTEST_LIBRARY gtest-md gtest) _gtest_find_library(GTEST_LIBRARY_DEBUG gtest-mdd gtestd) _gtest_find_library(GTEST_MAIN_LIBRARY gtest_main-md gtest_main) - _gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_main-mdd gtest_maind) + _gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_main-mdd gtestd_main gtest_maind) else() _gtest_find_library(GTEST_LIBRARY gtest) _gtest_find_library(GTEST_LIBRARY_DEBUG gtestd) _gtest_find_library(GTEST_MAIN_LIBRARY gtest_main) - _gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_maind) + _gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtestd_main gtest_maind) endif() include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f4ce396254eff94446df92f9900dc501fad65ad8 commit f4ce396254eff94446df92f9900dc501fad65ad8 Author: Walter Gray AuthorDate: Mon Jun 5 22:43:36 2017 -0700 Commit: Brad King CommitDate: Tue Jun 6 08:55:43 2017 -0400 C++ feature checks: Do not match "0 Warning(s)" as a warning The change in commit v3.9.0-rc1~6^2~1 (C++ feature checks: check output for '[Ww]arning', 2017-06-03) accidentally matches `0 Warning(s)` in the output and always thinks a warning exists, thus failing all checks in Visual Studio builds. Fixes: #16942 diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake index c3835c3..c9a19af 100644 --- a/Source/Checks/cm_cxx_features.cmake +++ b/Source/Checks/cm_cxx_features.cmake @@ -15,7 +15,7 @@ function(cm_check_cxx_feature name) OUTPUT_VARIABLE OUTPUT ) # If using the feature causes warnings, treat it as broken/unavailable. - if(OUTPUT MATCHES "[Ww]arning") + if(OUTPUT MATCHES "[Ww]arning" AND NOT OUTPUT MATCHES "0 Warning") set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE) endif() if(CMake_HAVE_CXX_${FEATURE}) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7869e80ce6ffc538f559aa12dd54bb90ea9945e commit e7869e80ce6ffc538f559aa12dd54bb90ea9945e Author: Florian Maushart AuthorDate: Tue May 30 21:33:18 2017 +0200 Commit: Brad King CommitDate: Mon Jun 5 13:51:30 2017 -0400 cmake_host_system_information: Add more keywords Extend the `cmake_host_system_information()` command to add processor identification keywords. diff --git a/Auxiliary/vim/syntax/cmake.vim b/Auxiliary/vim/syntax/cmake.vim index a191c18..4517603 100644 --- a/Auxiliary/vim/syntax/cmake.vim +++ b/Auxiliary/vim/syntax/cmake.vim @@ -78,7 +78,7 @@ syn keyword cmakeKWbuild_name contained \ CMAKE_CXX_COMPILER syn keyword cmakeKWcmake_host_system_information contained - \ AVAILABLE_PHYSICAL_MEMORY AVAILABLE_VIRTUAL_MEMORY FQDN HOSTNAME NUMBER_OF_LOGICAL_CORES NUMBER_OF_PHYSICAL_CORES QUERY RESULT TOTAL_PHYSICAL_MEMORY TOTAL_VIRTUAL_MEMORY + \ AVAILABLE_PHYSICAL_MEMORY AVAILABLE_VIRTUAL_MEMORY FQDN HOSTNAME NUMBER_OF_LOGICAL_CORES NUMBER_OF_PHYSICAL_CORES QUERY RESULT TOTAL_PHYSICAL_MEMORY TOTAL_VIRTUAL_MEMORY IS_64BIT HAS_FPU HAS_MMX HAS_MMX_PLUS HAS_SSE HAS_SSE2 HAS_SSE_FP HAS_SSE_MMX HAS_AMD_3DNOW HAS_AMD_3DNOW_PLUS HAS_IA64 HAS_SERIAL_NUMBER PROCESSOR_SERIAL_NUMBER PROCESSOR_NAME OS_NAME OS_RELEASE OS_VERSION OS_PLATFORM syn keyword cmakeKWcmake_minimum_required contained \ FATAL_ERROR VERSION diff --git a/Help/command/cmake_host_system_information.rst b/Help/command/cmake_host_system_information.rst index 9402d57..7199874 100644 --- a/Help/command/cmake_host_system_information.rst +++ b/Help/command/cmake_host_system_information.rst @@ -13,13 +13,34 @@ queried. The list of queried values is stored in ````. ```` can be one of the following values: -:: - - NUMBER_OF_LOGICAL_CORES = Number of logical cores. - NUMBER_OF_PHYSICAL_CORES = Number of physical cores. - HOSTNAME = Hostname. - FQDN = Fully qualified domain name. - TOTAL_VIRTUAL_MEMORY = Total virtual memory in megabytes. - AVAILABLE_VIRTUAL_MEMORY = Available virtual memory in megabytes. - TOTAL_PHYSICAL_MEMORY = Total physical memory in megabytes. - AVAILABLE_PHYSICAL_MEMORY = Available physical memory in megabytes. +============================= ================================================ +Key Description +============================= ================================================ +``NUMBER_OF_LOGICAL_CORES`` Number of logical cores +``NUMBER_OF_PHYSICAL_CORES`` Number of physical cores +``HOSTNAME`` Hostname +``FQDN`` Fully qualified domain name +``TOTAL_VIRTUAL_MEMORY`` Total virtual memory in megabytes +``AVAILABLE_VIRTUAL_MEMORY`` Available virtual memory in megabytes +``TOTAL_PHYSICAL_MEMORY`` Total physical memory in megabytes +``AVAILABLE_PHYSICAL_MEMORY`` Available physical memory in megabytes +``IS_64BIT`` One if processor is 64Bit +``HAS_FPU`` One if processor has floating point unit +``HAS_MMX`` One if processor supports MMX instructions +``HAS_MMX_PLUS`` One if porcessor supports Ext. MMX instructions +``HAS_SSE`` One if porcessor supports SSE instructions +``HAS_SSE2`` One if porcessor supports SSE2 instructions +``HAS_SSE_FP`` One if porcessor supports SSE FP instructions +``HAS_SSE_MMX`` One if porcessor supports SSE MMX instructions +``HAS_AMD_3DNOW`` One if porcessor supports 3DNow instructions +``HAS_AMD_3DNOW_PLUS`` One if porcessor supports 3DNow+ instructions +``HAS_IA64`` One if IA64 processor emulating x86 +``HAS_SERIAL_NUMBER`` One if processor has serial number +``PROCESSOR_SERIAL_NUMBER`` Processor serial number +``PROCESSOR_NAME`` Human readable processor name +``PROCESSOR_DESCRIPTION`` Human readable full processor description +``OS_NAME`` See :variable:`CMAKE_HOST_SYSTEM_NAME` +``OS_RELEASE`` The OS sub-type e.g. on Windows ``Professional`` +``OS_VERSION`` The OS build ID +``OS_PLATFORM`` See :variable:`CMAKE_HOST_SYSTEM_PROCESSOR` +============================= ================================================ diff --git a/Help/release/dev/cmake_host_system_information-extend.rst b/Help/release/dev/cmake_host_system_information-extend.rst new file mode 100644 index 0000000..d1c882d --- /dev/null +++ b/Help/release/dev/cmake_host_system_information-extend.rst @@ -0,0 +1,6 @@ +cmake_host_system_information-extend +------------------------------------ + +* The :command:`cmake_host_system_information` command learned more keys + to get information about the processor capabilities and the host OS + version. diff --git a/Source/cmCMakeHostSystemInformationCommand.cxx b/Source/cmCMakeHostSystemInformationCommand.cxx index 4475c5a..5106f52 100644 --- a/Source/cmCMakeHostSystemInformationCommand.cxx +++ b/Source/cmCMakeHostSystemInformationCommand.cxx @@ -76,6 +76,55 @@ bool cmCMakeHostSystemInformationCommand::GetValue( value = this->ValueToString(info.GetTotalPhysicalMemory()); } else if (key == "AVAILABLE_PHYSICAL_MEMORY") { value = this->ValueToString(info.GetAvailablePhysicalMemory()); + } else if (key == "IS_64BIT") { + value = this->ValueToString(info.Is64Bits()); + } else if (key == "HAS_FPU") { + value = this->ValueToString( + info.DoesCPUSupportFeature(cmsys::SystemInformation::CPU_FEATURE_FPU)); + } else if (key == "HAS_MMX") { + value = this->ValueToString( + info.DoesCPUSupportFeature(cmsys::SystemInformation::CPU_FEATURE_MMX)); + } else if (key == "HAS_MMX_PLUS") { + value = this->ValueToString(info.DoesCPUSupportFeature( + cmsys::SystemInformation::CPU_FEATURE_MMX_PLUS)); + } else if (key == "HAS_SSE") { + value = this->ValueToString( + info.DoesCPUSupportFeature(cmsys::SystemInformation::CPU_FEATURE_SSE)); + } else if (key == "HAS_SSE2") { + value = this->ValueToString( + info.DoesCPUSupportFeature(cmsys::SystemInformation::CPU_FEATURE_SSE2)); + } else if (key == "HAS_SSE_FP") { + value = this->ValueToString(info.DoesCPUSupportFeature( + cmsys::SystemInformation::CPU_FEATURE_SSE_FP)); + } else if (key == "HAS_SSE_MMX") { + value = this->ValueToString(info.DoesCPUSupportFeature( + cmsys::SystemInformation::CPU_FEATURE_SSE_MMX)); + } else if (key == "HAS_AMD_3DNOW") { + value = this->ValueToString(info.DoesCPUSupportFeature( + cmsys::SystemInformation::CPU_FEATURE_AMD_3DNOW)); + } else if (key == "HAS_AMD_3DNOW_PLUS") { + value = this->ValueToString(info.DoesCPUSupportFeature( + cmsys::SystemInformation::CPU_FEATURE_AMD_3DNOW_PLUS)); + } else if (key == "HAS_IA64") { + value = this->ValueToString( + info.DoesCPUSupportFeature(cmsys::SystemInformation::CPU_FEATURE_IA64)); + } else if (key == "HAS_SERIAL_NUMBER") { + value = this->ValueToString(info.DoesCPUSupportFeature( + cmsys::SystemInformation::CPU_FEATURE_SERIALNUMBER)); + } else if (key == "PROCESSOR_NAME") { + value = this->ValueToString(info.GetExtendedProcessorName()); + } else if (key == "PROCESSOR_DESCRIPTION") { + value = info.GetCPUDescription(); + } else if (key == "PROCESSOR_SERIAL_NUMBER") { + value = this->ValueToString(info.GetProcessorSerialNumber()); + } else if (key == "OS_NAME") { + value = this->ValueToString(info.GetOSName()); + } else if (key == "OS_RELEASE") { + value = this->ValueToString(info.GetOSRelease()); + } else if (key == "OS_VERSION") { + value = this->ValueToString(info.GetOSVersion()); + } else if (key == "OS_PLATFORM") { + value = this->ValueToString(info.GetOSPlatform()); #ifdef HAVE_VS_SETUP_HELPER } else if (key == "VS_15_DIR") { cmVSSetupAPIHelper vsSetupAPIHelper; diff --git a/Tests/CMakeTests/CMakeHostSystemInformationTest.cmake.in b/Tests/CMakeTests/CMakeHostSystemInformationTest.cmake.in index 3294a2f..a3c2b05 100644 --- a/Tests/CMakeTests/CMakeHostSystemInformationTest.cmake.in +++ b/Tests/CMakeTests/CMakeHostSystemInformationTest.cmake.in @@ -22,6 +22,25 @@ try_and_print(TOTAL_VIRTUAL_MEMORY) try_and_print(AVAILABLE_VIRTUAL_MEMORY) try_and_print(TOTAL_PHYSICAL_MEMORY) try_and_print(AVAILABLE_PHYSICAL_MEMORY) +try_and_print(IS_64BIT) +try_and_print(HAS_FPU) +try_and_print(HAS_MMX) +try_and_print(HAS_MMX_PLUS) +try_and_print(HAS_SSE) +try_and_print(HAS_SSE2) +try_and_print(HAS_SSE_FP) +try_and_print(HAS_SSE_MMX) +try_and_print(HAS_AMD_3DNOW) +try_and_print(HAS_AMD_3DNOW_PLUS) +try_and_print(HAS_IA64) +try_and_print(HAS_SERIAL_NUMBER) +try_and_print(PROCESSOR_SERIAL_NUMBER) +try_and_print(PROCESSOR_NAME) +try_and_print(PROCESSOR_DESCRIPTION) +try_and_print(OS_NAME) +try_and_print(OS_RELEASE) +try_and_print(OS_VERSION) +try_and_print(OS_PLATFORM) include("@CMAKE_CURRENT_SOURCE_DIR@/CheckCMakeTest.cmake") ----------------------------------------------------------------------- Summary of changes: Auxiliary/vim/syntax/cmake.vim | 2 +- Help/command/cmake_host_system_information.rst | 41 ++++++++++++---- .../dev/cmake_host_system_information-extend.rst | 6 +++ Modules/FindGTest.cmake | 4 +- Source/Checks/cm_cxx_features.cmake | 2 +- Source/cmCMakeHostSystemInformationCommand.cxx | 49 ++++++++++++++++++++ .../CMakeHostSystemInformationTest.cmake.in | 19 ++++++++ 7 files changed, 109 insertions(+), 14 deletions(-) create mode 100644 Help/release/dev/cmake_host_system_information-extend.rst hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 7 11:15:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 7 Jun 2017 11:15:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc1-19-ga10c3cc Message-ID: <20170607151502.E3221F9BA5@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via a10c3cc69f037aefc5828b0cad6e44d09ddb39f2 (commit) via d3f3759bfbb8aa69785df183e14204c5b416bc5b (commit) via 67c0b56e3c31422f546a963a0d571b85c98534a0 (commit) via 44e323ca9281eb039b148165e4779310aad3bfcc (commit) via 137938e5f02c480b5c5f1f0f282f612c7e911f10 (commit) via b9d411eb258476a0eb603ac078b01b335661714a (commit) via cc1b513df143161e437c261cc385225cb4191d16 (commit) via 5f8271962b3498ba0e2cb3756afa8f785b275e78 (commit) via 56136e6315aa0c2a3e1a11f9c795c180f1cf6a9e (commit) from 5b1d0aeffe337e8109d267d88f7533807fb76c31 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a10c3cc69f037aefc5828b0cad6e44d09ddb39f2 commit a10c3cc69f037aefc5828b0cad6e44d09ddb39f2 Merge: d3f3759 44e323c Author: Brad King AuthorDate: Wed Jun 7 11:11:17 2017 -0400 Commit: Brad King CommitDate: Wed Jun 7 11:11:17 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3f3759bfbb8aa69785df183e14204c5b416bc5b commit d3f3759bfbb8aa69785df183e14204c5b416bc5b Merge: 67c0b56 137938e Author: Brad King AuthorDate: Wed Jun 7 15:08:19 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 7 11:09:02 2017 -0400 Merge topic 'doc-3.9-find_dependency' 137938e5 Help: Add 3.9 release note about find_dependency update Acked-by: Kitware Robot Merge-request: !933 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=67c0b56e3c31422f546a963a0d571b85c98534a0 commit 67c0b56e3c31422f546a963a0d571b85c98534a0 Merge: 5b1d0ae cc1b513 Author: Brad King AuthorDate: Wed Jun 7 15:08:05 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 7 11:08:13 2017 -0400 Merge topic 'autogen-no-vs-per-config' cc1b513d Autogen: Do not use per-config file suffixes with VS yet Acked-by: Kitware Robot Merge-request: !932 ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-qt.7.rst | 9 --------- Help/prop_tgt/AUTOMOC.rst | 7 ------- Help/prop_tgt/AUTOUIC.rst | 3 --- Help/release/3.9.rst | 5 +++++ Source/cmQtAutoGeneratorInitializer.cxx | 4 ++++ 5 files changed, 9 insertions(+), 19 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 7 11:15:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 7 Jun 2017 11:15:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc1-8-g44e323c Message-ID: <20170607151503.030A2F9BC8@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via 44e323ca9281eb039b148165e4779310aad3bfcc (commit) via 137938e5f02c480b5c5f1f0f282f612c7e911f10 (commit) via b9d411eb258476a0eb603ac078b01b335661714a (commit) via cc1b513df143161e437c261cc385225cb4191d16 (commit) via 5f8271962b3498ba0e2cb3756afa8f785b275e78 (commit) via df18cd1dd57bf661ca81e5b5a5679697047811d7 (commit) via 56136e6315aa0c2a3e1a11f9c795c180f1cf6a9e (commit) via f4ce396254eff94446df92f9900dc501fad65ad8 (commit) from 344f9ed96a4cc457810ca84cf6549f7a4218fd8a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-qt.7.rst | 9 --------- Help/prop_tgt/AUTOMOC.rst | 7 ------- Help/prop_tgt/AUTOUIC.rst | 3 --- Help/release/3.9.rst | 5 +++++ Modules/FindGTest.cmake | 4 ++-- Source/Checks/cm_cxx_features.cmake | 2 +- Source/cmQtAutoGeneratorInitializer.cxx | 4 ++++ 7 files changed, 12 insertions(+), 22 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 7 12:45:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 7 Jun 2017 12:45:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc1-21-gc8a8687 Message-ID: <20170607164504.0200DFAA64@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via c8a8687bcbd6f15ac2257e642367d451b8b4aae1 (commit) via ab2954c4716a96fcd00f7fcf1f8592093bbb7627 (commit) from a10c3cc69f037aefc5828b0cad6e44d09ddb39f2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8a8687bcbd6f15ac2257e642367d451b8b4aae1 commit c8a8687bcbd6f15ac2257e642367d451b8b4aae1 Merge: a10c3cc ab2954c Author: Brad King AuthorDate: Wed Jun 7 16:42:01 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 7 12:42:04 2017 -0400 Merge topic 'revert-FindGTest-main-debug' ab2954c4 Revert "FindGTest: Add gtestd_main variant of debug library" Acked-by: Kitware Robot Merge-request: !936 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ab2954c4716a96fcd00f7fcf1f8592093bbb7627 commit ab2954c4716a96fcd00f7fcf1f8592093bbb7627 Author: Brad King AuthorDate: Wed Jun 7 12:38:25 2017 -0400 Commit: Brad King CommitDate: Wed Jun 7 12:38:25 2017 -0400 Revert "FindGTest: Add gtestd_main variant of debug library" The reported variant turned out to be due to a local configuration problem. Issue: #16940 diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake index 0dbf77f..c4b4535 100644 --- a/Modules/FindGTest.cmake +++ b/Modules/FindGTest.cmake @@ -134,12 +134,12 @@ if(MSVC AND GTEST_MSVC_SEARCH STREQUAL "MD") _gtest_find_library(GTEST_LIBRARY gtest-md gtest) _gtest_find_library(GTEST_LIBRARY_DEBUG gtest-mdd gtestd) _gtest_find_library(GTEST_MAIN_LIBRARY gtest_main-md gtest_main) - _gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_main-mdd gtestd_main gtest_maind) + _gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_main-mdd gtest_maind) else() _gtest_find_library(GTEST_LIBRARY gtest) _gtest_find_library(GTEST_LIBRARY_DEBUG gtestd) _gtest_find_library(GTEST_MAIN_LIBRARY gtest_main) - _gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtestd_main gtest_maind) + _gtest_find_library(GTEST_MAIN_LIBRARY_DEBUG gtest_maind) endif() include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) ----------------------------------------------------------------------- Summary of changes: Modules/FindGTest.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 7 13:35:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 7 Jun 2017 13:35:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc1-26-gb6e3557 Message-ID: <20170607173502.C3FE4FA9C3@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via b6e35578b6fdac4f4dd65821cbd7d7186d093df2 (commit) via b8b8f0c0fd1f5a5c4739e2edad21edd4f80c6993 (commit) via 1c6d03729a9e1e92259cd5d2362e5df9f3b56d34 (commit) via 893ee1b17c310f64c47cf1ebb9b9e5a839ea1940 (commit) via bc5a252a7b1a115c783950caab0c96bf13e7150e (commit) from c8a8687bcbd6f15ac2257e642367d451b8b4aae1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b6e35578b6fdac4f4dd65821cbd7d7186d093df2 commit b6e35578b6fdac4f4dd65821cbd7d7186d093df2 Merge: b8b8f0c 1c6d037 Author: Brad King AuthorDate: Wed Jun 7 13:26:44 2017 -0400 Commit: Brad King CommitDate: Wed Jun 7 13:26:44 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8b8f0c0fd1f5a5c4739e2edad21edd4f80c6993 commit b8b8f0c0fd1f5a5c4739e2edad21edd4f80c6993 Merge: c8a8687 893ee1b Author: Brad King AuthorDate: Wed Jun 7 17:12:58 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 7 13:25:21 2017 -0400 Merge topic 'FindDoxygen-compat' 893ee1b1 FindDoxygen: Restore DOXYGEN_DOT_FOUND variable Acked-by: Kitware Robot Merge-request: !935 ----------------------------------------------------------------------- Summary of changes: Modules/FindDoxygen.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 7 13:35:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 7 Jun 2017 13:35:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc1-12-g1c6d037 Message-ID: <20170607173502.E8407FA9CD@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via 1c6d03729a9e1e92259cd5d2362e5df9f3b56d34 (commit) via 893ee1b17c310f64c47cf1ebb9b9e5a839ea1940 (commit) via bc5a252a7b1a115c783950caab0c96bf13e7150e (commit) via ab2954c4716a96fcd00f7fcf1f8592093bbb7627 (commit) from 44e323ca9281eb039b148165e4779310aad3bfcc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Modules/FindDoxygen.cmake | 2 +- Modules/FindGTest.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 7 14:35:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 7 Jun 2017 14:35:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-15-gf203669 Message-ID: <20170607183502.2C96DFA84B@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via f203669bcc1703638ff282c7ce33c1cdb90e1d95 (commit) via 010b50fda71feaff3abec4d13910f4a4bd1f13b0 (commit) from b6e35578b6fdac4f4dd65821cbd7d7186d093df2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f203669bcc1703638ff282c7ce33c1cdb90e1d95 commit f203669bcc1703638ff282c7ce33c1cdb90e1d95 Merge: b6e3557 010b50f Author: Brad King AuthorDate: Wed Jun 7 14:31:54 2017 -0400 Commit: Brad King CommitDate: Wed Jun 7 14:31:54 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 7 14:35:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 7 Jun 2017 14:35:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc2 Message-ID: <20170607183502.3D8DDFA851@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via 010b50fda71feaff3abec4d13910f4a4bd1f13b0 (commit) from 1c6d03729a9e1e92259cd5d2362e5df9f3b56d34 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 7 14:35:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 7 Jun 2017 14:35:02 -0400 (EDT) Subject: [Cmake-commits] CMake annotated tag, v3.9.0-rc2, created. v3.9.0-rc2 Message-ID: <20170607183502.4B70BFA84B@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The annotated tag, v3.9.0-rc2 has been created at a4dc0f634b99945b77ec501c6e70005d9e0cc4d9 (tag) tagging 010b50fda71feaff3abec4d13910f4a4bd1f13b0 (commit) replaces v3.9.0-rc1 tagged by Brad King on Wed Jun 7 14:31:36 2017 -0400 - Log ----------------------------------------------------------------- CMake 3.9.0-rc2 -----BEGIN PGP SIGNATURE----- iQJKBAABCAA0FiEExsJlMku+vcNQtRPQLSzvEDSSFoQFAlk4RogWHGJyYWQua2lu Z0BraXR3YXJlLmNvbQAKCRAtLO8QNJIWhK94EACOh9JXYTNJcHwWrrwgeVsAwK/R 6SDRMlndNCKTDpPi2FMogq/f/WY8llZ8wKqULrtJDPTe8RDHy0wNljmgoziTcSW0 9+4IfBd9LjW2q9I5eqfnP9bFLINfkNc1x7X5dSjNosbs0c7u8XFElMO/sxIX8Wxu jzItO7or3HsMjbSxbKLcP1yA3YFji+tcMrnKqZI+MLrQGyAfvWicGQQFYIjM968V 0Sp2x0ESAuf09jVl/cqHYI0vdJbUwNo2PAsHJ513Eu01FOe7R6CLpxctAyclyG7Z npOFU8mNEEcpQjJDZtXG/hJlF6yiNlYqTvJqYB1VncIm7AFHQFHIeTb70uPpuFl+ WUazPVVht64rPqaGJ4T2+o+tZNkGJ0NJlb6VKSlebK7UKJHmo+vJWeAO+oivJ6zw cYC0h3KkezzCmLSa+j28p4VWSWPxH3b8yRyNQP63wvn4RJ9ZdgDOGdyPWAUeviGq lJCHjWFpc4vZv/O5UPoS+d816vh6uSU150AirXNT22XzYND6S4YuuFHczABQlBaq jUMwOzr6dpOTl8U8i5hoWJ1pFUBxF/HE8yLJZvqkWu3p7ejFUIyIU47xDBl4ZeyH T9EZOeVhp4gr3ww4zjDBCtAcZuN2ULNvSzVhTa8LfctRgPy6Qt3KgMuLOpB1jF13 GpnpsWEvKSPSo+SKfQ== =WOw0 -----END PGP SIGNATURE----- Brad King (10): Merge branch 'fix-vs2017-featuredetect' into release-3.9 FindGTest: Add gtestd_main variant of debug library Merge branch 'FindGTest-main-debug' into release-3.9 Autogen: Do not use per-config file suffixes with VS yet Merge branch 'autogen-no-vs-per-config' into release-3.9 Merge branch 'doc-3.9-find_dependency' into release-3.9 Revert "FindGTest: Add gtestd_main variant of debug library" Merge branch 'revert-FindGTest-main-debug' into release-3.9 Merge branch 'FindDoxygen-compat' into release-3.9 CMake 3.9.0-rc2 Konstantin Podsvirov (1): FindDoxygen: Restore DOXYGEN_DOT_FOUND variable Matthew Woehlke (1): Help: Add 3.9 release note about find_dependency update Walter Gray (1): C++ feature checks: Do not match "0 Warning(s)" as a warning ----------------------------------------------------------------------- hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 8 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 8 Jun 2017 00:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-16-gbf06d72 Message-ID: <20170608040504.D3024FAA23@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via bf06d72f398cd4a8da2a3ae39ff9421209bd6964 (commit) from f203669bcc1703638ff282c7ce33c1cdb90e1d95 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf06d72f398cd4a8da2a3ae39ff9421209bd6964 commit bf06d72f398cd4a8da2a3ae39ff9421209bd6964 Author: Kitware Robot AuthorDate: Thu Jun 8 00:01:06 2017 -0400 Commit: Kitware Robot CommitDate: Thu Jun 8 00:01:06 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 6dde0f2..33e3186 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 9) -set(CMake_VERSION_PATCH 20170607) +set(CMake_VERSION_PATCH 20170608) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 8 09:05:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 8 Jun 2017 09:05:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-18-g2a83bff Message-ID: <20170608130503.8FB6BFAB4F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 2a83bffdb9c845545eb8f533a19b32688cfc48b8 (commit) via 488ffbef4f63a49d1a2a9c30eaaa7956df809ddd (commit) from bf06d72f398cd4a8da2a3ae39ff9421209bd6964 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a83bffdb9c845545eb8f533a19b32688cfc48b8 commit 2a83bffdb9c845545eb8f533a19b32688cfc48b8 Merge: bf06d72 488ffbe Author: Brad King AuthorDate: Thu Jun 8 12:55:11 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 8 08:56:03 2017 -0400 Merge topic 'suppress-false-positive-warning' 488ffbef CTestCustom: Suppress warning matched on source file name Acked-by: Kitware Robot Merge-request: !934 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=488ffbef4f63a49d1a2a9c30eaaa7956df809ddd commit 488ffbef4f63a49d1a2a9c30eaaa7956df809ddd Author: Brad King AuthorDate: Wed Jun 7 10:46:20 2017 -0400 Commit: Brad King CommitDate: Wed Jun 7 10:46:20 2017 -0400 CTestCustom: Suppress warning matched on source file name The `WarningMessagesDialog.cxx` source file name is displayed by MSVC in the compiler output, and the CTest launcher matches the name as a warning line starting in "Warning". Suppress this false positive with a custom exception. diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index fa2fbe3..6a37275 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -44,6 +44,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "Warning: LINN32: Last line.*is less.*" "Warning: Olimit was exceeded on function.*" "Warning: To override Olimit for all functions in file.*" + "WarningMessagesDialog\\.cxx" "warning.*directory name.*CMake-Xcode.*/bin/.*does not exist.*" "stl_deque.h:1051" "(Lexer|Parser).*warning.*conversion.*may (alter its value|change the sign)" ----------------------------------------------------------------------- Summary of changes: CTestCustom.cmake.in | 1 + 1 file changed, 1 insertion(+) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 8 09:35:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 8 Jun 2017 09:35:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-23-gcab94b7 Message-ID: <20170608133507.0DFA0FABAF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via cab94b7c4f82653796e407c90c8d348e8f45a904 (commit) via 9c0d1e7531edbebc7943d5b981353b17631ed632 (commit) via 567bac890c060c56ff311bda24280873c8641b0a (commit) via 380bd70cc2cea6b77e24c2424374365ac30fa046 (commit) via e61979a71cb7a32bdaa19aca9dbb3c8dfcb2e495 (commit) from 2a83bffdb9c845545eb8f533a19b32688cfc48b8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cab94b7c4f82653796e407c90c8d348e8f45a904 commit cab94b7c4f82653796e407c90c8d348e8f45a904 Merge: 2a83bff 9c0d1e7 Author: Brad King AuthorDate: Thu Jun 8 13:24:10 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 8 09:25:52 2017 -0400 Merge topic 'bootstrap-cleanup' 9c0d1e75 bootstrap: implement cmake_extract_standard_flags() without loop 567bac89 bootstrap: use "grep -q" instead of output redirection 380bd70c bootstrap: implement cmake_toupper() using tr e61979a7 bootstrap: don't use 'cat x | sed', let sed open the file instead Acked-by: Kitware Robot Merge-request: !937 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c0d1e7531edbebc7943d5b981353b17631ed632 commit 9c0d1e7531edbebc7943d5b981353b17631ed632 Author: Rolf Eike Beer AuthorDate: Wed Jun 7 19:34:10 2017 +0200 Commit: Rolf Eike Beer CommitDate: Wed Jun 7 19:52:40 2017 +0200 bootstrap: implement cmake_extract_standard_flags() without loop Pass all files to sed at once, and don't even change the directory for this. diff --git a/bootstrap b/bootstrap index c89bffc..2cf7847 100755 --- a/bootstrap +++ b/bootstrap @@ -9,11 +9,8 @@ die() { # Compile flag extraction function. cmake_extract_standard_flags() { - cd "${cmake_source_dir}/Modules/Compiler/" - for file in ${1:-*}-${2}.cmake; do - sed -n "s/ *set *( *CMAKE_${2}${3}_EXTENSION_COMPILE_OPTION *\"\{0,1\}\([^\")]*\).*/\1/p" \ - "${file}" | tr ';' ' ' - done + sed -n "s/ *set *( *CMAKE_${2}${3}_EXTENSION_COMPILE_OPTION *\"\{0,1\}\([^\")]*\).*/\1/p" \ + "${file}" "${cmake_source_dir}/Modules/Compiler/"${1:-*}-${2}.cmake 2>/dev/null | tr ';' ' ' } # Version number extraction function. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=567bac890c060c56ff311bda24280873c8641b0a commit 567bac890c060c56ff311bda24280873c8641b0a Author: Rolf Eike Beer AuthorDate: Wed Jun 7 19:22:35 2017 +0200 Commit: Rolf Eike Beer CommitDate: Wed Jun 7 19:52:40 2017 +0200 bootstrap: use "grep -q" instead of output redirection diff --git a/bootstrap b/bootstrap index 280655e..c89bffc 100755 --- a/bootstrap +++ b/bootstrap @@ -83,7 +83,7 @@ cmake_sphinx_build="" cmake_sphinx_flags="" # Determine whether this is a Cygwin environment. -if echo "${cmake_system}" | grep CYGWIN >/dev/null 2>&1; then +if echo "${cmake_system}" | grep -q CYGWIN; then cmake_system_cygwin=true cmake_doc_dir_keyword="CYGWIN" cmake_man_dir_keyword="CYGWIN" @@ -92,21 +92,21 @@ else fi # Determine whether this is a MinGW environment. -if echo "${cmake_system}" | grep 'MINGW\|MSYS' >/dev/null 2>&1; then +if echo "${cmake_system}" | grep -q 'MINGW\|MSYS'; then cmake_system_mingw=true else cmake_system_mingw=false fi # Determine whether this is OS X -if echo "${cmake_system}" | grep Darwin >/dev/null 2>&1; then +if echo "${cmake_system}" | grep -q Darwin; then cmake_system_darwin=true else cmake_system_darwin=false fi # Determine whether this is BeOS -if echo "${cmake_system}" | grep BeOS >/dev/null 2>&1; then +if echo "${cmake_system}" | grep -q BeOS; then cmake_system_beos=true cmake_doc_dir_keyword="HAIKU" cmake_man_dir_keyword="HAIKU" @@ -115,7 +115,7 @@ else fi # Determine whether this is Haiku -if echo "${cmake_system}" | grep Haiku >/dev/null 2>&1; then +if echo "${cmake_system}" | grep -q Haiku; then cmake_system_haiku=true cmake_doc_dir_keyword="HAIKU" cmake_man_dir_keyword="HAIKU" @@ -124,21 +124,21 @@ else fi # Determine whether this is OpenVMS -if echo "${cmake_system}" | grep OpenVMS >/dev/null 2>&1; then +if echo "${cmake_system}" | grep -q OpenVMS; then cmake_system_openvms=true else cmake_system_openvms=false fi # Determine whether this is HP-UX -if echo "${cmake_system}" | grep HP-UX >/dev/null 2>&1; then +if echo "${cmake_system}" | grep -q HP-UX; then cmake_system_hpux=true else cmake_system_hpux=false fi # Determine whether this is Linux -if echo "${cmake_system}" | grep Linux >/dev/null 2>&1; then +if echo "${cmake_system}" | grep -q Linux; then cmake_system_linux=true else cmake_system_linux=false @@ -149,11 +149,11 @@ else # may falsely detect parisc on HP-UX m68k cmake_machine_parisc=false if ${cmake_system_linux}; then - if uname -m | grep parisc >/dev/null 2>&1; then + if uname -m | grep -q parisc; then cmake_machine_parisc=true fi elif ${cmake_system_hpux}; then - if uname -m | grep ia64 >/dev/null 2>&1; then : ; else + if uname -m | grep -q ia64; then : ; else cmake_machine_parisc=true fi fi https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=380bd70cc2cea6b77e24c2424374365ac30fa046 commit 380bd70cc2cea6b77e24c2424374365ac30fa046 Author: Rolf Eike Beer AuthorDate: Wed Jun 7 19:17:42 2017 +0200 Commit: Rolf Eike Beer CommitDate: Wed Jun 7 19:52:40 2017 +0200 bootstrap: implement cmake_toupper() using tr diff --git a/bootstrap b/bootstrap index 46f81c5..280655e 100755 --- a/bootstrap +++ b/bootstrap @@ -41,7 +41,7 @@ cmake_install_dest_default() cmake_toupper() { - echo "$1" | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' + echo "$1" | tr '[:lower:]' '[:upper:]' } # Detect system and directory information. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e61979a71cb7a32bdaa19aca9dbb3c8dfcb2e495 commit e61979a71cb7a32bdaa19aca9dbb3c8dfcb2e495 Author: Rolf Eike Beer AuthorDate: Wed Jun 7 19:16:42 2017 +0200 Commit: Rolf Eike Beer CommitDate: Wed Jun 7 19:52:40 2017 +0200 bootstrap: don't use 'cat x | sed', let sed open the file instead diff --git a/bootstrap b/bootstrap index 84df54a..46f81c5 100755 --- a/bootstrap +++ b/bootstrap @@ -11,24 +11,23 @@ cmake_extract_standard_flags() { cd "${cmake_source_dir}/Modules/Compiler/" for file in ${1:-*}-${2}.cmake; do - cat "${file}" \ - | sed -n "s/ *set *( *CMAKE_${2}${3}_EXTENSION_COMPILE_OPTION *\"\{0,1\}\([^\")]*\).*/\1/p" \ - | tr ';' ' ' + sed -n "s/ *set *( *CMAKE_${2}${3}_EXTENSION_COMPILE_OPTION *\"\{0,1\}\([^\")]*\).*/\1/p" \ + "${file}" | tr ';' ' ' done } # Version number extraction function. cmake_version_component() { - cat "${cmake_source_dir}/Source/CMakeVersion.cmake" | sed -n " + sed -n " /^set(CMake_VERSION_${1}/ {s/set(CMake_VERSION_${1} *\([0-9]*\))/\1/;p;} -" +" "${cmake_source_dir}/Source/CMakeVersion.cmake" } # Install destination extraction function. cmake_install_dest_default() { - cat "${cmake_source_dir}/Source/CMakeInstallDestinations.cmake" | sed -n ' + sed -n ' /^ *set(CMAKE_'"${1}"'_DIR_DEFAULT.*) # '"${2}"'$/ { s/^ *set(CMAKE_'"${1}"'_DIR_DEFAULT *"\([^"]*\)").*$/\1/ s/${CMake_VERSION_MAJOR}/'"${cmake_version_major}"'/ @@ -37,7 +36,7 @@ cmake_install_dest_default() p q } -' +' "${cmake_source_dir}/Source/CMakeInstallDestinations.cmake" } cmake_toupper() @@ -581,8 +580,7 @@ cmake_replace_string () SEARCHFOR="$3" REPLACEWITH="$4" if [ -f "${INFILE}" ] || ${cmake_system_openvms}; then - cat "${INFILE}" | - sed "s/\@${SEARCHFOR}\@/${REPLACEWITH}/g" > "${OUTFILE}${_tmp}" + sed "s/\@${SEARCHFOR}\@/${REPLACEWITH}/g" "${INFILE}" > "${OUTFILE}${_tmp}" if [ -f "${OUTFILE}${_tmp}" ]; then if "${_diff}" "${OUTFILE}" "${OUTFILE}${_tmp}" > /dev/null 2> /dev/null ; then #echo "Files are the same" @@ -604,15 +602,14 @@ cmake_kwsys_config_replace_string () APPEND="$*" if [ -f "${INFILE}" ] || ${cmake_system_openvms}; then echo "${APPEND}" > "${OUTFILE}${_tmp}" - cat "${INFILE}" | - sed "/./ {s/\@KWSYS_NAMESPACE\@/cmsys/g; - s/@KWSYS_BUILD_SHARED@/${KWSYS_BUILD_SHARED}/g; - s/@KWSYS_LFS_AVAILABLE@/${KWSYS_LFS_AVAILABLE}/g; - s/@KWSYS_LFS_REQUESTED@/${KWSYS_LFS_REQUESTED}/g; - s/@KWSYS_NAME_IS_KWSYS@/${KWSYS_NAME_IS_KWSYS}/g; - s/@KWSYS_STL_HAS_WSTRING@/${KWSYS_STL_HAS_WSTRING}/g; - s/@KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H@/${KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H}/g; - }" >> "${OUTFILE}${_tmp}" + sed "/./ {s/\@KWSYS_NAMESPACE\@/cmsys/g; + s/@KWSYS_BUILD_SHARED@/${KWSYS_BUILD_SHARED}/g; + s/@KWSYS_LFS_AVAILABLE@/${KWSYS_LFS_AVAILABLE}/g; + s/@KWSYS_LFS_REQUESTED@/${KWSYS_LFS_REQUESTED}/g; + s/@KWSYS_NAME_IS_KWSYS@/${KWSYS_NAME_IS_KWSYS}/g; + s/@KWSYS_STL_HAS_WSTRING@/${KWSYS_STL_HAS_WSTRING}/g; + s/@KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H@/${KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H}/g; + }" "${INFILE}" >> "${OUTFILE}${_tmp}" if [ -f "${OUTFILE}${_tmp}" ]; then if "${_diff}" "${OUTFILE}" "${OUTFILE}${_tmp}" > /dev/null 2> /dev/null ; then #echo "Files are the same" ----------------------------------------------------------------------- Summary of changes: bootstrap | 58 ++++++++++++++++++++++++++-------------------------------- 1 file changed, 26 insertions(+), 32 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 9 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 9 Jun 2017 00:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-24-g51e1e23 Message-ID: <20170609040504.36FBDFA9A3@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 51e1e23cf477e3918e7b98b7ae14a7041d0734f8 (commit) from cab94b7c4f82653796e407c90c8d348e8f45a904 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=51e1e23cf477e3918e7b98b7ae14a7041d0734f8 commit 51e1e23cf477e3918e7b98b7ae14a7041d0734f8 Author: Kitware Robot AuthorDate: Fri Jun 9 00:01:04 2017 -0400 Commit: Kitware Robot CommitDate: Fri Jun 9 00:01:04 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 33e3186..6630aa6 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 9) -set(CMake_VERSION_PATCH 20170608) +set(CMake_VERSION_PATCH 20170609) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 9 10:05:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 9 Jun 2017 10:05:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-26-g55d752b Message-ID: <20170609140504.01302FAA34@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 55d752b10855f22642dc69fd99a79af6d085831b (commit) via f44d9bcc8f09c3a135fa0feb82e9d71c475eb196 (commit) from 51e1e23cf477e3918e7b98b7ae14a7041d0734f8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=55d752b10855f22642dc69fd99a79af6d085831b commit 55d752b10855f22642dc69fd99a79af6d085831b Merge: 51e1e23 f44d9bc Author: Brad King AuthorDate: Fri Jun 9 14:00:41 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 9 10:00:57 2017 -0400 Merge topic 'improve-msvc-feature-checks' f44d9bcc C++ feature checks: Improve exclusion of "0 Warning(s)" Acked-by: Kitware Robot Merge-request: !938 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f44d9bcc8f09c3a135fa0feb82e9d71c475eb196 commit f44d9bcc8f09c3a135fa0feb82e9d71c475eb196 Author: Brad King AuthorDate: Thu Jun 8 09:21:21 2017 -0400 Commit: Brad King CommitDate: Thu Jun 8 09:22:09 2017 -0400 C++ feature checks: Improve exclusion of "0 Warning(s)" Simply matching "0 Warning" may match "10 Warning(s)". Instead remove the entire ` 0 Warning(s)` content from the MSBuild output before searching it for warnings. Issue: #16942 diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake index c9a19af..3b08025 100644 --- a/Source/Checks/cm_cxx_features.cmake +++ b/Source/Checks/cm_cxx_features.cmake @@ -14,8 +14,10 @@ function(cm_check_cxx_feature name) CMAKE_FLAGS ${maybe_cxx_standard} OUTPUT_VARIABLE OUTPUT ) + # Filter out MSBuild output that looks like a warning. + string(REGEX REPLACE " +0 Warning\\(s\\)" "" check_output "${OUTPUT}") # If using the feature causes warnings, treat it as broken/unavailable. - if(OUTPUT MATCHES "[Ww]arning" AND NOT OUTPUT MATCHES "0 Warning") + if(check_output MATCHES "[Ww]arning") set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE) endif() if(CMake_HAVE_CXX_${FEATURE}) ----------------------------------------------------------------------- Summary of changes: Source/Checks/cm_cxx_features.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 9 10:15:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 9 Jun 2017 10:15:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-33-g9dd1d35 Message-ID: <20170609141503.35672F382E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 9dd1d351fe2cb90e3adbe5cb191f6a3727f78979 (commit) via 7150082aa86223a441575a95e4a50107e22e9a0d (commit) via c8a866b8c47f25ffd5e63e82bf4e501344bf7740 (commit) via ae22079808d708d630dacf3bcd368a123e6bcedf (commit) via 522c92d752753089f4bd50552955883a6f005570 (commit) via 83784ed18bc2b6edcfb9400c350562356ef554f2 (commit) via 43dae6459797ccebc53956050ac058a933b60078 (commit) from 55d752b10855f22642dc69fd99a79af6d085831b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9dd1d351fe2cb90e3adbe5cb191f6a3727f78979 commit 9dd1d351fe2cb90e3adbe5cb191f6a3727f78979 Merge: 7150082 ae22079 Author: Brad King AuthorDate: Fri Jun 9 10:09:22 2017 -0400 Commit: Brad King CommitDate: Fri Jun 9 10:09:22 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7150082aa86223a441575a95e4a50107e22e9a0d commit 7150082aa86223a441575a95e4a50107e22e9a0d Merge: c8a866b 83784ed Author: Brad King AuthorDate: Fri Jun 9 14:08:22 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 9 10:08:26 2017 -0400 Merge topic 'bootstrap-cleanup' 83784ed1 bootstrap: remove leftover empty variable dereference Acked-by: Kitware Robot Merge-request: !944 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8a866b8c47f25ffd5e63e82bf4e501344bf7740 commit c8a866b8c47f25ffd5e63e82bf4e501344bf7740 Merge: 55d752b 522c92d Author: Brad King AuthorDate: Fri Jun 9 14:06:58 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 9 10:07:16 2017 -0400 Merge topic 'FindDoxygen-imported-target-once' 522c92d7 FindDoxygen: Create imported targets at most once in a given scope Acked-by: Kitware Robot Merge-request: !945 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=83784ed18bc2b6edcfb9400c350562356ef554f2 commit 83784ed18bc2b6edcfb9400c350562356ef554f2 Author: Rolf Eike Beer AuthorDate: Thu Jun 8 21:19:25 2017 +0200 Commit: Rolf Eike Beer CommitDate: Thu Jun 8 21:19:25 2017 +0200 bootstrap: remove leftover empty variable dereference This was missed in 9c0d1e7531edbebc7943d5b981353b17631ed632 when the for loop that used this as loop variable was removed. diff --git a/bootstrap b/bootstrap index 2cf7847..ba2a5f3 100755 --- a/bootstrap +++ b/bootstrap @@ -10,7 +10,7 @@ die() { cmake_extract_standard_flags() { sed -n "s/ *set *( *CMAKE_${2}${3}_EXTENSION_COMPILE_OPTION *\"\{0,1\}\([^\")]*\).*/\1/p" \ - "${file}" "${cmake_source_dir}/Modules/Compiler/"${1:-*}-${2}.cmake 2>/dev/null | tr ';' ' ' + "${cmake_source_dir}/Modules/Compiler/"${1:-*}-${2}.cmake 2>/dev/null | tr ';' ' ' } # Version number extraction function. ----------------------------------------------------------------------- Summary of changes: Modules/FindDoxygen.cmake | 40 ++++++++++++++++++++++++---------------- bootstrap | 2 +- 2 files changed, 25 insertions(+), 17 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 9 10:15:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 9 Jun 2017 10:15:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc2-4-gae22079 Message-ID: <20170609141503.511E8F388E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via ae22079808d708d630dacf3bcd368a123e6bcedf (commit) via 522c92d752753089f4bd50552955883a6f005570 (commit) via 43dae6459797ccebc53956050ac058a933b60078 (commit) via f44d9bcc8f09c3a135fa0feb82e9d71c475eb196 (commit) from 010b50fda71feaff3abec4d13910f4a4bd1f13b0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Modules/FindDoxygen.cmake | 40 +++++++++++++++++++++-------------- Source/Checks/cm_cxx_features.cmake | 4 +++- 2 files changed, 27 insertions(+), 17 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 9 10:35:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 9 Jun 2017 10:35:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-43-g20df0bc Message-ID: <20170609143503.58AD1FA986@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 20df0bcd7026b9209fb8c88052ad637e2559c74f (commit) via b90330f5746aca43c3698c4761bf6c0060afa63e (commit) via 7e6e37fdf1bf24194edad6fa8640b7fa8e92e393 (commit) via d4d24c30f0648e45e43835fa104debacae0b4a7f (commit) via 994beddb9342423c5b71b45c91bdffc7b0791bf2 (commit) via a0436a2f618b7421e6582cb8f6d3f20a39b1f957 (commit) via dcf559d060fcce32b3a946eecf51d32a3e2cc953 (commit) via 5b02bcf682d8ed851f4733c5af61c471cf00296b (commit) via 2d1c05c1669efa9eeba6f8606c47f92a3b880920 (commit) via 62eec34c291572a684cdbc00d2b296295f589f32 (commit) from 9dd1d351fe2cb90e3adbe5cb191f6a3727f78979 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20df0bcd7026b9209fb8c88052ad637e2559c74f commit 20df0bcd7026b9209fb8c88052ad637e2559c74f Merge: b90330f a0436a2 Author: Brad King AuthorDate: Fri Jun 9 14:34:39 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 9 10:34:42 2017 -0400 Merge topic 'sdcc-simplify-link-flags' a0436a2f SDCC: Remove superfluous whitespace from link line dcf559d0 SDCC: Do not explicitly ask linker to generate Intel Hex files Acked-by: Kitware Robot Merge-request: !942 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b90330f5746aca43c3698c4761bf6c0060afa63e commit b90330f5746aca43c3698c4761bf6c0060afa63e Merge: 7e6e37f 994bedd Author: Brad King AuthorDate: Fri Jun 9 14:33:58 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 9 10:34:06 2017 -0400 Merge topic 'qt-pass-point-by-value' 994beddb CMakeSetupDialog: Pass QPoint by value Acked-by: Kitware Robot Merge-request: !946 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7e6e37fdf1bf24194edad6fa8640b7fa8e92e393 commit 7e6e37fdf1bf24194edad6fa8640b7fa8e92e393 Merge: d4d24c3 5b02bcf Author: Brad King AuthorDate: Fri Jun 9 14:33:25 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 9 10:33:47 2017 -0400 Merge topic 'no-return-void-expression' 5b02bcf6 QtDialog/FirstConfigure: remove 'return' from void expression 2d1c05c1 cmGlobalGenerator: remove 'return' from void expression Acked-by: Kitware Robot Merge-request: !941 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4d24c30f0648e45e43835fa104debacae0b4a7f commit d4d24c30f0648e45e43835fa104debacae0b4a7f Merge: 9dd1d35 62eec34 Author: Brad King AuthorDate: Fri Jun 9 14:32:49 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 9 10:33:18 2017 -0400 Merge topic 'cpack-destructor-overrides' 62eec34c Add CM_OVERRIDE to CPack generator destructors Acked-by: Kitware Robot Merge-request: !939 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=994beddb9342423c5b71b45c91bdffc7b0791bf2 commit 994beddb9342423c5b71b45c91bdffc7b0791bf2 Author: Daniel Pfeifer AuthorDate: Thu Jun 8 22:15:21 2017 +0200 Commit: Daniel Pfeifer CommitDate: Thu Jun 8 22:15:21 2017 +0200 CMakeSetupDialog: Pass QPoint by value diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 57f8e10..5290afe 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -1195,7 +1195,7 @@ void CMakeSetupDialog::setSearchFilter(const QString& str) this->CacheValues->setSearchFilter(str); } -void CMakeSetupDialog::doOutputContextMenu(const QPoint& pt) +void CMakeSetupDialog::doOutputContextMenu(QPoint pt) { QMenu* menu = this->Output->createStandardContextMenu(); diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h index 1abdb46..0da28d8 100644 --- a/Source/QtDialog/CMakeSetupDialog.h +++ b/Source/QtDialog/CMakeSetupDialog.h @@ -70,7 +70,7 @@ protected slots: bool doConfigureInternal(); bool doGenerateInternal(); void exitLoop(int); - void doOutputContextMenu(const QPoint&); + void doOutputContextMenu(QPoint pt); void doOutputFindDialog(); void doOutputFindNext(bool directionForward = true); void doOutputFindPrev(); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0436a2f618b7421e6582cb8f6d3f20a39b1f957 commit a0436a2f618b7421e6582cb8f6d3f20a39b1f957 Author: Reto Schneider AuthorDate: Thu Jun 8 14:00:35 2017 +0200 Commit: Brad King CommitDate: Thu Jun 8 13:19:49 2017 -0400 SDCC: Remove superfluous whitespace from link line diff --git a/Modules/Platform/Generic-SDCC-C.cmake b/Modules/Platform/Generic-SDCC-C.cmake index 82074cf..4b3912a 100644 --- a/Modules/Platform/Generic-SDCC-C.cmake +++ b/Modules/Platform/Generic-SDCC-C.cmake @@ -41,7 +41,7 @@ endif() set(CMAKE_C_COMPILE_OBJECT " -o -c ") # link object files to an executable -set(CMAKE_C_LINK_EXECUTABLE " -o ") +set(CMAKE_C_LINK_EXECUTABLE " -o ") # needs sdcc 2.7.0 + sddclib from cvs set(CMAKE_C_CREATE_STATIC_LIBRARY https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dcf559d060fcce32b3a946eecf51d32a3e2cc953 commit dcf559d060fcce32b3a946eecf51d32a3e2cc953 Author: Reto Schneider AuthorDate: Thu Jun 8 13:47:39 2017 +0200 Commit: Brad King CommitDate: Thu Jun 8 13:18:28 2017 -0400 SDCC: Do not explicitly ask linker to generate Intel Hex files The `--out-fmt-ihx` option added by commit v2.6.0~1253 (...use --out-fmt-ihx to enforce .ihx files, 2007-08-15) may interfere with options requested by the user. Also, when no linker output is specified, SDCC outputs Intel Hex by default anyway. diff --git a/Modules/Platform/Generic-SDCC-C.cmake b/Modules/Platform/Generic-SDCC-C.cmake index bbefe19..82074cf 100644 --- a/Modules/Platform/Generic-SDCC-C.cmake +++ b/Modules/Platform/Generic-SDCC-C.cmake @@ -41,7 +41,7 @@ endif() set(CMAKE_C_COMPILE_OBJECT " -o -c ") # link object files to an executable -set(CMAKE_C_LINK_EXECUTABLE " --out-fmt-ihx -o ") +set(CMAKE_C_LINK_EXECUTABLE " -o ") # needs sdcc 2.7.0 + sddclib from cvs set(CMAKE_C_CREATE_STATIC_LIBRARY https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5b02bcf682d8ed851f4733c5af61c471cf00296b commit 5b02bcf682d8ed851f4733c5af61c471cf00296b Author: Daniel Pfeifer AuthorDate: Thu Jun 8 16:40:57 2017 +0200 Commit: Daniel Pfeifer CommitDate: Thu Jun 8 16:40:57 2017 +0200 QtDialog/FirstConfigure: remove 'return' from void expression diff --git a/Source/QtDialog/FirstConfigure.cxx b/Source/QtDialog/FirstConfigure.cxx index b193a27..88ce7cb 100644 --- a/Source/QtDialog/FirstConfigure.cxx +++ b/Source/QtDialog/FirstConfigure.cxx @@ -301,7 +301,7 @@ QString CrossCompilerSetup::getFindRoot() const void CrossCompilerSetup::setFindRoot(const QString& t) { - return this->crossFindRoot->setText(t); + this->crossFindRoot->setText(t); } int CrossCompilerSetup::getProgramMode() const https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2d1c05c1669efa9eeba6f8606c47f92a3b880920 commit 2d1c05c1669efa9eeba6f8606c47f92a3b880920 Author: Daniel Pfeifer AuthorDate: Thu Jun 8 16:35:02 2017 +0200 Commit: Daniel Pfeifer CommitDate: Thu Jun 8 16:40:11 2017 +0200 cmGlobalGenerator: remove 'return' from void expression diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 099f705..591963f 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1075,7 +1075,7 @@ bool cmGlobalGenerator::GetLanguageEnabled(const std::string& l) const void cmGlobalGenerator::ClearEnabledLanguages() { - return this->CMakeInstance->GetState()->ClearEnabledLanguages(); + this->CMakeInstance->GetState()->ClearEnabledLanguages(); } void cmGlobalGenerator::CreateLocalGenerators() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=62eec34c291572a684cdbc00d2b296295f589f32 commit 62eec34c291572a684cdbc00d2b296295f589f32 Author: Brad King AuthorDate: Thu Jun 8 09:38:07 2017 -0400 Commit: Brad King CommitDate: Thu Jun 8 09:38:07 2017 -0400 Add CM_OVERRIDE to CPack generator destructors diff --git a/Source/CPack/cmCPackBundleGenerator.h b/Source/CPack/cmCPackBundleGenerator.h index 861fe4b..a127e7b 100644 --- a/Source/CPack/cmCPackBundleGenerator.h +++ b/Source/CPack/cmCPackBundleGenerator.h @@ -21,7 +21,7 @@ public: cmCPackTypeMacro(cmCPackBundleGenerator, cmCPackDragNDropGenerator); cmCPackBundleGenerator(); - virtual ~cmCPackBundleGenerator(); + ~cmCPackBundleGenerator() CM_OVERRIDE; protected: int InitializeInternal() CM_OVERRIDE; diff --git a/Source/CPack/cmCPackCygwinBinaryGenerator.h b/Source/CPack/cmCPackCygwinBinaryGenerator.h index 58e80bd..b5a0531 100644 --- a/Source/CPack/cmCPackCygwinBinaryGenerator.h +++ b/Source/CPack/cmCPackCygwinBinaryGenerator.h @@ -17,7 +17,7 @@ public: * Construct generator */ cmCPackCygwinBinaryGenerator(); - virtual ~cmCPackCygwinBinaryGenerator(); + ~cmCPackCygwinBinaryGenerator() CM_OVERRIDE; protected: virtual int InitializeInternal(); diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.h b/Source/CPack/cmCPackCygwinSourceGenerator.h index 896de1d..d19f87c 100644 --- a/Source/CPack/cmCPackCygwinSourceGenerator.h +++ b/Source/CPack/cmCPackCygwinSourceGenerator.h @@ -17,7 +17,7 @@ public: * Construct generator */ cmCPackCygwinSourceGenerator(); - virtual ~cmCPackCygwinSourceGenerator(); + ~cmCPackCygwinSourceGenerator() CM_OVERRIDE; protected: const char* GetPackagingInstallPrefix(); diff --git a/Source/CPack/cmCPackDragNDropGenerator.h b/Source/CPack/cmCPackDragNDropGenerator.h index ae2cc17..922325c 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.h +++ b/Source/CPack/cmCPackDragNDropGenerator.h @@ -23,7 +23,7 @@ public: cmCPackTypeMacro(cmCPackDragNDropGenerator, cmCPackGenerator); cmCPackDragNDropGenerator(); - virtual ~cmCPackDragNDropGenerator(); + ~cmCPackDragNDropGenerator() CM_OVERRIDE; protected: int InitializeInternal() CM_OVERRIDE; diff --git a/Source/CPack/cmCPackOSXX11Generator.h b/Source/CPack/cmCPackOSXX11Generator.h index 0eebc6d..0a1770c 100644 --- a/Source/CPack/cmCPackOSXX11Generator.h +++ b/Source/CPack/cmCPackOSXX11Generator.h @@ -23,7 +23,7 @@ public: * Construct generator */ cmCPackOSXX11Generator(); - virtual ~cmCPackOSXX11Generator(); + ~cmCPackOSXX11Generator() CM_OVERRIDE; protected: virtual int InitializeInternal() CM_OVERRIDE; diff --git a/Source/CPack/cmCPackPKGGenerator.h b/Source/CPack/cmCPackPKGGenerator.h index f873c59..d9461ee 100644 --- a/Source/CPack/cmCPackPKGGenerator.h +++ b/Source/CPack/cmCPackPKGGenerator.h @@ -27,7 +27,7 @@ public: * Construct generator */ cmCPackPKGGenerator(); - virtual ~cmCPackPKGGenerator(); + ~cmCPackPKGGenerator() CM_OVERRIDE; bool SupportsComponentInstallation() const CM_OVERRIDE; diff --git a/Source/CPack/cmCPackPackageMakerGenerator.h b/Source/CPack/cmCPackPackageMakerGenerator.h index 6274515..770f434 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.h +++ b/Source/CPack/cmCPackPackageMakerGenerator.h @@ -25,7 +25,7 @@ public: * Construct generator */ cmCPackPackageMakerGenerator(); - virtual ~cmCPackPackageMakerGenerator(); + ~cmCPackPackageMakerGenerator() CM_OVERRIDE; bool SupportsComponentInstallation() const CM_OVERRIDE; protected: diff --git a/Source/CPack/cmCPackProductBuildGenerator.h b/Source/CPack/cmCPackProductBuildGenerator.h index 12093a0..3435641 100644 --- a/Source/CPack/cmCPackProductBuildGenerator.h +++ b/Source/CPack/cmCPackProductBuildGenerator.h @@ -25,7 +25,7 @@ public: * Construct generator */ cmCPackProductBuildGenerator(); - virtual ~cmCPackProductBuildGenerator(); + ~cmCPackProductBuildGenerator() CM_OVERRIDE; protected: int InitializeInternal() CM_OVERRIDE; ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Generic-SDCC-C.cmake | 2 +- Source/CPack/cmCPackBundleGenerator.h | 2 +- Source/CPack/cmCPackCygwinBinaryGenerator.h | 2 +- Source/CPack/cmCPackCygwinSourceGenerator.h | 2 +- Source/CPack/cmCPackDragNDropGenerator.h | 2 +- Source/CPack/cmCPackOSXX11Generator.h | 2 +- Source/CPack/cmCPackPKGGenerator.h | 2 +- Source/CPack/cmCPackPackageMakerGenerator.h | 2 +- Source/CPack/cmCPackProductBuildGenerator.h | 2 +- Source/QtDialog/CMakeSetupDialog.cxx | 2 +- Source/QtDialog/CMakeSetupDialog.h | 2 +- Source/QtDialog/FirstConfigure.cxx | 2 +- Source/cmGlobalGenerator.cxx | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 9 10:45:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 9 Jun 2017 10:45:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-45-g591557b Message-ID: <20170609144502.13F24FA250@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 591557ba450f1f24610ea0eefcb4e1d7665fae25 (commit) via c41a7c7d90e1fca52896dfeb99b7efd717aa6262 (commit) from 20df0bcd7026b9209fb8c88052ad637e2559c74f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=591557ba450f1f24610ea0eefcb4e1d7665fae25 commit 591557ba450f1f24610ea0eefcb4e1d7665fae25 Merge: 20df0bc c41a7c7 Author: Brad King AuthorDate: Fri Jun 9 14:36:23 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 9 10:36:30 2017 -0400 Merge topic 'file-generate-path-cleanup' c41a7c7d file: Normalize GENERATE command input and output file paths Acked-by: Kitware Robot Merge-request: !940 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c41a7c7d90e1fca52896dfeb99b7efd717aa6262 commit c41a7c7d90e1fca52896dfeb99b7efd717aa6262 Author: Brad King AuthorDate: Thu Jun 8 09:54:37 2017 -0400 Commit: Brad King CommitDate: Thu Jun 8 10:41:28 2017 -0400 file: Normalize GENERATE command input and output file paths Normalize absolute paths so that no extra components like `../` or `...//...` appear that later confuse relative path computation. In particular, we expect paths sent to AddCMakeDependFile and AddCMakeOutputFile to be normalized. Do this only for paths that are already absolute because we can't handle relative paths yet (see #16786). Fixes: #16892 diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx index 1526454..c21e4f6 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.cxx +++ b/Source/cmGeneratorExpressionEvaluationFile.cxx @@ -51,11 +51,15 @@ void cmGeneratorExpressionEvaluationFile::Generate( } } - const std::string outputFileName = this->OutputFileExpr->Evaluate( + std::string outputFileName = this->OutputFileExpr->Evaluate( lg, config, false, CM_NULLPTR, CM_NULLPTR, CM_NULLPTR, lang); const std::string outputContent = inputExpression->Evaluate( lg, config, false, CM_NULLPTR, CM_NULLPTR, CM_NULLPTR, lang); + if (cmSystemTools::FileIsFullPath(outputFileName)) { + outputFileName = cmSystemTools::CollapseFullPath(outputFileName); + } + std::map::iterator it = outputFiles.find(outputFileName); @@ -111,12 +115,16 @@ void cmGeneratorExpressionEvaluationFile::Generate(cmLocalGenerator* lg) if (this->InputIsContent) { inputContent = this->Input; } else { - lg->GetMakefile()->AddCMakeDependFile(this->Input); - cmSystemTools::GetPermissions(this->Input.c_str(), perm); - cmsys::ifstream fin(this->Input.c_str()); + std::string inputFileName = this->Input; + if (cmSystemTools::FileIsFullPath(inputFileName)) { + inputFileName = cmSystemTools::CollapseFullPath(inputFileName); + } + lg->GetMakefile()->AddCMakeDependFile(inputFileName); + cmSystemTools::GetPermissions(inputFileName.c_str(), perm); + cmsys::ifstream fin(inputFileName.c_str()); if (!fin) { std::ostringstream e; - e << "Evaluation file \"" << this->Input << "\" cannot be read."; + e << "Evaluation file \"" << inputFileName << "\" cannot be read."; lg->IssueMessage(cmake::FATAL_ERROR, e.str()); return; } ----------------------------------------------------------------------- Summary of changes: Source/cmGeneratorExpressionEvaluationFile.cxx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Jun 10 00:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 10 Jun 2017 00:05:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-46-gc3868cf Message-ID: <20170610040505.4BC93FA3AB@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via c3868cf90ca39d86f52c9e9f6492c856034cd02f (commit) from 591557ba450f1f24610ea0eefcb4e1d7665fae25 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c3868cf90ca39d86f52c9e9f6492c856034cd02f commit c3868cf90ca39d86f52c9e9f6492c856034cd02f Author: Kitware Robot AuthorDate: Sat Jun 10 00:01:10 2017 -0400 Commit: Kitware Robot CommitDate: Sat Jun 10 00:01:10 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 6630aa6..5837d5c 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 9) -set(CMake_VERSION_PATCH 20170609) +set(CMake_VERSION_PATCH 20170610) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Jun 11 00:05:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 11 Jun 2017 00:05:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-47-g200fdf2 Message-ID: <20170611040507.9C823FA970@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 200fdf272f37d6a94fd926c2e96bc8fdf8eac68b (commit) from c3868cf90ca39d86f52c9e9f6492c856034cd02f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=200fdf272f37d6a94fd926c2e96bc8fdf8eac68b commit 200fdf272f37d6a94fd926c2e96bc8fdf8eac68b Author: Kitware Robot AuthorDate: Sun Jun 11 00:01:04 2017 -0400 Commit: Kitware Robot CommitDate: Sun Jun 11 00:01:04 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 5837d5c..bb1b764 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 9) -set(CMake_VERSION_PATCH 20170610) +set(CMake_VERSION_PATCH 20170611) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 12 00:05:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 12 Jun 2017 00:05:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-48-gabd1216 Message-ID: <20170612040508.76793FA950@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via abd1216c1f8a1211d348568bb7695c30505de84e (commit) from 200fdf272f37d6a94fd926c2e96bc8fdf8eac68b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=abd1216c1f8a1211d348568bb7695c30505de84e commit abd1216c1f8a1211d348568bb7695c30505de84e Author: Kitware Robot AuthorDate: Mon Jun 12 00:01:04 2017 -0400 Commit: Kitware Robot CommitDate: Mon Jun 12 00:01:04 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index bb1b764..0d651dd 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 9) -set(CMake_VERSION_PATCH 20170611) +set(CMake_VERSION_PATCH 20170612) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 12 10:25:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 12 Jun 2017 10:25:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-67-gf6ed922 Message-ID: <20170612142505.3592EFA6B7@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via f6ed92280c9af9e35dec9d1cff5d453e0758c0d5 (commit) via 637ff39d4554e581d87ade1bce39671c811ebd09 (commit) via 00b91b153089cfec8d60fd58bfa135e55ddae1b9 (commit) via 0cb8730c0b4e032db451789933ee7eb65d264278 (commit) via 99153a9eb6c3e997dfb07dcf9ea01836f2c384d1 (commit) via 22b412c32574986720198445172e8a460429eba1 (commit) via aa9d0afc525b84806bc2f897fbc854fe0e0070f9 (commit) via cb1fdb301ed845a88ff046270d23e780a1fed551 (commit) via d6051ca39e2ac8e5afc8f6308fd1bda7d1e8c17b (commit) via 2042cae9a5d9bb2f71a715022a4b6a7416c8e9e3 (commit) via 22f8a465d7de84b246f6d5ec0e05984b5610122f (commit) via 5f93bf787d0ccccf1aa6dc3f6f1d0df3855a55f6 (commit) via 414438b2fb5a43c447273b425b59cd982818457b (commit) via fcbecbd2afcf3fcfd4662946615fec5e4c73ed84 (commit) via 3d1c3e0dcf78849b38ab620ef36c715997af0088 (commit) via a32758782c953a333c0dd1e8553aee66a4404ee5 (commit) via 82be694c7a1a878650563cd2c72b60f314d5dc85 (commit) via 69050f4d16ae649e074b5fd7cb3bae1811b403a8 (commit) from abd1216c1f8a1211d348568bb7695c30505de84e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f6ed92280c9af9e35dec9d1cff5d453e0758c0d5 commit f6ed92280c9af9e35dec9d1cff5d453e0758c0d5 Merge: 637ff39 22f8a46 Author: Brad King AuthorDate: Mon Jun 12 14:23:17 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 12 10:23:22 2017 -0400 Merge topic 'android-standalone-no-sysroot-include' 22f8a465 Android: Do not pass sysroot include for standalone toolchain Acked-by: Kitware Robot Merge-request: !952 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=637ff39d4554e581d87ade1bce39671c811ebd09 commit 637ff39d4554e581d87ade1bce39671c811ebd09 Merge: 00b91b1 5f93bf7 Author: Brad King AuthorDate: Mon Jun 12 14:23:00 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 12 10:23:06 2017 -0400 Merge topic 'android-standalone-unified-api-level' 5f93bf78 Android: Detect API version of standalone toolchain with unified headers Acked-by: Kitware Robot Merge-request: !950 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=00b91b153089cfec8d60fd58bfa135e55ddae1b9 commit 00b91b153089cfec8d60fd58bfa135e55ddae1b9 Merge: 0cb8730 d6051ca Author: Brad King AuthorDate: Mon Jun 12 14:20:56 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 12 10:22:12 2017 -0400 Merge topic 'execute_process-pipeline-results' d6051ca3 execute_process: Add option to get results of every child Acked-by: Kitware Robot Merge-request: !702 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0cb8730c0b4e032db451789933ee7eb65d264278 commit 0cb8730c0b4e032db451789933ee7eb65d264278 Merge: 99153a9 2042cae Author: Brad King AuthorDate: Mon Jun 12 14:18:37 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 12 10:21:42 2017 -0400 Merge topic 'cpack-freebsd-pkg' 2042cae9 CPack-FreeBSD: add a generator for FreeBSD pkg(8) Acked-by: Kitware Robot Merge-request: !693 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=99153a9eb6c3e997dfb07dcf9ea01836f2c384d1 commit 99153a9eb6c3e997dfb07dcf9ea01836f2c384d1 Merge: 22b412c 414438b Author: Brad King AuthorDate: Mon Jun 12 14:17:53 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 12 10:20:58 2017 -0400 Merge topic 'cuda-compiler-launcher' 414438b2 CUDA: Add option to run the compiler through launcher tools Acked-by: Kitware Robot Merge-request: !949 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=22b412c32574986720198445172e8a460429eba1 commit 22b412c32574986720198445172e8a460429eba1 Merge: aa9d0af fcbecbd Author: Brad King AuthorDate: Mon Jun 12 14:15:44 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 12 10:20:23 2017 -0400 Merge topic 'FindHTMLHelp-path-suffixes' fcbecbd2 FindHTMLHelp: Use PATH_SUFFIXES to search under Program Files Acked-by: Kitware Robot Merge-request: !948 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa9d0afc525b84806bc2f897fbc854fe0e0070f9 commit aa9d0afc525b84806bc2f897fbc854fe0e0070f9 Merge: cb1fdb3 3d1c3e0 Author: Brad King AuthorDate: Mon Jun 12 14:15:01 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 12 10:19:23 2017 -0400 Merge topic 'update-kwsys' 3d1c3e0d Merge branch 'upstream-KWSys' into update-kwsys a3275878 KWSys 2017-06-09 (a700e2ab) Acked-by: Kitware Robot Merge-request: !947 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cb1fdb301ed845a88ff046270d23e780a1fed551 commit cb1fdb301ed845a88ff046270d23e780a1fed551 Merge: abd1216 82be694 Author: Brad King AuthorDate: Mon Jun 12 14:14:37 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 12 10:15:47 2017 -0400 Merge topic 'file-generate-relative-paths' 82be694c file(GENERATE): Add policy CMP0070 to define relative path behavior 69050f4d Tests: Use full output paths in file(GENERATE) calls Acked-by: Kitware Robot Merge-request: !943 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d6051ca39e2ac8e5afc8f6308fd1bda7d1e8c17b commit d6051ca39e2ac8e5afc8f6308fd1bda7d1e8c17b Author: Adam Weisi AuthorDate: Thu Apr 13 19:10:04 2017 +0200 Commit: Brad King CommitDate: Sat Jun 10 08:03:06 2017 -0400 execute_process: Add option to get results of every child Add a `RESULTS_VARIABLE` option to get the results of all children in a pipeline of one or more `COMMAND`s. diff --git a/Help/command/execute_process.rst b/Help/command/execute_process.rst index d617243..799493f 100644 --- a/Help/command/execute_process.rst +++ b/Help/command/execute_process.rst @@ -10,6 +10,7 @@ Execute one or more child processes. [WORKING_DIRECTORY ] [TIMEOUT ] [RESULT_VARIABLE ] + [RESULTS_VARIABLE ] [OUTPUT_VARIABLE ] [ERROR_VARIABLE ] [INPUT_FILE ] @@ -49,10 +50,16 @@ Options: specified number of seconds (fractions are allowed). ``RESULT_VARIABLE`` - The variable will be set to contain the result of running the processes. + The variable will be set to contain the result of last child process. This will be an integer return code from the last child or a string describing an error condition. +``RESULTS_VARIABLE `` + The variable will be set to contain the result of all processes as a + :ref:`;-list `, in order of the given ``COMMAND`` + arguments. Each entry will be an integer return code from the + corresponding child or a string describing an error condition. + ``OUTPUT_VARIABLE``, ``ERROR_VARIABLE`` The variable named will be set with the contents of the standard output and standard error pipes, respectively. If the same variable is named diff --git a/Help/release/dev/execute_process-pipeline-results.rst b/Help/release/dev/execute_process-pipeline-results.rst new file mode 100644 index 0000000..9755ef5 --- /dev/null +++ b/Help/release/dev/execute_process-pipeline-results.rst @@ -0,0 +1,6 @@ +execute_process-pipeline-results +-------------------------------- + +* The :command:`execute_process` command gained a ``RESULTS_VARIABLE`` + option to collect a list of results from all children in a pipeline + of processes when multiple ``COMMAND`` arguments are given. diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx index 8c10dbe..435adca 100644 --- a/Source/cmExecuteProcessCommand.cxx +++ b/Source/cmExecuteProcessCommand.cxx @@ -7,6 +7,7 @@ #include #include +#include "cmAlgorithms.h" #include "cmMakefile.h" #include "cmProcessOutput.h" #include "cmSystemTools.h" @@ -46,6 +47,7 @@ bool cmExecuteProcessCommand::InitialPass(std::vector const& args, std::string output_variable; std::string error_variable; std::string result_variable; + std::string results_variable; std::string working_directory; cmProcessOutput::Encoding encoding = cmProcessOutput::None; for (size_t i = 0; i < args.size(); ++i) { @@ -77,6 +79,14 @@ bool cmExecuteProcessCommand::InitialPass(std::vector const& args, this->SetError(" called with no value for RESULT_VARIABLE."); return false; } + } else if (args[i] == "RESULTS_VARIABLE") { + doing_command = false; + if (++i < args.size()) { + results_variable = args[i]; + } else { + this->SetError(" called with no value for RESULTS_VARIABLE."); + return false; + } } else if (args[i] == "WORKING_DIRECTORY") { doing_command = false; if (++i < args.size()) { @@ -287,7 +297,7 @@ bool cmExecuteProcessCommand::InitialPass(std::vector const& args, switch (cmsysProcess_GetState(cp)) { case cmsysProcess_State_Exited: { int v = cmsysProcess_GetExitValue(cp); - char buf[100]; + char buf[16]; sprintf(buf, "%d", v); this->Makefile->AddDefinition(result_variable, buf); } break; @@ -305,6 +315,47 @@ bool cmExecuteProcessCommand::InitialPass(std::vector const& args, break; } } + // Store the result of running the processes. + if (!results_variable.empty()) { + switch (cmsysProcess_GetState(cp)) { + case cmsysProcess_State_Exited: { + std::vector res; + for (size_t i = 0; i < cmds.size(); ++i) { + switch (cmsysProcess_GetStateByIndex(cp, static_cast(i))) { + case kwsysProcess_StateByIndex_Exited: { + int exitCode = + cmsysProcess_GetExitValueByIndex(cp, static_cast(i)); + char buf[16]; + sprintf(buf, "%d", exitCode); + res.push_back(buf); + } break; + case kwsysProcess_StateByIndex_Exception: + res.push_back(cmsysProcess_GetExceptionStringByIndex( + cp, static_cast(i))); + break; + case kwsysProcess_StateByIndex_Error: + default: + res.push_back("Error getting the child return code"); + break; + } + } + this->Makefile->AddDefinition(results_variable, + cmJoin(res, ";").c_str()); + } break; + case cmsysProcess_State_Exception: + this->Makefile->AddDefinition(results_variable, + cmsysProcess_GetExceptionString(cp)); + break; + case cmsysProcess_State_Error: + this->Makefile->AddDefinition(results_variable, + cmsysProcess_GetErrorString(cp)); + break; + case cmsysProcess_State_Expired: + this->Makefile->AddDefinition(results_variable, + "Process terminated due to timeout"); + break; + } + } // Delete the process instance. cmsysProcess_Delete(cp); diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 79f487d..91e0cdd 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -181,8 +181,10 @@ add_RunCMake_test(add_custom_target) add_RunCMake_test(add_dependencies) add_RunCMake_test(add_subdirectory) add_RunCMake_test(build_command) +add_executable(exit_code exit_code.c) +set(execute_process_ARGS -DEXIT_CODE_EXE=$) if(NOT CMake_TEST_EXTERNAL_CMAKE) - set(execute_process_ARGS -DTEST_ENCODING_EXE=$) + list(APPEND execute_process_ARGS -DTEST_ENCODING_EXE=$) endif() add_RunCMake_test(execute_process) add_RunCMake_test(export) diff --git a/Tests/RunCMake/execute_process/ExitValues-stdout.txt b/Tests/RunCMake/execute_process/ExitValues-stdout.txt new file mode 100644 index 0000000..3bcaf46 --- /dev/null +++ b/Tests/RunCMake/execute_process/ExitValues-stdout.txt @@ -0,0 +1,14 @@ +^-- 1 - 1 RESULT_VARIABLE: 0 +-- 1 - 2 RESULT_VARIABLE: [^0].* +-- 2 - 1 RESULT_VARIABLE: 0 +-- 2 - 1 RESULTS_VARIABLE: 0 +-- 2 - 2 RESULT_VARIABLE: [^0].* +-- 2 - 2 RESULTS_VARIABLE: [^0].* +-- 3 - 1 RESULTS_VARIABLE: 0 +-- 3 - 2 RESULTS_VARIABLE: [^0].* +-- 4 - 1 RESULT_VARIABLE: 0 +-- 4 - 1 RESULTS_VARIABLE: [^0].*;0;[^0].*;0;[^0].*;0 +-- 4 - 1 RESULTS_VARIABLE_LENGTH: 6 +-- 5 - 1 RESULT_VARIABLE: [^0].* +-- 5 - 1 RESULTS_VARIABLE: 0;0;[^0].* +-- 5 - 1 RESULTS_VARIABLE_LENGTH: 3$ diff --git a/Tests/RunCMake/execute_process/ExitValues.cmake b/Tests/RunCMake/execute_process/ExitValues.cmake new file mode 100644 index 0000000..d80a57b --- /dev/null +++ b/Tests/RunCMake/execute_process/ExitValues.cmake @@ -0,0 +1,120 @@ +#1st TEST RESULT_VARIABLE ONLY +execute_process(COMMAND ${EXIT_CODE_EXE} "zero_exit" + RESULT_VARIABLE r0 + ) +message(STATUS " 1 - 1 RESULT_VARIABLE: ${r0}") +if(NOT r0 EQUAL 0) + message(FATAL_ERROR "zero exit code expected") +endif() +execute_process(COMMAND ${EXIT_CODE_EXE} "non_zero_exit" + RESULT_VARIABLE r01 + ERROR_QUIET + ) +message(STATUS " 1 - 2 RESULT_VARIABLE: ${r01}") +if(r01 EQUAL 0) + message(FATAL_ERROR "non-zero exit code expected") +endif() +#2nd TEST RESULT_VARIABLE and RESULTS_VARIABLE +execute_process(COMMAND ${EXIT_CODE_EXE} "zero_exit" + RESULT_VARIABLE r1 + RESULTS_VARIABLE r1s + ) +message(STATUS " 2 - 1 RESULT_VARIABLE: ${r1}") +message(STATUS " 2 - 1 RESULTS_VARIABLE: ${r1s}") +if(NOT r1 EQUAL 0 OR NOT r1s EQUAL 0) + message(FATAL_ERROR "zero exit code expected") +endif() +execute_process(COMMAND ${EXIT_CODE_EXE} "non_zero_exit" + RESULT_VARIABLE r11 + RESULTS_VARIABLE r11s + ERROR_QUIET + ) +message(STATUS " 2 - 2 RESULT_VARIABLE: ${r11}") +message(STATUS " 2 - 2 RESULTS_VARIABLE: ${r11s}") +if(r11 EQUAL 0 OR r11s EQUAL 0) + message(FATAL_ERROR "non-zero exit code expected") +endif() +#3rd TEST RESULTS_VARIABLE +execute_process(COMMAND ${EXIT_CODE_EXE} "zero_exit" + RESULTS_VARIABLE r2s + ) +message(STATUS " 3 - 1 RESULTS_VARIABLE: ${r2s}") +if(NOT r2s EQUAL 0) + message(FATAL_ERROR "zero exit code expected") +endif() +execute_process(COMMAND ${EXIT_CODE_EXE} "non_zero_exit" + RESULTS_VARIABLE r21s + ERROR_QUIET + ) +message(STATUS " 3 - 2 RESULTS_VARIABLE: ${r21s}") +if(r21s EQUAL 0) + message(FATAL_ERROR "non-zero exit code expected") +endif() +#4th TEST RESULT_VARIABLE and RESULTS_VARIABLE WITH MULTICOMMAND +execute_process(COMMAND ${EXIT_CODE_EXE} "non_zero_exit" + COMMAND ${EXIT_CODE_EXE} "zero_exit" + COMMAND ${EXIT_CODE_EXE} "non_zero_exit" + COMMAND ${EXIT_CODE_EXE} "zero_exit" + COMMAND ${EXIT_CODE_EXE} "non_zero_exit" + COMMAND ${EXIT_CODE_EXE} "zero_exit" + RESULT_VARIABLE r31 + RESULTS_VARIABLE r31s + OUTPUT_QUIET + ERROR_QUIET + ) +message(STATUS " 4 - 1 RESULT_VARIABLE: ${r31}") +message(STATUS " 4 - 1 RESULTS_VARIABLE: ${r31s}") +if(NOT r31 EQUAL 0) + message(FATAL_ERROR "zero exit code expected for last command") +endif() +list(LENGTH r31s r31sLen) +message(STATUS " 4 - 1 RESULTS_VARIABLE_LENGTH: ${r31sLen}") +if(NOT r31sLen EQUAL 6) + message(FATAL_ERROR "length of RESULTS_VARIABLE is not as expected") +else() + foreach(loop_var RANGE 5) + list(GET r31s ${loop_var} rsLocal) + math(EXPR isOdd "${loop_var} % 2") + if(isOdd) + if(NOT rsLocal EQUAL 0) + message(FATAL_ERROR "zero exit code expected") + endif() + else() + if(rsLocal EQUAL 0) + message(FATAL_ERROR "non-zero exit code expected") + endif() + endif() + endforeach() +endif() +#5th TEST RESULT_VARIABLE and RESULTS_VARIABLE WITH MULTICOMMAND +execute_process(COMMAND ${EXIT_CODE_EXE} "zero_exit" + COMMAND ${EXIT_CODE_EXE} "zero_exit" + COMMAND ${EXIT_CODE_EXE} "non_zero_exit" + RESULT_VARIABLE r41 + RESULTS_VARIABLE r41s + OUTPUT_QUIET + ERROR_QUIET + ) +message(STATUS " 5 - 1 RESULT_VARIABLE: ${r41}") +message(STATUS " 5 - 1 RESULTS_VARIABLE: ${r41s}") +if(r41 EQUAL 0) + message(FATAL_ERROR "non-zero exit code expected for last command") +endif() +list(LENGTH r41s r41sLen) +message(STATUS " 5 - 1 RESULTS_VARIABLE_LENGTH: ${r41sLen}") +if(NOT r31sLen EQUAL 6) + message(FATAL_ERROR "length of RESULTS_VARIABLE is not as expected") +else() + list(GET r41s 0 rsLocal) + if(NOT rsLocal EQUAL 0) + message(FATAL_ERROR "zero exit code expected") + endif() + list(GET r41s 1 rsLocal) + if(NOT rsLocal EQUAL 0) + message(FATAL_ERROR "zero exit code expected") + endif() + list(GET r41s 2 rsLocal) + if(rsLocal EQUAL 0) + message(FATAL_ERROR "non-zero exit code expected") + endif() +endif() diff --git a/Tests/RunCMake/execute_process/RunCMakeTest.cmake b/Tests/RunCMake/execute_process/RunCMakeTest.cmake index 62e18c6..83589bb 100644 --- a/Tests/RunCMake/execute_process/RunCMakeTest.cmake +++ b/Tests/RunCMake/execute_process/RunCMakeTest.cmake @@ -11,3 +11,7 @@ run_cmake(EncodingMissing) if(TEST_ENCODING_EXE) run_cmake_command(EncodingUTF8 ${CMAKE_COMMAND} -DTEST_ENCODING=UTF8 -DTEST_ENCODING_EXE=${TEST_ENCODING_EXE} -P ${RunCMake_SOURCE_DIR}/Encoding.cmake) endif() + +if(EXIT_CODE_EXE) + run_cmake_command(ExitValues ${CMAKE_COMMAND} -DEXIT_CODE_EXE=${EXIT_CODE_EXE} -P ${RunCMake_SOURCE_DIR}/ExitValues.cmake) +endif() diff --git a/Tests/RunCMake/exit_code.c b/Tests/RunCMake/exit_code.c new file mode 100644 index 0000000..3eba019 --- /dev/null +++ b/Tests/RunCMake/exit_code.c @@ -0,0 +1,30 @@ +#include +#include +#include + +// Usage: +// +// /path/to/program arg1 [arg2 [...]] +// +// Return EXIT_SUCCESS if 'zero_exit' +// string was found in . +// Return EXIT_FAILURE if 'non_zero_exit' +// string was found in . + +int main(int argc, const char* argv[]) +{ + const char* substring_failure = "non_zero_exit"; + const char* substring_success = "zero_exit"; + const char* str = argv[1]; + if (argc < 2) { + return EXIT_FAILURE; + } + if (strcmp(str, substring_success) == 0) { + return EXIT_SUCCESS; + } else if (strcmp(str, substring_failure) == 0) { + return EXIT_FAILURE; + } + fprintf(stderr, "Failed to find string '%s' in '%s'\n", substring_success, + str); + return EXIT_FAILURE; +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2042cae9a5d9bb2f71a715022a4b6a7416c8e9e3 commit 2042cae9a5d9bb2f71a715022a4b6a7416c8e9e3 Author: Adriaan de Groot AuthorDate: Sun Feb 12 17:48:14 2017 +0100 Commit: Brad King CommitDate: Sat Jun 10 07:53:59 2017 -0400 CPack-FreeBSD: add a generator for FreeBSD pkg(8) Adds an option CPACK_ENABLE_FREEBSD_PKG to allow CPack to look for FreeBSD's libpkg / pkg(8). If this is set and the libpkg headers and library are found (which they will be, by default, on any FreeBSD system), then add a FreeBSD pkg(8) generator. The FreeBSD package tool pkg(8) uses tar.xz files (.txz) with two metadata files embedded (+MANIFEST and +COMPACT_MANIFEST). This introduces a bunch of FreeBSD-specific CPACK_FREEBSD_PACKAGE_* variables for filling in the metadata; the Debian generator does something similar. Documentation for the CPack CMake-script is styled after the Debian generator. Implementation notes: - Checks for libpkg -- the underlying implementation for pkg(8) -- and includes FreeBSD package-generation if building CMake on a UNIX host. Since libpkg can be used on BSDs, Linux and OSX, this potentially adds one more packaging format. In practice, this will only happen on FreeBSD and DragonflyBSD. - Copy-paste from cmCPackArchiveGenerator to special-case the metadata generation and to run around the internal archive generation: use libpkg instead. - Generating the metadata files is a little contrived. - Most of the validation logic for package settings is in CPackFreeBSD.cmake, as well as the code that tries to re-use packaging settings that may already be set up for Debian. - libpkg has its own notion of output filename, so we have another contrived bit of code that munges the output file list so that CPack can find the output. - Stick with C++98. diff --git a/Copyright.txt b/Copyright.txt index daaa1d1..b7af4c5 100644 --- a/Copyright.txt +++ b/Copyright.txt @@ -34,6 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following individuals and institutions are among the Contributors: * Aaron C. Meadows +* Adriaan de Groot * Aleksey Avdeev * Alexander Neundorf * Alexander Smorkalov diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index 4a03b7a..fa6144c 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -60,6 +60,7 @@ All Modules /module/CPackCygwin /module/CPackDeb /module/CPackDMG + /module/CPackFreeBSD /module/CPackIFW /module/CPackIFWConfigureFile /module/CPackNSIS diff --git a/Help/module/CPackFreeBSD.rst b/Help/module/CPackFreeBSD.rst new file mode 100644 index 0000000..083f0cb --- /dev/null +++ b/Help/module/CPackFreeBSD.rst @@ -0,0 +1 @@ +.. cmake-module:: ../../Modules/CPackFreeBSD.cmake diff --git a/Help/release/dev/cpack-freebsd-pkg.rst b/Help/release/dev/cpack-freebsd-pkg.rst new file mode 100644 index 0000000..1732581 --- /dev/null +++ b/Help/release/dev/cpack-freebsd-pkg.rst @@ -0,0 +1,5 @@ +cpack-freebsd-pkg +----------------- + +* CPack gained a ``FREEBSD`` generator for FreeBSD ``pkg(8)``, configured + by the :module:`CPackFreeBSD` module. diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake index a63fc83..3915943 100644 --- a/Modules/CPack.cmake +++ b/Modules/CPack.cmake @@ -471,6 +471,7 @@ if(NOT CPACK_GENERATOR) option(CPACK_BINARY_TZ "Enable to build TZ packages" ON) endif() option(CPACK_BINARY_DEB "Enable to build Debian packages" OFF) + option(CPACK_BINARY_FREEBSD "Enable to build FreeBSD packages" OFF) option(CPACK_BINARY_NSIS "Enable to build NSIS packages" OFF) option(CPACK_BINARY_RPM "Enable to build RPM packages" OFF) option(CPACK_BINARY_STGZ "Enable to build STGZ packages" ON) @@ -491,6 +492,7 @@ if(NOT CPACK_GENERATOR) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_CYGWIN CygwinBinary) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DEB DEB) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DRAGNDROP DragNDrop) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_FREEBSD FREEBSD) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_IFW IFW) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_NSIS NSIS) cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_OSXX11 OSXX11) @@ -542,6 +544,7 @@ mark_as_advanced( CPACK_BINARY_CYGWIN CPACK_BINARY_DEB CPACK_BINARY_DRAGNDROP + CPACK_BINARY_FREEBSD CPACK_BINARY_IFW CPACK_BINARY_NSIS CPACK_BINARY_OSXX11 diff --git a/Modules/CPackFreeBSD.cmake b/Modules/CPackFreeBSD.cmake new file mode 100644 index 0000000..7fec78a --- /dev/null +++ b/Modules/CPackFreeBSD.cmake @@ -0,0 +1,246 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +CPackFreeBSD +------------ + +The built in (binary) CPack FreeBSD (pkg) generator (Unix only) + +Variables specific to CPack FreeBSD (pkg) generator +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +CPackFreeBSD may be used to create pkg(8) packages -- these may be used +on FreeBSD, DragonflyBSD, NetBSD, OpenBSD, but also on Linux or OSX, +depending on the installed package-management tools -- using :module:`CPack`. + +CPackFreeBSD is a :module:`CPack` generator and uses the ``CPACK_XXX`` +variables used by :module:`CPack`. It tries to re-use packaging information +that may already be specified for Debian packages for the :module:`CPackDeb` +generator. it also tries to re-use RPM packaging information when Debian +does not specify. + +CPackFreeBSD generator should work on any host with libpkg installed. The +packages it produces are specific to the host architecture and ABI. + +CPackFreeBSD sets package-metadata through :code:`CPACK_FREEBSD_XXX` variables. +CPackFreeBSD, unlike CPackDeb, does not specially support componentized +packages; a single package is created from all the software artifacts +created through CMake. + +All of the variables can be set specifically for FreeBSD packaging in +the CPackConfig file or in CMakeLists.txt, but most of them have defaults +that use general settings (e.g. CMAKE_PROJECT_NAME) or Debian-specific +variables when those make sense (e.g. the homepage of an upstream project +is usually unchanged by the flavor of packaging). When there is no Debian +information to fall back on, but the RPM packaging has it, fall back to +the RPM information (e.g. package license). + +.. variable:: CPACK_FREEBSD_PACKAGE_NAME + + Sets the package name (in the package manifest, but also affects the + output filename). + + * Mandatory: YES + * Default: + + - :variable:`CPACK_PACKAGE_NAME` (this is always set by CPack itself, + based on CMAKE_PROJECT_NAME). + +.. variable:: CPACK_FREEBSD_PACKAGE_COMMENT + + Sets the package comment. This is the short description displayed by + pkg(8) in standard "pkg info" output. + + * Mandatory: YES + * Default: + + - :variable:`CPACK_PACKAGE_DESCRIPTION_SUMMARY` (this is always set + by CPack itself, if nothing else sets it explicitly). + - :variable:`PROJECT_DESCRIPTION` (this can be set with the DESCRIPTION + parameter for :command:`project`). + +.. variable:: CPACK_FREEBSD_PACKAGE_DESCRIPTION + + Sets the package description. This is the long description of the package, + given by "pkg info" with a specific package as argument. + + * Mandatory: YES + * Default: + + - :variable:`CPACK_DEBIAN_PACKAGE_DESCRIPTION` (this may be set already + for Debian packaging, so we may as well re-use it). + +.. variable:: CPACK_FREEBSD_PACKAGE_WWW + + The URL of the web site for this package, preferably (when applicable) the + site from which the original source can be obtained and any additional + upstream documentation or information may be found. + + * Mandatory: YES + * Default: + + - :variable:`CPACK_DEBIAN_PACKAGE_HOMEPAGE` (this may be set already + for Debian packaging, so we may as well re-use it). + +.. variable:: CPACK_FREEBSD_PACKAGE_LICENSE + + The license, or licenses, which apply to this software package. This must + be one or more license-identifiers that pkg recognizes as acceptable license + identifiers (e.g. "GPLv2"). + + * Mandatory: YES + * Default: + + - :variable:`CPACK_RPM_PACKAGE_LICENSE` + +.. variable:: CPACK_FREEBSD_PACKAGE_LICENSE_LOGIC + + This variable is only of importance if there is more than one license. + The default is "single", which is only applicable to a single license. + Other acceptable values are determined by pkg -- those are "dual" or "multi" -- + meaning choice (OR) or simultaneous (AND) application of the licenses. + + * Mandatory: NO + * Default: single + +.. variable:: CPACK_FREEBSD_PACKAGE_MAINTAINER + + The FreeBSD maintainer (e.g. kde at freebsd.org) of this package. + + * Mandatory: YES + * Default: none + +.. variable:: CPACK_FREEBSD_PACKAGE_ORIGIN + + The origin (ports label) of this package; for packages built by CPack + outside of the ports system this is of less importance. The default + puts the package somewhere under misc/, as a stopgap. + + * Mandatory: YES + * Default: misc/ + +.. variable:: CPACK_FREEBSD_PACKAGE_CATEGORIES + + The ports categories where this package lives (if it were to be built + from ports). If none is set a single category is determined based on + the package origin. + + * Mandatory: YES + * Default: derived from ORIGIN + +.. variable:: CPACK_FREEBSD_PACKAGE_DEPS + + A list of package origins that should be added as package dependencies. + These are in the form /, e.g. x11/libkonq. + No version information needs to be provided (this is not included + in the manifest). + + * Mandatory: NO + * Default: empty +#]=======================================================================] + + + +if(CMAKE_BINARY_DIR) + message(FATAL_ERROR "CPackFreeBSD.cmake may only be used by CPack internally.") +endif() + +if(NOT UNIX) + message(FATAL_ERROR "CPackFreeBSD.cmake may only be used under UNIX.") +endif() + + +### +# +# These bits are copied from the Debian packaging file; slightly modified. +# They are used for filling in FreeBSD-packaging variables that can take +# on values from elsewhere -- e.g. the package description may as well be +# copied from Debian. +# +function(_cpack_freebsd_fallback_var OUTPUT_VAR_NAME) + set(FALLBACK_VAR_NAMES ${ARGN}) + + set(VALUE "${${OUTPUT_VAR_NAME}}") + if(VALUE) + return() + endif() + + foreach(variable_name IN LISTS FALLBACK_VAR_NAMES) + if(${variable_name}) + set(${OUTPUT_VAR_NAME} "${${variable_name}}" PARENT_SCOPE) + set(VALUE "${${variable_name}}") + break() + endif() + endforeach() + if(NOT VALUE) + message(WARNING "Variable ${OUTPUT_VAR_NAME} could not be given a fallback value from any variable ${FALLBACK_VAR_NAMES}.") + endif() +endfunction() + +function(check_required_var VAR_NAME) + if(NOT ${VAR_NAME}) + message(FATAL_ERROR "Variable ${VAR_NAME} is not set.") + endif() +endfunction() + +set(_cpack_freebsd_fallback_origin "misc/bogus") + +_cpack_freebsd_fallback_var("CPACK_FREEBSD_PACKAGE_NAME" + "CPACK_PACKAGE_NAME" + "CMAKE_PROJECT_NAME" + ) + +set(_cpack_freebsd_fallback_www "http://example.com/?pkg=${CPACK_FREEBSD_PACKAGE_NAME}") + +_cpack_freebsd_fallback_var("CPACK_FREEBSD_PACKAGE_COMMENT" + "CPACK_PACKAGE_DESCRIPTION_SUMMARY" + ) + +# TODO: maybe read the PACKAGE_DESCRIPTION file for the longer +# FreeBSD pkg-descr? +_cpack_freebsd_fallback_var("CPACK_FREEBSD_PACKAGE_DESCRIPTION" + "CPACK_DEBIAN_PACKAGE_DESCRIPTION" + "CPACK_PACKAGE_DESCRIPTION_SUMMARY" + "PACKAGE_DESCRIPTION" + ) + +# There's really only one homepage for a project, so +# re-use the Debian setting if it's there. +_cpack_freebsd_fallback_var("CPACK_FREEBSD_PACKAGE_WWW" + "CPACK_DEBIAN_PACKAGE_HOMEPAGE" + "_cpack_freebsd_fallback_www" + ) + +_cpack_freebsd_fallback_var("CPACK_FREEBSD_PACKAGE_VERSION" + "CMAKE_PROJECT_VERSION" + "${CMAKE_PROJECT_NAME}_VERSION" + "PROJECT_VERSION" + "CPACK_PACKAGE_VERSION" + "CPACK_PACKAGE_VERSION" + ) + +_cpack_freebsd_fallback_var("CPACK_FREEBSD_PACKAGE_MAINTAINER" + "CPACK_PACKAGE_CONTACT" + ) + +_cpack_freebsd_fallback_var("CPACK_FREEBSD_PACKAGE_LICENSE" + "CPACK_RPM_PACKAGE_LICENSE" + ) + +_cpack_freebsd_fallback_var("CPACK_FREEBSD_PACKAGE_ORIGIN" + "_cpack_freebsd_fallback_origin" + ) + +if(NOT CPACK_FREEBSD_PACKAGE_CATEGORIES) + string(REGEX REPLACE "/.*" "" CPACK_FREEBSD_PACKAGE_CATEGORIES ${CPACK_FREEBSD_PACKAGE_ORIGIN}) +endif() + +check_required_var("CPACK_FREEBSD_PACKAGE_NAME") +check_required_var("CPACK_FREEBSD_PACKAGE_ORIGIN") +check_required_var("CPACK_FREEBSD_PACKAGE_VERSION") +check_required_var("CPACK_FREEBSD_PACKAGE_MAINTAINER") +check_required_var("CPACK_FREEBSD_PACKAGE_COMMENT") +check_required_var("CPACK_FREEBSD_PACKAGE_DESCRIPTION") +check_required_var("CPACK_FREEBSD_PACKAGE_WWW") +check_required_var("CPACK_FREEBSD_PACKAGE_LICENSE") diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 40403ca..1878b8a 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -896,11 +896,40 @@ if(CYGWIN) ) endif() +option(CPACK_ENABLE_FREEBSD_PKG "Add FreeBSD pkg(8) generator to CPack." OFF) + if(UNIX) set(CPACK_SRCS ${CPACK_SRCS} CPack/cmCPackDebGenerator.cxx CPack/cmCPackRPMGenerator.cxx ) + + # Optionally, try to use pkg(8) + if(CPACK_ENABLE_FREEBSD_PKG) + # On UNIX, you may find FreeBSD's pkg(8) and attendant + # library -- it can be used on FreeBSD, Dragonfly, NetBSD, + # OpenBSD and also Linux and OSX. Look for the header and + # the library; it's a warning on FreeBSD if they're not + # found, and informational on other platforms. + find_path(FREEBSD_PKG_INCLUDE_DIRS "pkg.h" PATHS /usr/local) + if(FREEBSD_PKG_INCLUDE_DIRS) + find_library(FREEBSD_PKG_LIBRARIES + pkg + DOC "FreeBSD pkg(8) library") + if(FREEBSD_PKG_LIBRARIES) + set(CPACK_SRCS ${CPACK_SRCS} + CPack/cmCPackFreeBSDGenerator.cxx + ) + endif() + endif() + + if (NOT FREEBSD_PKG_INCLUDE_DIRS OR NOT FREEBSD_PKG_LIBRARIES) + message(FATAL_ERROR "CPack needs libpkg(3) to produce FreeBSD packages natively.") + endif() + else() + set(FREEBSD_PKG_INCLUDE_DIRS NOTFOUND) + set(FREEBSD_PKG_LIBRARIES NOTFOUND) + endif() endif() if(WIN32) @@ -958,6 +987,11 @@ if(APPLE) "See CMakeFiles/CMakeError.log for details of the failure.") endif() endif() +if(CPACK_ENABLE_FREEBSD_PKG AND FREEBSD_PKG_INCLUDE_DIRS AND FREEBSD_PKG_LIBRARIES) + target_link_libraries(CPackLib ${FREEBSD_PKG_LIBRARIES}) + include_directories(${FREEBSD_PKG_INCLUDE_DIRS}) + add_definitions(-DHAVE_FREEBSD_PKG) +endif() if(APPLE) add_executable(cmakexbuild cmakexbuild.cxx) diff --git a/Source/CPack/cmCPackFreeBSDGenerator.cxx b/Source/CPack/cmCPackFreeBSDGenerator.cxx new file mode 100644 index 0000000..ae17b79 --- /dev/null +++ b/Source/CPack/cmCPackFreeBSDGenerator.cxx @@ -0,0 +1,359 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmCPackFreeBSDGenerator.h" + +#include "cmArchiveWrite.h" +#include "cmCPackArchiveGenerator.h" +#include "cmCPackLog.h" +#include "cmGeneratedFileStream.h" +#include "cmSystemTools.h" + +// Needed for ::open() and ::stat() +#include +#include +#include +#include + +#include + +#include + +cmCPackFreeBSDGenerator::cmCPackFreeBSDGenerator() + : cmCPackArchiveGenerator(cmArchiveWrite::CompressXZ, "paxr") +{ +} + +int cmCPackFreeBSDGenerator::InitializeInternal() +{ + this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr/local"); + this->SetOption("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", "0"); + return this->Superclass::InitializeInternal(); +} + +cmCPackFreeBSDGenerator::~cmCPackFreeBSDGenerator() +{ +} + +// This is a wrapper, for use only in stream-based output, +// that will output a string in UCL escaped fashion (in particular, +// quotes and backslashes are escaped). The list of characters +// to escape is taken from https://github.com/vstakhov/libucl +// (which is the reference implementation pkg(8) refers to). +class EscapeQuotes +{ +public: + const std::string& value; + + EscapeQuotes(const std::string& s) + : value(s) + { + } +}; + +// Output a string as "string" with escaping applied. +cmGeneratedFileStream& operator<<(cmGeneratedFileStream& s, + const EscapeQuotes& v) +{ + s << '"'; + for (std::string::size_type i = 0; i < v.value.length(); ++i) { + char c = v.value[i]; + switch (c) { + case '\n': + s << "\\n"; + break; + case '\r': + s << "\\r"; + break; + case '\b': + s << "\\b"; + break; + case '\t': + s << "\\t"; + break; + case '\f': + s << "\\f"; + break; + case '\\': + s << "\\\\"; + break; + case '"': + s << "\\\""; + break; + default: + s << c; + break; + } + } + s << '"'; + return s; +} + +// The following classes are all helpers for writing out the UCL +// manifest file (it also looks like JSON). ManifestKey just has +// a (string-valued) key; subclasses add a specific kind of +// value-type to the key, and implement write_value() to output +// the corresponding UCL. +class ManifestKey +{ +public: + std::string key; + + ManifestKey(const std::string& k) + : key(k) + { + } + + virtual ~ManifestKey() {} + + // Output the value associated with this key to the stream @p s. + // Format is to be decided by subclasses. + virtual void write_value(cmGeneratedFileStream& s) const = 0; +}; + +// Basic string-value (e.g. "name": "cmake") +class ManifestKeyValue : public ManifestKey +{ +public: + std::string value; + + ManifestKeyValue(const std::string& k, const std::string& v) + : ManifestKey(k) + , value(v) + { + } + + void write_value(cmGeneratedFileStream& s) const CM_OVERRIDE + { + s << EscapeQuotes(value); + } +}; + +// List-of-strings values (e.g. "licenses": ["GPLv2", "LGPLv2"]) +class ManifestKeyListValue : public ManifestKey +{ +public: + typedef std::vector VList; + VList value; + + ManifestKeyListValue(const std::string& k) + : ManifestKey(k) + { + } + + ManifestKeyListValue& operator<<(const std::string& v) + { + value.push_back(v); + return *this; + } + + ManifestKeyListValue& operator<<(const std::vector& v) + { + for (VList::const_iterator it = v.begin(); it != v.end(); ++it) { + (*this) << (*it); + } + return *this; + } + + void write_value(cmGeneratedFileStream& s) const CM_OVERRIDE + { + bool with_comma = false; + + s << '['; + for (VList::const_iterator it = value.begin(); it != value.end(); ++it) { + s << (with_comma ? ',' : ' '); + s << EscapeQuotes(*it); + with_comma = true; + } + s << " ]"; + } +}; + +// Deps: actually a dictionary, but we'll treat it as a +// list so we only name the deps, and produce dictionary- +// like output via write_value() +class ManifestKeyDepsValue : public ManifestKeyListValue +{ +public: + ManifestKeyDepsValue(const std::string& k) + : ManifestKeyListValue(k) + { + } + + void write_value(cmGeneratedFileStream& s) const CM_OVERRIDE + { + s << "{\n"; + for (VList::const_iterator it = value.begin(); it != value.end(); ++it) { + s << " \"" << *it << "\": {\"origin\": \"" << *it << "\"},\n"; + } + s << '}'; + } +}; + +// Write one of the key-value classes (above) to the stream @p s +cmGeneratedFileStream& operator<<(cmGeneratedFileStream& s, + const ManifestKey& v) +{ + s << '"' << v.key << "\": "; + v.write_value(s); + s << ",\n"; + return s; +} + +// Look up variable; if no value is set, returns an empty string; +// basically a wrapper that handles the NULL-ptr return from GetOption(). +std::string cmCPackFreeBSDGenerator::var_lookup(const char* var_name) +{ + const char* pv = this->GetOption(var_name); + if (!pv) { + return std::string(); + } else { + return pv; + } +} + +// Produce UCL in the given @p manifest file for the common +// manifest fields (common to the compact and regular formats), +// by reading the CPACK_FREEBSD_* variables. +void cmCPackFreeBSDGenerator::write_manifest_fields( + cmGeneratedFileStream& manifest) +{ + manifest << ManifestKeyValue("name", + var_lookup("CPACK_FREEBSD_PACKAGE_NAME")); + manifest << ManifestKeyValue("origin", + var_lookup("CPACK_FREEBSD_PACKAGE_ORIGIN")); + manifest << ManifestKeyValue("version", + var_lookup("CPACK_FREEBSD_PACKAGE_VERSION")); + manifest << ManifestKeyValue("maintainer", + var_lookup("CPACK_FREEBSD_PACKAGE_MAINTAINER")); + manifest << ManifestKeyValue("comment", + var_lookup("CPACK_FREEBSD_PACKAGE_COMMENT")); + manifest << ManifestKeyValue( + "desc", var_lookup("CPACK_FREEBSD_PACKAGE_DESCRIPTION")); + manifest << ManifestKeyValue("www", var_lookup("CPACK_FREEBSD_PACKAGE_WWW")); + std::vector licenses; + cmSystemTools::ExpandListArgument( + var_lookup("CPACK_FREEBSD_PACKAGE_LICENSE"), licenses); + std::string licenselogic("single"); + if (licenses.size() < 1) { + cmSystemTools::SetFatalErrorOccured(); + } else if (licenses.size() > 1) { + licenselogic = var_lookup("CPACK_FREEBSD_PACKAGE_LICENSE_LOGIC"); + } + manifest << ManifestKeyValue("licenselogic", licenselogic); + manifest << (ManifestKeyListValue("licenses") << licenses); + std::vector categories; + cmSystemTools::ExpandListArgument( + var_lookup("CPACK_FREEBSD_PACKAGE_CATEGORIES"), categories); + manifest << (ManifestKeyListValue("categories") << categories); + manifest << ManifestKeyValue("prefix", var_lookup("CMAKE_INSTALL_PREFIX")); + std::vector deps; + cmSystemTools::ExpandListArgument(var_lookup("CPACK_FREEBSD_PACKAGE_DEPS"), + deps); + if (deps.size() > 0) { + manifest << (ManifestKeyDepsValue("deps") << deps); + } +} + +// Package only actual files; others are ignored (in particular, +// intermediate subdirectories are ignored). +static bool ignore_file(const std::string& filename) +{ + struct stat statbuf; + + if (!((stat(filename.c_str(), &statbuf) >= 0) && + ((statbuf.st_mode & S_IFMT) == S_IFREG))) { + return true; + } + // May be other reasons to return false + return false; +} + +// Write the given list of @p files to the manifest stream @p s, +// as the UCL field "files" (which is dictionary-valued, to +// associate filenames with hashes). All the files are transformed +// to paths relative to @p toplevel, with a leading / (since the paths +// in FreeBSD package files are supposed to be absolute). +void write_manifest_files(cmGeneratedFileStream& s, + const std::string& toplevel, + const std::vector& files) +{ + const char* c_toplevel = toplevel.c_str(); + std::vector::const_iterator it; + + s << "\"files\": {\n"; + for (it = files.begin(); it != files.end(); ++it) { + s << " \"/" << cmSystemTools::RelativePath(c_toplevel, it->c_str()) + << "\": \"" + << "" + << "\",\n"; + } + s << " },\n"; +} + +static bool has_suffix(const std::string& str, const std::string& suffix) +{ + return str.size() >= suffix.size() && + str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; +} + +int cmCPackFreeBSDGenerator::PackageFiles() +{ + if (!this->ReadListFile("CPackFreeBSD.cmake")) { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Error while execution CPackFreeBSD.cmake" << std::endl); + return 0; + } + + std::vector::const_iterator fileIt; + std::string dir = cmSystemTools::GetCurrentWorkingDirectory(); + cmSystemTools::ChangeDirectory(toplevel); + + files.erase(std::remove_if(files.begin(), files.end(), ignore_file), + files.end()); + + std::string manifestname = toplevel + "/+MANIFEST"; + { + cmGeneratedFileStream manifest(manifestname.c_str()); + manifest << "{\n"; + write_manifest_fields(manifest); + write_manifest_files(manifest, toplevel, files); + manifest << "}\n"; + } + + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: " << toplevel << std::endl); + + if (WantsComponentInstallation()) { + // CASE 1 : COMPONENT ALL-IN-ONE package + // If ALL COMPONENTS in ONE package has been requested + // then the package file is unique and should be open here. + if (componentPackageMethod == ONE_PACKAGE) { + return PackageComponentsAllInOne(); + } + // CASE 2 : COMPONENT CLASSICAL package(s) (i.e. not all-in-one) + // There will be 1 package for each component group + // however one may require to ignore component group and + // in this case you'll get 1 package for each component. + return PackageComponents(componentPackageMethod == + ONE_PACKAGE_PER_COMPONENT); + } + + std::string output_dir = + cmSystemTools::CollapseCombinedPath(toplevel, "../"); + pkg_create_from_manifest(output_dir.c_str(), ::TXZ, toplevel.c_str(), + manifestname.c_str(), NULL); + + std::string broken_suffix = std::string("-") + + var_lookup("CPACK_TOPLEVEL_TAG") + std::string(GetOutputExtension()); + for (std::vector::iterator it = packageFileNames.begin(); + it != packageFileNames.end(); ++it) { + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Packagefile " << *it << std::endl); + if (has_suffix(*it, broken_suffix)) { + it->replace(it->size() - broken_suffix.size(), std::string::npos, + GetOutputExtension()); + break; + } + } + + cmSystemTools::ChangeDirectory(dir); + return 1; +} diff --git a/Source/CPack/cmCPackFreeBSDGenerator.h b/Source/CPack/cmCPackFreeBSDGenerator.h new file mode 100644 index 0000000..230f728 --- /dev/null +++ b/Source/CPack/cmCPackFreeBSDGenerator.h @@ -0,0 +1,37 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef cmCPackFreeBSDGenerator_h +#define cmCPackFreeBSDGenerator_h + +#include + +#include "cmCPackArchiveGenerator.h" +#include "cmCPackGenerator.h" + +class cmGeneratedFileStream; + +/** \class cmCPackFreeBSDGenerator + * \brief A generator for FreeBSD package files (TXZ with a manifest) + * + */ +class cmCPackFreeBSDGenerator : public cmCPackArchiveGenerator +{ +public: + cmCPackTypeMacro(cmCPackFreeBSDGenerator, cmCPackArchiveGenerator); + /** + * Construct generator + */ + cmCPackFreeBSDGenerator(); + ~cmCPackFreeBSDGenerator() CM_OVERRIDE; + + int InitializeInternal() CM_OVERRIDE; + int PackageFiles() CM_OVERRIDE; + +protected: + const char* GetOutputExtension() CM_OVERRIDE { return ".txz"; } + + std::string var_lookup(const char* var_name); + void write_manifest_fields(cmGeneratedFileStream&); +}; + +#endif diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx index 31f48c7..f135059 100644 --- a/Source/CPack/cmCPackGeneratorFactory.cxx +++ b/Source/CPack/cmCPackGeneratorFactory.cxx @@ -9,6 +9,9 @@ #include "IFW/cmCPackIFWGenerator.h" #include "cmAlgorithms.h" #include "cmCPack7zGenerator.h" +#ifdef HAVE_FREEBSD_PKG +#include "cmCPackFreeBSDGenerator.h" +#endif #include "cmCPackGenerator.h" #include "cmCPackLog.h" #include "cmCPackNSISGenerator.h" @@ -132,6 +135,12 @@ cmCPackGeneratorFactory::cmCPackGeneratorFactory() cmCPackRPMGenerator::CreateGenerator); } #endif +#ifdef HAVE_FREEBSD_PKG + if (cmCPackFreeBSDGenerator::CanGenerate()) { + this->RegisterGenerator("FREEBSD", "FreeBSD pkg(8) packages", + cmCPackFreeBSDGenerator::CreateGenerator); + } +#endif } cmCPackGeneratorFactory::~cmCPackGeneratorFactory() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=22f8a465d7de84b246f6d5ec0e05984b5610122f commit 22f8a465d7de84b246f6d5ec0e05984b5610122f Author: Brad King AuthorDate: Fri Jun 9 16:28:32 2017 -0400 Commit: Brad King CommitDate: Fri Jun 9 16:28:32 2017 -0400 Android: Do not pass sysroot include for standalone toolchain The change in commit v3.8.0-rc1~60^2 (Android: Pass sysroot include directory explicitly, 2017-01-20) does not make sense when compiling with a standalone toolchain which is tied to a single API version. Drop the explicit include directory so that the compiler uses its default system include order. Fixes: #16954 diff --git a/Modules/Platform/Android-Common.cmake b/Modules/Platform/Android-Common.cmake index cf2785a..78938dc 100644 --- a/Modules/Platform/Android-Common.cmake +++ b/Modules/Platform/Android-Common.cmake @@ -156,6 +156,11 @@ macro(__android_compiler_common lang) # necessary so that Android API-version-specific headers are preferred # over those in the toolchain's `include-fixed` directory (which cannot # possibly match all versions). - list(APPEND CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES "${CMAKE_SYSROOT}/usr/include") - list(REMOVE_ITEM CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include") + # + # Do not do this for a standalone toolchain because it is already + # tied to a specific API version. + if(CMAKE_ANDROID_NDK) + list(APPEND CMAKE_${lang}_STANDARD_INCLUDE_DIRECTORIES "${CMAKE_SYSROOT}/usr/include") + list(REMOVE_ITEM CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include") + endif() endmacro() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5f93bf787d0ccccf1aa6dc3f6f1d0df3855a55f6 commit 5f93bf787d0ccccf1aa6dc3f6f1d0df3855a55f6 Author: Brad King AuthorDate: Fri Jun 9 13:30:37 2017 -0400 Commit: Brad King CommitDate: Fri Jun 9 14:19:52 2017 -0400 Android: Detect API version of standalone toolchain with unified headers A standalone toolchain with unified headers keeps the `__ANDROID_API__` macro in the `bin/clang` launcher instead of in `api-level.h`. Issue: #16954 diff --git a/Modules/Platform/Android-Determine.cmake b/Modules/Platform/Android-Determine.cmake index 6d370ab..076be85 100644 --- a/Modules/Platform/Android-Determine.cmake +++ b/Modules/Platform/Android-Determine.cmake @@ -100,11 +100,34 @@ endif() set(_ANDROID_STANDALONE_TOOLCHAIN_API "") if(CMAKE_ANDROID_STANDALONE_TOOLCHAIN) - set(_ANDROID_API_LEVEL_H_REGEX "^[\t ]*#[\t ]*define[\t ]+__ANDROID_API__[\t ]+([0-9]+)") - file(STRINGS "${CMAKE_ANDROID_STANDALONE_TOOLCHAIN}/sysroot/usr/include/android/api-level.h" - _ANDROID_API_LEVEL_H_CONTENT REGEX "${_ANDROID_API_LEVEL_H_REGEX}") - if(_ANDROID_API_LEVEL_H_CONTENT MATCHES "${_ANDROID_API_LEVEL_H_REGEX}") - set(_ANDROID_STANDALONE_TOOLCHAIN_API "${CMAKE_MATCH_1}") + # Try to read the API level from the toolchain launcher. + if(EXISTS "${CMAKE_ANDROID_STANDALONE_TOOLCHAIN}/bin/clang") + set(_ANDROID_API_LEVEL_CLANG_REGEX "__ANDROID_API__=([0-9]+)") + file(STRINGS "${CMAKE_ANDROID_STANDALONE_TOOLCHAIN}/bin/clang" _ANDROID_STANDALONE_TOOLCHAIN_BIN_CLANG + REGEX "${_ANDROID_API_LEVEL_CLANG_REGEX}" LIMIT_COUNT 1 LIMIT_INPUT 65536) + if(_ANDROID_STANDALONE_TOOLCHAIN_BIN_CLANG MATCHES "${_ANDROID_API_LEVEL_CLANG_REGEX}") + set(_ANDROID_STANDALONE_TOOLCHAIN_API "${CMAKE_MATCH_1}") + endif() + unset(_ANDROID_STANDALONE_TOOLCHAIN_BIN_CLANG) + unset(_ANDROID_API_LEVEL_CLANG_REGEX) + endif() + if(NOT _ANDROID_STANDALONE_TOOLCHAIN_API) + # The compiler launcher does not know __ANDROID_API__. Assume this + # is not unified headers and look for it in the api-level.h header. + set(_ANDROID_API_LEVEL_H_REGEX "^[\t ]*#[\t ]*define[\t ]+__ANDROID_API__[\t ]+([0-9]+)") + file(STRINGS "${CMAKE_ANDROID_STANDALONE_TOOLCHAIN}/sysroot/usr/include/android/api-level.h" + _ANDROID_API_LEVEL_H_CONTENT REGEX "${_ANDROID_API_LEVEL_H_REGEX}") + if(_ANDROID_API_LEVEL_H_CONTENT MATCHES "${_ANDROID_API_LEVEL_H_REGEX}") + set(_ANDROID_STANDALONE_TOOLCHAIN_API "${CMAKE_MATCH_1}") + endif() + endif() + if(NOT _ANDROID_STANDALONE_TOOLCHAIN_API) + message(WARNING + "Android: Did not detect API level from\n" + " ${CMAKE_ANDROID_STANDALONE_TOOLCHAIN}/bin/clang\n" + "or\n" + " ${CMAKE_ANDROID_STANDALONE_TOOLCHAIN}/sysroot/usr/include/android/api-level.h\n" + ) endif() endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=414438b2fb5a43c447273b425b59cd982818457b commit 414438b2fb5a43c447273b425b59cd982818457b Author: Brad King AuthorDate: Fri Jun 9 11:20:41 2017 -0400 Commit: Brad King CommitDate: Fri Jun 9 12:34:39 2017 -0400 CUDA: Add option to run the compiler through launcher tools Add a `CUDA_COMPILER_LAUNCHER` target property like those added for C and CXX by commit v3.4.0-rc1~450^2 (Add options to launch the compiler through tools like ccache or distcc, 2015-06-04). Fixes: #16953 diff --git a/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst b/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst index 0fe0b31..28925fc 100644 --- a/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst +++ b/Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst @@ -1,7 +1,8 @@ _COMPILER_LAUNCHER ------------------------ -This property is implemented only when ```` is ``C`` or ``CXX``. +This property is implemented only when ```` is ``C``, ``CXX``, +or ``CUDA``. Specify a :ref:`;-list ` containing a command line for a compiler launching tool. The :ref:`Makefile Generators` and the diff --git a/Help/release/dev/cuda-compiler-launcher.rst b/Help/release/dev/cuda-compiler-launcher.rst new file mode 100644 index 0000000..f217780 --- /dev/null +++ b/Help/release/dev/cuda-compiler-launcher.rst @@ -0,0 +1,8 @@ +cuda-compiler-launcher +---------------------- + +* The :ref:`Makefile Generators` and the :generator:`Ninja` generator learned + to add compiler launcher tools like ccache along with the compiler for the + ``CUDA`` language (``C`` and ``CXX`` were supported previously). See the + :variable:`CMAKE__COMPILER_LAUNCHER` variable and + :prop_tgt:`_COMPILER_LAUNCHER` target property for details. diff --git a/Help/variable/CMAKE_LANG_COMPILER_LAUNCHER.rst b/Help/variable/CMAKE_LANG_COMPILER_LAUNCHER.rst index 7961f60..f4e2ba5 100644 --- a/Help/variable/CMAKE_LANG_COMPILER_LAUNCHER.rst +++ b/Help/variable/CMAKE_LANG_COMPILER_LAUNCHER.rst @@ -3,4 +3,4 @@ CMAKE__COMPILER_LAUNCHER Default value for :prop_tgt:`_COMPILER_LAUNCHER` target property. This variable is used to initialize the property on each target as it is -created. This is done only when ```` is ``C`` or ``CXX``. +created. This is done only when ```` is ``C``, ``CXX``, or ``CUDA``. diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index a4511b6..7938683 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -657,7 +657,8 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( } // Maybe insert a compiler launcher like ccache or distcc - if (!compileCommands.empty() && (lang == "C" || lang == "CXX")) { + if (!compileCommands.empty() && + (lang == "C" || lang == "CXX" || lang == "CUDA")) { std::string const clauncher_prop = lang + "_COMPILER_LAUNCHER"; const char* clauncher = this->GeneratorTarget->GetProperty(clauncher_prop); diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 2f4cccb..7c57ef0 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -648,7 +648,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang) } // Maybe insert a compiler launcher like ccache or distcc - if (!compileCmds.empty() && (lang == "C" || lang == "CXX")) { + if (!compileCmds.empty() && + (lang == "C" || lang == "CXX" || lang == "CUDA")) { std::string const clauncher_prop = lang + "_COMPILER_LAUNCHER"; const char* clauncher = this->GeneratorTarget->GetProperty(clauncher_prop); if (clauncher && *clauncher) { diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index c95a3ca..c1b6f97 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -276,6 +276,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, this->SetPropertyDefault("CUDA_STANDARD", CM_NULLPTR); this->SetPropertyDefault("CUDA_STANDARD_REQUIRED", CM_NULLPTR); this->SetPropertyDefault("CUDA_EXTENSIONS", CM_NULLPTR); + this->SetPropertyDefault("CUDA_COMPILER_LAUNCHER", CM_NULLPTR); this->SetPropertyDefault("LINK_SEARCH_START_STATIC", CM_NULLPTR); this->SetPropertyDefault("LINK_SEARCH_END_STATIC", CM_NULLPTR); } diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 79f487d..7a59824 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -341,6 +341,9 @@ if("${CMAKE_GENERATOR}" MATCHES "Make|Ninja") add_RunCMake_test(ClangTidy -DPSEUDO_TIDY=$) add_RunCMake_test(IncludeWhatYouUse -DPSEUDO_IWYU=$) add_RunCMake_test(Cpplint -DPSEUDO_CPPLINT=$) + if(DEFINED CMake_TEST_CUDA) + list(APPEND CompilerLauncher_ARGS -DCMake_TEST_CUDA=${CMake_TEST_CUDA}) + endif() add_RunCMake_test(CompilerLauncher) endif() diff --git a/Tests/RunCMake/CompilerLauncher/CUDA-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CUDA-Build-stdout.txt new file mode 100644 index 0000000..3313e31 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/CUDA-Build-stdout.txt @@ -0,0 +1 @@ +.*-E env USED_LAUNCHER=1.* diff --git a/Tests/RunCMake/CompilerLauncher/CUDA-launch-Build-stdout.txt b/Tests/RunCMake/CompilerLauncher/CUDA-launch-Build-stdout.txt new file mode 100644 index 0000000..3313e31 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/CUDA-launch-Build-stdout.txt @@ -0,0 +1 @@ +.*-E env USED_LAUNCHER=1.* diff --git a/Tests/RunCMake/CompilerLauncher/CUDA-launch.cmake b/Tests/RunCMake/CompilerLauncher/CUDA-launch.cmake new file mode 100644 index 0000000..6b4b816 --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/CUDA-launch.cmake @@ -0,0 +1,3 @@ +set(CTEST_USE_LAUNCHERS 1) +include(CTestUseLaunchers) +include(CUDA.cmake) diff --git a/Tests/RunCMake/CompilerLauncher/CUDA.cmake b/Tests/RunCMake/CompilerLauncher/CUDA.cmake new file mode 100644 index 0000000..fe5560b --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/CUDA.cmake @@ -0,0 +1,4 @@ +enable_language(CUDA) +set(CMAKE_CUDA_COMPILER_LAUNCHER "${CMAKE_COMMAND};-E;env;USED_LAUNCHER=1") +set(CMAKE_VERBOSE_MAKEFILE TRUE) +add_executable(main main.cu) diff --git a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake index 5884d5c..ab26512 100644 --- a/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake +++ b/Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake @@ -15,9 +15,14 @@ function(run_compiler_launcher lang) run_cmake_command(${lang}-Build ${CMAKE_COMMAND} --build . ${verbose_args}) endfunction() -run_compiler_launcher(C) -run_compiler_launcher(CXX) -if (NOT RunCMake_GENERATOR STREQUAL "Watcom WMake") - run_compiler_launcher(C-launch) - run_compiler_launcher(CXX-launch) +set(langs C CXX) +if(CMake_TEST_CUDA) + list(APPEND langs CUDA) endif() + +foreach(lang ${langs}) + run_compiler_launcher(${lang}) + if (NOT RunCMake_GENERATOR STREQUAL "Watcom WMake") + run_compiler_launcher(${lang}-launch) + endif() +endforeach() diff --git a/Tests/RunCMake/CompilerLauncher/main.cu b/Tests/RunCMake/CompilerLauncher/main.cu new file mode 100644 index 0000000..f8b643a --- /dev/null +++ b/Tests/RunCMake/CompilerLauncher/main.cu @@ -0,0 +1,4 @@ +int main() +{ + return 0; +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fcbecbd2afcf3fcfd4662946615fec5e4c73ed84 commit fcbecbd2afcf3fcfd4662946615fec5e4c73ed84 Author: Brad King AuthorDate: Fri Jun 9 11:13:32 2017 -0400 Commit: Brad King CommitDate: Fri Jun 9 11:13:32 2017 -0400 FindHTMLHelp: Use PATH_SUFFIXES to search under Program Files The find commands already know how to search in variants of the Program Files folders on Windows. Use PATH_SUFFIXES to tell them under what directory within Program Files to find htmlhelp. Fixes: #16950 diff --git a/Modules/FindHTMLHelp.cmake b/Modules/FindHTMLHelp.cmake index 84e2458..6aab8a7 100644 --- a/Modules/FindHTMLHelp.cmake +++ b/Modules/FindHTMLHelp.cmake @@ -18,28 +18,28 @@ if(WIN32) find_program(HTML_HELP_COMPILER - hhc - "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]" - "$ENV{ProgramFiles}/HTML Help Workshop" - "C:/Program Files/HTML Help Workshop" + NAMES hhc + PATHS + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]" + PATH_SUFFIXES "HTML Help Workshop" ) get_filename_component(HTML_HELP_COMPILER_PATH "${HTML_HELP_COMPILER}" PATH) find_path(HTML_HELP_INCLUDE_PATH - htmlhelp.h - "${HTML_HELP_COMPILER_PATH}/include" - "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/include" - "$ENV{ProgramFiles}/HTML Help Workshop/include" - "C:/Program Files/HTML Help Workshop/include" + NAMES htmlhelp.h + PATHS + "${HTML_HELP_COMPILER_PATH}/include" + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/include" + PATH_SUFFIXES "HTML Help Workshop/include" ) find_library(HTML_HELP_LIBRARY - htmlhelp - "${HTML_HELP_COMPILER_PATH}/lib" - "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/lib" - "$ENV{ProgramFiles}/HTML Help Workshop/lib" - "C:/Program Files/HTML Help Workshop/lib" + NAMES htmlhelp + PATHS + "${HTML_HELP_COMPILER_PATH}/lib" + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/lib" + PATH_SUFFIXES "HTML Help Workshop/lib" ) mark_as_advanced( https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d1c3e0dcf78849b38ab620ef36c715997af0088 commit 3d1c3e0dcf78849b38ab620ef36c715997af0088 Merge: 591557b a327587 Author: Brad King AuthorDate: Fri Jun 9 11:03:34 2017 -0400 Commit: Brad King CommitDate: Fri Jun 9 11:03:34 2017 -0400 Merge branch 'upstream-KWSys' into update-kwsys * upstream-KWSys: KWSys 2017-06-09 (a700e2ab) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a32758782c953a333c0dd1e8553aee66a4404ee5 commit a32758782c953a333c0dd1e8553aee66a4404ee5 Author: KWSys Upstream AuthorDate: Fri Jun 9 10:36:15 2017 -0400 Commit: Brad King CommitDate: Fri Jun 9 11:03:33 2017 -0400 KWSys 2017-06-09 (a700e2ab) Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit a700e2ab06e2741e4955a1aa120293bf78b8fcac (master). Upstream Shortlog ----------------- Brad King (1): 7e04a3d2 SystemTools: Remove RemoveEmptyPathElements method diff --git a/SystemTools.cxx b/SystemTools.cxx index 1c4fe33..c5bbd41 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -22,7 +22,6 @@ #include KWSYS_HEADER(FStream.hxx) #include KWSYS_HEADER(Encoding.hxx) -#include #include #include #include @@ -3709,16 +3708,6 @@ std::string SystemTools::JoinPath( return result; } -void SystemTools::RemoveEmptyPathElements(std::vector& path) -{ - if (path.empty()) { - return; - } - - path.erase(std::remove(path.begin() + 1, path.end(), std::string("")), - path.end()); -} - bool SystemTools::ComparePath(const std::string& c1, const std::string& c2) { #if defined(_WIN32) || defined(__APPLE__) diff --git a/SystemTools.hxx.in b/SystemTools.hxx.in index 5e091c2..1672e92 100644 --- a/SystemTools.hxx.in +++ b/SystemTools.hxx.in @@ -461,6 +461,10 @@ public: * produce the original path. Home directory references are * automatically expanded if expand_home_dir is true and this * platform supports them. + * + * This does *not* normalize the input path. All components are + * preserved, including empty ones. Typically callers should use + * this only on paths that have already been normalized. */ static void SplitPath(const std::string& p, std::vector& components, @@ -469,15 +473,15 @@ public: /** * Join components of a path name into a single string. See * SplitPath for the format of the components. + * + * This does *not* normalize the input path. All components are + * preserved, including empty ones. Typically callers should use + * this only on paths that have already been normalized. */ static std::string JoinPath(const std::vector& components); static std::string JoinPath(std::vector::const_iterator first, std::vector::const_iterator last); - /** Removes empty components from path. - */ - static void RemoveEmptyPathElements(std::vector& path); - /** * Compare a path or components of a path. */ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=82be694c7a1a878650563cd2c72b60f314d5dc85 commit 82be694c7a1a878650563cd2c72b60f314d5dc85 Author: Brad King AuthorDate: Thu Jun 8 11:54:03 2017 -0400 Commit: Brad King CommitDate: Fri Jun 9 10:38:43 2017 -0400 file(GENERATE): Add policy CMP0070 to define relative path behavior Previously `file(GENERATE)` did not define any behavior for relative paths given to the `OUTPUT` or `INPUT` arguments. Define behavior consistent with CMake conventions and add a policy to provide compatibility for projects that relied on the old accidental behavior. Fixes: #16786 diff --git a/Help/command/file.rst b/Help/command/file.rst index b2e4eea..7afb715 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -291,6 +291,8 @@ from the input content to produce the output content. The options are: ``INPUT `` Use the content from a given file as input. + A relative path is treated with respect to the value of + :variable:`CMAKE_CURRENT_SOURCE_DIR`. See policy :policy:`CMP0070`. ``OUTPUT `` Specify the output file name to generate. Use generator expressions @@ -298,6 +300,9 @@ from the input content to produce the output content. The options are: name. Multiple configurations may generate the same output file only if the generated content is identical. Otherwise, the ```` must evaluate to an unique name for each configuration. + A relative path (after evaluating generator expressions) is treated + with respect to the value of :variable:`CMAKE_CURRENT_BINARY_DIR`. + See policy :policy:`CMP0070`. Exactly one ``CONTENT`` or ``INPUT`` option must be given. A specific ``OUTPUT`` file may be named by at most one invocation of ``file(GENERATE)``. diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 7b85817..eb9af27 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -51,6 +51,14 @@ The :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable may also be used to determine whether to report an error on use of deprecated macros or functions. +Policies Introduced by CMake 3.10 +================================= + +.. toctree:: + :maxdepth: 1 + + CMP0070: Define file(GENERATE) behavior for relative paths. + Policies Introduced by CMake 3.9 ================================ diff --git a/Help/policy/CMP0070.rst b/Help/policy/CMP0070.rst new file mode 100644 index 0000000..0fb3617 --- /dev/null +++ b/Help/policy/CMP0070.rst @@ -0,0 +1,25 @@ +CMP0070 +------- + +Define :command:`file(GENERATE)` behavior for relative paths. + +CMake 3.10 and newer define that relative paths given to ``INPUT`` and +``OUTPUT`` arguments of ``file(GENERATE)`` are interpreted relative to the +current source and binary directories, respectively. CMake 3.9 and lower did +not define any behavior for relative paths but did not diagnose them either +and accidentally treated them relative to the process working directory. +Policy ``CMP0070`` provides compatibility with projects that used the old +undefined behavior. + +This policy affects behavior of relative paths given to ``file(GENERATE)``. +The ``OLD`` behavior for this policy is to treat the paths relative to the +working directory of CMake. The ``NEW`` behavior for this policy is to +interpret relative paths with respect to the current source or binary +directory of the caller. + +This policy was introduced in CMake version 3.10. CMake version +|release| warns when the policy is not set and uses ``OLD`` behavior. +Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` +explicitly. + +.. include:: DEPRECATED.txt diff --git a/Help/release/dev/file-generate-relative-paths.rst b/Help/release/dev/file-generate-relative-paths.rst new file mode 100644 index 0000000..fdeb9e0 --- /dev/null +++ b/Help/release/dev/file-generate-relative-paths.rst @@ -0,0 +1,7 @@ +file-generate-relative-paths +---------------------------- + +* The :command:`file(GENERATE)` command now interprets relative paths + given to its ``OUTPUT`` and ``INPUT`` arguments with respect to the + caller's current binary and source directories, respectively. + See policy :policy:`CMP0070`. diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx index c21e4f6..5003e8d 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.cxx +++ b/Source/cmGeneratorExpressionEvaluationFile.cxx @@ -20,11 +20,13 @@ cmGeneratorExpressionEvaluationFile::cmGeneratorExpressionEvaluationFile( const std::string& input, CM_AUTO_PTR outputFileExpr, - CM_AUTO_PTR condition, bool inputIsContent) + CM_AUTO_PTR condition, bool inputIsContent, + cmPolicies::PolicyStatus policyStatusCMP0070) : Input(input) , OutputFileExpr(outputFileExpr) , Condition(condition) , InputIsContent(inputIsContent) + , PolicyStatusCMP0070(policyStatusCMP0070) { } @@ -58,6 +60,8 @@ void cmGeneratorExpressionEvaluationFile::Generate( if (cmSystemTools::FileIsFullPath(outputFileName)) { outputFileName = cmSystemTools::CollapseFullPath(outputFileName); + } else { + outputFileName = this->FixRelativePath(outputFileName, PathForOutput, lg); } std::map::iterator it = @@ -118,6 +122,8 @@ void cmGeneratorExpressionEvaluationFile::Generate(cmLocalGenerator* lg) std::string inputFileName = this->Input; if (cmSystemTools::FileIsFullPath(inputFileName)) { inputFileName = cmSystemTools::CollapseFullPath(inputFileName); + } else { + inputFileName = this->FixRelativePath(inputFileName, PathForInput, lg); } lg->GetMakefile()->AddCMakeDependFile(inputFileName); cmSystemTools::GetPermissions(inputFileName.c_str(), perm); @@ -167,3 +173,57 @@ void cmGeneratorExpressionEvaluationFile::Generate(cmLocalGenerator* lg) } } } + +std::string cmGeneratorExpressionEvaluationFile::FixRelativePath( + std::string const& relativePath, PathRole role, cmLocalGenerator* lg) +{ + std::string resultPath; + switch (this->PolicyStatusCMP0070) { + case cmPolicies::WARN: { + std::string arg; + switch (role) { + case PathForInput: + arg = "INPUT"; + break; + case PathForOutput: + arg = "OUTPUT"; + break; + } + std::ostringstream w; + /* clang-format off */ + w << + cmPolicies::GetPolicyWarning(cmPolicies::CMP0070) << "\n" + "file(GENERATE) given relative " << arg << " path:\n" + " " << relativePath << "\n" + "This is not defined behavior unless CMP0070 is set to NEW. " + "For compatibility with older versions of CMake, the previous " + "undefined behavior will be used." + ; + /* clang-format on */ + lg->IssueMessage(cmake::AUTHOR_WARNING, w.str()); + } + CM_FALLTHROUGH; + case cmPolicies::OLD: + // OLD behavior is to use the relative path unchanged, + // which ends up being used relative to the working dir. + resultPath = relativePath; + break; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::NEW: + // NEW behavior is to interpret the relative path with respect + // to the current source or binary directory. + switch (role) { + case PathForInput: + resultPath = cmSystemTools::CollapseFullPath( + relativePath, lg->GetCurrentSourceDirectory()); + break; + case PathForOutput: + resultPath = cmSystemTools::CollapseFullPath( + relativePath, lg->GetCurrentBinaryDirectory()); + break; + } + break; + } + return resultPath; +} diff --git a/Source/cmGeneratorExpressionEvaluationFile.h b/Source/cmGeneratorExpressionEvaluationFile.h index 9872746..ecf919d 100644 --- a/Source/cmGeneratorExpressionEvaluationFile.h +++ b/Source/cmGeneratorExpressionEvaluationFile.h @@ -10,6 +10,7 @@ #include #include "cmGeneratorExpression.h" +#include "cmPolicies.h" #include "cm_auto_ptr.hxx" #include "cm_sys_stat.h" @@ -21,7 +22,8 @@ public: cmGeneratorExpressionEvaluationFile( const std::string& input, CM_AUTO_PTR outputFileExpr, - CM_AUTO_PTR condition, bool inputIsContent); + CM_AUTO_PTR condition, bool inputIsContent, + cmPolicies::PolicyStatus policyStatusCMP0070); void Generate(cmLocalGenerator* lg); @@ -35,12 +37,21 @@ private: cmCompiledGeneratorExpression* inputExpression, std::map& outputFiles, mode_t perm); + enum PathRole + { + PathForInput, + PathForOutput + }; + std::string FixRelativePath(std::string const& filePath, PathRole role, + cmLocalGenerator* lg); + private: const std::string Input; const CM_AUTO_PTR OutputFileExpr; const CM_AUTO_PTR Condition; std::vector Files; const bool InputIsContent; + cmPolicies::PolicyStatus PolicyStatusCMP0070; }; #endif diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 802a427..2a93966 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -592,7 +592,8 @@ void cmMakefile::AddEvaluationFile( CM_AUTO_PTR condition, bool inputIsContent) { this->EvaluationFiles.push_back(new cmGeneratorExpressionEvaluationFile( - inputFile, outputName, condition, inputIsContent)); + inputFile, outputName, condition, inputIsContent, + this->GetPolicyStatus(cmPolicies::CMP0070))); } std::vector diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 69cbc18..0a0178c 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -206,6 +206,9 @@ class cmMakefile; cmPolicies::WARN) \ SELECT(POLICY, CMP0069, \ "INTERPROCEDURAL_OPTIMIZATION is enforced when enabled.", 3, 9, 0, \ + cmPolicies::WARN) \ + SELECT(POLICY, CMP0070, \ + "Define file(GENERATE) behavior for relative paths.", 3, 10, 0, \ cmPolicies::WARN) #define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1) diff --git a/Tests/RunCMake/File_Generate/CMP0070-NEW-check.cmake b/Tests/RunCMake/File_Generate/CMP0070-NEW-check.cmake new file mode 100644 index 0000000..05ec26e --- /dev/null +++ b/Tests/RunCMake/File_Generate/CMP0070-NEW-check.cmake @@ -0,0 +1,13 @@ +foreach(f + "${RunCMake_TEST_SOURCE_DIR}/relative-input-NEW.txt" + "${RunCMake_TEST_BINARY_DIR}/relative-output-NEW.txt" + ) + if(EXISTS "${f}") + file(READ "${f}" content) + if(NOT content MATCHES "^relative-input-NEW[\r\n]*$") + string(APPEND RunCMake_TEST_FAILED "File\n ${f}\ndoes not have expected content.\n") + endif() + else() + string(APPEND RunCMake_TEST_FAILED "Missing\n ${f}\n") + endif() +endforeach() diff --git a/Tests/RunCMake/File_Generate/CMP0070-NEW.cmake b/Tests/RunCMake/File_Generate/CMP0070-NEW.cmake new file mode 100644 index 0000000..1a03822 --- /dev/null +++ b/Tests/RunCMake/File_Generate/CMP0070-NEW.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0070 NEW) +file(GENERATE OUTPUT relative-output-NEW.txt INPUT relative-input-NEW.txt) diff --git a/Tests/RunCMake/File_Generate/CMP0070-OLD-check.cmake b/Tests/RunCMake/File_Generate/CMP0070-OLD-check.cmake new file mode 100644 index 0000000..a71d822 --- /dev/null +++ b/Tests/RunCMake/File_Generate/CMP0070-OLD-check.cmake @@ -0,0 +1,13 @@ +foreach(f + "${RunCMake_TEST_BINARY_DIR}/relative-input-OLD.txt" + "${RunCMake_TEST_BINARY_DIR}/relative-output-OLD.txt" + ) + if(EXISTS "${f}") + file(READ "${f}" content) + if(NOT content MATCHES "^relative-input-OLD[\r\n]*$") + string(APPEND RunCMake_TEST_FAILED "File\n ${f}\ndoes not have expected content.\n") + endif() + else() + string(APPEND RunCMake_TEST_FAILED "Missing\n ${f}\n") + endif() +endforeach() diff --git a/Tests/RunCMake/File_Generate/CMP0070-OLD.cmake b/Tests/RunCMake/File_Generate/CMP0070-OLD.cmake new file mode 100644 index 0000000..0fb47cd --- /dev/null +++ b/Tests/RunCMake/File_Generate/CMP0070-OLD.cmake @@ -0,0 +1,3 @@ +cmake_policy(SET CMP0070 OLD) +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/relative-input-OLD.txt "relative-input-OLD\n") +file(GENERATE OUTPUT relative-output-OLD.txt INPUT relative-input-OLD.txt) diff --git a/Tests/RunCMake/File_Generate/CMP0070-WARN-check.cmake b/Tests/RunCMake/File_Generate/CMP0070-WARN-check.cmake new file mode 100644 index 0000000..1488df0 --- /dev/null +++ b/Tests/RunCMake/File_Generate/CMP0070-WARN-check.cmake @@ -0,0 +1,13 @@ +foreach(f + "${RunCMake_TEST_BINARY_DIR}/relative-input-WARN.txt" + "${RunCMake_TEST_BINARY_DIR}/relative-output-WARN.txt" + ) + if(EXISTS "${f}") + file(READ "${f}" content) + if(NOT content MATCHES "^relative-input-WARN[\r\n]*$") + string(APPEND RunCMake_TEST_FAILED "File\n ${f}\ndoes not have expected content.\n") + endif() + else() + string(APPEND RunCMake_TEST_FAILED "Missing\n ${f}\n") + endif() +endforeach() diff --git a/Tests/RunCMake/File_Generate/CMP0070-WARN-stderr.txt b/Tests/RunCMake/File_Generate/CMP0070-WARN-stderr.txt new file mode 100644 index 0000000..dbabaa9 --- /dev/null +++ b/Tests/RunCMake/File_Generate/CMP0070-WARN-stderr.txt @@ -0,0 +1,27 @@ +^CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0070 is not set: Define file\(GENERATE\) behavior for relative + paths. Run "cmake --help-policy CMP0070" for policy details. Use the + cmake_policy command to set the policy and suppress this warning. + + file\(GENERATE\) given relative INPUT path: + + relative-input-WARN.txt + + This is not defined behavior unless CMP0070 is set to NEW. For + compatibility with older versions of CMake, the previous undefined behavior + will be used. +This warning is for project developers. Use -Wno-dev to suppress it.( ++ +CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0070 is not set: Define file\(GENERATE\) behavior for relative + paths. Run "cmake --help-policy CMP0070" for policy details. Use the + cmake_policy command to set the policy and suppress this warning. + + file\(GENERATE\) given relative OUTPUT path: + + relative-output-WARN.txt + + This is not defined behavior unless CMP0070 is set to NEW. For + compatibility with older versions of CMake, the previous undefined behavior + will be used. +This warning is for project developers. Use -Wno-dev to suppress it.)+$ diff --git a/Tests/RunCMake/File_Generate/CMP0070-WARN.cmake b/Tests/RunCMake/File_Generate/CMP0070-WARN.cmake new file mode 100644 index 0000000..ccb0452 --- /dev/null +++ b/Tests/RunCMake/File_Generate/CMP0070-WARN.cmake @@ -0,0 +1,2 @@ +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/relative-input-WARN.txt "relative-input-WARN\n") +file(GENERATE OUTPUT relative-output-WARN.txt INPUT relative-input-WARN.txt) diff --git a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake index 82e903d..b660463 100644 --- a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake +++ b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake @@ -1,5 +1,9 @@ include(RunCMake) +run_cmake(CMP0070-NEW) +run_cmake(CMP0070-OLD) +run_cmake(CMP0070-WARN) + run_cmake(CommandConflict) if("${RunCMake_GENERATOR}" MATCHES "Visual Studio|Xcode") run_cmake(OutputConflict) diff --git a/Tests/RunCMake/File_Generate/relative-input-NEW.txt b/Tests/RunCMake/File_Generate/relative-input-NEW.txt new file mode 100644 index 0000000..7293e90 --- /dev/null +++ b/Tests/RunCMake/File_Generate/relative-input-NEW.txt @@ -0,0 +1 @@ +relative-input-NEW https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69050f4d16ae649e074b5fd7cb3bae1811b403a8 commit 69050f4d16ae649e074b5fd7cb3bae1811b403a8 Author: Brad King AuthorDate: Thu Jun 8 11:53:01 2017 -0400 Commit: Brad King CommitDate: Thu Jun 8 13:31:33 2017 -0400 Tests: Use full output paths in file(GENERATE) calls We don't define behavior for relative paths to the OUTPUT argument. Fix our tests to use full paths. diff --git a/Tests/RunCMake/BuildDepends/C-Exe-Manifest.cmake b/Tests/RunCMake/BuildDepends/C-Exe-Manifest.cmake index ef33012..87b0de0 100644 --- a/Tests/RunCMake/BuildDepends/C-Exe-Manifest.cmake +++ b/Tests/RunCMake/BuildDepends/C-Exe-Manifest.cmake @@ -11,7 +11,7 @@ endif() ]]) endif() -file(GENERATE OUTPUT check-$>.cmake CONTENT " +file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$>.cmake CONTENT " set(check_pairs \"$|${CMAKE_CURRENT_BINARY_DIR}/test.manifest\" ) diff --git a/Tests/RunCMake/BuildDepends/C-Exe.cmake b/Tests/RunCMake/BuildDepends/C-Exe.cmake index 5057ca9..ad5cd4d 100644 --- a/Tests/RunCMake/BuildDepends/C-Exe.cmake +++ b/Tests/RunCMake/BuildDepends/C-Exe.cmake @@ -2,7 +2,7 @@ enable_language(C) add_executable(main ${CMAKE_CURRENT_BINARY_DIR}/main.c) -file(GENERATE OUTPUT check-$>.cmake CONTENT " +file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$>.cmake CONTENT " set(check_pairs \"$|${CMAKE_CURRENT_BINARY_DIR}/main.c\" ) diff --git a/Tests/RunCMake/BuildDepends/Custom-Always.cmake b/Tests/RunCMake/BuildDepends/Custom-Always.cmake index d412708..c7e7fb0 100644 --- a/Tests/RunCMake/BuildDepends/Custom-Always.cmake +++ b/Tests/RunCMake/BuildDepends/Custom-Always.cmake @@ -16,7 +16,7 @@ add_custom_command( add_custom_target(drive ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/after-always) -file(GENERATE OUTPUT check-$>.cmake CONTENT " +file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$>.cmake CONTENT " set(check_pairs \"${CMAKE_CURRENT_BINARY_DIR}/always-updated|${CMAKE_CURRENT_BINARY_DIR}/before-always\" \"${CMAKE_CURRENT_BINARY_DIR}/after-always|${CMAKE_CURRENT_BINARY_DIR}/always-updated\" diff --git a/Tests/RunCMake/BuildDepends/Custom-Symbolic-and-Byproduct.cmake b/Tests/RunCMake/BuildDepends/Custom-Symbolic-and-Byproduct.cmake index 687c827..1e1f22a 100644 --- a/Tests/RunCMake/BuildDepends/Custom-Symbolic-and-Byproduct.cmake +++ b/Tests/RunCMake/BuildDepends/Custom-Symbolic-and-Byproduct.cmake @@ -16,7 +16,7 @@ add_custom_command( add_custom_target(drive ALL DEPENDS use-byproduct) add_dependencies(drive produce) -file(GENERATE OUTPUT check-$>.cmake CONTENT " +file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$>.cmake CONTENT " if (check_step EQUAL 1) set(check_pairs \"${CMAKE_CURRENT_BINARY_DIR}/use-byproduct|${CMAKE_CURRENT_BINARY_DIR}/gen-byproduct-stamp\" diff --git a/Tests/RunCMake/BuildDepends/MakeCustomIncludes.cmake b/Tests/RunCMake/BuildDepends/MakeCustomIncludes.cmake index 0f92e0e..8b2ae78 100644 --- a/Tests/RunCMake/BuildDepends/MakeCustomIncludes.cmake +++ b/Tests/RunCMake/BuildDepends/MakeCustomIncludes.cmake @@ -6,7 +6,7 @@ add_custom_command( add_custom_target(generate ALL DEPENDS output.cxx) set_property(TARGET generate PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}) -file(GENERATE OUTPUT check-$>.cmake CONTENT " +file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$>.cmake CONTENT " set(check_pairs \"${CMAKE_CURRENT_BINARY_DIR}/output.cxx|${CMAKE_CURRENT_BINARY_DIR}/MakeCustomIncludes.h\" ) diff --git a/Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake b/Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake index add9aeb..af6ad86 100644 --- a/Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake +++ b/Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake @@ -3,7 +3,7 @@ get_filename_component(include_dir "${CMAKE_BINARY_DIR}" PATH) include_directories("${include_dir}") add_executable(MakeInProjectOnly MakeInProjectOnly.c) set(CMAKE_DEPENDS_IN_PROJECT_ONLY 1) -file(GENERATE OUTPUT check-$>.cmake CONTENT " +file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$>.cmake CONTENT " if (check_step EQUAL 1) set(check_pairs \"$|${include_dir}/MakeInProjectOnly.h\" diff --git a/Tests/RunCMake/CPackInstallProperties/FilenameGenex.cmake b/Tests/RunCMake/CPackInstallProperties/FilenameGenex.cmake index 1a373b9..8fc1218 100644 --- a/Tests/RunCMake/CPackInstallProperties/FilenameGenex.cmake +++ b/Tests/RunCMake/CPackInstallProperties/FilenameGenex.cmake @@ -1,6 +1,6 @@ add_executable(mytest test.cpp) -file(GENERATE OUTPUT runtest_info.cmake CONTENT [[ +file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/runtest_info.cmake CONTENT [[ set(EXPECTED_MYTEST_NAME "$") ]]) diff --git a/Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake b/Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake index 77fe8ed..b23d3c7 100644 --- a/Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake +++ b/Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake @@ -6,7 +6,7 @@ foreach(CONFIG IN LISTS CMAKE_CONFIGURATION_TYPES) OUTPUT_NAME_${UPPER_CONFIG} bar_${CONFIG}) endforeach() -file(GENERATE OUTPUT runtest_info_$.cmake CONTENT [[ +file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/runtest_info_$.cmake CONTENT [[ set(CPACK_BUILD_CONFIG "$") set(EXPECTED_MYTEST_NAME "$") ]]) diff --git a/Tests/RunCMake/CPackInstallProperties/ValueGenex.cmake b/Tests/RunCMake/CPackInstallProperties/ValueGenex.cmake index 2e1d465..2001d9f 100644 --- a/Tests/RunCMake/CPackInstallProperties/ValueGenex.cmake +++ b/Tests/RunCMake/CPackInstallProperties/ValueGenex.cmake @@ -1,6 +1,6 @@ add_executable(mytest test.cpp) -file(GENERATE OUTPUT runtest_info.cmake CONTENT [[ +file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/runtest_info.cmake CONTENT [[ set(EXPECTED_MYTEST_NAME "$") ]]) diff --git a/Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex.cmake b/Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex.cmake index e2b081d..59ccf19 100644 --- a/Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex.cmake +++ b/Tests/RunCMake/File_Generate/COMPILE_LANGUAGE-genex.cmake @@ -7,6 +7,6 @@ target_compile_options(empty ) file(GENERATE - OUTPUT opts-$.txt + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/opts-$.txt CONTENT "$\n" ) diff --git a/Tests/RunCMake/File_Generate/ReRunCMake.cmake b/Tests/RunCMake/File_Generate/ReRunCMake.cmake index 109d60e..541d86d 100644 --- a/Tests/RunCMake/File_Generate/ReRunCMake.cmake +++ b/Tests/RunCMake/File_Generate/ReRunCMake.cmake @@ -1,5 +1,5 @@ file(GENERATE - OUTPUT output_file.txt + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/output_file.txt" INPUT "${CMAKE_CURRENT_BINARY_DIR}/input_file.txt" ) diff --git a/Tests/RunCMake/File_Generate/WriteIfDifferent.cmake b/Tests/RunCMake/File_Generate/WriteIfDifferent.cmake index d1d832a..bb36a4c 100644 --- a/Tests/RunCMake/File_Generate/WriteIfDifferent.cmake +++ b/Tests/RunCMake/File_Generate/WriteIfDifferent.cmake @@ -1,5 +1,5 @@ file(GENERATE - OUTPUT output_file.txt + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/output_file.txt CONTENT "123" ) diff --git a/Tests/RunCMake/Framework/FrameworkLayout.cmake b/Tests/RunCMake/Framework/FrameworkLayout.cmake index 3d62a8a..4f42459 100644 --- a/Tests/RunCMake/Framework/FrameworkLayout.cmake +++ b/Tests/RunCMake/Framework/FrameworkLayout.cmake @@ -22,4 +22,4 @@ set_source_files_properties(some.txt PROPERTIES MACOSX_PACKAGE_LOCATION somedir) add_custom_command(TARGET Framework POST_BUILD COMMAND /usr/bin/file $) -file(GENERATE OUTPUT FrameworkName.cmake CONTENT "set(framework-dir \"$\")\n") +file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/FrameworkName.cmake CONTENT "set(framework-dir \"$\")\n") diff --git a/Tests/RunCMake/TargetObjects/NoTarget.cmake b/Tests/RunCMake/TargetObjects/NoTarget.cmake index 5d7e33e..268577d 100644 --- a/Tests/RunCMake/TargetObjects/NoTarget.cmake +++ b/Tests/RunCMake/TargetObjects/NoTarget.cmake @@ -1,7 +1,7 @@ add_library(iface INTERFACE) target_sources(iface INTERFACE $) -file(GENERATE OUTPUT test_output CONTENT $) -file(GENERATE OUTPUT test_output2 CONTENT $) +file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test_output CONTENT $) +file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test_output2 CONTENT $) install(FILES $ DESTINATION objects) diff --git a/Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake b/Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake index 8e5fdd0..3bb3e37 100644 --- a/Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake +++ b/Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake @@ -1,3 +1,3 @@ add_library(StaticLib empty.cpp) -file(GENERATE OUTPUT test_output CONTENT $) +file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/test_output CONTENT $) ----------------------------------------------------------------------- Summary of changes: Copyright.txt | 1 + Help/command/execute_process.rst | 9 +- Help/command/file.rst | 5 + Help/manual/cmake-modules.7.rst | 1 + Help/manual/cmake-policies.7.rst | 8 + Help/module/CPackFreeBSD.rst | 1 + Help/policy/CMP0070.rst | 25 ++ Help/prop_tgt/LANG_COMPILER_LAUNCHER.rst | 3 +- Help/release/dev/cpack-freebsd-pkg.rst | 5 + Help/release/dev/cuda-compiler-launcher.rst | 8 + .../dev/execute_process-pipeline-results.rst | 6 + Help/release/dev/file-generate-relative-paths.rst | 7 + Help/variable/CMAKE_LANG_COMPILER_LAUNCHER.rst | 2 +- Modules/CPack.cmake | 3 + Modules/CPackFreeBSD.cmake | 246 ++++++++++++++ Modules/FindHTMLHelp.cmake | 28 +- Modules/Platform/Android-Common.cmake | 9 +- Modules/Platform/Android-Determine.cmake | 33 +- Source/CMakeLists.txt | 34 ++ Source/CPack/cmCPackFreeBSDGenerator.cxx | 359 ++++++++++++++++++++ Source/CPack/cmCPackFreeBSDGenerator.h | 37 ++ Source/CPack/cmCPackGeneratorFactory.cxx | 9 + Source/cmExecuteProcessCommand.cxx | 53 ++- Source/cmGeneratorExpressionEvaluationFile.cxx | 62 +++- Source/cmGeneratorExpressionEvaluationFile.h | 13 +- Source/cmMakefile.cxx | 3 +- Source/cmMakefileTargetGenerator.cxx | 3 +- Source/cmNinjaTargetGenerator.cxx | 3 +- Source/cmPolicies.h | 3 + Source/cmTarget.cxx | 1 + Source/kwsys/SystemTools.cxx | 11 - Source/kwsys/SystemTools.hxx.in | 12 +- Tests/RunCMake/BuildDepends/C-Exe-Manifest.cmake | 2 +- Tests/RunCMake/BuildDepends/C-Exe.cmake | 2 +- Tests/RunCMake/BuildDepends/Custom-Always.cmake | 2 +- .../Custom-Symbolic-and-Byproduct.cmake | 2 +- .../RunCMake/BuildDepends/MakeCustomIncludes.cmake | 2 +- .../RunCMake/BuildDepends/MakeInProjectOnly.cmake | 2 +- Tests/RunCMake/CMakeLists.txt | 7 +- .../CPackInstallProperties/FilenameGenex.cmake | 2 +- .../CPackInstallProperties/PerConfigValue.cmake | 2 +- .../CPackInstallProperties/ValueGenex.cmake | 2 +- .../{C-Build-stdout.txt => CUDA-Build-stdout.txt} | 0 ...ild-stdout.txt => CUDA-launch-Build-stdout.txt} | 0 Tests/RunCMake/CompilerLauncher/CUDA-launch.cmake | 3 + Tests/RunCMake/CompilerLauncher/CUDA.cmake | 4 + Tests/RunCMake/CompilerLauncher/RunCMakeTest.cmake | 15 +- .../RunCMake/CompilerLauncher/main.cu | 0 .../RunCMake/File_Generate/CMP0070-NEW-check.cmake | 13 + Tests/RunCMake/File_Generate/CMP0070-NEW.cmake | 2 + .../RunCMake/File_Generate/CMP0070-OLD-check.cmake | 13 + Tests/RunCMake/File_Generate/CMP0070-OLD.cmake | 3 + .../File_Generate/CMP0070-WARN-check.cmake | 13 + .../RunCMake/File_Generate/CMP0070-WARN-stderr.txt | 27 ++ Tests/RunCMake/File_Generate/CMP0070-WARN.cmake | 2 + .../File_Generate/COMPILE_LANGUAGE-genex.cmake | 2 +- Tests/RunCMake/File_Generate/ReRunCMake.cmake | 2 +- Tests/RunCMake/File_Generate/RunCMakeTest.cmake | 4 + .../RunCMake/File_Generate/WriteIfDifferent.cmake | 2 +- .../RunCMake/File_Generate/relative-input-NEW.txt | 1 + Tests/RunCMake/Framework/FrameworkLayout.cmake | 2 +- Tests/RunCMake/TargetObjects/NoTarget.cmake | 4 +- Tests/RunCMake/TargetObjects/NotObjlibTarget.cmake | 2 +- .../RunCMake/execute_process/ExitValues-stdout.txt | 14 + Tests/RunCMake/execute_process/ExitValues.cmake | 120 +++++++ Tests/RunCMake/execute_process/RunCMakeTest.cmake | 4 + Tests/RunCMake/exit_code.c | 30 ++ 67 files changed, 1243 insertions(+), 67 deletions(-) create mode 100644 Help/module/CPackFreeBSD.rst create mode 100644 Help/policy/CMP0070.rst create mode 100644 Help/release/dev/cpack-freebsd-pkg.rst create mode 100644 Help/release/dev/cuda-compiler-launcher.rst create mode 100644 Help/release/dev/execute_process-pipeline-results.rst create mode 100644 Help/release/dev/file-generate-relative-paths.rst create mode 100644 Modules/CPackFreeBSD.cmake create mode 100644 Source/CPack/cmCPackFreeBSDGenerator.cxx create mode 100644 Source/CPack/cmCPackFreeBSDGenerator.h copy Tests/RunCMake/CompilerLauncher/{C-Build-stdout.txt => CUDA-Build-stdout.txt} (100%) copy Tests/RunCMake/CompilerLauncher/{C-Build-stdout.txt => CUDA-launch-Build-stdout.txt} (100%) create mode 100644 Tests/RunCMake/CompilerLauncher/CUDA-launch.cmake create mode 100644 Tests/RunCMake/CompilerLauncher/CUDA.cmake copy Modules/DummyCXXFile.cxx => Tests/RunCMake/CompilerLauncher/main.cu (100%) create mode 100644 Tests/RunCMake/File_Generate/CMP0070-NEW-check.cmake create mode 100644 Tests/RunCMake/File_Generate/CMP0070-NEW.cmake create mode 100644 Tests/RunCMake/File_Generate/CMP0070-OLD-check.cmake create mode 100644 Tests/RunCMake/File_Generate/CMP0070-OLD.cmake create mode 100644 Tests/RunCMake/File_Generate/CMP0070-WARN-check.cmake create mode 100644 Tests/RunCMake/File_Generate/CMP0070-WARN-stderr.txt create mode 100644 Tests/RunCMake/File_Generate/CMP0070-WARN.cmake create mode 100644 Tests/RunCMake/File_Generate/relative-input-NEW.txt create mode 100644 Tests/RunCMake/execute_process/ExitValues-stdout.txt create mode 100644 Tests/RunCMake/execute_process/ExitValues.cmake create mode 100644 Tests/RunCMake/exit_code.c hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 12 10:45:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 12 Jun 2017 10:45:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-70-gee47d80 Message-ID: <20170612144502.6304DC4BFF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via ee47d80c3b476a56d876888f74387e583c69f79d (commit) via a131316a95fde7ae19ec851369d9a186e6488d0c (commit) via f83d3e3f2ccf795e47cdb0f41969c11aef897207 (commit) from f6ed92280c9af9e35dec9d1cff5d453e0758c0d5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ee47d80c3b476a56d876888f74387e583c69f79d commit ee47d80c3b476a56d876888f74387e583c69f79d Merge: f6ed922 a131316 Author: Brad King AuthorDate: Mon Jun 12 10:42:17 2017 -0400 Commit: Brad King CommitDate: Mon Jun 12 10:42:17 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 12 10:45:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 12 Jun 2017 10:45:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc2-8-ga131316 Message-ID: <20170612144502.7650CE4A35@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via a131316a95fde7ae19ec851369d9a186e6488d0c (commit) via 22f8a465d7de84b246f6d5ec0e05984b5610122f (commit) via f83d3e3f2ccf795e47cdb0f41969c11aef897207 (commit) via 5f93bf787d0ccccf1aa6dc3f6f1d0df3855a55f6 (commit) from ae22079808d708d630dacf3bcd368a123e6bcedf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android-Common.cmake | 9 ++++++-- Modules/Platform/Android-Determine.cmake | 33 +++++++++++++++++++++++++----- 2 files changed, 35 insertions(+), 7 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 13 00:05:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 13 Jun 2017 00:05:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-71-g4ba2d2e Message-ID: <20170613040507.70B15FA96D@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 4ba2d2e3d76cb1ec04c612f9646c47d3f1231ad2 (commit) from ee47d80c3b476a56d876888f74387e583c69f79d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ba2d2e3d76cb1ec04c612f9646c47d3f1231ad2 commit 4ba2d2e3d76cb1ec04c612f9646c47d3f1231ad2 Author: Kitware Robot AuthorDate: Tue Jun 13 00:01:05 2017 -0400 Commit: Kitware Robot CommitDate: Tue Jun 13 00:01:05 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 0d651dd..739a17c 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 9) -set(CMake_VERSION_PATCH 20170612) +set(CMake_VERSION_PATCH 20170613) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 13 09:25:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 13 Jun 2017 09:25:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-78-g6733d60 Message-ID: <20170613132505.DED6FFA7FD@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 6733d602afec0218feeddea93b043cf36aa22e4a (commit) via 5f704d992da3d8adb33481ec4cbec4ce49234add (commit) via 087b8ccda98af32480657d2e54b5395aac3b413f (commit) via 7368ade2502a347b18c47fc175b67c1d0f594744 (commit) via 70a6cb70f644b23acb99f1f6342728c8afb23d14 (commit) via 6610fdbed2c8e375055a304daa41ee6301317c34 (commit) via ae77d9768f27a652ecc823c7333e0306bbccc50a (commit) from 4ba2d2e3d76cb1ec04c612f9646c47d3f1231ad2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6733d602afec0218feeddea93b043cf36aa22e4a commit 6733d602afec0218feeddea93b043cf36aa22e4a Merge: 5f704d9 ae77d97 Author: Brad King AuthorDate: Tue Jun 13 13:20:50 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jun 13 09:20:54 2017 -0400 Merge topic 'remove-stray-line' ae77d976 cmGlobalGenerator: Remove unused line Acked-by: Kitware Robot Merge-request: !955 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5f704d992da3d8adb33481ec4cbec4ce49234add commit 5f704d992da3d8adb33481ec4cbec4ce49234add Merge: 087b8cc 70a6cb7 Author: Brad King AuthorDate: Tue Jun 13 13:20:31 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jun 13 09:20:34 2017 -0400 Merge topic 'doc-pkgconfig-list' 70a6cb70 FindPkgConfig: mention that variables will be ;-lists 6610fdbe FindPkgConfig: fix confusing indentation Acked-by: Kitware Robot Merge-request: !957 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=087b8ccda98af32480657d2e54b5395aac3b413f commit 087b8ccda98af32480657d2e54b5395aac3b413f Merge: 4ba2d2e 7368ade Author: Brad King AuthorDate: Tue Jun 13 13:18:13 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jun 13 09:18:19 2017 -0400 Merge topic 'cuda-dlink-no-deprecated-gpu' 7368ade2 CUDA: When linking device code suppress CUDA 8.0+ deprecation warnings Acked-by: Kitware Robot Merge-request: !951 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7368ade2502a347b18c47fc175b67c1d0f594744 commit 7368ade2502a347b18c47fc175b67c1d0f594744 Author: Robert Maynard AuthorDate: Fri Jun 9 15:49:58 2017 -0400 Commit: Brad King CommitDate: Tue Jun 13 09:15:19 2017 -0400 CUDA: When linking device code suppress CUDA 8.0+ deprecation warnings The CUDA compiler automatic deprecation warnings are pure noise when doing device linking, and should be suppressed to reduce the amount of confusion from users. diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake index 1c48159..780e953 100644 --- a/Modules/CMakeCUDAInformation.cmake +++ b/Modules/CMakeCUDAInformation.cmake @@ -186,16 +186,25 @@ if(NOT CMAKE_CUDA_LINK_EXECUTABLE) " -o ${__IMPLICT_LINKS}") endif() +if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "8.0.0") + set(_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS "-Wno-deprecated-gpu-targets") +else() + set(_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS "") +endif() + + #These are used when linking relocatable (dc) cuda code if(NOT CMAKE_CUDA_DEVICE_LINK_LIBRARY) set(CMAKE_CUDA_DEVICE_LINK_LIBRARY - " ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} -shared -dlink -o ") + " ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink -o ") endif() if(NOT CMAKE_CUDA_DEVICE_LINK_EXECUTABLE) set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE - " ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} -shared -dlink -o ") + " ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink -o ") endif() +unset(_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS) + mark_as_advanced( CMAKE_CUDA_FLAGS CMAKE_CUDA_FLAGS_RELEASE diff --git a/Modules/Platform/Windows-NVIDIA-CUDA.cmake b/Modules/Platform/Windows-NVIDIA-CUDA.cmake index 845fa4b..970c2c6 100644 --- a/Modules/Platform/Windows-NVIDIA-CUDA.cmake +++ b/Modules/Platform/Windows-NVIDIA-CUDA.cmake @@ -30,10 +30,18 @@ set(CMAKE_CUDA_LINK_EXECUTABLE unset(_CMAKE_VS_LINK_EXE) unset(_CMAKE_VS_LINK_EXE) +if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "8.0.0") + set(_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS "-Wno-deprecated-gpu-targets") +else() + set(_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS "") +endif() + set(CMAKE_CUDA_DEVICE_LINK_LIBRARY - " -shared -dlink -o -Xcompiler=-Fd,-FS") + " ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink -o -Xcompiler=-Fd,-FS") set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE - " -shared -dlink -o -Xcompiler=-Fd,-FS") + " ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared -dlink -o -Xcompiler=-Fd,-FS") + +unset(_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS) string(REPLACE "/D" "-D" _PLATFORM_DEFINES_CUDA "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_CXX}") diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 46c2894..29a06b7 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2591,6 +2591,13 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaLinkOptions( cudaLinkOptions.AddFlag("PerformDeviceLink", doDeviceLinking ? "true" : "false"); + // Suppress deprecation warnings for default GPU targets during device link. + if (cmSystemTools::VersionCompareGreaterEq( + this->GlobalGenerator->GetPlatformToolsetCudaString(), "8.0")) { + cudaLinkOptions.AppendFlag("AdditionalOptions", + "-Wno-deprecated-gpu-targets"); + } + this->CudaLinkOptions[configName] = pOptions.release(); return true; } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70a6cb70f644b23acb99f1f6342728c8afb23d14 commit 70a6cb70f644b23acb99f1f6342728c8afb23d14 Author: Rolf Eike Beer AuthorDate: Mon Jun 12 22:02:50 2017 +0200 Commit: Rolf Eike Beer CommitDate: Mon Jun 12 22:03:20 2017 +0200 FindPkgConfig: mention that variables will be ;-lists diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index eb95227..a5357fa 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -86,6 +86,9 @@ endmacro() pkg_get_variable( ) + If multiple values are returned variable will contain a + :ref:`;-list `. + For example: .. code-block:: cmake @@ -524,6 +527,9 @@ endmacro() = for common case = _STATIC for static linking + Every variable containing multiple values will be a + :ref:`;-list `. + There are some special variables whose prefix depends on the count of given modules. When there is only one module, stays unchanged. When there are multiple modules, the prefix will be https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6610fdbed2c8e375055a304daa41ee6301317c34 commit 6610fdbed2c8e375055a304daa41ee6301317c34 Author: Rolf Eike Beer AuthorDate: Mon Jun 12 21:54:03 2017 +0200 Commit: Rolf Eike Beer CommitDate: Mon Jun 12 22:03:20 2017 +0200 FindPkgConfig: fix confusing indentation diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index 12a5ded..eb95227 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -65,7 +65,7 @@ macro(_pkgconfig_invoke _pkglist _prefix _varname _regexp) set(_pkgconfig_${_varname} "") _pkgconfig_unset(${_prefix}_${_varname}) else() - string(REGEX REPLACE "[\r\n]" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") + string(REGEX REPLACE "[\r\n]" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") if (NOT ${_regexp} STREQUAL "") string(REGEX REPLACE "${_regexp}" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae77d9768f27a652ecc823c7333e0306bbccc50a commit ae77d9768f27a652ecc823c7333e0306bbccc50a Author: Brad King AuthorDate: Mon Jun 12 10:01:31 2017 -0400 Commit: Brad King CommitDate: Mon Jun 12 10:01:31 2017 -0400 cmGlobalGenerator: Remove unused line Remove an unused line that was left by commit v2.4.0~3946 (set CMAKE_SYSTEM_VERSION for windows, 2003-07-16). Fixes: #16956 diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 591963f..0bef710 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -490,7 +490,6 @@ void cmGlobalGenerator::EnableLanguage( windowsVersionString << osviex.dwMajorVersion << "." << osviex.dwMinorVersion << "." << osviex.dwBuildNumber; - windowsVersionString.str(); mf->AddDefinition("CMAKE_HOST_SYSTEM_VERSION", windowsVersionString.str().c_str()); #endif ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCUDAInformation.cmake | 13 +++++++++++-- Modules/FindPkgConfig.cmake | 8 +++++++- Modules/Platform/Windows-NVIDIA-CUDA.cmake | 12 ++++++++++-- Source/cmGlobalGenerator.cxx | 1 - Source/cmVisualStudio10TargetGenerator.cxx | 7 +++++++ 5 files changed, 35 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 13 09:35:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 13 Jun 2017 09:35:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc2-84-g4e23a1d Message-ID: <20170613133503.BA91CFA976@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 4e23a1d0eb0eca303d28c3f5b7b7147739f891b3 (commit) via 9203aff851e711561bfb906d435f6594afe6a9ce (commit) via fb99b0b87b616e2045e2112ec99bb9f0ff08b128 (commit) via 70ec0f2ad1d4acf6c7c9ab49c756985d468a1a69 (commit) via 05789144bdac1065d29d4c8fd41d75d338294e74 (commit) via 3d00be13ee04a48be1a6d0d64057494839e1df6f (commit) from 6733d602afec0218feeddea93b043cf36aa22e4a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4e23a1d0eb0eca303d28c3f5b7b7147739f891b3 commit 4e23a1d0eb0eca303d28c3f5b7b7147739f891b3 Merge: 9203aff fb99b0b Author: Brad King AuthorDate: Tue Jun 13 09:29:39 2017 -0400 Commit: Brad King CommitDate: Tue Jun 13 09:29:39 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9203aff851e711561bfb906d435f6594afe6a9ce commit 9203aff851e711561bfb906d435f6594afe6a9ce Merge: 6733d60 3d00be1 Author: Brad King AuthorDate: Tue Jun 13 13:27:05 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jun 13 09:27:17 2017 -0400 Merge topic 'android-unified-headers' 3d00be13 Android: Add support for unified headers Acked-by: Kitware Robot Merge-request: !956 ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-toolchains.7.rst | 5 ++ Help/manual/cmake-variables.7.rst | 1 + Help/release/3.9.rst | 5 ++ .../CMAKE_ANDROID_NDK_DEPRECATED_HEADERS.rst | 9 +++ Modules/Platform/Android-Common.cmake | 3 + Modules/Platform/Android-Determine.cmake | 58 ++++++++++++++------ Modules/Platform/Android-Initialize.cmake | 3 + Modules/Platform/Android/abi-common.cmake | 4 ++ 8 files changed, 72 insertions(+), 16 deletions(-) create mode 100644 Help/variable/CMAKE_ANDROID_NDK_DEPRECATED_HEADERS.rst hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 13 09:35:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 13 Jun 2017 09:35:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc2-15-gfb99b0b Message-ID: <20170613133504.08FA7FA97F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via fb99b0b87b616e2045e2112ec99bb9f0ff08b128 (commit) via 7368ade2502a347b18c47fc175b67c1d0f594744 (commit) via 70ec0f2ad1d4acf6c7c9ab49c756985d468a1a69 (commit) via 70a6cb70f644b23acb99f1f6342728c8afb23d14 (commit) via 6610fdbed2c8e375055a304daa41ee6301317c34 (commit) via 05789144bdac1065d29d4c8fd41d75d338294e74 (commit) via 3d00be13ee04a48be1a6d0d64057494839e1df6f (commit) from a131316a95fde7ae19ec851369d9a186e6488d0c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-toolchains.7.rst | 5 ++ Help/manual/cmake-variables.7.rst | 1 + Help/release/3.9.rst | 5 ++ .../CMAKE_ANDROID_NDK_DEPRECATED_HEADERS.rst | 9 +++ Modules/CMakeCUDAInformation.cmake | 13 ++++- Modules/FindPkgConfig.cmake | 8 ++- Modules/Platform/Android-Common.cmake | 3 + Modules/Platform/Android-Determine.cmake | 58 ++++++++++++++------ Modules/Platform/Android-Initialize.cmake | 3 + Modules/Platform/Android/abi-common.cmake | 4 ++ Modules/Platform/Windows-NVIDIA-CUDA.cmake | 12 +++- Source/cmVisualStudio10TargetGenerator.cxx | 7 +++ 12 files changed, 107 insertions(+), 21 deletions(-) create mode 100644 Help/variable/CMAKE_ANDROID_NDK_DEPRECATED_HEADERS.rst hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 13 11:15:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 13 Jun 2017 11:15:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-70-g52b10ca Message-ID: <20170613151502.47A85F9D9F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 52b10ca882362569f4ef18dfe99b7cded195532e (commit) via c52b982da6fc6387ba66a15c097ae90f69980ef5 (commit) from 4e23a1d0eb0eca303d28c3f5b7b7147739f891b3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52b10ca882362569f4ef18dfe99b7cded195532e commit 52b10ca882362569f4ef18dfe99b7cded195532e Merge: 4e23a1d c52b982 Author: Brad King AuthorDate: Tue Jun 13 11:09:53 2017 -0400 Commit: Brad King CommitDate: Tue Jun 13 11:09:53 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 13 11:15:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 13 Jun 2017 11:15:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc3 Message-ID: <20170613151502.5A803F9D9F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via c52b982da6fc6387ba66a15c097ae90f69980ef5 (commit) from fb99b0b87b616e2045e2112ec99bb9f0ff08b128 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 13 11:15:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 13 Jun 2017 11:15:02 -0400 (EDT) Subject: [Cmake-commits] CMake annotated tag, v3.9.0-rc3, created. v3.9.0-rc3 Message-ID: <20170613151502.6B987F9D9F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The annotated tag, v3.9.0-rc3 has been created at 3e7898caca7bce371def392e1e07f42f291222d3 (tag) tagging c52b982da6fc6387ba66a15c097ae90f69980ef5 (commit) replaces v3.9.0-rc2 tagged by Brad King on Tue Jun 13 11:07:19 2017 -0400 - Log ----------------------------------------------------------------- CMake 3.9.0-rc3 -----BEGIN PGP SIGNATURE----- iQJKBAABCAA0FiEExsJlMku+vcNQtRPQLSzvEDSSFoQFAlk//6cWHGJyYWQua2lu Z0BraXR3YXJlLmNvbQAKCRAtLO8QNJIWhE/8D/0ZCNZlGBlDiA4fGOy1sf9AofMN YjG0IJTk5oS97QplI16U2WqjjRkCLr+8v2X1TwUtjNtQ4pvpg7Q+FJKCed2jZFim GnwWdgYfLJsa2liBNwtmslCZR5JSSs1UrYW4G119DyL/Ztv0Wu+K8hoL/aYg29g5 CYD5LAaC19NiDp3Lld+igSXJpqHa8UUMWJBrghMrcGr6YZ4lAcPRMJ1S3LwZcVL6 W1N7tXCz5WDyqja1QTEUGEmKfAv5+MGyruke1iuUhh5i/uFffsOuIrXa2V0GYcL7 oS/nT8kRZ8aOaKIkozlAxLYWPibgYvNkhMxUwuShrtQIuRL2R042kolQELEoRnGg lnEdRKiR8w+UqcYntiDrhBHZUFjbOHUiXBvw4vrKa4pFiWMpAhzV6X7BzpMZ61XH KSHqkEmqPNE9LL25R+qehowo4BfX5ffUdtBL0s9JJ/Y3Fwmy1RelZDzI/ilWJx4y Ul34lYUX813+mvMRUUmdvEZybVAGOHRsNDYo64AJwFe1O2ku/a34YAfpcC8D+/+I O2rNKl8uSbmHD0KOWqs1tY0laFseh4T5utgIlvPfXWnEM6U9RNbFM1Gy89L0nPLr PRCiIe9BQQaBQMQRBUdbG0vXV90P/U4ACDe7YQ2/cq3yk6jNdDRWGJrfxHg8h6uq uytbkIEN4+hfE4XQxA== =Z3Qt -----END PGP SIGNATURE----- Brad King (13): C++ feature checks: Improve exclusion of "0 Warning(s)" Merge branch 'improve-msvc-feature-checks' into release-3.9 FindDoxygen: Create imported targets at most once in a given scope Merge branch 'FindDoxygen-imported-target-once' into release-3.9 Android: Detect API version of standalone toolchain with unified headers Merge branch 'android-standalone-unified-api-level' into release-3.9 Android: Do not pass sysroot include for standalone toolchain Merge branch 'android-standalone-no-sysroot-include' into release-3.9 Android: Add support for unified headers Merge branch 'android-unified-headers' into release-3.9 Merge branch 'doc-pkgconfig-list' into release-3.9 Merge branch 'cuda-dlink-no-deprecated-gpu' into release-3.9 CMake 3.9.0-rc3 Robert Maynard (1): CUDA: When linking device code suppress CUDA 8.0+ deprecation warnings Rolf Eike Beer (2): FindPkgConfig: fix confusing indentation FindPkgConfig: mention that variables will be ;-lists ----------------------------------------------------------------------- hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 14 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 14 Jun 2017 00:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-71-g3c40207 Message-ID: <20170614040504.5207BFA78D@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 3c40207a108798f49132ac3974ac6331dd467093 (commit) from 52b10ca882362569f4ef18dfe99b7cded195532e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3c40207a108798f49132ac3974ac6331dd467093 commit 3c40207a108798f49132ac3974ac6331dd467093 Author: Kitware Robot AuthorDate: Wed Jun 14 00:01:05 2017 -0400 Commit: Kitware Robot CommitDate: Wed Jun 14 00:01:05 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 739a17c..614f31d 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 9) -set(CMake_VERSION_PATCH 20170613) +set(CMake_VERSION_PATCH 20170614) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 14 11:55:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 14 Jun 2017 11:55:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-76-gb0835fe Message-ID: <20170614155505.DED4CF61BD@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via b0835fefd27dbb261397ac9fe3b9ab49a107966c (commit) via cbc7d2435ebcdc36999dc6757dc20547e09635c6 (commit) via bf2e4bfbaabaa5621791b35ea5da7d7e5c141d8b (commit) via 7f68ad6612e4eded99fda9de7133e77a9eced04e (commit) via 38e3fc4bddf6ef47828a7beb732e3d78d297bd23 (commit) from 3c40207a108798f49132ac3974ac6331dd467093 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0835fefd27dbb261397ac9fe3b9ab49a107966c commit b0835fefd27dbb261397ac9fe3b9ab49a107966c Merge: cbc7d24 7f68ad6 Author: Brad King AuthorDate: Wed Jun 14 15:49:16 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 14 11:49:28 2017 -0400 Merge topic 'autogen_uc' 7f68ad66 Autogen: Tests: Disable some tests on non ASCII build paths 38e3fc4b Autogen: Tests fix for utf8 paths Acked-by: Kitware Robot Merge-request: !959 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cbc7d2435ebcdc36999dc6757dc20547e09635c6 commit cbc7d2435ebcdc36999dc6757dc20547e09635c6 Merge: 3c40207 bf2e4bf Author: Brad King AuthorDate: Wed Jun 14 15:49:01 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 14 11:49:06 2017 -0400 Merge topic 'readme-supported-platforms' bf2e4bfb README: Update list of supported platforms Acked-by: Kitware Robot Merge-request: !962 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bf2e4bfbaabaa5621791b35ea5da7d7e5c141d8b commit bf2e4bfbaabaa5621791b35ea5da7d7e5c141d8b Author: Brad King AuthorDate: Tue Jun 13 11:49:49 2017 -0400 Commit: Brad King CommitDate: Tue Jun 13 13:05:51 2017 -0400 README: Update list of supported platforms Convert to a bullet list. Drop platforms for which we no longer have nightly testing. diff --git a/README.rst b/README.rst index 4188ea0..d5acd4a 100644 --- a/README.rst +++ b/README.rst @@ -30,7 +30,13 @@ Building CMake Supported Platforms ------------------- -MS Windows, Mac OS X, Linux, FreeBSD, Solaris, HP-UX, IRIX, BeOS, QNX +* Microsoft Windows +* Apple macOS +* Linux +* FreeBSD +* OpenBSD +* Solaris +* HP-UX Other UNIX-like operating systems may work too out of the box, if not it should not be a major problem to port CMake to this platform. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f68ad6612e4eded99fda9de7133e77a9eced04e commit 7f68ad6612e4eded99fda9de7133e77a9eced04e Author: Sebastian Holtermann AuthorDate: Tue Jun 13 11:25:45 2017 +0200 Commit: Sebastian Holtermann CommitDate: Tue Jun 13 16:51:33 2017 +0200 Autogen: Tests: Disable some tests on non ASCII build paths diff --git a/Tests/Qt4Targets/CMakeLists.txt b/Tests/Qt4Targets/CMakeLists.txt index ae0a02b..2ca11e4 100644 --- a/Tests/Qt4Targets/CMakeLists.txt +++ b/Tests/Qt4Targets/CMakeLists.txt @@ -20,6 +20,16 @@ if (WIN32) endif() endif() +# Qt4 moc does not support utf8 paths in _parameter files generated by +# qt4_wrap_cpp and qt4_generate_moc +# https://bugreports.qt.io/browse/QTBUG-35480 +# Do a simple check if there is are non ASCII character in the build path +string(REGEX MATCH "[^ -~]+" NON_ASCII_BDIR ${CMAKE_CURRENT_BINARY_DIR}) +if(NON_ASCII_BDIR) + message(WARNING "Build path contains non ASCII characters. Skipping Qt4 test.") + return() +endif() + qt4_generate_moc(main_gen_test.cpp "${CMAKE_CURRENT_BINARY_DIR}/main_gen_test.moc" TARGET Qt4GenerateMacroTest diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index f5acce0..3c6b2b3 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -46,6 +46,20 @@ endif() get_property(QT_COMPILE_FEATURES TARGET ${QT_QTCORE_TARGET} PROPERTY INTERFACE_COMPILE_FEATURES) +# Qt4 moc does not support utf8 paths in _parameter files generated by +# qtx_wrap_cpp +# https://bugreports.qt.io/browse/QTBUG-35480 +# Do a simple check if there is are non ASCII character in the build path +string(REGEX MATCH "[^ -~]+" NON_ASCII_BDIR ${CMAKE_CURRENT_BINARY_DIR}) +if((NOT NON_ASCII_BDIR) OR (NOT QT_TEST_VERSION STREQUAL 4)) + set(ALLOW_WRAP_CPP TRUE) +endif() +# On windows qtx_wrap_cpp also fails in Qt5 when used on a path that +# contains non ASCII characters +if(NON_ASCII_BDIR AND WIN32) + set(ALLOW_WRAP_CPP FALSE) +endif() + # -- Test # RCC only add_executable(rccOnly rccOnly.cpp rccOnlyRes.qrc) @@ -60,10 +74,12 @@ target_link_libraries(rccEmpty ${QT_QTCORE_TARGET}) # -- Test # UIC only -qtx_wrap_cpp(uicOnlyMoc uicOnlySource/uiconly.h) -add_executable(uicOnly uicOnlySource/uiconly.cpp ${uicOnlyMoc}) -set_property(TARGET uicOnly PROPERTY AUTOUIC ON) -target_link_libraries(uicOnly ${QT_LIBRARIES}) +if(ALLOW_WRAP_CPP) + qtx_wrap_cpp(uicOnlyMoc uicOnlySource/uiconly.h) + add_executable(uicOnly uicOnlySource/uiconly.cpp ${uicOnlyMoc}) + set_property(TARGET uicOnly PROPERTY AUTOUIC ON) + target_link_libraries(uicOnly ${QT_LIBRARIES}) +endif() # -- Test # Add not_generated_file.qrc to the source list to get the file-level @@ -209,25 +225,27 @@ endif() # -- Test # Test for SKIP_AUTOMOC and SKIP_AUTOGEN on an AUTOMOC enabled target -qtx_wrap_cpp(skipMocWrapMoc - skipSource/qItemA.hpp - skipSource/qItemB.hpp) -set(skipMocSources - skipMoc.cpp - skipSource/qItemA.cpp - skipSource/qItemB.cpp - skipSource/qItemC.cpp) -set_property(SOURCE skipSource/qItemA.cpp PROPERTY SKIP_AUTOMOC ON) -set_property(SOURCE skipSource/qItemB.cpp PROPERTY SKIP_AUTOGEN ON) -# AUTOMOC enabled only -add_executable(skipMocA ${skipMocSources} ${skipMocWrapMoc}) -set_property(TARGET skipMocA PROPERTY AUTOMOC ON) -target_link_libraries(skipMocA ${QT_LIBRARIES}) -# AUTOMOC and AUTOUIC enabled -add_executable(skipMocB ${skipMocSources} ${skipMocWrapMoc}) -set_property(TARGET skipMocB PROPERTY AUTOMOC ON) -set_property(TARGET skipMocB PROPERTY AUTOUIC ON) -target_link_libraries(skipMocB ${QT_LIBRARIES}) +if(ALLOW_WRAP_CPP) + qtx_wrap_cpp(skipMocWrapMoc + skipSource/qItemA.hpp + skipSource/qItemB.hpp) + set(skipMocSources + skipMoc.cpp + skipSource/qItemA.cpp + skipSource/qItemB.cpp + skipSource/qItemC.cpp) + set_property(SOURCE skipSource/qItemA.cpp PROPERTY SKIP_AUTOMOC ON) + set_property(SOURCE skipSource/qItemB.cpp PROPERTY SKIP_AUTOGEN ON) + # AUTOMOC enabled only + add_executable(skipMocA ${skipMocSources} ${skipMocWrapMoc}) + set_property(TARGET skipMocA PROPERTY AUTOMOC ON) + target_link_libraries(skipMocA ${QT_LIBRARIES}) + # AUTOMOC and AUTOUIC enabled + add_executable(skipMocB ${skipMocSources} ${skipMocWrapMoc}) + set_property(TARGET skipMocB PROPERTY AUTOMOC ON) + set_property(TARGET skipMocB PROPERTY AUTOUIC ON) + target_link_libraries(skipMocB ${QT_LIBRARIES}) +endif() # -- Test # Test for SKIP_AUTOUIC and SKIP_AUTOGEN on an AUTOUIC enabled target https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=38e3fc4bddf6ef47828a7beb732e3d78d297bd23 commit 38e3fc4bddf6ef47828a7beb732e3d78d297bd23 Author: Sebastian Holtermann AuthorDate: Mon Jun 12 21:54:45 2017 +0200 Commit: Sebastian Holtermann CommitDate: Mon Jun 12 21:54:45 2017 +0200 Autogen: Tests fix for utf8 paths diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 073c5fd..f5acce0 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -100,7 +100,7 @@ if (NOT RCC_DEPENDS) message(SEND_ERROR "Initial build of rccDepends failed. Output: ${output}") endif() # Get name and timestamp of the output binary -file(STRINGS "${RCC_DEPENDS_BIN}/target.txt" targetList) +file(STRINGS "${RCC_DEPENDS_BIN}/target.txt" targetList ENCODING UTF-8) list(GET targetList 0 rccDependsBin) file(TIMESTAMP "${rccDependsBin}" timeBegin "${timeformat}") # Sleep, touch regular qrc input file, rebuild and compare timestamp @@ -188,7 +188,7 @@ if (NOT MOC_RERUN) message(SEND_ERROR "Initial build of mocRerun failed. Output: ${output}") endif() # Get name and timestamp of the output binary -file(STRINGS "${CMAKE_CURRENT_BINARY_DIR}/mocRerun/target1.txt" target1List) +file(STRINGS "${CMAKE_CURRENT_BINARY_DIR}/mocRerun/target1.txt" target1List ENCODING UTF-8) list(GET target1List 0 binFile) file(TIMESTAMP "${binFile}" timeBegin "${timeformat}") # Change file content and rebuild ----------------------------------------------------------------------- Summary of changes: README.rst | 8 ++++- Tests/Qt4Targets/CMakeLists.txt | 10 ++++++ Tests/QtAutogen/CMakeLists.txt | 68 +++++++++++++++++++++++++-------------- 3 files changed, 60 insertions(+), 26 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 14 12:45:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 14 Jun 2017 12:45:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-78-gc8b4da5 Message-ID: <20170614164505.37B4AC01F5@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via c8b4da583878177099b3aa9c6eb895f968ccf11a (commit) via 07ec212ae8d55cd20c315a8e73bd358762f3f959 (commit) from b0835fefd27dbb261397ac9fe3b9ab49a107966c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8b4da583878177099b3aa9c6eb895f968ccf11a commit c8b4da583878177099b3aa9c6eb895f968ccf11a Merge: b0835fe 07ec212 Author: Brad King AuthorDate: Wed Jun 14 16:43:24 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 14 12:43:34 2017 -0400 Merge topic 'vs-dotnet-custom-reference-tags' 07ec212a VS: add target property VS_DOTNET_REFERENCEPROP__TAG_ Acked-by: Kitware Robot Merge-request: !960 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=07ec212ae8d55cd20c315a8e73bd358762f3f959 commit 07ec212ae8d55cd20c315a8e73bd358762f3f959 Author: Michael St?rmer AuthorDate: Fri Apr 7 16:26:14 2017 +0200 Commit: Brad King CommitDate: Tue Jun 13 10:46:31 2017 -0400 VS: add target property VS_DOTNET_REFERENCEPROP__TAG_ Fixes: #16689 diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index ec25596..94ab70c 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -291,6 +291,7 @@ Properties on Targets /prop_tgt/VS_DEBUGGER_WORKING_DIRECTORY /prop_tgt/VS_DESKTOP_EXTENSIONS_VERSION /prop_tgt/VS_DOTNET_REFERENCE_refname + /prop_tgt/VS_DOTNET_REFERENCEPROP_refname_TAG_tagname /prop_tgt/VS_DOTNET_REFERENCES /prop_tgt/VS_DOTNET_REFERENCES_COPY_LOCAL /prop_tgt/VS_DOTNET_TARGET_FRAMEWORK_VERSION diff --git a/Help/prop_tgt/VS_DOTNET_REFERENCEPROP_refname_TAG_tagname.rst b/Help/prop_tgt/VS_DOTNET_REFERENCEPROP_refname_TAG_tagname.rst new file mode 100644 index 0000000..478a04c --- /dev/null +++ b/Help/prop_tgt/VS_DOTNET_REFERENCEPROP_refname_TAG_tagname.rst @@ -0,0 +1,11 @@ +VS_DOTNET_REFERENCEPROP__TAG_ +----------------------------------------------- + +Visual Studio managed project .NET reference with name ```` +and hint path. + +Adds one .NET reference to generated Visual Studio project. The +reference will have the name ```` and will point to the +assembly given as value of the property. + +See also the :prop_tgt:`VS_DOTNET_REFERENCE_` target property. diff --git a/Help/release/dev/VS_DOTNET_REFERENCEPROP_refname_TAG_tagname.rst b/Help/release/dev/VS_DOTNET_REFERENCEPROP_refname_TAG_tagname.rst new file mode 100644 index 0000000..0e258fd --- /dev/null +++ b/Help/release/dev/VS_DOTNET_REFERENCEPROP_refname_TAG_tagname.rst @@ -0,0 +1,6 @@ +vs-dotnet-custom-reference-tags +------------------------------- + +* The :prop_tgt:`VS_DOTNET_REFERENCEPROP__TAG_` + target property was added to support custom XML tags for reference + assemblies in C# targets. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 46c2894..21ff8ad 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -658,9 +658,39 @@ void cmVisualStudio10TargetGenerator::WriteDotNetReference( this->WriteString("", 3); (*this->BuildFileStream) << hint << "\n"; } + this->WriteDotNetReferenceCustomTags(ref); this->WriteString("\n", 2); } +void cmVisualStudio10TargetGenerator::WriteDotNetReferenceCustomTags( + std::string const& ref) +{ + + static const std::string refpropPrefix = "VS_DOTNET_REFERENCEPROP_"; + static const std::string refpropInfix = "_TAG_"; + const std::string refPropFullPrefix = refpropPrefix + ref + refpropInfix; + typedef std::map CustomTags; + CustomTags tags; + cmPropertyMap const& props = this->GeneratorTarget->Target->GetProperties(); + for (cmPropertyMap::const_iterator i = props.begin(); i != props.end(); + ++i) { + if (i->first.find(refPropFullPrefix) == 0) { + std::string refTag = i->first.substr(refPropFullPrefix.length()); + std::string refVal = i->second.GetValue(); + if (!refTag.empty() && !refVal.empty()) { + tags[refTag] = refVal; + } + } + } + for (CustomTags::const_iterator tag = tags.begin(); tag != tags.end(); + ++tag) { + this->WriteString("<", 3); + (*this->BuildFileStream) << tag->first << ">" + << cmVS10EscapeXML(tag->second) << "first << ">\n"; + } +} + void cmVisualStudio10TargetGenerator::WriteEmbeddedResourceGroup() { std::vector resxObjs; @@ -3493,6 +3523,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences() (*this->BuildFileStream) << "\n"; this->WriteString("", 3); (*this->BuildFileStream) << name << "\n"; + this->WriteDotNetReferenceCustomTags(name); this->WriteString("\n", 2); } this->WriteString("\n", 1); diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 6106615..fd91c7e 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -66,6 +66,7 @@ private: void WriteAllSources(); void WriteDotNetReferences(); void WriteDotNetReference(std::string const& ref, std::string const& hint); + void WriteDotNetReferenceCustomTags(std::string const& ref); void WriteEmbeddedResourceGroup(); void WriteWinRTReferences(); void WriteWinRTPackageCertificateKeyFile(); diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake index 3af877f..6e7c2f3 100644 --- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake +++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake @@ -4,3 +4,4 @@ run_cmake(VsTargetsFileReferences) run_cmake(VsCustomProps) run_cmake(VsDebuggerWorkingDir) run_cmake(VsCSharpCustomTags) +run_cmake(VsCSharpReferenceProps) diff --git a/Tests/RunCMake/VS10Project/VsCSharpReferenceProps-check.cmake b/Tests/RunCMake/VS10Project/VsCSharpReferenceProps-check.cmake new file mode 100644 index 0000000..8b9bb67 --- /dev/null +++ b/Tests/RunCMake/VS10Project/VsCSharpReferenceProps-check.cmake @@ -0,0 +1,49 @@ +set(csProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.csproj") +if(NOT EXISTS "${csProjectFile}") + set(RunCMake_TEST_FAILED "Project file ${csProjectFile} does not exist.") + return() +endif() + +set(test1Reference "System") +set(test1Tag "Hello") +set(test1Value "World") + +set(test2Reference "foo2") +set(test2Tag "Hallo") +set(test2Value "Welt") + +set(tag1Found FALSE) +set(ref1Found FALSE) + +file(STRINGS "${csProjectFile}" lines) + +foreach(i 1 2) + set(testReference "${test${i}Reference}") + set(testTag "${test${i}Tag}") + set(testValue "${test${i}Value}") + foreach(line IN LISTS lines) + if(line MATCHES "^ *<(Project|)Reference .*>$") + set(validTag FALSE) + if(line MATCHES "^ *<(Project|)Reference .*\".*${testReference}.*\".*>$") + set(validTag TRUE) + message(STATUS "foo.csproj is using reference ${testReference}") + set(ref${i}Found TRUE) + endif() + endif() + if(line MATCHES "^ *<${testTag}>${testValue}$") + if(validTag) + message(STATUS "foo.csproj reference ${testReference} has tag ${testTag}") + set(tag${i}Found TRUE) + else() + message(STATUS "tag ${testTag} found in wrong place!") + set(tag${i}Found FALSE) + endif() + endif() + endforeach() +endforeach() + +if(NOT tag1Found OR NOT ref1Found OR + NOT tag2Found OR NOT ref2Found) + set(RunCMake_TEST_FAILED "Custom reference XML tag not found.") + return() +endif() diff --git a/Tests/RunCMake/VS10Project/VsCSharpReferenceProps.cmake b/Tests/RunCMake/VS10Project/VsCSharpReferenceProps.cmake new file mode 100644 index 0000000..2af1756 --- /dev/null +++ b/Tests/RunCMake/VS10Project/VsCSharpReferenceProps.cmake @@ -0,0 +1,19 @@ +enable_language(CSharp) +add_library(foo foo.cs) +add_library(foo2 foo.cs) + +set(test1Reference "System") +set(test1Tag "Hello") +set(test1Value "World") + +set(test2Reference "foo2") +set(test2Tag "Hallo") +set(test2Value "Welt") + +target_link_libraries(foo foo2) + +set_target_properties(foo PROPERTIES + VS_DOTNET_REFERENCES "${test1Reference};Blubb" + VS_DOTNET_REFERENCEPROP_${test1Reference}_TAG_${test1Tag} ${test1Value} + VS_DOTNET_REFERENCEPROP_${test2Reference}_TAG_${test2Tag} ${test2Value} + ) ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-properties.7.rst | 1 + ...S_DOTNET_REFERENCEPROP_refname_TAG_tagname.rst} | 7 ++- ...VS_DOTNET_REFERENCEPROP_refname_TAG_tagname.rst | 6 +++ Source/cmVisualStudio10TargetGenerator.cxx | 31 +++++++++++++ Source/cmVisualStudio10TargetGenerator.h | 1 + Tests/RunCMake/VS10Project/RunCMakeTest.cmake | 1 + .../VS10Project/VsCSharpReferenceProps-check.cmake | 49 ++++++++++++++++++++ .../VS10Project/VsCSharpReferenceProps.cmake | 19 ++++++++ 8 files changed, 111 insertions(+), 4 deletions(-) copy Help/prop_tgt/{VS_DOTNET_REFERENCE_refname.rst => VS_DOTNET_REFERENCEPROP_refname_TAG_tagname.rst} (60%) create mode 100644 Help/release/dev/VS_DOTNET_REFERENCEPROP_refname_TAG_tagname.rst create mode 100644 Tests/RunCMake/VS10Project/VsCSharpReferenceProps-check.cmake create mode 100644 Tests/RunCMake/VS10Project/VsCSharpReferenceProps.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 14 14:15:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 14 Jun 2017 14:15:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-80-ga7cbc5f Message-ID: <20170614181502.E4C34F46C2@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via a7cbc5f2453ff316d127c06cbb4e0c7cc38cd270 (commit) via 28756437f21c4bce40fe15c214ae22a5625673ff (commit) from c8b4da583878177099b3aa9c6eb895f968ccf11a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a7cbc5f2453ff316d127c06cbb4e0c7cc38cd270 commit a7cbc5f2453ff316d127c06cbb4e0c7cc38cd270 Merge: c8b4da5 2875643 Author: Brad King AuthorDate: Wed Jun 14 18:12:39 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 14 14:12:47 2017 -0400 Merge topic 'add-missing-compiler-release-notes' 28756437 Help: Add docs for new compilers supporting language standards. Acked-by: Kitware Robot Merge-request: !966 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=28756437f21c4bce40fe15c214ae22a5625673ff commit 28756437f21c4bce40fe15c214ae22a5625673ff Author: Chuck Atkins AuthorDate: Wed Jun 14 11:50:39 2017 -0400 Commit: Chuck Atkins CommitDate: Wed Jun 14 11:54:58 2017 -0400 Help: Add docs for new compilers supporting language standards. diff --git a/Help/manual/cmake-compile-features.7.rst b/Help/manual/cmake-compile-features.7.rst index fa2aa8d..cfb1b78 100644 --- a/Help/manual/cmake-compile-features.7.rst +++ b/Help/manual/cmake-compile-features.7.rst @@ -343,9 +343,25 @@ and :prop_gbl:`compile features ` available from the following :variable:`compiler ids _COMPILER_ID>` as of the versions specified for each: -* all compilers and versions listed above for C++ +* all compilers and versions listed above for C++. * ``GNU``: GNU compiler versions 3.4 through 5.0. +CMake is currently aware of the :prop_tgt:`C++ standards ` and +thier associated meta-features (e.g. ``cxx_std_11``) available from the +following :variable:`compiler ids _COMPILER_ID>` as of the +versions specified for each: + +* ``Cray``: Cray Compiler Environment version 8.1 through 8.5.8. +* ``PGI``: PGI version 12.10 through 17.5. +* ``XL``: IBM XL version 10.1 through 13.1.5. + +CMake is currently aware of the :prop_tgt:`C standards ` and +thier associated meta-features (e.g. ``c_std_99``) available from the +following :variable:`compiler ids _COMPILER_ID>` as of the +versions specified for each: + +* all compilers and versions listed above with only meta-features for C++. + CMake is currently aware of the :prop_tgt:`CUDA standards ` from the following :variable:`compiler ids _COMPILER_ID>` as of the versions specified for each: diff --git a/Help/release/3.9.rst b/Help/release/3.9.rst index 333ba9e..7222196 100644 --- a/Help/release/3.9.rst +++ b/Help/release/3.9.rst @@ -17,6 +17,11 @@ Languages for VS 2010 and above. This complements the existing support by the :ref:`Makefile Generators` and the :generator:`Ninja` generator. +* CMake is now aware of the :prop_tgt:`C++ standards ` and + :prop_tgt:`C standards ` and thier associated meta-features for + the following :variable:`compiler ids _COMPILER_ID>`: ``Cray``, + ``PGI``, and ``XL``. + Generators ---------- ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-compile-features.7.rst | 18 +++++++++++++++++- Help/release/3.9.rst | 5 +++++ 2 files changed, 22 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 14 15:15:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 14 Jun 2017 15:15:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc3-4-gfdacfc6 Message-ID: <20170614191504.1B6C6C0254@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via fdacfc6604c09e11ef2dd7bc8c4da8dfab9a8244 (commit) via 28756437f21c4bce40fe15c214ae22a5625673ff (commit) via 14c82d14bc08f414fed11fc251da565728790b78 (commit) via bf2e4bfbaabaa5621791b35ea5da7d7e5c141d8b (commit) from c52b982da6fc6387ba66a15c097ae90f69980ef5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-compile-features.7.rst | 18 +++++++++++++++++- Help/release/3.9.rst | 5 +++++ README.rst | 8 +++++++- 3 files changed, 29 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 14 15:15:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 14 Jun 2017 15:15:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-83-g877e738 Message-ID: <20170614191504.0F513C01F5@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 877e7383b33600f313b1c958f6fc4ee10fb5bbe3 (commit) via fdacfc6604c09e11ef2dd7bc8c4da8dfab9a8244 (commit) via 14c82d14bc08f414fed11fc251da565728790b78 (commit) from a7cbc5f2453ff316d127c06cbb4e0c7cc38cd270 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=877e7383b33600f313b1c958f6fc4ee10fb5bbe3 commit 877e7383b33600f313b1c958f6fc4ee10fb5bbe3 Merge: a7cbc5f fdacfc6 Author: Brad King AuthorDate: Wed Jun 14 15:11:15 2017 -0400 Commit: Brad King CommitDate: Wed Jun 14 15:11:15 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 15 00:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 15 Jun 2017 00:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-84-ga0ba798 Message-ID: <20170615040504.74E9DFA7AD@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via a0ba798e428af3cd2643c3f8905f351378239972 (commit) from 877e7383b33600f313b1c958f6fc4ee10fb5bbe3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0ba798e428af3cd2643c3f8905f351378239972 commit a0ba798e428af3cd2643c3f8905f351378239972 Author: Kitware Robot AuthorDate: Thu Jun 15 00:01:05 2017 -0400 Commit: Kitware Robot CommitDate: Thu Jun 15 00:01:05 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 614f31d..d1db7d3 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 9) -set(CMake_VERSION_PATCH 20170614) +set(CMake_VERSION_PATCH 20170615) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 15 10:05:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 15 Jun 2017 10:05:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-90-gdf6f3ef Message-ID: <20170615140507.7DD8AF9E26@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via df6f3ef9a6a2de945f43bf1f60e19d60f3137188 (commit) via 65834d04a21c93e5eaaa7256e386aabd36699041 (commit) via 871adefce97246ec42a157f62e39855b434c523d (commit) via a3ef36f153f51c33ea2154cff17bbf9abb7ee073 (commit) via 06d6d6c4aee149cd6560b919ef6935ef0867d921 (commit) via 91101f108d68e8fe98c378f06e1ed12a513151fe (commit) from a0ba798e428af3cd2643c3f8905f351378239972 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=df6f3ef9a6a2de945f43bf1f60e19d60f3137188 commit df6f3ef9a6a2de945f43bf1f60e19d60f3137188 Merge: 65834d0 a3ef36f Author: Brad King AuthorDate: Thu Jun 15 14:03:11 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 15 10:03:31 2017 -0400 Merge topic 'update-curl' a3ef36f1 Merge branch 'upstream-curl' into update-curl 06d6d6c4 curl 2017-06-14 (54b636f1) 91101f10 curl: Update script to get curl 7.54.1 Acked-by: Kitware Robot Merge-request: !965 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=65834d04a21c93e5eaaa7256e386aabd36699041 commit 65834d04a21c93e5eaaa7256e386aabd36699041 Merge: a0ba798 871adef Author: Brad King AuthorDate: Thu Jun 15 14:02:38 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 15 10:02:56 2017 -0400 Merge topic 'libuv-restore-fmode' 871adefc cmake: Fix default file translate mode when using libuv Acked-by: Kitware Robot Merge-request: !963 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=871adefce97246ec42a157f62e39855b434c523d commit 871adefce97246ec42a157f62e39855b434c523d Author: Brad King AuthorDate: Tue Jun 13 16:08:12 2017 -0400 Commit: Brad King CommitDate: Wed Jun 14 12:46:03 2017 -0400 cmake: Fix default file translate mode when using libuv On Windows, libuv's one-time initialization changes the C runtime library's `_fmode` setting to `_O_BINARY`, thus causing files to open as binary after that instead of the default `_O_TEXT` mode. See upstream libuv issue 840. Work around the problem by performing libuv initialization early and then restoring `_fmode`. In particular, this currently affects server mode. Without this fix, the `_fmode` setting changes when the server mode initializes libuv. Fixes: #16962 diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 6e65955..c5a6836 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -27,6 +27,10 @@ #include #ifdef CMAKE_USE_LIBUV +#ifdef _WIN32 +#include /* _O_TEXT */ +#include /* _set_fmode, _fmode */ +#endif #include "cm_uv.h" #endif @@ -168,6 +172,18 @@ int main(int ac, char const* const* av) ac = args.argc(); av = args.argv(); +#if defined(CMAKE_USE_LIBUV) && defined(_WIN32) + // Perform libuv one-time initialization now, and then un-do its + // global _fmode setting so that using libuv does not change the + // default file text/binary mode. See libuv issue 840. + uv_loop_close(uv_default_loop()); +#ifdef _MSC_VER + _set_fmode(_O_TEXT); +#else + _fmode = _O_TEXT; +#endif +#endif + cmSystemTools::EnableMSVCDebugHook(); cmSystemTools::FindCMakeResources(av[0]); if (ac > 1) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a3ef36f153f51c33ea2154cff17bbf9abb7ee073 commit a3ef36f153f51c33ea2154cff17bbf9abb7ee073 Merge: 91101f1 06d6d6c Author: Brad King AuthorDate: Wed Jun 14 11:03:53 2017 -0400 Commit: Brad King CommitDate: Wed Jun 14 11:10:22 2017 -0400 Merge branch 'upstream-curl' into update-curl * upstream-curl: curl 2017-06-14 (54b636f1) Resolve a logical conflict in `Utilities/cmcurl/CMakeLists.txt` by disabling CA bundle/path detection for build within CMake. CMake already handles locating a CA bundle/path at runtime. diff --cc Utilities/cmcurl/CMakeLists.txt index 5049d7b,0000000..45ae3de mode 100644,000000..100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@@ -1,1340 -1,0 +1,1411 @@@ +# Set curl options as needed for CMake build +set(BUILD_CURL_EXE OFF CACHE INTERNAL "No curl exe") +set(BUILD_DASHBOARD_REPORTS OFF CACHE INTERNAL "No curl dashboard reports") +set(BUILD_RELEASE_DEBUG_DIRS OFF CACHE INTERNAL "No curl release/debug dirs") +set(CMAKE_USE_GSSAPI OFF CACHE INTERNAL "Disable curl gssapi") +set(CMAKE_USE_LIBSSH2 OFF CACHE INTERNAL "Disable curl libssh2") +set(CMAKE_USE_OPENLDAP OFF CACHE INTERNAL "No curl OpenLDAP") +set(CURL_DISABLE_COOKIES OFF CACHE INTERNAL "Do not disable curl cookie support") +set(CURL_DISABLE_CRYPTO_AUTH OFF CACHE INTERNAL "Do not disable curl crypto auth") +set(CURL_DISABLE_DICT ON CACHE INTERNAL "Disable curl dict protocol?") +set(CURL_DISABLE_FILE OFF CACHE INTERNAL "Disable curl file protocol?") +set(CURL_DISABLE_FTP OFF CACHE INTERNAL "Disable curl ftp protocol?") +set(CURL_DISABLE_GOPHER ON CACHE INTERNAL "Disable curl gopher protocol?") +set(CURL_DISABLE_HTTP OFF CACHE INTERNAL "Disable curl http protocol?") +set(CURL_DISABLE_IMAP ON CACHE INTERNAL "Disable curl imap protocol?") +set(CURL_DISABLE_LDAP ON CACHE INTERNAL "Disable curl ldap protocol?") +set(CURL_DISABLE_LDAPS ON CACHE INTERNAL "Disable curl ldaps protocol?") +set(CURL_DISABLE_POP3 ON CACHE INTERNAL "Disable curl pop3 protocol?") +set(CURL_DISABLE_PROXY OFF CACHE INTERNAL "Do not disable curl proxy") +set(CURL_DISABLE_RTSP ON CACHE INTERNAL "Disable curl rtsp protocol?") +set(CURL_DISABLE_SMTP ON CACHE INTERNAL "Disable curl smtp protocol?") +set(CURL_DISABLE_TELNET ON CACHE INTERNAL "Disable curl telnet protocol?") +set(CURL_DISABLE_TFTP ON CACHE INTERNAL "Disable curl tftp protocol?") +set(CURL_DISABLE_VERBOSE_STRINGS OFF CACHE INTERNAL "Do not disable curl verbosity") +set(CURL_HIDDEN_SYMBOLS OFF CACHE INTERNAL "No curl hidden symbols") +set(CURL_STATICLIB ON CACHE INTERNAL "Static curl") +set(DISABLED_THREADSAFE OFF CACHE INTERNAL "Curl can use thread-safe functions") +set(ENABLE_ARES OFF CACHE INTERNAL "No curl c-ares support") +set(ENABLE_CURLDEBUG OFF CACHE INTERNAL "No curl TrackMemory features") +set(ENABLE_DEBUG OFF CACHE INTERNAL "No curl debug features") +set(ENABLE_IPV6 OFF CACHE INTERNAL "No curl IPv6 support") +set(ENABLE_MANUAL OFF CACHE INTERNAL "No curl built-in manual") +set(ENABLE_THREADED_RESOLVER OFF CACHE INTERNAL "No curl POSIX threaded DNS lookup") +set(ENABLE_UNIX_SOCKETS OFF CACHE INTERNAL "No curl Unix domain sockets support") +set(HTTP_ONLY OFF CACHE INTERNAL "Curl is not http-only") +set(USE_WIN32_LDAP OFF CACHE INTERNAL "No curl Windows LDAP") +if(CMAKE_USE_OPENSSL) +elseif(WIN32) + set(CMAKE_USE_WINSSL ON CACHE INTERNAL "enable Windows native SSL/TLS") + set(CURL_WINDOWS_SSPI ON CACHE INTERNAL "Use windows libraries to allow NTLM authentication without openssl") +elseif(APPLE) + # Use OS X SSL/TLS native implementation if available on target version. + if(CMAKE_OSX_DEPLOYMENT_TARGET) + set(OSX_VERSION ${CMAKE_OSX_DEPLOYMENT_TARGET}) + else() + execute_process( + COMMAND sw_vers -productVersion + OUTPUT_VARIABLE OSX_VERSION + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + endif() + if(NOT OSX_VERSION VERSION_LESS 10.6 AND + CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|AppleClang") + set(CMAKE_USE_DARWINSSL ON CACHE INTERNAL "enable Apple OS native SSL/TLS") + else() + set(CMAKE_USE_DARWINSSL OFF CACHE INTERNAL "enable Apple OS native SSL/TLS") + endif() +endif() +set(CMAKE_USE_MBEDTLS OFF CACHE INTERNAL "Enable mbedTLS for SSL/TLS") + +# Windows Vista and above have inet_pton, but this will link on +# older versions and then the executable will fail to launch at +# runtime on older versions because no DLL provides the symbol. +if(WIN32) + set(HAVE_INET_PTON 0 CACHE INTERNAL "Do not use inet_pton") +endif() + +# Starting with OSX 10.11 there is an unrelated libnetwork library which will +# be picked up during curl configuration. Linking against this library is +# unnecessary and breaks backward compatibility of the resulting binaries +# because libnetwork is unavailable on older OSX versions. +if(APPLE) + set(HAVE_LIBNETWORK 0 CACHE INTERNAL "Do not use libnetwork") +endif(APPLE) + +# Disable warnings to avoid changing 3rd party code. +if(CMAKE_C_COMPILER_ID MATCHES + "^(GNU|Clang|AppleClang|XL|VisualAge|SunPro|MIPSpro|HP|Intel)$") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w") +elseif(CMAKE_C_COMPILER_ID STREQUAL "PathScale") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -woffall") +endif() + +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at https://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +########################################################################### +# curl/libcurl CMake script +# by Tetetest and Sukender (Benoit Neil) + +# TODO: +# The output .so file lacks the soname number which we currently have within the lib/Makefile.am file +# Add full (4 or 5 libs) SSL support +# Add INSTALL target (EXTRA_DIST variables in Makefile.am may be moved to Makefile.inc so that CMake/CPack is aware of what's to include). +# Add CTests(?) +# Check on all possible platforms +# Test with as many configurations possible (With or without any option) +# Create scripts that help keeping the CMake build system up to date (to reduce maintenance). According to Tetetest: +# - lists of headers that 'configure' checks for; +# - curl-specific tests (the ones that are in m4/curl-*.m4 files); +# - (most obvious thing:) curl version numbers. +# Add documentation subproject +# +# To check: +# (From Daniel Stenberg) The cmake build selected to run gcc with -fPIC on my box while the plain configure script did not. +# (From Daniel Stenberg) The gcc command line use neither -g nor any -O options. As a developer, I also treasure our configure scripts's --enable-debug option that sets a long range of "picky" compiler options. +cmake_minimum_required(VERSION 2.8 FATAL_ERROR) +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}") +include(Utilities) +include(Macros) +include(CMakeDependentOption) + +project( CURL C ) + +if(0) # This code not needed for building within CMake. +message(WARNING "the curl cmake build system is poorly maintained. Be aware") +endif() + +file (READ ${CURL_SOURCE_DIR}/include/curl/curlver.h CURL_VERSION_H_CONTENTS) +string (REGEX MATCH "#define LIBCURL_VERSION \"[^\"]*" + CURL_VERSION ${CURL_VERSION_H_CONTENTS}) +string (REGEX REPLACE "[^\"]+\"" "" CURL_VERSION ${CURL_VERSION}) +string (REGEX MATCH "#define LIBCURL_VERSION_NUM 0x[0-9a-fA-F]+" + CURL_VERSION_NUM ${CURL_VERSION_H_CONTENTS}) +string (REGEX REPLACE "[^0]+0x" "" CURL_VERSION_NUM ${CURL_VERSION_NUM}) + +include_regular_expression("^.*$") # Sukender: Is it necessary? + +# Setup package meta-data +# SET(PACKAGE "curl") +if(0) # This code not needed for building within CMake. +message(STATUS "curl version=[${CURL_VERSION}]") +endif() +# SET(PACKAGE_TARNAME "curl") +# SET(PACKAGE_NAME "curl") +# SET(PACKAGE_VERSION "-") +# SET(PACKAGE_STRING "curl-") +# SET(PACKAGE_BUGREPORT "a suitable curl mailing list => https://curl.haxx.se/mail/") +set(OPERATING_SYSTEM "${CMAKE_SYSTEM_NAME}") +set(OS "\"${CMAKE_SYSTEM_NAME}\"") + +include_directories(${PROJECT_BINARY_DIR}/include/curl) +include_directories( ${CURL_SOURCE_DIR}/include ) + +option(BUILD_CURL_EXE "Set to ON to build curl executable." ON) +option(CURL_STATICLIB "Set to ON to build libcurl with static linking." OFF) +option(ENABLE_ARES "Set to ON to enable c-ares support" OFF) +if(WIN32) + CMAKE_DEPENDENT_OPTION(ENABLE_THREADED_RESOLVER + "Set to ON to enable threaded DNS lookup" + ON "NOT ENABLE_ARES" + OFF) +else() + option(ENABLE_THREADED_RESOLVER "Set to ON to enable POSIX threaded DNS lookup" OFF) +endif() +option(ENABLE_DEBUG "Set to ON to enable curl debug features" OFF) +option(ENABLE_CURLDEBUG "Set to ON to build with TrackMemory feature enabled" OFF) + +if (ENABLE_DEBUG) + # DEBUGBUILD will be defined only for Debug builds + if(NOT CMAKE_VERSION VERSION_LESS 3.0) + set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$:DEBUGBUILD>) + else() + set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUGBUILD) + endif() + set(ENABLE_CURLDEBUG ON) +endif() + +if (ENABLE_CURLDEBUG) + set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS CURLDEBUG) +endif() + +# initialize CURL_LIBS +set(CURL_LIBS "") + +if(ENABLE_THREADED_RESOLVER AND ENABLE_ARES) + message(FATAL_ERROR "Options ENABLE_THREADED_RESOLVER and ENABLE_ARES are mutually exclusive") +endif() + +if(ENABLE_ARES) + set(USE_ARES 1) + find_package(CARES REQUIRED) + list(APPEND CURL_LIBS ${CARES_LIBRARY} ) + set(CURL_LIBS ${CURL_LIBS} ${CARES_LIBRARY}) +endif() + +if(MSVC) + option(BUILD_RELEASE_DEBUG_DIRS "Set OFF to build each configuration to a separate directory" OFF) + mark_as_advanced(BUILD_RELEASE_DEBUG_DIRS) +endif() + +if(0) # This code not needed for building within CMake. +include(CurlSymbolHiding) +endif() + +option(HTTP_ONLY "disables all protocols except HTTP (This overrides all CURL_DISABLE_* options)" OFF) +mark_as_advanced(HTTP_ONLY) +option(CURL_DISABLE_FTP "disables FTP" OFF) +mark_as_advanced(CURL_DISABLE_FTP) +option(CURL_DISABLE_LDAP "disables LDAP" OFF) +mark_as_advanced(CURL_DISABLE_LDAP) +option(CURL_DISABLE_TELNET "disables Telnet" OFF) +mark_as_advanced(CURL_DISABLE_TELNET) +option(CURL_DISABLE_DICT "disables DICT" OFF) +mark_as_advanced(CURL_DISABLE_DICT) +option(CURL_DISABLE_FILE "disables FILE" OFF) +mark_as_advanced(CURL_DISABLE_FILE) +option(CURL_DISABLE_TFTP "disables TFTP" OFF) +mark_as_advanced(CURL_DISABLE_TFTP) +option(CURL_DISABLE_HTTP "disables HTTP" OFF) +mark_as_advanced(CURL_DISABLE_HTTP) + +option(CURL_DISABLE_LDAPS "to disable LDAPS" OFF) +mark_as_advanced(CURL_DISABLE_LDAPS) + +option(CURL_DISABLE_RTSP "to disable RTSP" OFF) +mark_as_advanced(CURL_DISABLE_RTSP) +option(CURL_DISABLE_PROXY "to disable proxy" OFF) +mark_as_advanced(CURL_DISABLE_PROXY) +option(CURL_DISABLE_POP3 "to disable POP3" OFF) +mark_as_advanced(CURL_DISABLE_POP3) +option(CURL_DISABLE_IMAP "to disable IMAP" OFF) +mark_as_advanced(CURL_DISABLE_IMAP) +option(CURL_DISABLE_SMTP "to disable SMTP" OFF) +mark_as_advanced(CURL_DISABLE_SMTP) +option(CURL_DISABLE_GOPHER "to disable Gopher" OFF) +mark_as_advanced(CURL_DISABLE_GOPHER) + +if(HTTP_ONLY) + set(CURL_DISABLE_FTP ON) + set(CURL_DISABLE_LDAP ON) + set(CURL_DISABLE_LDAPS ON) + set(CURL_DISABLE_TELNET ON) + set(CURL_DISABLE_DICT ON) + set(CURL_DISABLE_FILE ON) + set(CURL_DISABLE_TFTP ON) + set(CURL_DISABLE_RTSP ON) + set(CURL_DISABLE_POP3 ON) + set(CURL_DISABLE_IMAP ON) + set(CURL_DISABLE_SMTP ON) + set(CURL_DISABLE_GOPHER ON) +endif() + +option(CURL_DISABLE_COOKIES "to disable cookies support" OFF) +mark_as_advanced(CURL_DISABLE_COOKIES) + +option(CURL_DISABLE_CRYPTO_AUTH "to disable cryptographic authentication" OFF) +mark_as_advanced(CURL_DISABLE_CRYPTO_AUTH) +option(CURL_DISABLE_VERBOSE_STRINGS "to disable verbose strings" OFF) +mark_as_advanced(CURL_DISABLE_VERBOSE_STRINGS) +option(DISABLED_THREADSAFE "Set to explicitly specify we don't want to use thread-safe functions" OFF) +mark_as_advanced(DISABLED_THREADSAFE) +option(ENABLE_IPV6 "Define if you want to enable IPv6 support" ON) +mark_as_advanced(ENABLE_IPV6) +if(ENABLE_IPV6 AND NOT WIN32) + include(CheckStructHasMember) + check_struct_has_member("struct sockaddr_in6" sin6_addr "netinet/in.h" + HAVE_SOCKADDR_IN6_SIN6_ADDR) + check_struct_has_member("struct sockaddr_in6" sin6_scope_id "netinet/in.h" + HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID) + if(NOT HAVE_SOCKADDR_IN6_SIN6_ADDR) + message(WARNING "struct sockaddr_in6 not available, disabling IPv6 support") + # Force the feature off as this name is used as guard macro... + set(ENABLE_IPV6 OFF + CACHE BOOL "Define if you want to enable IPv6 support" FORCE) + endif() +endif() + +option(ENABLE_MANUAL "to provide the built-in manual" ON) +unset(USE_MANUAL CACHE) # TODO: cache NROFF/NROFF_MANOPT/USE_MANUAL vars? +if(ENABLE_MANUAL) + find_program(NROFF NAMES gnroff nroff) + if(NROFF) + # Need a way to write to stdin, this will do + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt" "test") + # Tests for a valid nroff option to generate a manpage + foreach(_MANOPT "-man" "-mandoc") + execute_process(COMMAND "${NROFF}" ${_MANOPT} + OUTPUT_VARIABLE NROFF_MANOPT_OUTPUT + INPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt" + ERROR_QUIET) + # Save the option if it was valid + if(NROFF_MANOPT_OUTPUT) + message("Found *nroff option: -- ${_MANOPT}") + set(NROFF_MANOPT ${_MANOPT}) + set(USE_MANUAL 1) + break() + endif() + endforeach() + # No need for the temporary file + file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/nroff-input.txt") + if(NOT USE_MANUAL) + message(WARNING "Found no *nroff option to get plaintext from man pages") + endif() + else() + message(WARNING "Found no *nroff program") + endif() +endif() + +if(0) # This code not needed for building within CMake. +# Required for building manual, docs, tests +find_package(Perl REQUIRED) +endif() + +# We need ansi c-flags, especially on HP +set(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}") +set(CMAKE_REQUIRED_FLAGS ${CMAKE_ANSI_CFLAGS}) + +# Disable warnings on Borland to avoid changing 3rd party code. +if(BORLAND) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-") +endif(BORLAND) + +# If we are on AIX, do the _ALL_SOURCE magic +if(${CMAKE_SYSTEM_NAME} MATCHES AIX) + set(_ALL_SOURCE 1) +endif(${CMAKE_SYSTEM_NAME} MATCHES AIX) + +# Include all the necessary files for macros +include (CheckFunctionExists) +include (CheckIncludeFile) +include (CheckIncludeFiles) +include (CheckLibraryExists) +include (CheckSymbolExists) +include (CheckTypeSize) +include (CheckCSourceCompiles) + +# On windows preload settings +if(WIN32) + set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_WINSOCKAPI_=") + include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/Platforms/WindowsCache.cmake) +endif(WIN32) + +if(ENABLE_THREADED_RESOLVER) + if(WIN32) + set(USE_THREADS_WIN32 ON) + else() + check_include_file_concat("pthread.h" HAVE_PTHREAD_H) + if(HAVE_PTHREAD_H) + set(CMAKE_THREAD_PREFER_PTHREAD 1) + find_package(Threads) + if(CMAKE_USE_PTHREADS_INIT) + set(CURL_LIBS ${CURL_LIBS} ${CMAKE_THREAD_LIBS_INIT}) + set(USE_THREADS_POSIX 1) + endif() + endif() + endif() +endif() + +# Check for all needed libraries +if(0) # This code not needed for building within CMake. +check_library_exists_concat("dl" dlopen HAVE_LIBDL) +else() + # Use the cmake-defined dl libs as dl is should not be used + # on HPUX, but rather dld this avoids a warning + list(APPEND CURL_LIBS ${CMAKE_DL_LIBS}) +endif() +check_library_exists_concat("socket" connect HAVE_LIBSOCKET) +check_library_exists("c" gethostbyname "" NOT_NEED_LIBNSL) + +# Yellowtab Zeta needs different libraries than BeOS 5. +if(BEOS) + set(NOT_NEED_LIBNSL 1) + check_library_exists_concat("bind" gethostbyname HAVE_LIBBIND) + check_library_exists_concat("bnetapi" closesocket HAVE_LIBBNETAPI) +endif(BEOS) + +check_library_exists_concat("network" recv HAVE_LIBNETWORK) + +if(NOT NOT_NEED_LIBNSL) + check_library_exists_concat("nsl" gethostbyname HAVE_LIBNSL) +endif(NOT NOT_NEED_LIBNSL) + +check_function_exists(gethostname HAVE_GETHOSTNAME) + +if(WIN32) + check_library_exists_concat("ws2_32" getch HAVE_LIBWS2_32) + check_library_exists_concat("winmm" getch HAVE_LIBWINMM) +endif() + +# check SSL libraries +# TODO support GNUTLS, NSS, POLARSSL, AXTLS, CYASSL + +if(APPLE) + option(CMAKE_USE_DARWINSSL "enable Apple OS native SSL/TLS" OFF) +endif() +if(WIN32) + option(CMAKE_USE_WINSSL "enable Windows native SSL/TLS" OFF) + cmake_dependent_option(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without openssl" ON + CMAKE_USE_WINSSL OFF) +endif() +option(CMAKE_USE_MBEDTLS "Enable mbedTLS for SSL/TLS" OFF) + +set(openssl_default ON) +if(WIN32 OR CMAKE_USE_DARWINSSL OR CMAKE_USE_WINSSL OR CMAKE_USE_MBEDTLS) + set(openssl_default OFF) +endif() + +collect_true(enabled_ssl_options enabled_ssl_options_count + CMAKE_USE_WINSSL + CMAKE_USE_DARWINSSL + CMAKE_USE_OPENSSL + CMAKE_USE_MBEDTLS +) +if(enabled_ssl_options_count GREATER 1) + message(FATAL_ERROR "Multiple SSL options specified: ${enabled_ssl_options}. Please pick at most one and disable the rest.") +endif() + +if(CMAKE_USE_WINSSL) + set(SSL_ENABLED ON) + set(USE_SCHANNEL ON) # Windows native SSL/TLS support + set(USE_WINDOWS_SSPI ON) # CMAKE_USE_WINSSL implies CURL_WINDOWS_SSPI + list(APPEND CURL_LIBS "crypt32") +endif() +if(CURL_WINDOWS_SSPI) + set(USE_WINDOWS_SSPI ON) + set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -DSECURITY_WIN32") +endif() + +if(CMAKE_USE_DARWINSSL) + find_library(COREFOUNDATION_FRAMEWORK "CoreFoundation") + if(NOT COREFOUNDATION_FRAMEWORK) + message(FATAL_ERROR "CoreFoundation framework not found") + endif() + + find_library(SECURITY_FRAMEWORK "Security") + if(NOT SECURITY_FRAMEWORK) + message(FATAL_ERROR "Security framework not found") + endif() + + set(SSL_ENABLED ON) + set(USE_DARWINSSL ON) + list(APPEND CURL_LIBS "${COREFOUNDATION_FRAMEWORK}" "${SECURITY_FRAMEWORK}") +endif() + +if(CMAKE_USE_OPENSSL) + find_package(OpenSSL REQUIRED) + set(SSL_ENABLED ON) + set(USE_OPENSSL ON) + set(HAVE_LIBCRYPTO ON) + set(HAVE_LIBSSL ON) + list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES}) + include_directories(${OPENSSL_INCLUDE_DIR}) + set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) + check_include_file("openssl/crypto.h" HAVE_OPENSSL_CRYPTO_H) + check_include_file("openssl/engine.h" HAVE_OPENSSL_ENGINE_H) + check_include_file("openssl/err.h" HAVE_OPENSSL_ERR_H) + check_include_file("openssl/pem.h" HAVE_OPENSSL_PEM_H) + check_include_file("openssl/pkcs12.h" HAVE_OPENSSL_PKCS12_H) + check_include_file("openssl/rsa.h" HAVE_OPENSSL_RSA_H) + check_include_file("openssl/ssl.h" HAVE_OPENSSL_SSL_H) + check_include_file("openssl/x509.h" HAVE_OPENSSL_X509_H) + check_include_file("openssl/rand.h" HAVE_OPENSSL_RAND_H) + check_symbol_exists(RAND_status "${CURL_INCLUDES}" HAVE_RAND_STATUS) + check_symbol_exists(RAND_screen "${CURL_INCLUDES}" HAVE_RAND_SCREEN) + check_symbol_exists(RAND_egd "${CURL_INCLUDES}" HAVE_RAND_EGD) + + # Optionally build with a specific CA cert bundle. + if(CURL_CA_BUNDLE) + add_definitions(-DCURL_CA_BUNDLE="${CURL_CA_BUNDLE}") + endif() + # Optionally build with a specific CA cert dir. + if(CURL_CA_PATH) + add_definitions(-DCURL_CA_PATH="${CURL_CA_PATH}") + endif() +endif() + +if(CMAKE_USE_MBEDTLS) + find_package(MbedTLS REQUIRED) + set(SSL_ENABLED ON) + set(USE_MBEDTLS ON) + list(APPEND CURL_LIBS ${MBEDTLS_LIBRARIES}) - include_directories(${MBEDTLS_INCLUDE_DIR}) ++ include_directories(${MBEDTLS_INCLUDE_DIRS}) +endif() + +option(USE_NGHTTP2 "Use Nghttp2 library" OFF) +if(USE_NGHTTP2) + find_package(NGHTTP2 REQUIRED) + include_directories(${NGHTTP2_INCLUDE_DIRS}) + list(APPEND CURL_LIBS ${NGHTTP2_LIBRARIES}) +endif() + +if(NOT CURL_DISABLE_LDAP) + if(WIN32) + option(USE_WIN32_LDAP "Use Windows LDAP implementation" ON) + if(USE_WIN32_LDAP) + check_library_exists_concat("wldap32" cldap_open HAVE_WLDAP32) + if(NOT HAVE_WLDAP32) + set(USE_WIN32_LDAP OFF) + endif() + endif() + endif() + + option(CMAKE_USE_OPENLDAP "Use OpenLDAP code." OFF) + mark_as_advanced(CMAKE_USE_OPENLDAP) + set(CMAKE_LDAP_LIB "ldap" CACHE STRING "Name or full path to ldap library") + set(CMAKE_LBER_LIB "lber" CACHE STRING "Name or full path to lber library") + + if(CMAKE_USE_OPENLDAP AND USE_WIN32_LDAP) + message(FATAL_ERROR "Cannot use USE_WIN32_LDAP and CMAKE_USE_OPENLDAP at the same time") + endif() + + # Now that we know, we're not using windows LDAP... + if(USE_WIN32_LDAP) + check_include_file_concat("winldap.h" HAVE_WINLDAP_H) + check_include_file_concat("winber.h" HAVE_WINBER_H) + else() + # Check for LDAP + set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) + check_library_exists_concat(${CMAKE_LDAP_LIB} ldap_init HAVE_LIBLDAP) + check_library_exists_concat(${CMAKE_LBER_LIB} ber_init HAVE_LIBLBER) + + set(CMAKE_REQUIRED_INCLUDES_BAK ${CMAKE_REQUIRED_INCLUDES}) + set(CMAKE_LDAP_INCLUDE_DIR "" CACHE STRING "Path to LDAP include directory") + if(CMAKE_LDAP_INCLUDE_DIR) + list(APPEND CMAKE_REQUIRED_INCLUDES ${CMAKE_LDAP_INCLUDE_DIR}) + endif() + check_include_file_concat("ldap.h" HAVE_LDAP_H) + check_include_file_concat("lber.h" HAVE_LBER_H) + + if(NOT HAVE_LDAP_H) + message(STATUS "LDAP_H not found CURL_DISABLE_LDAP set ON") + set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE) + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_BAK}) #LDAP includes won't be used + elseif(NOT HAVE_LIBLDAP) + message(STATUS "LDAP library '${CMAKE_LDAP_LIB}' not found CURL_DISABLE_LDAP set ON") + set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE) + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_BAK}) #LDAP includes won't be used + else() + if(CMAKE_USE_OPENLDAP) + set(USE_OPENLDAP ON) + endif() + if(CMAKE_LDAP_INCLUDE_DIR) + include_directories(${CMAKE_LDAP_INCLUDE_DIR}) + endif() + set(NEED_LBER_H ON) + set(_HEADER_LIST) + if(HAVE_WINDOWS_H) + list(APPEND _HEADER_LIST "windows.h") + endif() + if(HAVE_SYS_TYPES_H) + list(APPEND _HEADER_LIST "sys/types.h") + endif() + list(APPEND _HEADER_LIST "ldap.h") + + set(_SRC_STRING "") + foreach(_HEADER ${_HEADER_LIST}) + set(_INCLUDE_STRING "${_INCLUDE_STRING}#include <${_HEADER}>\n") + endforeach() + + set(_SRC_STRING + " + ${_INCLUDE_STRING} + int main(int argc, char ** argv) + { + BerValue *bvp = NULL; + BerElement *bep = ber_init(bvp); + ber_free(bep, 1); + return 0; + }" + ) + set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -DLDAP_DEPRECATED=1") + list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LDAP_LIB}) + if(HAVE_LIBLBER) + list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LBER_LIB}) + endif() + check_c_source_compiles("${_SRC_STRING}" NOT_NEED_LBER_H) + + if(NOT_NEED_LBER_H) + set(NEED_LBER_H OFF) + else() + set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -DNEED_LBER_H") + endif() + endif() + endif() + +endif() + +# No ldap, no ldaps. +if(CURL_DISABLE_LDAP) + if(NOT CURL_DISABLE_LDAPS) + message(STATUS "LDAP needs to be enabled to support LDAPS") + set(CURL_DISABLE_LDAPS ON CACHE BOOL "" FORCE) + endif() +endif() + +if(NOT CURL_DISABLE_LDAPS) + check_include_file_concat("ldap_ssl.h" HAVE_LDAP_SSL_H) + check_include_file_concat("ldapssl.h" HAVE_LDAPSSL_H) +endif() + +# Check for idn +check_library_exists_concat("idn2" idn2_lookup_ul HAVE_LIBIDN2) + +# Check for symbol dlopen (same as HAVE_LIBDL) +check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN) + +if(0) # This code not needed for building within CMake. +option(CURL_ZLIB "Set to ON to enable building curl with zlib support." ON) +set(HAVE_LIBZ OFF) +set(HAVE_ZLIB_H OFF) +set(HAVE_ZLIB OFF) +if(CURL_ZLIB) + find_package(ZLIB QUIET) + if(ZLIB_FOUND) + set(HAVE_ZLIB_H ON) + set(HAVE_ZLIB ON) + set(HAVE_LIBZ ON) + list(APPEND CURL_LIBS ${ZLIB_LIBRARIES}) + include_directories(${ZLIB_INCLUDE_DIRS}) + list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS}) + endif() +endif() +endif() + +#----------------------------------------------------------------------------- +# CMake-specific curl code. + +if(CURL_SPECIAL_LIBZ) + set(CURL_LIBS ${CURL_LIBS} "${CURL_SPECIAL_LIBZ}") + include_directories(${CURL_SPECIAL_LIBZ_INCLUDES}) + set(HAVE_LIBZ 0) + set(HAVE_ZLIB_H 0) +endif() + +#libSSH2 +option(CMAKE_USE_LIBSSH2 "Use libSSH2" ON) +mark_as_advanced(CMAKE_USE_LIBSSH2) +set(USE_LIBSSH2 OFF) +set(HAVE_LIBSSH2 OFF) +set(HAVE_LIBSSH2_H OFF) + +if(CMAKE_USE_LIBSSH2) + find_package(LibSSH2) + if(LIBSSH2_FOUND) + list(APPEND CURL_LIBS ${LIBSSH2_LIBRARY}) + set(CMAKE_REQUIRED_LIBRARIES ${LIBSSH2_LIBRARY}) + list(APPEND CMAKE_REQUIRED_INCLUDES "${LIBSSH2_INCLUDE_DIR}") + include_directories("${LIBSSH2_INCLUDE_DIR}") + set(HAVE_LIBSSH2 ON) + set(USE_LIBSSH2 ON) + + # find_package has already found the headers + set(HAVE_LIBSSH2_H ON) + set(CURL_INCLUDES ${CURL_INCLUDES} "${LIBSSH2_INCLUDE_DIR}/libssh2.h") + set(CURL_TEST_DEFINES "${CURL_TEST_DEFINES} -DHAVE_LIBSSH2_H") + + # now check for specific libssh2 symbols as they were added in different versions + set(CMAKE_EXTRA_INCLUDE_FILES "libssh2.h") + check_function_exists(libssh2_version HAVE_LIBSSH2_VERSION) + check_function_exists(libssh2_init HAVE_LIBSSH2_INIT) + check_function_exists(libssh2_exit HAVE_LIBSSH2_EXIT) + check_function_exists(libssh2_scp_send64 HAVE_LIBSSH2_SCP_SEND64) + check_function_exists(libssh2_session_handshake HAVE_LIBSSH2_SESSION_HANDSHAKE) + set(CMAKE_EXTRA_INCLUDE_FILES "") + + endif(LIBSSH2_FOUND) +endif(CMAKE_USE_LIBSSH2) + +option(CMAKE_USE_GSSAPI "Use GSSAPI implementation (right now only Heimdal is supported with CMake build)" OFF) +mark_as_advanced(CMAKE_USE_GSSAPI) + +if(CMAKE_USE_GSSAPI) + find_package(GSS) + + set(HAVE_GSSAPI ${GSS_FOUND}) + if(GSS_FOUND) + + message(STATUS "Found ${GSS_FLAVOUR} GSSAPI version: \"${GSS_VERSION}\"") + + list(APPEND CMAKE_REQUIRED_INCLUDES ${GSS_INCLUDE_DIRECTORIES}) + check_include_file_concat("gssapi/gssapi.h" HAVE_GSSAPI_GSSAPI_H) + check_include_file_concat("gssapi/gssapi_generic.h" HAVE_GSSAPI_GSSAPI_GENERIC_H) + check_include_file_concat("gssapi/gssapi_krb5.h" HAVE_GSSAPI_GSSAPI_KRB5_H) + + if(GSS_FLAVOUR STREQUAL "Heimdal") + set(HAVE_GSSHEIMDAL ON) + else() # MIT + set(HAVE_GSSMIT ON) + set(_INCLUDE_LIST "") + if(HAVE_GSSAPI_GSSAPI_H) + list(APPEND _INCLUDE_LIST "gssapi/gssapi.h") + endif() + if(HAVE_GSSAPI_GSSAPI_GENERIC_H) + list(APPEND _INCLUDE_LIST "gssapi/gssapi_generic.h") + endif() + if(HAVE_GSSAPI_GSSAPI_KRB5_H) + list(APPEND _INCLUDE_LIST "gssapi/gssapi_krb5.h") + endif() + + string(REPLACE ";" " " _COMPILER_FLAGS_STR "${GSS_COMPILER_FLAGS}") + string(REPLACE ";" " " _LINKER_FLAGS_STR "${GSS_LINKER_FLAGS}") + + foreach(_dir ${GSS_LINK_DIRECTORIES}) + set(_LINKER_FLAGS_STR "${_LINKER_FLAGS_STR} -L\"${_dir}\"") + endforeach() + + set(CMAKE_REQUIRED_FLAGS "${_COMPILER_FLAGS_STR} ${_LINKER_FLAGS_STR}") + set(CMAKE_REQUIRED_LIBRARIES ${GSS_LIBRARIES}) + check_symbol_exists("GSS_C_NT_HOSTBASED_SERVICE" ${_INCLUDE_LIST} HAVE_GSS_C_NT_HOSTBASED_SERVICE) + if(NOT HAVE_GSS_C_NT_HOSTBASED_SERVICE) + set(HAVE_OLD_GSSMIT ON) + endif() + + endif() + + include_directories(${GSS_INCLUDE_DIRECTORIES}) + link_directories(${GSS_LINK_DIRECTORIES}) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GSS_COMPILER_FLAGS}") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GSS_LINKER_FLAGS}") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GSS_LINKER_FLAGS}") + list(APPEND CURL_LIBS ${GSS_LIBRARIES}) + + else() + message(WARNING "GSSAPI support has been requested but no supporting libraries found. Skipping.") + endif() +endif() + +option(ENABLE_UNIX_SOCKETS "Define if you want Unix domain sockets support" ON) +if(ENABLE_UNIX_SOCKETS) + include(CheckStructHasMember) + check_struct_has_member("struct sockaddr_un" sun_path "sys/un.h" USE_UNIX_SOCKETS) +else() + unset(USE_UNIX_SOCKETS CACHE) +endif() + + ++if(0) # This code not needed for building within CMake. ++# ++# CA handling ++# ++set(CURL_CA_BUNDLE "auto" CACHE STRING ++ "Path to the CA bundle. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.") ++set(CURL_CA_FALLBACK OFF CACHE BOOL ++ "Set ON to use built-in CA store of TLS backend. Defaults to OFF") ++set(CURL_CA_PATH "auto" CACHE STRING ++ "Location of default CA path. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.") ++ ++if("${CURL_CA_BUNDLE}" STREQUAL "") ++ message(FATAL_ERROR "Invalid value of CURL_CA_BUNDLE. Use 'none', 'auto' or file path.") ++elseif("${CURL_CA_BUNDLE}" STREQUAL "none") ++ unset(CURL_CA_BUNDLE CACHE) ++elseif("${CURL_CA_BUNDLE}" STREQUAL "auto") ++ unset(CURL_CA_BUNDLE CACHE) ++ set(CURL_CA_BUNDLE_AUTODETECT TRUE) ++else() ++ set(CURL_CA_BUNDLE_SET TRUE) ++endif() ++ ++if("${CURL_CA_PATH}" STREQUAL "") ++ message(FATAL_ERROR "Invalid value of CURL_CA_PATH. Use 'none', 'auto' or directory path.") ++elseif("${CURL_CA_PATH}" STREQUAL "none") ++ unset(CURL_CA_PATH CACHE) ++elseif("${CURL_CA_PATH}" STREQUAL "auto") ++ unset(CURL_CA_PATH CACHE) ++ set(CURL_CA_PATH_AUTODETECT TRUE) ++else() ++ set(CURL_CA_PATH_SET TRUE) ++endif() ++ ++if(CURL_CA_BUNDLE_SET AND CURL_CA_PATH_AUTODETECT) ++ # Skip autodetection of unset CA path because CA bundle is set explicitly ++elseif(CURL_CA_PATH_SET AND CURL_CA_BUNDLE_AUTODETECT) ++ # Skip autodetection of unset CA bundle because CA path is set explicitly ++elseif(CURL_CA_PATH_AUTODETECT OR CURL_CA_BUNDLE_AUTODETECT) ++ # first try autodetecting a CA bundle, then a CA path ++ ++ if(CURL_CA_BUNDLE_AUTODETECT) ++ set(SEARCH_CA_BUNDLE_PATHS ++ /etc/ssl/certs/ca-certificates.crt ++ /etc/pki/tls/certs/ca-bundle.crt ++ /usr/share/ssl/certs/ca-bundle.crt ++ /usr/local/share/certs/ca-root-nss.crt ++ /etc/ssl/cert.pem) ++ ++ foreach(SEARCH_CA_BUNDLE_PATH ${SEARCH_CA_BUNDLE_PATHS}) ++ if(EXISTS "${SEARCH_CA_BUNDLE_PATH}") ++ message(STATUS "Found CA bundle: ${SEARCH_CA_BUNDLE_PATH}") ++ set(CURL_CA_BUNDLE "${SEARCH_CA_BUNDLE_PATH}") ++ set(CURL_CA_BUNDLE_SET TRUE CACHE BOOL "Path to the CA bundle has been set") ++ break() ++ endif() ++ endforeach() ++ endif() ++ ++ if(CURL_CA_PATH_AUTODETECT AND (NOT CURL_CA_PATH_SET)) ++ if(EXISTS "/etc/ssl/certs") ++ set(CURL_CA_PATH "/etc/ssl/certs") ++ set(CURL_CA_PATH_SET TRUE CACHE BOOL "Path to the CA bundle has been set") ++ endif() ++ endif() ++endif() ++ ++if(CURL_CA_PATH_SET AND NOT USE_OPENSSL AND NOT USE_MBEDTLS) ++ message(FATAL_ERROR ++ "CA path only supported by OpenSSL, GnuTLS or mbed TLS. " ++ "Set CURL_CA_PATH=none or enable one of those TLS backends.") ++endif() ++endif() ++ ++ +# Check for header files +if(NOT UNIX) + check_include_file_concat("windows.h" HAVE_WINDOWS_H) + check_include_file_concat("winsock.h" HAVE_WINSOCK_H) + check_include_file_concat("ws2tcpip.h" HAVE_WS2TCPIP_H) + check_include_file_concat("winsock2.h" HAVE_WINSOCK2_H) + if(NOT CURL_WINDOWS_SSPI AND USE_OPENSSL) + set(CURL_LIBS ${CURL_LIBS} "crypt32") + endif() +else() + set(HAVE_WINDOWS_H 0) + set(HAVE_WINSOCK_H 0) + set(HAVE_WS2TCPIP_H 0) + set(HAVE_WINSOCK2_H 0) +endif() + +check_include_file_concat("stdio.h" HAVE_STDIO_H) +check_include_file_concat("inttypes.h" HAVE_INTTYPES_H) +check_include_file_concat("sys/filio.h" HAVE_SYS_FILIO_H) +check_include_file_concat("sys/ioctl.h" HAVE_SYS_IOCTL_H) +check_include_file_concat("sys/param.h" HAVE_SYS_PARAM_H) +check_include_file_concat("sys/poll.h" HAVE_SYS_POLL_H) +check_include_file_concat("sys/resource.h" HAVE_SYS_RESOURCE_H) +check_include_file_concat("sys/select.h" HAVE_SYS_SELECT_H) +check_include_file_concat("sys/socket.h" HAVE_SYS_SOCKET_H) +check_include_file_concat("sys/sockio.h" HAVE_SYS_SOCKIO_H) +check_include_file_concat("sys/stat.h" HAVE_SYS_STAT_H) +check_include_file_concat("sys/time.h" HAVE_SYS_TIME_H) +check_include_file_concat("sys/types.h" HAVE_SYS_TYPES_H) +check_include_file_concat("sys/uio.h" HAVE_SYS_UIO_H) +check_include_file_concat("sys/un.h" HAVE_SYS_UN_H) +check_include_file_concat("sys/utime.h" HAVE_SYS_UTIME_H) +check_include_file_concat("sys/xattr.h" HAVE_SYS_XATTR_H) +check_include_file_concat("alloca.h" HAVE_ALLOCA_H) +check_include_file_concat("arpa/inet.h" HAVE_ARPA_INET_H) +check_include_file_concat("arpa/tftp.h" HAVE_ARPA_TFTP_H) +check_include_file_concat("assert.h" HAVE_ASSERT_H) +check_include_file_concat("crypto.h" HAVE_CRYPTO_H) +check_include_file_concat("des.h" HAVE_DES_H) +check_include_file_concat("err.h" HAVE_ERR_H) +check_include_file_concat("errno.h" HAVE_ERRNO_H) +check_include_file_concat("fcntl.h" HAVE_FCNTL_H) +check_include_file_concat("idn2.h" HAVE_IDN2_H) +check_include_file_concat("ifaddrs.h" HAVE_IFADDRS_H) +check_include_file_concat("io.h" HAVE_IO_H) +check_include_file_concat("krb.h" HAVE_KRB_H) +check_include_file_concat("libgen.h" HAVE_LIBGEN_H) +check_include_file_concat("limits.h" HAVE_LIMITS_H) +check_include_file_concat("locale.h" HAVE_LOCALE_H) +check_include_file_concat("net/if.h" HAVE_NET_IF_H) +check_include_file_concat("netdb.h" HAVE_NETDB_H) +check_include_file_concat("netinet/in.h" HAVE_NETINET_IN_H) +check_include_file_concat("netinet/tcp.h" HAVE_NETINET_TCP_H) + +check_include_file_concat("pem.h" HAVE_PEM_H) +check_include_file_concat("poll.h" HAVE_POLL_H) +check_include_file_concat("pwd.h" HAVE_PWD_H) +check_include_file_concat("rsa.h" HAVE_RSA_H) +check_include_file_concat("setjmp.h" HAVE_SETJMP_H) +check_include_file_concat("sgtty.h" HAVE_SGTTY_H) +check_include_file_concat("signal.h" HAVE_SIGNAL_H) +check_include_file_concat("ssl.h" HAVE_SSL_H) +check_include_file_concat("stdbool.h" HAVE_STDBOOL_H) +check_include_file_concat("stdint.h" HAVE_STDINT_H) +check_include_file_concat("stdio.h" HAVE_STDIO_H) +check_include_file_concat("stdlib.h" HAVE_STDLIB_H) +check_include_file_concat("string.h" HAVE_STRING_H) +check_include_file_concat("strings.h" HAVE_STRINGS_H) +check_include_file_concat("stropts.h" HAVE_STROPTS_H) +check_include_file_concat("termio.h" HAVE_TERMIO_H) +check_include_file_concat("termios.h" HAVE_TERMIOS_H) +check_include_file_concat("time.h" HAVE_TIME_H) +check_include_file_concat("unistd.h" HAVE_UNISTD_H) +check_include_file_concat("utime.h" HAVE_UTIME_H) +check_include_file_concat("x509.h" HAVE_X509_H) + +check_include_file_concat("process.h" HAVE_PROCESS_H) +check_include_file_concat("stddef.h" HAVE_STDDEF_H) +check_include_file_concat("dlfcn.h" HAVE_DLFCN_H) +check_include_file_concat("malloc.h" HAVE_MALLOC_H) +check_include_file_concat("memory.h" HAVE_MEMORY_H) +check_include_file_concat("netinet/if_ether.h" HAVE_NETINET_IF_ETHER_H) +check_include_file_concat("stdint.h" HAVE_STDINT_H) +check_include_file_concat("sockio.h" HAVE_SOCKIO_H) +check_include_file_concat("sys/utsname.h" HAVE_SYS_UTSNAME_H) + +check_type_size(size_t SIZEOF_SIZE_T) +check_type_size(ssize_t SIZEOF_SSIZE_T) +check_type_size("long long" SIZEOF_LONG_LONG) +check_type_size("long" SIZEOF_LONG) +check_type_size("short" SIZEOF_SHORT) +check_type_size("int" SIZEOF_INT) +check_type_size("__int64" SIZEOF___INT64) +check_type_size("time_t" SIZEOF_TIME_T) + +# Make public versions of some type sizes for curlbuild.h. +foreach(t INT LONG LONG_LONG SSIZE_T) + string(REPLACE "SIZEOF_" "CURL_SIZEOF_" CURL_SIZEOF_${t}_CODE "${SIZEOF_${t}_CODE}") +endforeach() + +if(HAVE_SIZEOF_LONG_LONG) + set(HAVE_LONGLONG 1) + set(HAVE_LL 1) +endif(HAVE_SIZEOF_LONG_LONG) + +find_file(RANDOM_FILE urandom /dev) +mark_as_advanced(RANDOM_FILE) + +# Check for some functions that are used +if(HAVE_LIBWS2_32) + set(CMAKE_REQUIRED_LIBRARIES ws2_32) +elseif(HAVE_LIBSOCKET) + set(CMAKE_REQUIRED_LIBRARIES socket) +endif() + +check_symbol_exists(basename "${CURL_INCLUDES}" HAVE_BASENAME) +check_symbol_exists(socket "${CURL_INCLUDES}" HAVE_SOCKET) +# poll on macOS is unreliable, it first did not exist, then was broken until +# fixed in 10.9 only to break again in 10.12. +if(NOT APPLE) + check_symbol_exists(poll "${CURL_INCLUDES}" HAVE_POLL) +endif() +check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT) +check_symbol_exists(strdup "${CURL_INCLUDES}" HAVE_STRDUP) +check_symbol_exists(strstr "${CURL_INCLUDES}" HAVE_STRSTR) +check_symbol_exists(strtok_r "${CURL_INCLUDES}" HAVE_STRTOK_R) +check_symbol_exists(strftime "${CURL_INCLUDES}" HAVE_STRFTIME) +check_symbol_exists(uname "${CURL_INCLUDES}" HAVE_UNAME) +check_symbol_exists(strcasecmp "${CURL_INCLUDES}" HAVE_STRCASECMP) +check_symbol_exists(stricmp "${CURL_INCLUDES}" HAVE_STRICMP) +check_symbol_exists(strcmpi "${CURL_INCLUDES}" HAVE_STRCMPI) +check_symbol_exists(strncmpi "${CURL_INCLUDES}" HAVE_STRNCMPI) +check_symbol_exists(alarm "${CURL_INCLUDES}" HAVE_ALARM) +if(NOT HAVE_STRNCMPI) + set(HAVE_STRCMPI) +endif(NOT HAVE_STRNCMPI) +check_symbol_exists(gethostbyaddr "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR) +check_symbol_exists(gethostbyaddr_r "${CURL_INCLUDES}" HAVE_GETHOSTBYADDR_R) +check_symbol_exists(gettimeofday "${CURL_INCLUDES}" HAVE_GETTIMEOFDAY) +check_symbol_exists(inet_addr "${CURL_INCLUDES}" HAVE_INET_ADDR) +check_symbol_exists(inet_ntoa "${CURL_INCLUDES}" HAVE_INET_NTOA) +check_symbol_exists(inet_ntoa_r "${CURL_INCLUDES}" HAVE_INET_NTOA_R) +check_symbol_exists(tcsetattr "${CURL_INCLUDES}" HAVE_TCSETATTR) +check_symbol_exists(tcgetattr "${CURL_INCLUDES}" HAVE_TCGETATTR) +check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR) +check_symbol_exists(closesocket "${CURL_INCLUDES}" HAVE_CLOSESOCKET) +check_symbol_exists(setvbuf "${CURL_INCLUDES}" HAVE_SETVBUF) +check_symbol_exists(sigsetjmp "${CURL_INCLUDES}" HAVE_SIGSETJMP) +check_symbol_exists(getpass_r "${CURL_INCLUDES}" HAVE_GETPASS_R) +check_symbol_exists(strlcat "${CURL_INCLUDES}" HAVE_STRLCAT) +check_symbol_exists(getpwuid "${CURL_INCLUDES}" HAVE_GETPWUID) +check_symbol_exists(geteuid "${CURL_INCLUDES}" HAVE_GETEUID) +check_symbol_exists(utime "${CURL_INCLUDES}" HAVE_UTIME) +check_symbol_exists(gmtime_r "${CURL_INCLUDES}" HAVE_GMTIME_R) +check_symbol_exists(localtime_r "${CURL_INCLUDES}" HAVE_LOCALTIME_R) + +check_symbol_exists(gethostbyname "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME) +check_symbol_exists(gethostbyname_r "${CURL_INCLUDES}" HAVE_GETHOSTBYNAME_R) + +check_symbol_exists(signal "${CURL_INCLUDES}" HAVE_SIGNAL_FUNC) +check_symbol_exists(SIGALRM "${CURL_INCLUDES}" HAVE_SIGNAL_MACRO) +if(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO) + set(HAVE_SIGNAL 1) +endif(HAVE_SIGNAL_FUNC AND HAVE_SIGNAL_MACRO) +check_symbol_exists(uname "${CURL_INCLUDES}" HAVE_UNAME) +check_symbol_exists(strtoll "${CURL_INCLUDES}" HAVE_STRTOLL) +check_symbol_exists(_strtoi64 "${CURL_INCLUDES}" HAVE__STRTOI64) +check_symbol_exists(strerror_r "${CURL_INCLUDES}" HAVE_STRERROR_R) +check_symbol_exists(siginterrupt "${CURL_INCLUDES}" HAVE_SIGINTERRUPT) +check_symbol_exists(perror "${CURL_INCLUDES}" HAVE_PERROR) +check_symbol_exists(fork "${CURL_INCLUDES}" HAVE_FORK) +check_symbol_exists(getaddrinfo "${CURL_INCLUDES}" HAVE_GETADDRINFO) +check_symbol_exists(freeaddrinfo "${CURL_INCLUDES}" HAVE_FREEADDRINFO) +check_symbol_exists(freeifaddrs "${CURL_INCLUDES}" HAVE_FREEIFADDRS) +check_symbol_exists(pipe "${CURL_INCLUDES}" HAVE_PIPE) +check_symbol_exists(ftruncate "${CURL_INCLUDES}" HAVE_FTRUNCATE) +check_symbol_exists(getprotobyname "${CURL_INCLUDES}" HAVE_GETPROTOBYNAME) +check_symbol_exists(getrlimit "${CURL_INCLUDES}" HAVE_GETRLIMIT) +check_symbol_exists(setlocale "${CURL_INCLUDES}" HAVE_SETLOCALE) +check_symbol_exists(setrlimit "${CURL_INCLUDES}" HAVE_SETRLIMIT) +check_symbol_exists(fcntl "${CURL_INCLUDES}" HAVE_FCNTL) +check_symbol_exists(ioctl "${CURL_INCLUDES}" HAVE_IOCTL) +check_symbol_exists(setsockopt "${CURL_INCLUDES}" HAVE_SETSOCKOPT) + +# symbol exists in win32, but function does not. +check_function_exists(inet_pton HAVE_INET_PTON) + +check_symbol_exists(fsetxattr "${CURL_INCLUDES}" HAVE_FSETXATTR) +if(HAVE_FSETXATTR) + foreach(CURL_TEST HAVE_FSETXATTR_5 HAVE_FSETXATTR_6) + curl_internal_test_run(${CURL_TEST}) + endforeach(CURL_TEST) +endif(HAVE_FSETXATTR) + +# sigaction and sigsetjmp are special. Use special mechanism for +# detecting those, but only if previous attempt failed. +if(HAVE_SIGNAL_H) + check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION) +endif(HAVE_SIGNAL_H) + +if(NOT HAVE_SIGSETJMP) + if(HAVE_SETJMP_H) + check_symbol_exists(sigsetjmp "setjmp.h" HAVE_MACRO_SIGSETJMP) + if(HAVE_MACRO_SIGSETJMP) + set(HAVE_SIGSETJMP 1) + endif(HAVE_MACRO_SIGSETJMP) + endif(HAVE_SETJMP_H) +endif(NOT HAVE_SIGSETJMP) + +# If there is no stricmp(), do not allow LDAP to parse URLs +if(NOT HAVE_STRICMP) + set(HAVE_LDAP_URL_PARSE 1) +endif(NOT HAVE_STRICMP) + +# Do curl specific tests +foreach(CURL_TEST + HAVE_FCNTL_O_NONBLOCK + HAVE_IOCTLSOCKET + HAVE_IOCTLSOCKET_CAMEL + HAVE_IOCTLSOCKET_CAMEL_FIONBIO + HAVE_IOCTLSOCKET_FIONBIO + HAVE_IOCTL_FIONBIO + HAVE_IOCTL_SIOCGIFADDR + HAVE_SETSOCKOPT_SO_NONBLOCK + HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID + TIME_WITH_SYS_TIME + HAVE_O_NONBLOCK + HAVE_GETHOSTBYADDR_R_5 + HAVE_GETHOSTBYADDR_R_7 + HAVE_GETHOSTBYADDR_R_8 + HAVE_GETHOSTBYADDR_R_5_REENTRANT + HAVE_GETHOSTBYADDR_R_7_REENTRANT + HAVE_GETHOSTBYADDR_R_8_REENTRANT + HAVE_GETHOSTBYNAME_R_3 + HAVE_GETHOSTBYNAME_R_5 + HAVE_GETHOSTBYNAME_R_6 + HAVE_GETHOSTBYNAME_R_3_REENTRANT + HAVE_GETHOSTBYNAME_R_5_REENTRANT + HAVE_GETHOSTBYNAME_R_6_REENTRANT + HAVE_SOCKLEN_T + HAVE_IN_ADDR_T + HAVE_BOOL_T + STDC_HEADERS + RETSIGTYPE_TEST + HAVE_INET_NTOA_R_DECL + HAVE_INET_NTOA_R_DECL_REENTRANT + HAVE_GETADDRINFO + HAVE_FILE_OFFSET_BITS + ) + curl_internal_test(${CURL_TEST}) +endforeach(CURL_TEST) + +if(HAVE_FILE_OFFSET_BITS) + set(_FILE_OFFSET_BITS 64) + set(CMAKE_REQUIRED_FLAGS "-D_FILE_OFFSET_BITS=64") +endif(HAVE_FILE_OFFSET_BITS) +check_type_size("off_t" SIZEOF_OFF_T) +set(CMAKE_REQUIRED_FLAGS) + +foreach(CURL_TEST + HAVE_GLIBC_STRERROR_R + HAVE_POSIX_STRERROR_R + ) + curl_internal_test_run(${CURL_TEST}) +endforeach(CURL_TEST) + +# Check for reentrant +foreach(CURL_TEST + HAVE_GETHOSTBYADDR_R_5 + HAVE_GETHOSTBYADDR_R_7 + HAVE_GETHOSTBYADDR_R_8 + HAVE_GETHOSTBYNAME_R_3 + HAVE_GETHOSTBYNAME_R_5 + HAVE_GETHOSTBYNAME_R_6 + HAVE_INET_NTOA_R_DECL_REENTRANT) + if(NOT ${CURL_TEST}) + if(${CURL_TEST}_REENTRANT) + set(NEED_REENTRANT 1) + endif(${CURL_TEST}_REENTRANT) + endif(NOT ${CURL_TEST}) +endforeach(CURL_TEST) + +if(NEED_REENTRANT) + foreach(CURL_TEST + HAVE_GETHOSTBYADDR_R_5 + HAVE_GETHOSTBYADDR_R_7 + HAVE_GETHOSTBYADDR_R_8 + HAVE_GETHOSTBYNAME_R_3 + HAVE_GETHOSTBYNAME_R_5 + HAVE_GETHOSTBYNAME_R_6) + set(${CURL_TEST} 0) + if(${CURL_TEST}_REENTRANT) + set(${CURL_TEST} 1) + endif(${CURL_TEST}_REENTRANT) + endforeach(CURL_TEST) +endif(NEED_REENTRANT) + +if(HAVE_INET_NTOA_R_DECL_REENTRANT) + set(HAVE_INET_NTOA_R_DECL 1) + set(NEED_REENTRANT 1) +endif(HAVE_INET_NTOA_R_DECL_REENTRANT) + +# Some other minor tests + +if(NOT HAVE_IN_ADDR_T) + set(in_addr_t "unsigned long") +endif(NOT HAVE_IN_ADDR_T) + +# Fix libz / zlib.h + +if(NOT CURL_SPECIAL_LIBZ) + if(NOT HAVE_LIBZ) + set(HAVE_ZLIB_H 0) + endif(NOT HAVE_LIBZ) + + if(NOT HAVE_ZLIB_H) + set(HAVE_LIBZ 0) + endif(NOT HAVE_ZLIB_H) +endif(NOT CURL_SPECIAL_LIBZ) + +# Check for nonblocking +set(HAVE_DISABLED_NONBLOCKING 1) +if(HAVE_FIONBIO OR + HAVE_IOCTLSOCKET OR + HAVE_IOCTLSOCKET_CASE OR + HAVE_O_NONBLOCK) + set(HAVE_DISABLED_NONBLOCKING) +endif(HAVE_FIONBIO OR + HAVE_IOCTLSOCKET OR + HAVE_IOCTLSOCKET_CASE OR + HAVE_O_NONBLOCK) + +if(RETSIGTYPE_TEST) + set(RETSIGTYPE void) +else(RETSIGTYPE_TEST) + set(RETSIGTYPE int) +endif(RETSIGTYPE_TEST) + +if(CMAKE_COMPILER_IS_GNUCC AND APPLE) + include(CheckCCompilerFlag) + check_c_compiler_flag(-Wno-long-double HAVE_C_FLAG_Wno_long_double) + if(HAVE_C_FLAG_Wno_long_double) + # The Mac version of GCC warns about use of long double. Disable it. + get_source_file_property(MPRINTF_COMPILE_FLAGS mprintf.c COMPILE_FLAGS) + if(MPRINTF_COMPILE_FLAGS) + set(MPRINTF_COMPILE_FLAGS "${MPRINTF_COMPILE_FLAGS} -Wno-long-double") + else(MPRINTF_COMPILE_FLAGS) + set(MPRINTF_COMPILE_FLAGS "-Wno-long-double") + endif(MPRINTF_COMPILE_FLAGS) + set_source_files_properties(mprintf.c PROPERTIES + COMPILE_FLAGS ${MPRINTF_COMPILE_FLAGS}) + endif(HAVE_C_FLAG_Wno_long_double) +endif(CMAKE_COMPILER_IS_GNUCC AND APPLE) + +if(HAVE_SOCKLEN_T) + set(CURL_HAVE_SOCKLEN_T 1) + set(CURL_TYPEOF_CURL_SOCKLEN_T "socklen_t") + if(WIN32) + set(CMAKE_EXTRA_INCLUDE_FILES "winsock2.h;ws2tcpip.h") + elseif(HAVE_SYS_SOCKET_H) + set(CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h") + endif() + check_type_size("socklen_t" CURL_SIZEOF_CURL_SOCKLEN_T) + set(CMAKE_EXTRA_INCLUDE_FILES) + if(NOT HAVE_CURL_SIZEOF_CURL_SOCKLEN_T) + message(FATAL_ERROR + "Check for sizeof socklen_t failed, see CMakeFiles/CMakerror.log") + endif() +else() + set(CURL_HAVE_SOCKLEN_T 0) +endif() + +# TODO test which of these headers are required for the typedefs used in curlbuild.h +if(WIN32) + set(CURL_PULL_WS2TCPIP_H ${HAVE_WS2TCPIP_H}) +else() + set(CURL_PULL_SYS_TYPES_H ${HAVE_SYS_TYPES_H}) + set(CURL_PULL_SYS_SOCKET_H ${HAVE_SYS_SOCKET_H}) + set(CURL_PULL_SYS_POLL_H ${HAVE_SYS_POLL_H}) +endif() +set(CURL_PULL_STDINT_H ${HAVE_STDINT_H}) +set(CURL_PULL_INTTYPES_H ${HAVE_INTTYPES_H}) + +include(CMake/OtherTests.cmake) + +add_definitions(-DHAVE_CONFIG_H) + +# For windows, do not allow the compiler to use default target (Vista). +if(WIN32) + add_definitions(-D_WIN32_WINNT=0x0501) +endif(WIN32) + +# For windows, all compilers used by cmake should support large files +if(WIN32) + set(USE_WIN32_LARGE_FILES ON) +endif(WIN32) + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) +endif(MSVC) + +# Ugly (but functional) way to include "Makefile.inc" by transforming it (= regenerate it). +function(TRANSFORM_MAKEFILE_INC INPUT_FILE OUTPUT_FILE) + file(READ ${INPUT_FILE} MAKEFILE_INC_TEXT) + string(REPLACE "$(top_srcdir)" "\${CURL_SOURCE_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) + string(REPLACE "$(top_builddir)" "\${CURL_BINARY_DIR}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) + + string(REGEX REPLACE "\\\\\n" "!?!?!" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) + string(REGEX REPLACE "([a-zA-Z_][a-zA-Z0-9_]*)[\t ]*=[\t ]*([^\n]*)" "SET(\\1 \\2)" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) + string(REPLACE "!?!?!" "\n" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) + + string(REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace $() with ${} + string(REGEX REPLACE "@([a-zA-Z_][a-zA-Z0-9_]*)@" "\${\\1}" MAKEFILE_INC_TEXT ${MAKEFILE_INC_TEXT}) # Replace @@ with ${}, even if that may not be read by CMake scripts. + file(WRITE ${OUTPUT_FILE} ${MAKEFILE_INC_TEXT}) + +endfunction() + +if(0) # This code not needed for building within CMake. +add_subdirectory(docs) +endif() +add_subdirectory(lib) +if(BUILD_CURL_EXE) + add_subdirectory(src) +endif() + +#----------------------------------------------------------------------------- +# CMake-specific curl code. +add_executable(LIBCURL curltest.c) +target_link_libraries(LIBCURL cmcurl) + +if(CMAKE_CURL_TEST_URL) + add_test(curl LIBCURL ${CMAKE_CURL_TEST_URL}) +endif() + +install(FILES COPYING DESTINATION ${CMAKE_DOC_DIR}/cmcurl) +#----------------------------------------------------------------------------- + +if(0) # This code not needed for building within CMake. +include(CTest) +if(BUILD_TESTING) + add_subdirectory(tests) +endif() + +# Helper to populate a list (_items) with a label when conditions (the remaining +# args) are satisfied +function(_add_if label) + # TODO need to disable policy CMP0054 (CMake 3.1) to allow this indirection + if(${ARGN}) + set(_items ${_items} "${label}" PARENT_SCOPE) + endif() +endfunction() + +# Clear list and try to detect available features +set(_items) +_add_if("WinSSL" SSL_ENABLED AND USE_WINDOWS_SSPI) +_add_if("OpenSSL" SSL_ENABLED AND USE_OPENSSL) +_add_if("DarwinSSL" SSL_ENABLED AND USE_DARWINSSL) +_add_if("mbedTLS" SSL_ENABLED AND USE_MBEDTLS) +_add_if("IPv6" ENABLE_IPV6) +_add_if("unix-sockets" USE_UNIX_SOCKETS) +_add_if("libz" HAVE_LIBZ) +_add_if("AsynchDNS" USE_ARES OR USE_THREADS_POSIX OR USE_THREADS_WIN32) +_add_if("IDN" HAVE_LIBIDN2) +_add_if("Largefile" (CURL_SIZEOF_CURL_OFF_T GREATER 4) AND + ((SIZEOF_OFF_T GREATER 4) OR USE_WIN32_LARGE_FILES)) +# TODO SSP1 (WinSSL) check is missing +_add_if("SSPI" USE_WINDOWS_SSPI) +_add_if("GSS-API" HAVE_GSSAPI) +# TODO SSP1 missing for SPNEGO +_add_if("SPNEGO" NOT CURL_DISABLE_CRYPTO_AUTH AND + (HAVE_GSSAPI OR USE_WINDOWS_SSPI)) +_add_if("Kerberos" NOT CURL_DISABLE_CRYPTO_AUTH AND + (HAVE_GSSAPI OR USE_WINDOWS_SSPI)) +# NTLM support requires crypto function adaptions from various SSL libs +# TODO alternative SSL libs tests for SSP1, GNUTLS, NSS - if(NOT CURL_DISABLE_CRYPTO_AUTH AND (USE_OPENSSL OR - USE_WINDOWS_SSPI OR GNUTLS_ENABLED OR NSS_ENABLED OR USE_DARWINSSL OR USE_MBEDTLS)) ++if(NOT CURL_DISABLE_CRYPTO_AUTH AND (USE_OPENSSL OR USE_WINDOWS_SSPI OR USE_DARWINSSL OR USE_MBEDTLS)) + _add_if("NTLM" 1) + # TODO missing option (autoconf: --enable-ntlm-wb) + _add_if("NTLM_WB" NOT CURL_DISABLE_HTTP AND NTLM_WB_ENABLED) +endif() +# TODO missing option (--enable-tls-srp), depends on GNUTLS_SRP/OPENSSL_SRP +_add_if("TLS-SRP" USE_TLS_SRP) +# TODO option --with-nghttp2 tests for nghttp2 lib and nghttp2/nghttp2.h header +_add_if("HTTP2" USE_NGHTTP2) +string(REPLACE ";" " " SUPPORT_FEATURES "${_items}") +message(STATUS "Enabled features: ${SUPPORT_FEATURES}") + +# Clear list and try to detect available protocols +set(_items) +_add_if("HTTP" NOT CURL_DISABLE_HTTP) +_add_if("HTTPS" NOT CURL_DISABLE_HTTP AND SSL_ENABLED) +_add_if("FTP" NOT CURL_DISABLE_FTP) +_add_if("FTPS" NOT CURL_DISABLE_FTP AND SSL_ENABLED) +_add_if("FILE" NOT CURL_DISABLE_FILE) +_add_if("TELNET" NOT CURL_DISABLE_TELNET) +_add_if("LDAP" NOT CURL_DISABLE_LDAP) +# CURL_DISABLE_LDAP implies CURL_DISABLE_LDAPS +# TODO check HAVE_LDAP_SSL (in autoconf this is enabled with --enable-ldaps) +_add_if("LDAPS" NOT CURL_DISABLE_LDAPS AND + ((USE_OPENLDAP AND SSL_ENABLED) OR + (NOT USE_OPENLDAP AND HAVE_LDAP_SSL))) +_add_if("DICT" NOT CURL_DISABLE_DICT) +_add_if("TFTP" NOT CURL_DISABLE_TFTP) +_add_if("GOPHER" NOT CURL_DISABLE_GOPHER) +_add_if("POP3" NOT CURL_DISABLE_POP3) +_add_if("POP3S" NOT CURL_DISABLE_POP3 AND SSL_ENABLED) +_add_if("IMAP" NOT CURL_DISABLE_IMAP) +_add_if("IMAPS" NOT CURL_DISABLE_IMAP AND SSL_ENABLED) +_add_if("SMTP" NOT CURL_DISABLE_SMTP) +_add_if("SMTPS" NOT CURL_DISABLE_SMTP AND SSL_ENABLED) +_add_if("SCP" USE_LIBSSH2) +_add_if("SFTP" USE_LIBSSH2) +_add_if("RTSP" NOT CURL_DISABLE_RTSP) +_add_if("RTMP" USE_LIBRTMP) +list(SORT _items) +string(REPLACE ";" " " SUPPORT_PROTOCOLS "${_items}") +message(STATUS "Enabled protocols: ${SUPPORT_PROTOCOLS}") + +# curl-config needs the following options to be set. +set(CC "${CMAKE_C_COMPILER}") +# TODO probably put a -D... options here? +set(CONFIGURE_OPTIONS "") +# TODO when to set "-DCURL_STATICLIB" for CPPFLAG_CURL_STATICLIB? +set(CPPFLAG_CURL_STATICLIB "") - # TODO need to set this (see CURL_CHECK_CA_BUNDLE in acinclude.m4) - set(CURL_CA_BUNDLE "") +set(CURLVERSION "${CURL_VERSION}") +set(ENABLE_SHARED "yes") +if(CURL_STATICLIB) + set(ENABLE_STATIC "yes") +else() + set(ENABLE_STATIC "no") +endif() +set(exec_prefix "\${prefix}") +set(includedir "\${prefix}/include") +set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}") +set(LIBCURL_LIBS "") +set(libdir "${CMAKE_INSTALL_PREFIX}/lib") +foreach(_lib ${CMAKE_C_IMPLICIT_LINK_LIBRARIES} ${CURL_LIBS}) + if(_lib MATCHES ".*/.*") + set(LIBCURL_LIBS "${LIBCURL_LIBS} ${_lib}") + else() + set(LIBCURL_LIBS "${LIBCURL_LIBS} -l${_lib}") + endif() +endforeach() +# "a" (Linux) or "lib" (Windows) +string(REPLACE "." "" libext "${CMAKE_STATIC_LIBRARY_SUFFIX}") +set(prefix "${CMAKE_INSTALL_PREFIX}") +# Set this to "yes" to append all libraries on which -lcurl is dependent +set(REQUIRE_LIB_DEPS "no") +# SUPPORT_FEATURES +# SUPPORT_PROTOCOLS +set(VERSIONNUM "${CURL_VERSION_NUM}") + +# Finally generate a "curl-config" matching this config +configure_file("${CURL_SOURCE_DIR}/curl-config.in" + "${CURL_BINARY_DIR}/curl-config" @ONLY) +install(FILES "${CURL_BINARY_DIR}/curl-config" + DESTINATION bin + PERMISSIONS + OWNER_READ OWNER_WRITE OWNER_EXECUTE + GROUP_READ GROUP_EXECUTE + WORLD_READ WORLD_EXECUTE) + +# Finally generate a pkg-config file matching this config +configure_file("${CURL_SOURCE_DIR}/libcurl.pc.in" + "${CURL_BINARY_DIR}/libcurl.pc" @ONLY) +install(FILES "${CURL_BINARY_DIR}/libcurl.pc" + DESTINATION lib/pkgconfig) + +# This needs to be run very last so other parts of the scripts can take advantage of this. +if(NOT CURL_CONFIG_HAS_BEEN_RUN_BEFORE) + set(CURL_CONFIG_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before") +endif() + +# Installation. +# First, install generated curlbuild.h +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/include/curl/curlbuild.h" + DESTINATION include/curl ) +# Next, install other headers excluding curlbuild.h +install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/curl" + DESTINATION include + FILES_MATCHING PATTERN "*.h" + PATTERN "curlbuild.h" EXCLUDE) + + +# Workaround for MSVS10 to avoid the Dialog Hell +# FIXME: This could be removed with future version of CMake. +if(MSVC_VERSION EQUAL 1600) + set(CURL_SLN_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/CURL.sln") + if(EXISTS "${CURL_SLN_FILENAME}") + file(APPEND "${CURL_SLN_FILENAME}" "\n# This should be regenerated!\n") + endif() +endif() +endif() diff --cc Utilities/cmcurl/include/curl/curl.h index b19dd42,0000000..3955212 mode 100644,000000..100644 --- a/Utilities/cmcurl/include/curl/curl.h +++ b/Utilities/cmcurl/include/curl/curl.h @@@ -1,2554 -1,0 +1,2555 @@@ +#ifndef __CURL_CURL_H +#define __CURL_CURL_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* + * If you have libcurl problems, all docs and details are found here: + * https://curl.haxx.se/libcurl/ + * + * curl-library mailing list subscription and unsubscription web interface: + * https://cool.haxx.se/mailman/listinfo/curl-library/ + */ + +#ifdef CURL_NO_OLDIES +#define CURL_STRICTER +#endif + +#include "curlver.h" /* libcurl version defines */ +#include "system.h" /* determine things run-time */ +#include "cmcurl/include/curl/curlbuild.h" /* libcurl build definitions */ +#include "curlrules.h" /* libcurl rules enforcement */ + +/* + * Define WIN32 when build target is Win32 API + */ + +#if (defined(_WIN32) || defined(__WIN32__)) && \ + !defined(WIN32) && !defined(__SYMBIAN32__) +#define WIN32 +#endif + +#include +#include + +#if defined(__FreeBSD__) && (__FreeBSD__ >= 2) +/* Needed for __FreeBSD_version symbol definition */ +#include +#endif + +/* The include stuff here below is mainly for time_t! */ +#include +#include + +#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) +#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || \ + defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H)) +/* The check above prevents the winsock2 inclusion if winsock.h already was + included, since they can't co-exist without problems */ +#include +#include +#endif +#endif + +/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish + libc5-based Linux systems. Only include it on systems that are known to + require it! */ +#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ + defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ + defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \ + (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) +#include +#endif + +#if !defined(WIN32) && !defined(_WIN32_WCE) +#include +#endif + +#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) +#include +#endif + +#if defined __BEOS__ || defined __HAIKU__ +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER) +typedef struct Curl_easy CURL; +typedef struct Curl_share CURLSH; +#else +typedef void CURL; +typedef void CURLSH; +#endif + +/* + * libcurl external API function linkage decorations. + */ + +#ifdef CURL_STATICLIB +# define CURL_EXTERN +#elif defined(WIN32) || defined(_WIN32) || defined(__SYMBIAN32__) +# if defined(BUILDING_LIBCURL) +# define CURL_EXTERN __declspec(dllexport) +# else +# define CURL_EXTERN __declspec(dllimport) +# endif +#elif defined(BUILDING_LIBCURL) && defined(CURL_HIDDEN_SYMBOLS) +# define CURL_EXTERN CURL_EXTERN_SYMBOL +#else +# define CURL_EXTERN +#endif + +#ifndef curl_socket_typedef +/* socket typedef */ +#if defined(WIN32) && !defined(__LWIP_OPT_H__) && !defined(LWIP_HDR_OPT_H) +typedef SOCKET curl_socket_t; +#define CURL_SOCKET_BAD INVALID_SOCKET +#else +typedef int curl_socket_t; +#define CURL_SOCKET_BAD -1 +#endif +#define curl_socket_typedef +#endif /* curl_socket_typedef */ + +struct curl_httppost { + struct curl_httppost *next; /* next entry in the list */ + char *name; /* pointer to allocated name */ + long namelength; /* length of name length */ + char *contents; /* pointer to allocated data contents */ + long contentslength; /* length of contents field, see also + CURL_HTTPPOST_LARGE */ + char *buffer; /* pointer to allocated buffer contents */ + long bufferlength; /* length of buffer field */ + char *contenttype; /* Content-Type */ + struct curl_slist *contentheader; /* list of extra headers for this form */ + struct curl_httppost *more; /* if one field name has more than one + file, this link should link to following + files */ + long flags; /* as defined below */ + +/* specified content is a file name */ +#define CURL_HTTPPOST_FILENAME (1<<0) +/* specified content is a file name */ +#define CURL_HTTPPOST_READFILE (1<<1) +/* name is only stored pointer do not free in formfree */ +#define CURL_HTTPPOST_PTRNAME (1<<2) +/* contents is only stored pointer do not free in formfree */ +#define CURL_HTTPPOST_PTRCONTENTS (1<<3) +/* upload file from buffer */ +#define CURL_HTTPPOST_BUFFER (1<<4) +/* upload file from pointer contents */ +#define CURL_HTTPPOST_PTRBUFFER (1<<5) +/* upload file contents by using the regular read callback to get the data and + pass the given pointer as custom pointer */ +#define CURL_HTTPPOST_CALLBACK (1<<6) +/* use size in 'contentlen', added in 7.46.0 */ +#define CURL_HTTPPOST_LARGE (1<<7) + + char *showfilename; /* The file name to show. If not set, the + actual file name will be used (if this + is a file part) */ + void *userp; /* custom pointer used for + HTTPPOST_CALLBACK posts */ + curl_off_t contentlen; /* alternative length of contents + field. Used if CURL_HTTPPOST_LARGE is + set. Added in 7.46.0 */ +}; + +/* This is the CURLOPT_PROGRESSFUNCTION callback proto. It is now considered + deprecated but was the only choice up until 7.31.0 */ +typedef int (*curl_progress_callback)(void *clientp, + double dltotal, + double dlnow, + double ultotal, + double ulnow); + +/* This is the CURLOPT_XFERINFOFUNCTION callback proto. It was introduced in + 7.32.0, it avoids floating point and provides more detailed information. */ +typedef int (*curl_xferinfo_callback)(void *clientp, + curl_off_t dltotal, + curl_off_t dlnow, + curl_off_t ultotal, + curl_off_t ulnow); + +#ifndef CURL_MAX_READ_SIZE + /* The maximum receive buffer size configurable via CURLOPT_BUFFERSIZE. */ +#define CURL_MAX_READ_SIZE 524288 +#endif + +#ifndef CURL_MAX_WRITE_SIZE + /* Tests have proven that 20K is a very bad buffer size for uploads on + Windows, while 16K for some odd reason performed a lot better. + We do the ifndef check to allow this value to easier be changed at build + time for those who feel adventurous. The practical minimum is about + 400 bytes since libcurl uses a buffer of this size as a scratch area + (unrelated to network send operations). */ +#define CURL_MAX_WRITE_SIZE 16384 +#endif + +#ifndef CURL_MAX_HTTP_HEADER +/* The only reason to have a max limit for this is to avoid the risk of a bad + server feeding libcurl with a never-ending header that will cause reallocs + infinitely */ +#define CURL_MAX_HTTP_HEADER (100*1024) +#endif + +/* This is a magic return code for the write callback that, when returned, + will signal libcurl to pause receiving on the current transfer. */ +#define CURL_WRITEFUNC_PAUSE 0x10000001 + +typedef size_t (*curl_write_callback)(char *buffer, + size_t size, + size_t nitems, + void *outstream); + + + +/* enumeration of file types */ +typedef enum { + CURLFILETYPE_FILE = 0, + CURLFILETYPE_DIRECTORY, + CURLFILETYPE_SYMLINK, + CURLFILETYPE_DEVICE_BLOCK, + CURLFILETYPE_DEVICE_CHAR, + CURLFILETYPE_NAMEDPIPE, + CURLFILETYPE_SOCKET, + CURLFILETYPE_DOOR, /* is possible only on Sun Solaris now */ + + CURLFILETYPE_UNKNOWN /* should never occur */ +} curlfiletype; + +#define CURLFINFOFLAG_KNOWN_FILENAME (1<<0) +#define CURLFINFOFLAG_KNOWN_FILETYPE (1<<1) +#define CURLFINFOFLAG_KNOWN_TIME (1<<2) +#define CURLFINFOFLAG_KNOWN_PERM (1<<3) +#define CURLFINFOFLAG_KNOWN_UID (1<<4) +#define CURLFINFOFLAG_KNOWN_GID (1<<5) +#define CURLFINFOFLAG_KNOWN_SIZE (1<<6) +#define CURLFINFOFLAG_KNOWN_HLINKCOUNT (1<<7) + +/* Content of this structure depends on information which is known and is + achievable (e.g. by FTP LIST parsing). Please see the url_easy_setopt(3) man + page for callbacks returning this structure -- some fields are mandatory, + some others are optional. The FLAG field has special meaning. */ +struct curl_fileinfo { + char *filename; + curlfiletype filetype; + time_t time; + unsigned int perm; + int uid; + int gid; + curl_off_t size; + long int hardlinks; + + struct { + /* If some of these fields is not NULL, it is a pointer to b_data. */ + char *time; + char *perm; + char *user; + char *group; + char *target; /* pointer to the target filename of a symlink */ + } strings; + + unsigned int flags; + + /* used internally */ + char *b_data; + size_t b_size; + size_t b_used; +}; + +/* return codes for CURLOPT_CHUNK_BGN_FUNCTION */ +#define CURL_CHUNK_BGN_FUNC_OK 0 +#define CURL_CHUNK_BGN_FUNC_FAIL 1 /* tell the lib to end the task */ +#define CURL_CHUNK_BGN_FUNC_SKIP 2 /* skip this chunk over */ + +/* if splitting of data transfer is enabled, this callback is called before + download of an individual chunk started. Note that parameter "remains" works + only for FTP wildcard downloading (for now), otherwise is not used */ +typedef long (*curl_chunk_bgn_callback)(const void *transfer_info, + void *ptr, + int remains); + +/* return codes for CURLOPT_CHUNK_END_FUNCTION */ +#define CURL_CHUNK_END_FUNC_OK 0 +#define CURL_CHUNK_END_FUNC_FAIL 1 /* tell the lib to end the task */ + +/* If splitting of data transfer is enabled this callback is called after + download of an individual chunk finished. + Note! After this callback was set then it have to be called FOR ALL chunks. + Even if downloading of this chunk was skipped in CHUNK_BGN_FUNC. + This is the reason why we don't need "transfer_info" parameter in this + callback and we are not interested in "remains" parameter too. */ +typedef long (*curl_chunk_end_callback)(void *ptr); + +/* return codes for FNMATCHFUNCTION */ +#define CURL_FNMATCHFUNC_MATCH 0 /* string corresponds to the pattern */ +#define CURL_FNMATCHFUNC_NOMATCH 1 /* pattern doesn't match the string */ +#define CURL_FNMATCHFUNC_FAIL 2 /* an error occurred */ + +/* callback type for wildcard downloading pattern matching. If the + string matches the pattern, return CURL_FNMATCHFUNC_MATCH value, etc. */ +typedef int (*curl_fnmatch_callback)(void *ptr, + const char *pattern, + const char *string); + +/* These are the return codes for the seek callbacks */ +#define CURL_SEEKFUNC_OK 0 +#define CURL_SEEKFUNC_FAIL 1 /* fail the entire transfer */ +#define CURL_SEEKFUNC_CANTSEEK 2 /* tell libcurl seeking can't be done, so + libcurl might try other means instead */ +typedef int (*curl_seek_callback)(void *instream, + curl_off_t offset, + int origin); /* 'whence' */ + +/* This is a return code for the read callback that, when returned, will + signal libcurl to immediately abort the current transfer. */ +#define CURL_READFUNC_ABORT 0x10000000 +/* This is a return code for the read callback that, when returned, will + signal libcurl to pause sending data on the current transfer. */ +#define CURL_READFUNC_PAUSE 0x10000001 + +typedef size_t (*curl_read_callback)(char *buffer, + size_t size, + size_t nitems, + void *instream); + +typedef enum { + CURLSOCKTYPE_IPCXN, /* socket created for a specific IP connection */ + CURLSOCKTYPE_ACCEPT, /* socket created by accept() call */ + CURLSOCKTYPE_LAST /* never use */ +} curlsocktype; + +/* The return code from the sockopt_callback can signal information back + to libcurl: */ +#define CURL_SOCKOPT_OK 0 +#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return + CURLE_ABORTED_BY_CALLBACK */ +#define CURL_SOCKOPT_ALREADY_CONNECTED 2 + +typedef int (*curl_sockopt_callback)(void *clientp, + curl_socket_t curlfd, + curlsocktype purpose); + +struct curl_sockaddr { + int family; + int socktype; + int protocol; + unsigned int addrlen; /* addrlen was a socklen_t type before 7.18.0 but it + turned really ugly and painful on the systems that + lack this type */ + struct sockaddr addr; +}; + +typedef curl_socket_t +(*curl_opensocket_callback)(void *clientp, + curlsocktype purpose, + struct curl_sockaddr *address); + +typedef int +(*curl_closesocket_callback)(void *clientp, curl_socket_t item); + +typedef enum { + CURLIOE_OK, /* I/O operation successful */ + CURLIOE_UNKNOWNCMD, /* command was unknown to callback */ + CURLIOE_FAILRESTART, /* failed to restart the read */ + CURLIOE_LAST /* never use */ +} curlioerr; + +typedef enum { + CURLIOCMD_NOP, /* no operation */ + CURLIOCMD_RESTARTREAD, /* restart the read stream from start */ + CURLIOCMD_LAST /* never use */ +} curliocmd; + +typedef curlioerr (*curl_ioctl_callback)(CURL *handle, + int cmd, + void *clientp); + +#ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS +/* + * The following typedef's are signatures of malloc, free, realloc, strdup and + * calloc respectively. Function pointers of these types can be passed to the + * curl_global_init_mem() function to set user defined memory management + * callback routines. + */ +typedef void *(*curl_malloc_callback)(size_t size); +typedef void (*curl_free_callback)(void *ptr); +typedef void *(*curl_realloc_callback)(void *ptr, size_t size); +typedef char *(*curl_strdup_callback)(const char *str); +typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size); + +#define CURL_DID_MEMORY_FUNC_TYPEDEFS +#endif + +/* the kind of data that is passed to information_callback*/ +typedef enum { + CURLINFO_TEXT = 0, + CURLINFO_HEADER_IN, /* 1 */ + CURLINFO_HEADER_OUT, /* 2 */ + CURLINFO_DATA_IN, /* 3 */ + CURLINFO_DATA_OUT, /* 4 */ + CURLINFO_SSL_DATA_IN, /* 5 */ + CURLINFO_SSL_DATA_OUT, /* 6 */ + CURLINFO_END +} curl_infotype; + +typedef int (*curl_debug_callback) + (CURL *handle, /* the handle/transfer this concerns */ + curl_infotype type, /* what kind of data */ + char *data, /* points to the data */ + size_t size, /* size of the data pointed to */ + void *userptr); /* whatever the user please */ + +/* All possible error codes from all sorts of curl functions. Future versions + may return other values, stay prepared. + + Always add new return codes last. Never *EVER* remove any. The return + codes must remain the same! + */ + +typedef enum { + CURLE_OK = 0, + CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ + CURLE_FAILED_INIT, /* 2 */ + CURLE_URL_MALFORMAT, /* 3 */ + CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for + 7.17.0, reused in April 2011 for 7.21.5] */ + CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ + CURLE_COULDNT_RESOLVE_HOST, /* 6 */ + CURLE_COULDNT_CONNECT, /* 7 */ + CURLE_WEIRD_SERVER_REPLY, /* 8 */ + CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server + due to lack of access - when login fails + this is not returned. */ + CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for + 7.15.4, reused in Dec 2011 for 7.24.0]*/ + CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ + CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server + [was obsoleted in August 2007 for 7.17.0, + reused in Dec 2011 for 7.24.0]*/ + CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ + CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ + CURLE_FTP_CANT_GET_HOST, /* 15 */ + CURLE_HTTP2, /* 16 - A problem in the http2 framing layer. + [was obsoleted in August 2007 for 7.17.0, + reused in July 2014 for 7.38.0] */ + CURLE_FTP_COULDNT_SET_TYPE, /* 17 */ + CURLE_PARTIAL_FILE, /* 18 */ + CURLE_FTP_COULDNT_RETR_FILE, /* 19 */ + CURLE_OBSOLETE20, /* 20 - NOT USED */ + CURLE_QUOTE_ERROR, /* 21 - quote command failure */ + CURLE_HTTP_RETURNED_ERROR, /* 22 */ + CURLE_WRITE_ERROR, /* 23 */ + CURLE_OBSOLETE24, /* 24 - NOT USED */ + CURLE_UPLOAD_FAILED, /* 25 - failed upload "command" */ + CURLE_READ_ERROR, /* 26 - couldn't open/read from file */ + CURLE_OUT_OF_MEMORY, /* 27 */ + /* Note: CURLE_OUT_OF_MEMORY may sometimes indicate a conversion error + instead of a memory allocation error if CURL_DOES_CONVERSIONS + is defined + */ + CURLE_OPERATION_TIMEDOUT, /* 28 - the timeout time was reached */ + CURLE_OBSOLETE29, /* 29 - NOT USED */ + CURLE_FTP_PORT_FAILED, /* 30 - FTP PORT operation failed */ + CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */ + CURLE_OBSOLETE32, /* 32 - NOT USED */ + CURLE_RANGE_ERROR, /* 33 - RANGE "command" didn't work */ + CURLE_HTTP_POST_ERROR, /* 34 */ + CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */ + CURLE_BAD_DOWNLOAD_RESUME, /* 36 - couldn't resume download */ + CURLE_FILE_COULDNT_READ_FILE, /* 37 */ + CURLE_LDAP_CANNOT_BIND, /* 38 */ + CURLE_LDAP_SEARCH_FAILED, /* 39 */ + CURLE_OBSOLETE40, /* 40 - NOT USED */ + CURLE_FUNCTION_NOT_FOUND, /* 41 - NOT USED starting with 7.53.0 */ + CURLE_ABORTED_BY_CALLBACK, /* 42 */ + CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */ + CURLE_OBSOLETE44, /* 44 - NOT USED */ + CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ + CURLE_OBSOLETE46, /* 46 - NOT USED */ + CURLE_TOO_MANY_REDIRECTS, /* 47 - catch endless re-direct loops */ + CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */ + CURLE_TELNET_OPTION_SYNTAX, /* 49 - Malformed telnet option */ + CURLE_OBSOLETE50, /* 50 - NOT USED */ + CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint + wasn't verified fine */ + CURLE_GOT_NOTHING, /* 52 - when this is a specific error */ + CURLE_SSL_ENGINE_NOTFOUND, /* 53 - SSL crypto engine not found */ + CURLE_SSL_ENGINE_SETFAILED, /* 54 - can not set SSL crypto engine as + default */ + CURLE_SEND_ERROR, /* 55 - failed sending network data */ + CURLE_RECV_ERROR, /* 56 - failure in receiving network data */ + CURLE_OBSOLETE57, /* 57 - NOT IN USE */ + CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ + CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ + CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ + CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized/bad encoding */ + CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ + CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ + CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ + CURLE_SEND_FAIL_REWIND, /* 65 - Sending the data requires a rewind + that failed */ + CURLE_SSL_ENGINE_INITFAILED, /* 66 - failed to initialise ENGINE */ + CURLE_LOGIN_DENIED, /* 67 - user, password or similar was not + accepted and we failed to login */ + CURLE_TFTP_NOTFOUND, /* 68 - file not found on server */ + CURLE_TFTP_PERM, /* 69 - permission problem on server */ + CURLE_REMOTE_DISK_FULL, /* 70 - out of disk space on server */ + CURLE_TFTP_ILLEGAL, /* 71 - Illegal TFTP operation */ + CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */ + CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */ + CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */ + CURLE_CONV_FAILED, /* 75 - conversion failed */ + CURLE_CONV_REQD, /* 76 - caller must register conversion + callbacks using curl_easy_setopt options + CURLOPT_CONV_FROM_NETWORK_FUNCTION, + CURLOPT_CONV_TO_NETWORK_FUNCTION, and + CURLOPT_CONV_FROM_UTF8_FUNCTION */ + CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing + or wrong format */ + CURLE_REMOTE_FILE_NOT_FOUND, /* 78 - remote file not found */ + CURLE_SSH, /* 79 - error from the SSH layer, somewhat + generic so the error message will be of + interest when this has happened */ + + CURLE_SSL_SHUTDOWN_FAILED, /* 80 - Failed to shut down the SSL + connection */ + CURLE_AGAIN, /* 81 - socket is not ready for send/recv, + wait till it's ready and try again (Added + in 7.18.2) */ + CURLE_SSL_CRL_BADFILE, /* 82 - could not load CRL file, missing or + wrong format (Added in 7.19.0) */ + CURLE_SSL_ISSUER_ERROR, /* 83 - Issuer check failed. (Added in + 7.19.0) */ + CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */ + CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */ + CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */ + CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */ + CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */ + CURLE_NO_CONNECTION_AVAILABLE, /* 89 - No connection available, the + session will be queued */ + CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not + match */ + CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */ + CURLE_HTTP2_STREAM, /* 92 - stream error in HTTP/2 framing layer + */ + CURL_LAST /* never use! */ +} CURLcode; + +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all + the obsolete stuff removed! */ + +/* Previously obsolete error code re-used in 7.38.0 */ +#define CURLE_OBSOLETE16 CURLE_HTTP2 + +/* Previously obsolete error codes re-used in 7.24.0 */ +#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED +#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT + +/* compatibility with older names */ +#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING +#define CURLE_FTP_WEIRD_SERVER_REPLY CURLE_WEIRD_SERVER_REPLY + +/* The following were added in 7.21.5, April 2011 */ +#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION + +/* The following were added in 7.17.1 */ +/* These are scheduled to disappear by 2009 */ +#define CURLE_SSL_PEER_CERTIFICATE CURLE_PEER_FAILED_VERIFICATION + +/* The following were added in 7.17.0 */ +/* These are scheduled to disappear by 2009 */ +#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */ +#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46 +#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44 +#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10 +#define CURLE_FTP_CANT_RECONNECT CURLE_OBSOLETE16 +#define CURLE_FTP_COULDNT_GET_SIZE CURLE_OBSOLETE32 +#define CURLE_FTP_COULDNT_SET_ASCII CURLE_OBSOLETE29 +#define CURLE_FTP_WEIRD_USER_REPLY CURLE_OBSOLETE12 +#define CURLE_FTP_WRITE_ERROR CURLE_OBSOLETE20 +#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40 +#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24 +#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57 +#define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN + +#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED +#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE +#define CURLE_FTP_QUOTE_ERROR CURLE_QUOTE_ERROR +#define CURLE_TFTP_DISKFULL CURLE_REMOTE_DISK_FULL +#define CURLE_TFTP_EXISTS CURLE_REMOTE_FILE_EXISTS +#define CURLE_HTTP_RANGE_ERROR CURLE_RANGE_ERROR +#define CURLE_FTP_SSL_FAILED CURLE_USE_SSL_FAILED + +/* The following were added earlier */ + +#define CURLE_OPERATION_TIMEOUTED CURLE_OPERATION_TIMEDOUT + +#define CURLE_HTTP_NOT_FOUND CURLE_HTTP_RETURNED_ERROR +#define CURLE_HTTP_PORT_FAILED CURLE_INTERFACE_FAILED +#define CURLE_FTP_COULDNT_STOR_FILE CURLE_UPLOAD_FAILED + +#define CURLE_FTP_PARTIAL_FILE CURLE_PARTIAL_FILE +#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME + +/* This was the error code 50 in 7.7.3 and a few earlier versions, this + is no longer used by libcurl but is instead #defined here only to not + make programs break */ +#define CURLE_ALREADY_COMPLETE 99999 + +/* Provide defines for really old option names */ +#define CURLOPT_FILE CURLOPT_WRITEDATA /* name changed in 7.9.7 */ +#define CURLOPT_INFILE CURLOPT_READDATA /* name changed in 7.9.7 */ +#define CURLOPT_WRITEHEADER CURLOPT_HEADERDATA + +/* Since long deprecated options with no code in the lib that does anything + with them. */ +#define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40 +#define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72 + +#endif /*!CURL_NO_OLDIES*/ + +/* This prototype applies to all conversion callbacks */ +typedef CURLcode (*curl_conv_callback)(char *buffer, size_t length); + +typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */ + void *ssl_ctx, /* actually an + OpenSSL SSL_CTX */ + void *userptr); + +typedef enum { + CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use + CONNECT HTTP/1.1 */ + CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT + HTTP/1.0 */ + CURLPROXY_HTTPS = 2, /* added in 7.52.0 */ + CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already + in 7.10 */ + CURLPROXY_SOCKS5 = 5, /* added in 7.10 */ + CURLPROXY_SOCKS4A = 6, /* added in 7.18.0 */ + CURLPROXY_SOCKS5_HOSTNAME = 7 /* Use the SOCKS5 protocol but pass along the + host name rather than the IP address. added + in 7.18.0 */ +} curl_proxytype; /* this enum was added in 7.10 */ + +/* + * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options: + * + * CURLAUTH_NONE - No HTTP authentication + * CURLAUTH_BASIC - HTTP Basic authentication (default) + * CURLAUTH_DIGEST - HTTP Digest authentication + * CURLAUTH_NEGOTIATE - HTTP Negotiate (SPNEGO) authentication + * CURLAUTH_GSSNEGOTIATE - Alias for CURLAUTH_NEGOTIATE (deprecated) + * CURLAUTH_NTLM - HTTP NTLM authentication + * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour + * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper + * CURLAUTH_ONLY - Use together with a single other type to force no + * authentication or just that single type + * CURLAUTH_ANY - All fine types set + * CURLAUTH_ANYSAFE - All fine types except Basic + */ + +#define CURLAUTH_NONE ((unsigned long)0) +#define CURLAUTH_BASIC (((unsigned long)1)<<0) +#define CURLAUTH_DIGEST (((unsigned long)1)<<1) +#define CURLAUTH_NEGOTIATE (((unsigned long)1)<<2) +/* Deprecated since the advent of CURLAUTH_NEGOTIATE */ +#define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE +#define CURLAUTH_NTLM (((unsigned long)1)<<3) +#define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4) +#define CURLAUTH_NTLM_WB (((unsigned long)1)<<5) +#define CURLAUTH_ONLY (((unsigned long)1)<<31) +#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) +#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) + +#define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */ +#define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */ +#define CURLSSH_AUTH_PUBLICKEY (1<<0) /* public/private key files */ +#define CURLSSH_AUTH_PASSWORD (1<<1) /* password */ +#define CURLSSH_AUTH_HOST (1<<2) /* host key files */ +#define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ +#define CURLSSH_AUTH_AGENT (1<<4) /* agent (ssh-agent, pageant...) */ +#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY + +#define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */ +#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */ +#define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */ + +#define CURL_ERROR_SIZE 256 + +enum curl_khtype { + CURLKHTYPE_UNKNOWN, + CURLKHTYPE_RSA1, + CURLKHTYPE_RSA, + CURLKHTYPE_DSS +}; + +struct curl_khkey { + const char *key; /* points to a zero-terminated string encoded with base64 + if len is zero, otherwise to the "raw" data */ + size_t len; + enum curl_khtype keytype; +}; + +/* this is the set of return values expected from the curl_sshkeycallback + callback */ +enum curl_khstat { + CURLKHSTAT_FINE_ADD_TO_FILE, + CURLKHSTAT_FINE, + CURLKHSTAT_REJECT, /* reject the connection, return an error */ + CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so + this causes a CURLE_DEFER error but otherwise the + connection will be left intact etc */ + CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */ +}; + +/* this is the set of status codes pass in to the callback */ +enum curl_khmatch { + CURLKHMATCH_OK, /* match */ + CURLKHMATCH_MISMATCH, /* host found, key mismatch! */ + CURLKHMATCH_MISSING, /* no matching host/key found */ + CURLKHMATCH_LAST /* not for use, only a marker for last-in-list */ +}; + +typedef int + (*curl_sshkeycallback) (CURL *easy, /* easy handle */ + const struct curl_khkey *knownkey, /* known */ + const struct curl_khkey *foundkey, /* found */ + enum curl_khmatch, /* libcurl's view on the keys */ + void *clientp); /* custom pointer passed from app */ + +/* parameter for the CURLOPT_USE_SSL option */ +typedef enum { + CURLUSESSL_NONE, /* do not attempt to use SSL */ + CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */ + CURLUSESSL_CONTROL, /* SSL for the control connection or fail */ + CURLUSESSL_ALL, /* SSL for all communication or fail */ + CURLUSESSL_LAST /* not an option, never use */ +} curl_usessl; + +/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */ + +/* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the + name of improving interoperability with older servers. Some SSL libraries + have introduced work-arounds for this flaw but those work-arounds sometimes + make the SSL communication fail. To regain functionality with those broken + servers, a user can this way allow the vulnerability back. */ +#define CURLSSLOPT_ALLOW_BEAST (1<<0) + +/* - NO_REVOKE tells libcurl to disable certificate revocation checks for those + SSL backends where such behavior is present. */ +#define CURLSSLOPT_NO_REVOKE (1<<1) + +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all + the obsolete stuff removed! */ + +/* Backwards compatibility with older names */ +/* These are scheduled to disappear by 2009 */ + +#define CURLFTPSSL_NONE CURLUSESSL_NONE +#define CURLFTPSSL_TRY CURLUSESSL_TRY +#define CURLFTPSSL_CONTROL CURLUSESSL_CONTROL +#define CURLFTPSSL_ALL CURLUSESSL_ALL +#define CURLFTPSSL_LAST CURLUSESSL_LAST +#define curl_ftpssl curl_usessl +#endif /*!CURL_NO_OLDIES*/ + +/* parameter for the CURLOPT_FTP_SSL_CCC option */ +typedef enum { + CURLFTPSSL_CCC_NONE, /* do not send CCC */ + CURLFTPSSL_CCC_PASSIVE, /* Let the server initiate the shutdown */ + CURLFTPSSL_CCC_ACTIVE, /* Initiate the shutdown */ + CURLFTPSSL_CCC_LAST /* not an option, never use */ +} curl_ftpccc; + +/* parameter for the CURLOPT_FTPSSLAUTH option */ +typedef enum { + CURLFTPAUTH_DEFAULT, /* let libcurl decide */ + CURLFTPAUTH_SSL, /* use "AUTH SSL" */ + CURLFTPAUTH_TLS, /* use "AUTH TLS" */ + CURLFTPAUTH_LAST /* not an option, never use */ +} curl_ftpauth; + +/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */ +typedef enum { + CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */ + CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD + again if MKD succeeded, for SFTP this does + similar magic */ + CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD + again even if MKD failed! */ + CURLFTP_CREATE_DIR_LAST /* not an option, never use */ +} curl_ftpcreatedir; + +/* parameter for the CURLOPT_FTP_FILEMETHOD option */ +typedef enum { + CURLFTPMETHOD_DEFAULT, /* let libcurl pick */ + CURLFTPMETHOD_MULTICWD, /* single CWD operation for each path part */ + CURLFTPMETHOD_NOCWD, /* no CWD at all */ + CURLFTPMETHOD_SINGLECWD, /* one CWD to full dir, then work on file */ + CURLFTPMETHOD_LAST /* not an option, never use */ +} curl_ftpmethod; + +/* bitmask defines for CURLOPT_HEADEROPT */ +#define CURLHEADER_UNIFIED 0 +#define CURLHEADER_SEPARATE (1<<0) + +/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */ +#define CURLPROTO_HTTP (1<<0) +#define CURLPROTO_HTTPS (1<<1) +#define CURLPROTO_FTP (1<<2) +#define CURLPROTO_FTPS (1<<3) +#define CURLPROTO_SCP (1<<4) +#define CURLPROTO_SFTP (1<<5) +#define CURLPROTO_TELNET (1<<6) +#define CURLPROTO_LDAP (1<<7) +#define CURLPROTO_LDAPS (1<<8) +#define CURLPROTO_DICT (1<<9) +#define CURLPROTO_FILE (1<<10) +#define CURLPROTO_TFTP (1<<11) +#define CURLPROTO_IMAP (1<<12) +#define CURLPROTO_IMAPS (1<<13) +#define CURLPROTO_POP3 (1<<14) +#define CURLPROTO_POP3S (1<<15) +#define CURLPROTO_SMTP (1<<16) +#define CURLPROTO_SMTPS (1<<17) +#define CURLPROTO_RTSP (1<<18) +#define CURLPROTO_RTMP (1<<19) +#define CURLPROTO_RTMPT (1<<20) +#define CURLPROTO_RTMPE (1<<21) +#define CURLPROTO_RTMPTE (1<<22) +#define CURLPROTO_RTMPS (1<<23) +#define CURLPROTO_RTMPTS (1<<24) +#define CURLPROTO_GOPHER (1<<25) +#define CURLPROTO_SMB (1<<26) +#define CURLPROTO_SMBS (1<<27) +#define CURLPROTO_ALL (~0) /* enable everything */ + +/* long may be 32 or 64 bits, but we should never depend on anything else + but 32 */ +#define CURLOPTTYPE_LONG 0 +#define CURLOPTTYPE_OBJECTPOINT 10000 +#define CURLOPTTYPE_STRINGPOINT 10000 +#define CURLOPTTYPE_FUNCTIONPOINT 20000 +#define CURLOPTTYPE_OFF_T 30000 + +/* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the + string options from the header file */ + +/* name is uppercase CURLOPT_, + type is one of the defined CURLOPTTYPE_ + number is unique identifier */ +#ifdef CINIT +#undef CINIT +#endif + +#ifdef CURL_ISOCPP +#define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu +#else +/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ +#define LONG CURLOPTTYPE_LONG +#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT +#define STRINGPOINT CURLOPTTYPE_OBJECTPOINT +#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT +#define OFF_T CURLOPTTYPE_OFF_T +#define CINIT(name,type,number) CURLOPT_/**/name = type + number +#endif + +/* + * This macro-mania below setups the CURLOPT_[what] enum, to be used with + * curl_easy_setopt(). The first argument in the CINIT() macro is the [what] + * word. + */ + +typedef enum { + /* This is the FILE * or void * the regular output should be written to. */ + CINIT(WRITEDATA, OBJECTPOINT, 1), + + /* The full URL to get/put */ + CINIT(URL, STRINGPOINT, 2), + + /* Port number to connect to, if other than default. */ + CINIT(PORT, LONG, 3), + + /* Name of proxy to use. */ + CINIT(PROXY, STRINGPOINT, 4), + + /* "user:password;options" to use when fetching. */ + CINIT(USERPWD, STRINGPOINT, 5), + + /* "user:password" to use with proxy. */ + CINIT(PROXYUSERPWD, STRINGPOINT, 6), + + /* Range to get, specified as an ASCII string. */ + CINIT(RANGE, STRINGPOINT, 7), + + /* not used */ + + /* Specified file stream to upload from (use as input): */ + CINIT(READDATA, OBJECTPOINT, 9), + + /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE + * bytes big. If this is not used, error messages go to stderr instead: */ + CINIT(ERRORBUFFER, OBJECTPOINT, 10), + + /* Function that will be called to store the output (instead of fwrite). The + * parameters will use fwrite() syntax, make sure to follow them. */ + CINIT(WRITEFUNCTION, FUNCTIONPOINT, 11), + + /* Function that will be called to read the input (instead of fread). The + * parameters will use fread() syntax, make sure to follow them. */ + CINIT(READFUNCTION, FUNCTIONPOINT, 12), + + /* Time-out the read operation after this amount of seconds */ + CINIT(TIMEOUT, LONG, 13), + + /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about + * how large the file being sent really is. That allows better error + * checking and better verifies that the upload was successful. -1 means + * unknown size. + * + * For large file support, there is also a _LARGE version of the key + * which takes an off_t type, allowing platforms with larger off_t + * sizes to handle larger files. See below for INFILESIZE_LARGE. + */ + CINIT(INFILESIZE, LONG, 14), + + /* POST static input fields. */ + CINIT(POSTFIELDS, OBJECTPOINT, 15), + + /* Set the referrer page (needed by some CGIs) */ + CINIT(REFERER, STRINGPOINT, 16), + + /* Set the FTP PORT string (interface name, named or numerical IP address) + Use i.e '-' to use default address. */ + CINIT(FTPPORT, STRINGPOINT, 17), + + /* Set the User-Agent string (examined by some CGIs) */ + CINIT(USERAGENT, STRINGPOINT, 18), + + /* If the download receives less than "low speed limit" bytes/second + * during "low speed time" seconds, the operations is aborted. + * You could i.e if you have a pretty high speed connection, abort if + * it is less than 2000 bytes/sec during 20 seconds. + */ + + /* Set the "low speed limit" */ + CINIT(LOW_SPEED_LIMIT, LONG, 19), + + /* Set the "low speed time" */ + CINIT(LOW_SPEED_TIME, LONG, 20), + + /* Set the continuation offset. + * + * Note there is also a _LARGE version of this key which uses + * off_t types, allowing for large file offsets on platforms which + * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE. + */ + CINIT(RESUME_FROM, LONG, 21), + + /* Set cookie in request: */ + CINIT(COOKIE, STRINGPOINT, 22), + + /* This points to a linked list of headers, struct curl_slist kind. This + list is also used for RTSP (in spite of its name) */ + CINIT(HTTPHEADER, OBJECTPOINT, 23), + + /* This points to a linked list of post entries, struct curl_httppost */ + CINIT(HTTPPOST, OBJECTPOINT, 24), + + /* name of the file keeping your private SSL-certificate */ + CINIT(SSLCERT, STRINGPOINT, 25), + + /* password for the SSL or SSH private key */ + CINIT(KEYPASSWD, STRINGPOINT, 26), + + /* send TYPE parameter? */ + CINIT(CRLF, LONG, 27), + + /* send linked-list of QUOTE commands */ + CINIT(QUOTE, OBJECTPOINT, 28), + + /* send FILE * or void * to store headers to, if you use a callback it + is simply passed to the callback unmodified */ + CINIT(HEADERDATA, OBJECTPOINT, 29), + + /* point to a file to read the initial cookies from, also enables + "cookie awareness" */ + CINIT(COOKIEFILE, STRINGPOINT, 31), + + /* What version to specifically try to use. + See CURL_SSLVERSION defines below. */ + CINIT(SSLVERSION, LONG, 32), + + /* What kind of HTTP time condition to use, see defines */ + CINIT(TIMECONDITION, LONG, 33), + + /* Time to use with the above condition. Specified in number of seconds + since 1 Jan 1970 */ + CINIT(TIMEVALUE, LONG, 34), + + /* 35 = OBSOLETE */ + + /* Custom request, for customizing the get command like + HTTP: DELETE, TRACE and others + FTP: to use a different list command + */ + CINIT(CUSTOMREQUEST, STRINGPOINT, 36), + + /* FILE handle to use instead of stderr */ + CINIT(STDERR, OBJECTPOINT, 37), + + /* 38 is not used */ + + /* send linked-list of post-transfer QUOTE commands */ + CINIT(POSTQUOTE, OBJECTPOINT, 39), + + CINIT(OBSOLETE40, OBJECTPOINT, 40), /* OBSOLETE, do not use! */ + + CINIT(VERBOSE, LONG, 41), /* talk a lot */ + CINIT(HEADER, LONG, 42), /* throw the header out too */ + CINIT(NOPROGRESS, LONG, 43), /* shut off the progress meter */ + CINIT(NOBODY, LONG, 44), /* use HEAD to get http document */ + CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 400 */ + CINIT(UPLOAD, LONG, 46), /* this is an upload */ + CINIT(POST, LONG, 47), /* HTTP POST method */ + CINIT(DIRLISTONLY, LONG, 48), /* bare names when listing directories */ + + CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */ + + /* Specify whether to read the user+password from the .netrc or the URL. + * This must be one of the CURL_NETRC_* enums below. */ + CINIT(NETRC, LONG, 51), + + CINIT(FOLLOWLOCATION, LONG, 52), /* use Location: Luke! */ + + CINIT(TRANSFERTEXT, LONG, 53), /* transfer data in text/ASCII format */ + CINIT(PUT, LONG, 54), /* HTTP PUT */ + + /* 55 = OBSOLETE */ + + /* DEPRECATED + * Function that will be called instead of the internal progress display + * function. This function should be defined as the curl_progress_callback + * prototype defines. */ + CINIT(PROGRESSFUNCTION, FUNCTIONPOINT, 56), + + /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION + callbacks */ + CINIT(PROGRESSDATA, OBJECTPOINT, 57), +#define CURLOPT_XFERINFODATA CURLOPT_PROGRESSDATA + + /* We want the referrer field set automatically when following locations */ + CINIT(AUTOREFERER, LONG, 58), + + /* Port of the proxy, can be set in the proxy string as well with: + "[host]:[port]" */ + CINIT(PROXYPORT, LONG, 59), + + /* size of the POST input data, if strlen() is not good to use */ + CINIT(POSTFIELDSIZE, LONG, 60), + + /* tunnel non-http operations through a HTTP proxy */ + CINIT(HTTPPROXYTUNNEL, LONG, 61), + + /* Set the interface string to use as outgoing network interface */ + CINIT(INTERFACE, STRINGPOINT, 62), + + /* Set the krb4/5 security level, this also enables krb4/5 awareness. This + * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string + * is set but doesn't match one of these, 'private' will be used. */ + CINIT(KRBLEVEL, STRINGPOINT, 63), + + /* Set if we should verify the peer in ssl handshake, set 1 to verify. */ + CINIT(SSL_VERIFYPEER, LONG, 64), + + /* The CApath or CAfile used to validate the peer certificate + this option is used only if SSL_VERIFYPEER is true */ + CINIT(CAINFO, STRINGPOINT, 65), + + /* 66 = OBSOLETE */ + /* 67 = OBSOLETE */ + + /* Maximum number of http redirects to follow */ + CINIT(MAXREDIRS, LONG, 68), + + /* Pass a long set to 1 to get the date of the requested document (if + possible)! Pass a zero to shut it off. */ + CINIT(FILETIME, LONG, 69), + + /* This points to a linked list of telnet options */ + CINIT(TELNETOPTIONS, OBJECTPOINT, 70), + + /* Max amount of cached alive connections */ + CINIT(MAXCONNECTS, LONG, 71), + + CINIT(OBSOLETE72, LONG, 72), /* OBSOLETE, do not use! */ + + /* 73 = OBSOLETE */ + + /* Set to explicitly use a new connection for the upcoming transfer. + Do not use this unless you're absolutely sure of this, as it makes the + operation slower and is less friendly for the network. */ + CINIT(FRESH_CONNECT, LONG, 74), + + /* Set to explicitly forbid the upcoming transfer's connection to be re-used + when done. Do not use this unless you're absolutely sure of this, as it + makes the operation slower and is less friendly for the network. */ + CINIT(FORBID_REUSE, LONG, 75), + + /* Set to a file name that contains random data for libcurl to use to + seed the random engine when doing SSL connects. */ + CINIT(RANDOM_FILE, STRINGPOINT, 76), + + /* Set to the Entropy Gathering Daemon socket pathname */ + CINIT(EGDSOCKET, STRINGPOINT, 77), + + /* Time-out connect operations after this amount of seconds, if connects are + OK within this time, then fine... This only aborts the connect phase. */ + CINIT(CONNECTTIMEOUT, LONG, 78), + + /* Function that will be called to store headers (instead of fwrite). The + * parameters will use fwrite() syntax, make sure to follow them. */ + CINIT(HEADERFUNCTION, FUNCTIONPOINT, 79), + + /* Set this to force the HTTP request to get back to GET. Only really usable + if POST, PUT or a custom request have been used first. + */ + CINIT(HTTPGET, LONG, 80), + + /* Set if we should verify the Common name from the peer certificate in ssl + * handshake, set 1 to check existence, 2 to ensure that it matches the + * provided hostname. */ + CINIT(SSL_VERIFYHOST, LONG, 81), + + /* Specify which file name to write all known cookies in after completed + operation. Set file name to "-" (dash) to make it go to stdout. */ + CINIT(COOKIEJAR, STRINGPOINT, 82), + + /* Specify which SSL ciphers to use */ + CINIT(SSL_CIPHER_LIST, STRINGPOINT, 83), + + /* Specify which HTTP version to use! This must be set to one of the + CURL_HTTP_VERSION* enums set below. */ + CINIT(HTTP_VERSION, LONG, 84), + + /* Specifically switch on or off the FTP engine's use of the EPSV command. By + default, that one will always be attempted before the more traditional + PASV command. */ + CINIT(FTP_USE_EPSV, LONG, 85), + + /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */ + CINIT(SSLCERTTYPE, STRINGPOINT, 86), + + /* name of the file keeping your private SSL-key */ + CINIT(SSLKEY, STRINGPOINT, 87), + + /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */ + CINIT(SSLKEYTYPE, STRINGPOINT, 88), + + /* crypto engine for the SSL-sub system */ + CINIT(SSLENGINE, STRINGPOINT, 89), + + /* set the crypto engine for the SSL-sub system as default + the param has no meaning... + */ + CINIT(SSLENGINE_DEFAULT, LONG, 90), + + /* Non-zero value means to use the global dns cache */ + CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */ + + /* DNS cache timeout */ + CINIT(DNS_CACHE_TIMEOUT, LONG, 92), + + /* send linked-list of pre-transfer QUOTE commands */ + CINIT(PREQUOTE, OBJECTPOINT, 93), + + /* set the debug function */ + CINIT(DEBUGFUNCTION, FUNCTIONPOINT, 94), + + /* set the data for the debug function */ + CINIT(DEBUGDATA, OBJECTPOINT, 95), + + /* mark this as start of a cookie session */ + CINIT(COOKIESESSION, LONG, 96), + + /* The CApath directory used to validate the peer certificate + this option is used only if SSL_VERIFYPEER is true */ + CINIT(CAPATH, STRINGPOINT, 97), + + /* Instruct libcurl to use a smaller receive buffer */ + CINIT(BUFFERSIZE, LONG, 98), + + /* Instruct libcurl to not use any signal/alarm handlers, even when using + timeouts. This option is useful for multi-threaded applications. + See libcurl-the-guide for more background information. */ + CINIT(NOSIGNAL, LONG, 99), + + /* Provide a CURLShare for mutexing non-ts data */ + CINIT(SHARE, OBJECTPOINT, 100), + + /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default), + CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A and + CURLPROXY_SOCKS5. */ + CINIT(PROXYTYPE, LONG, 101), + + /* Set the Accept-Encoding string. Use this to tell a server you would like + the response to be compressed. Before 7.21.6, this was known as + CURLOPT_ENCODING */ + CINIT(ACCEPT_ENCODING, STRINGPOINT, 102), + + /* Set pointer to private data */ + CINIT(PRIVATE, OBJECTPOINT, 103), + + /* Set aliases for HTTP 200 in the HTTP Response header */ + CINIT(HTTP200ALIASES, OBJECTPOINT, 104), + + /* Continue to send authentication (user+password) when following locations, + even when hostname changed. This can potentially send off the name + and password to whatever host the server decides. */ + CINIT(UNRESTRICTED_AUTH, LONG, 105), + + /* Specifically switch on or off the FTP engine's use of the EPRT command ( + it also disables the LPRT attempt). By default, those ones will always be + attempted before the good old traditional PORT command. */ + CINIT(FTP_USE_EPRT, LONG, 106), + + /* Set this to a bitmask value to enable the particular authentications + methods you like. Use this in combination with CURLOPT_USERPWD. + Note that setting multiple bits may cause extra network round-trips. */ + CINIT(HTTPAUTH, LONG, 107), + + /* Set the ssl context callback function, currently only for OpenSSL ssl_ctx + in second argument. The function must be matching the + curl_ssl_ctx_callback proto. */ + CINIT(SSL_CTX_FUNCTION, FUNCTIONPOINT, 108), + + /* Set the userdata for the ssl context callback function's third + argument */ + CINIT(SSL_CTX_DATA, OBJECTPOINT, 109), + + /* FTP Option that causes missing dirs to be created on the remote server. + In 7.19.4 we introduced the convenience enums for this option using the + CURLFTP_CREATE_DIR prefix. + */ + CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110), + + /* Set this to a bitmask value to enable the particular authentications + methods you like. Use this in combination with CURLOPT_PROXYUSERPWD. + Note that setting multiple bits may cause extra network round-trips. */ + CINIT(PROXYAUTH, LONG, 111), + + /* FTP option that changes the timeout, in seconds, associated with + getting a response. This is different from transfer timeout time and + essentially places a demand on the FTP server to acknowledge commands + in a timely manner. */ + CINIT(FTP_RESPONSE_TIMEOUT, LONG, 112), +#define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT + + /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to + tell libcurl to resolve names to those IP versions only. This only has + affect on systems with support for more than one, i.e IPv4 _and_ IPv6. */ + CINIT(IPRESOLVE, LONG, 113), + + /* Set this option to limit the size of a file that will be downloaded from + an HTTP or FTP server. + + Note there is also _LARGE version which adds large file support for + platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */ + CINIT(MAXFILESIZE, LONG, 114), + + /* See the comment for INFILESIZE above, but in short, specifies + * the size of the file being uploaded. -1 means unknown. + */ + CINIT(INFILESIZE_LARGE, OFF_T, 115), + + /* Sets the continuation offset. There is also a LONG version of this; + * look above for RESUME_FROM. + */ + CINIT(RESUME_FROM_LARGE, OFF_T, 116), + + /* Sets the maximum size of data that will be downloaded from + * an HTTP or FTP server. See MAXFILESIZE above for the LONG version. + */ + CINIT(MAXFILESIZE_LARGE, OFF_T, 117), + + /* Set this option to the file name of your .netrc file you want libcurl + to parse (using the CURLOPT_NETRC option). If not set, libcurl will do + a poor attempt to find the user's home directory and check for a .netrc + file in there. */ + CINIT(NETRC_FILE, STRINGPOINT, 118), + + /* Enable SSL/TLS for FTP, pick one of: + CURLUSESSL_TRY - try using SSL, proceed anyway otherwise + CURLUSESSL_CONTROL - SSL for the control connection or fail + CURLUSESSL_ALL - SSL for all communication or fail + */ + CINIT(USE_SSL, LONG, 119), + + /* The _LARGE version of the standard POSTFIELDSIZE option */ + CINIT(POSTFIELDSIZE_LARGE, OFF_T, 120), + + /* Enable/disable the TCP Nagle algorithm */ + CINIT(TCP_NODELAY, LONG, 121), + + /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ + /* 123 OBSOLETE. Gone in 7.16.0 */ + /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ + /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ + /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */ + /* 127 OBSOLETE. Gone in 7.16.0 */ + /* 128 OBSOLETE. Gone in 7.16.0 */ + + /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL), this option + can be used to change libcurl's default action which is to first try + "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK + response has been received. + + Available parameters are: + CURLFTPAUTH_DEFAULT - let libcurl decide + CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS + CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL + */ + CINIT(FTPSSLAUTH, LONG, 129), + + CINIT(IOCTLFUNCTION, FUNCTIONPOINT, 130), + CINIT(IOCTLDATA, OBJECTPOINT, 131), + + /* 132 OBSOLETE. Gone in 7.16.0 */ + /* 133 OBSOLETE. Gone in 7.16.0 */ + + /* zero terminated string for pass on to the FTP server when asked for + "account" info */ + CINIT(FTP_ACCOUNT, STRINGPOINT, 134), + + /* feed cookie into cookie engine */ + CINIT(COOKIELIST, STRINGPOINT, 135), + + /* ignore Content-Length */ + CINIT(IGNORE_CONTENT_LENGTH, LONG, 136), + + /* Set to non-zero to skip the IP address received in a 227 PASV FTP server + response. Typically used for FTP-SSL purposes but is not restricted to + that. libcurl will then instead use the same IP address it used for the + control connection. */ + CINIT(FTP_SKIP_PASV_IP, LONG, 137), + + /* Select "file method" to use when doing FTP, see the curl_ftpmethod + above. */ + CINIT(FTP_FILEMETHOD, LONG, 138), + + /* Local port number to bind the socket to */ + CINIT(LOCALPORT, LONG, 139), + + /* Number of ports to try, including the first one set with LOCALPORT. + Thus, setting it to 1 will make no additional attempts but the first. + */ + CINIT(LOCALPORTRANGE, LONG, 140), + + /* no transfer, set up connection and let application use the socket by + extracting it with CURLINFO_LASTSOCKET */ + CINIT(CONNECT_ONLY, LONG, 141), + + /* Function that will be called to convert from the + network encoding (instead of using the iconv calls in libcurl) */ + CINIT(CONV_FROM_NETWORK_FUNCTION, FUNCTIONPOINT, 142), + + /* Function that will be called to convert to the + network encoding (instead of using the iconv calls in libcurl) */ + CINIT(CONV_TO_NETWORK_FUNCTION, FUNCTIONPOINT, 143), + + /* Function that will be called to convert from UTF8 + (instead of using the iconv calls in libcurl) + Note that this is used only for SSL certificate processing */ + CINIT(CONV_FROM_UTF8_FUNCTION, FUNCTIONPOINT, 144), + + /* if the connection proceeds too quickly then need to slow it down */ + /* limit-rate: maximum number of bytes per second to send or receive */ + CINIT(MAX_SEND_SPEED_LARGE, OFF_T, 145), + CINIT(MAX_RECV_SPEED_LARGE, OFF_T, 146), + + /* Pointer to command string to send if USER/PASS fails. */ + CINIT(FTP_ALTERNATIVE_TO_USER, STRINGPOINT, 147), + + /* callback function for setting socket options */ + CINIT(SOCKOPTFUNCTION, FUNCTIONPOINT, 148), + CINIT(SOCKOPTDATA, OBJECTPOINT, 149), + + /* set to 0 to disable session ID re-use for this transfer, default is + enabled (== 1) */ + CINIT(SSL_SESSIONID_CACHE, LONG, 150), + + /* allowed SSH authentication methods */ + CINIT(SSH_AUTH_TYPES, LONG, 151), + + /* Used by scp/sftp to do public/private key authentication */ + CINIT(SSH_PUBLIC_KEYFILE, STRINGPOINT, 152), + CINIT(SSH_PRIVATE_KEYFILE, STRINGPOINT, 153), + + /* Send CCC (Clear Command Channel) after authentication */ + CINIT(FTP_SSL_CCC, LONG, 154), + + /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */ + CINIT(TIMEOUT_MS, LONG, 155), + CINIT(CONNECTTIMEOUT_MS, LONG, 156), + + /* set to zero to disable the libcurl's decoding and thus pass the raw body + data to the application even when it is encoded/compressed */ + CINIT(HTTP_TRANSFER_DECODING, LONG, 157), + CINIT(HTTP_CONTENT_DECODING, LONG, 158), + + /* Permission used when creating new files and directories on the remote + server for protocols that support it, SFTP/SCP/FILE */ + CINIT(NEW_FILE_PERMS, LONG, 159), + CINIT(NEW_DIRECTORY_PERMS, LONG, 160), + + /* Set the behaviour of POST when redirecting. Values must be set to one + of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */ + CINIT(POSTREDIR, LONG, 161), + + /* used by scp/sftp to verify the host's public key */ + CINIT(SSH_HOST_PUBLIC_KEY_MD5, STRINGPOINT, 162), + + /* Callback function for opening socket (instead of socket(2)). Optionally, + callback is able change the address or refuse to connect returning + CURL_SOCKET_BAD. The callback should have type + curl_opensocket_callback */ + CINIT(OPENSOCKETFUNCTION, FUNCTIONPOINT, 163), + CINIT(OPENSOCKETDATA, OBJECTPOINT, 164), + + /* POST volatile input fields. */ + CINIT(COPYPOSTFIELDS, OBJECTPOINT, 165), + + /* set transfer mode (;type=) when doing FTP via an HTTP proxy */ + CINIT(PROXY_TRANSFER_MODE, LONG, 166), + + /* Callback function for seeking in the input stream */ + CINIT(SEEKFUNCTION, FUNCTIONPOINT, 167), + CINIT(SEEKDATA, OBJECTPOINT, 168), + + /* CRL file */ + CINIT(CRLFILE, STRINGPOINT, 169), + + /* Issuer certificate */ + CINIT(ISSUERCERT, STRINGPOINT, 170), + + /* (IPv6) Address scope */ + CINIT(ADDRESS_SCOPE, LONG, 171), + + /* Collect certificate chain info and allow it to get retrievable with + CURLINFO_CERTINFO after the transfer is complete. */ + CINIT(CERTINFO, LONG, 172), + + /* "name" and "pwd" to use when fetching. */ + CINIT(USERNAME, STRINGPOINT, 173), + CINIT(PASSWORD, STRINGPOINT, 174), + + /* "name" and "pwd" to use with Proxy when fetching. */ + CINIT(PROXYUSERNAME, STRINGPOINT, 175), + CINIT(PROXYPASSWORD, STRINGPOINT, 176), + + /* Comma separated list of hostnames defining no-proxy zones. These should + match both hostnames directly, and hostnames within a domain. For + example, local.com will match local.com and www.local.com, but NOT + notlocal.com or www.notlocal.com. For compatibility with other + implementations of this, .local.com will be considered to be the same as + local.com. A single * is the only valid wildcard, and effectively + disables the use of proxy. */ + CINIT(NOPROXY, STRINGPOINT, 177), + + /* block size for TFTP transfers */ + CINIT(TFTP_BLKSIZE, LONG, 178), + + /* Socks Service */ + CINIT(SOCKS5_GSSAPI_SERVICE, STRINGPOINT, 179), /* DEPRECATED, do not use! */ + + /* Socks Service */ + CINIT(SOCKS5_GSSAPI_NEC, LONG, 180), + + /* set the bitmask for the protocols that are allowed to be used for the + transfer, which thus helps the app which takes URLs from users or other + external inputs and want to restrict what protocol(s) to deal + with. Defaults to CURLPROTO_ALL. */ + CINIT(PROTOCOLS, LONG, 181), + + /* set the bitmask for the protocols that libcurl is allowed to follow to, + as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs + to be set in both bitmasks to be allowed to get redirected to. Defaults + to all protocols except FILE and SCP. */ + CINIT(REDIR_PROTOCOLS, LONG, 182), + + /* set the SSH knownhost file name to use */ + CINIT(SSH_KNOWNHOSTS, STRINGPOINT, 183), + + /* set the SSH host key callback, must point to a curl_sshkeycallback + function */ + CINIT(SSH_KEYFUNCTION, FUNCTIONPOINT, 184), + + /* set the SSH host key callback custom pointer */ + CINIT(SSH_KEYDATA, OBJECTPOINT, 185), + + /* set the SMTP mail originator */ + CINIT(MAIL_FROM, STRINGPOINT, 186), + + /* set the list of SMTP mail receiver(s) */ + CINIT(MAIL_RCPT, OBJECTPOINT, 187), + + /* FTP: send PRET before PASV */ + CINIT(FTP_USE_PRET, LONG, 188), + + /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */ + CINIT(RTSP_REQUEST, LONG, 189), + + /* The RTSP session identifier */ + CINIT(RTSP_SESSION_ID, STRINGPOINT, 190), + + /* The RTSP stream URI */ + CINIT(RTSP_STREAM_URI, STRINGPOINT, 191), + + /* The Transport: header to use in RTSP requests */ + CINIT(RTSP_TRANSPORT, STRINGPOINT, 192), + + /* Manually initialize the client RTSP CSeq for this handle */ + CINIT(RTSP_CLIENT_CSEQ, LONG, 193), + + /* Manually initialize the server RTSP CSeq for this handle */ + CINIT(RTSP_SERVER_CSEQ, LONG, 194), + + /* The stream to pass to INTERLEAVEFUNCTION. */ + CINIT(INTERLEAVEDATA, OBJECTPOINT, 195), + + /* Let the application define a custom write method for RTP data */ + CINIT(INTERLEAVEFUNCTION, FUNCTIONPOINT, 196), + + /* Turn on wildcard matching */ + CINIT(WILDCARDMATCH, LONG, 197), + + /* Directory matching callback called before downloading of an + individual file (chunk) started */ + CINIT(CHUNK_BGN_FUNCTION, FUNCTIONPOINT, 198), + + /* Directory matching callback called after the file (chunk) + was downloaded, or skipped */ + CINIT(CHUNK_END_FUNCTION, FUNCTIONPOINT, 199), + + /* Change match (fnmatch-like) callback for wildcard matching */ + CINIT(FNMATCH_FUNCTION, FUNCTIONPOINT, 200), + + /* Let the application define custom chunk data pointer */ + CINIT(CHUNK_DATA, OBJECTPOINT, 201), + + /* FNMATCH_FUNCTION user pointer */ + CINIT(FNMATCH_DATA, OBJECTPOINT, 202), + + /* send linked-list of name:port:address sets */ + CINIT(RESOLVE, OBJECTPOINT, 203), + + /* Set a username for authenticated TLS */ + CINIT(TLSAUTH_USERNAME, STRINGPOINT, 204), + + /* Set a password for authenticated TLS */ + CINIT(TLSAUTH_PASSWORD, STRINGPOINT, 205), + + /* Set authentication type for authenticated TLS */ + CINIT(TLSAUTH_TYPE, STRINGPOINT, 206), + + /* Set to 1 to enable the "TE:" header in HTTP requests to ask for + compressed transfer-encoded responses. Set to 0 to disable the use of TE: + in outgoing requests. The current default is 0, but it might change in a + future libcurl release. + + libcurl will ask for the compressed methods it knows of, and if that + isn't any, it will not ask for transfer-encoding at all even if this + option is set to 1. + + */ + CINIT(TRANSFER_ENCODING, LONG, 207), + + /* Callback function for closing socket (instead of close(2)). The callback + should have type curl_closesocket_callback */ + CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208), + CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209), + + /* allow GSSAPI credential delegation */ + CINIT(GSSAPI_DELEGATION, LONG, 210), + + /* Set the name servers to use for DNS resolution */ + CINIT(DNS_SERVERS, STRINGPOINT, 211), + + /* Time-out accept operations (currently for FTP only) after this amount + of milliseconds. */ + CINIT(ACCEPTTIMEOUT_MS, LONG, 212), + + /* Set TCP keepalive */ + CINIT(TCP_KEEPALIVE, LONG, 213), + + /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */ + CINIT(TCP_KEEPIDLE, LONG, 214), + CINIT(TCP_KEEPINTVL, LONG, 215), + + /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */ + CINIT(SSL_OPTIONS, LONG, 216), + + /* Set the SMTP auth originator */ + CINIT(MAIL_AUTH, STRINGPOINT, 217), + + /* Enable/disable SASL initial response */ + CINIT(SASL_IR, LONG, 218), + + /* Function that will be called instead of the internal progress display + * function. This function should be defined as the curl_xferinfo_callback + * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */ + CINIT(XFERINFOFUNCTION, FUNCTIONPOINT, 219), + + /* The XOAUTH2 bearer token */ + CINIT(XOAUTH2_BEARER, STRINGPOINT, 220), + + /* Set the interface string to use as outgoing network + * interface for DNS requests. + * Only supported by the c-ares DNS backend */ + CINIT(DNS_INTERFACE, STRINGPOINT, 221), + + /* Set the local IPv4 address to use for outgoing DNS requests. + * Only supported by the c-ares DNS backend */ + CINIT(DNS_LOCAL_IP4, STRINGPOINT, 222), + + /* Set the local IPv4 address to use for outgoing DNS requests. + * Only supported by the c-ares DNS backend */ + CINIT(DNS_LOCAL_IP6, STRINGPOINT, 223), + + /* Set authentication options directly */ + CINIT(LOGIN_OPTIONS, STRINGPOINT, 224), + + /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */ + CINIT(SSL_ENABLE_NPN, LONG, 225), + + /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */ + CINIT(SSL_ENABLE_ALPN, LONG, 226), + + /* Time to wait for a response to a HTTP request containing an + * Expect: 100-continue header before sending the data anyway. */ + CINIT(EXPECT_100_TIMEOUT_MS, LONG, 227), + + /* This points to a linked list of headers used for proxy requests only, + struct curl_slist kind */ + CINIT(PROXYHEADER, OBJECTPOINT, 228), + + /* Pass in a bitmask of "header options" */ + CINIT(HEADEROPT, LONG, 229), + + /* The public key in DER form used to validate the peer public key + this option is used only if SSL_VERIFYPEER is true */ + CINIT(PINNEDPUBLICKEY, STRINGPOINT, 230), + + /* Path to Unix domain socket */ + CINIT(UNIX_SOCKET_PATH, STRINGPOINT, 231), + + /* Set if we should verify the certificate status. */ + CINIT(SSL_VERIFYSTATUS, LONG, 232), + + /* Set if we should enable TLS false start. */ + CINIT(SSL_FALSESTART, LONG, 233), + + /* Do not squash dot-dot sequences */ + CINIT(PATH_AS_IS, LONG, 234), + + /* Proxy Service Name */ + CINIT(PROXY_SERVICE_NAME, STRINGPOINT, 235), + + /* Service Name */ + CINIT(SERVICE_NAME, STRINGPOINT, 236), + + /* Wait/don't wait for pipe/mutex to clarify */ + CINIT(PIPEWAIT, LONG, 237), + + /* Set the protocol used when curl is given a URL without a protocol */ + CINIT(DEFAULT_PROTOCOL, STRINGPOINT, 238), + + /* Set stream weight, 1 - 256 (default is 16) */ + CINIT(STREAM_WEIGHT, LONG, 239), + + /* Set stream dependency on another CURL handle */ + CINIT(STREAM_DEPENDS, OBJECTPOINT, 240), + + /* Set E-xclusive stream dependency on another CURL handle */ + CINIT(STREAM_DEPENDS_E, OBJECTPOINT, 241), + + /* Do not send any tftp option requests to the server */ + CINIT(TFTP_NO_OPTIONS, LONG, 242), + + /* Linked-list of host:port:connect-to-host:connect-to-port, + overrides the URL's host:port (only for the network layer) */ + CINIT(CONNECT_TO, OBJECTPOINT, 243), + + /* Set TCP Fast Open */ + CINIT(TCP_FASTOPEN, LONG, 244), + + /* Continue to send data if the server responds early with an + * HTTP status code >= 300 */ + CINIT(KEEP_SENDING_ON_ERROR, LONG, 245), + + /* The CApath or CAfile used to validate the proxy certificate + this option is used only if PROXY_SSL_VERIFYPEER is true */ + CINIT(PROXY_CAINFO, STRINGPOINT, 246), + + /* The CApath directory used to validate the proxy certificate + this option is used only if PROXY_SSL_VERIFYPEER is true */ + CINIT(PROXY_CAPATH, STRINGPOINT, 247), + + /* Set if we should verify the proxy in ssl handshake, + set 1 to verify. */ + CINIT(PROXY_SSL_VERIFYPEER, LONG, 248), + + /* Set if we should verify the Common name from the proxy certificate in ssl + * handshake, set 1 to check existence, 2 to ensure that it matches + * the provided hostname. */ + CINIT(PROXY_SSL_VERIFYHOST, LONG, 249), + + /* What version to specifically try to use for proxy. + See CURL_SSLVERSION defines below. */ + CINIT(PROXY_SSLVERSION, LONG, 250), + + /* Set a username for authenticated TLS for proxy */ + CINIT(PROXY_TLSAUTH_USERNAME, STRINGPOINT, 251), + + /* Set a password for authenticated TLS for proxy */ + CINIT(PROXY_TLSAUTH_PASSWORD, STRINGPOINT, 252), + + /* Set authentication type for authenticated TLS for proxy */ + CINIT(PROXY_TLSAUTH_TYPE, STRINGPOINT, 253), + + /* name of the file keeping your private SSL-certificate for proxy */ + CINIT(PROXY_SSLCERT, STRINGPOINT, 254), + + /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for + proxy */ + CINIT(PROXY_SSLCERTTYPE, STRINGPOINT, 255), + + /* name of the file keeping your private SSL-key for proxy */ + CINIT(PROXY_SSLKEY, STRINGPOINT, 256), + + /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for + proxy */ + CINIT(PROXY_SSLKEYTYPE, STRINGPOINT, 257), + + /* password for the SSL private key for proxy */ + CINIT(PROXY_KEYPASSWD, STRINGPOINT, 258), + + /* Specify which SSL ciphers to use for proxy */ + CINIT(PROXY_SSL_CIPHER_LIST, STRINGPOINT, 259), + + /* CRL file for proxy */ + CINIT(PROXY_CRLFILE, STRINGPOINT, 260), + + /* Enable/disable specific SSL features with a bitmask for proxy, see + CURLSSLOPT_* */ + CINIT(PROXY_SSL_OPTIONS, LONG, 261), + + /* Name of pre proxy to use. */ + CINIT(PRE_PROXY, STRINGPOINT, 262), + + /* The public key in DER form used to validate the proxy public key + this option is used only if PROXY_SSL_VERIFYPEER is true */ + CINIT(PROXY_PINNEDPUBLICKEY, STRINGPOINT, 263), + + /* Path to an abstract Unix domain socket */ + CINIT(ABSTRACT_UNIX_SOCKET, STRINGPOINT, 264), + + /* Suppress proxy CONNECT response headers from user callbacks */ + CINIT(SUPPRESS_CONNECT_HEADERS, LONG, 265), + + CURLOPT_LASTENTRY /* the last unused */ +} CURLoption; + +#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all + the obsolete stuff removed! */ + +/* Backwards compatibility with older names */ +/* These are scheduled to disappear by 2011 */ + +/* This was added in version 7.19.1 */ +#define CURLOPT_POST301 CURLOPT_POSTREDIR + +/* These are scheduled to disappear by 2009 */ + +/* The following were added in 7.17.0 */ +#define CURLOPT_SSLKEYPASSWD CURLOPT_KEYPASSWD +#define CURLOPT_FTPAPPEND CURLOPT_APPEND +#define CURLOPT_FTPLISTONLY CURLOPT_DIRLISTONLY +#define CURLOPT_FTP_SSL CURLOPT_USE_SSL + +/* The following were added earlier */ + +#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD +#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL + +#else +/* This is set if CURL_NO_OLDIES is defined at compile-time */ +#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ +#endif + + + /* Below here follows defines for the CURLOPT_IPRESOLVE option. If a host + name resolves addresses using more than one IP protocol version, this + option might be handy to force libcurl to use a specific IP version. */ +#define CURL_IPRESOLVE_WHATEVER 0 /* default, resolves addresses to all IP + versions that your system allows */ +#define CURL_IPRESOLVE_V4 1 /* resolve to IPv4 addresses */ +#define CURL_IPRESOLVE_V6 2 /* resolve to IPv6 addresses */ + + /* three convenient "aliases" that follow the name scheme better */ +#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER + + /* These enums are for use with the CURLOPT_HTTP_VERSION option. */ +enum { + CURL_HTTP_VERSION_NONE, /* setting this means we don't care, and that we'd + like the library to choose the best possible + for us! */ + CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */ + CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */ + CURL_HTTP_VERSION_2_0, /* please use HTTP 2 in the request */ + CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */ + CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1 + Upgrade */ + + CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ +}; + +/* Convenience definition simple because the name of the version is HTTP/2 and + not 2.0. The 2_0 version of the enum name was set while the version was + still planned to be 2.0 and we stick to it for compatibility. */ +#define CURL_HTTP_VERSION_2 CURL_HTTP_VERSION_2_0 + +/* + * Public API enums for RTSP requests + */ +enum { + CURL_RTSPREQ_NONE, /* first in list */ + CURL_RTSPREQ_OPTIONS, + CURL_RTSPREQ_DESCRIBE, + CURL_RTSPREQ_ANNOUNCE, + CURL_RTSPREQ_SETUP, + CURL_RTSPREQ_PLAY, + CURL_RTSPREQ_PAUSE, + CURL_RTSPREQ_TEARDOWN, + CURL_RTSPREQ_GET_PARAMETER, + CURL_RTSPREQ_SET_PARAMETER, + CURL_RTSPREQ_RECORD, + CURL_RTSPREQ_RECEIVE, + CURL_RTSPREQ_LAST /* last in list */ +}; + + /* These enums are for use with the CURLOPT_NETRC option. */ +enum CURL_NETRC_OPTION { + CURL_NETRC_IGNORED, /* The .netrc will never be read. + * This is the default. */ + CURL_NETRC_OPTIONAL, /* A user:password in the URL will be preferred + * to one in the .netrc. */ + CURL_NETRC_REQUIRED, /* A user:password in the URL will be ignored. + * Unless one is set programmatically, the .netrc + * will be queried. */ + CURL_NETRC_LAST +}; + +enum { + CURL_SSLVERSION_DEFAULT, + CURL_SSLVERSION_TLSv1, /* TLS 1.x */ + CURL_SSLVERSION_SSLv2, + CURL_SSLVERSION_SSLv3, + CURL_SSLVERSION_TLSv1_0, + CURL_SSLVERSION_TLSv1_1, + CURL_SSLVERSION_TLSv1_2, + CURL_SSLVERSION_TLSv1_3, + + CURL_SSLVERSION_LAST /* never use, keep last */ +}; + +enum { + CURL_SSLVERSION_MAX_NONE = 0, + CURL_SSLVERSION_MAX_DEFAULT = (CURL_SSLVERSION_TLSv1 << 16), + CURL_SSLVERSION_MAX_TLSv1_0 = (CURL_SSLVERSION_TLSv1_0 << 16), + CURL_SSLVERSION_MAX_TLSv1_1 = (CURL_SSLVERSION_TLSv1_1 << 16), + CURL_SSLVERSION_MAX_TLSv1_2 = (CURL_SSLVERSION_TLSv1_2 << 16), + CURL_SSLVERSION_MAX_TLSv1_3 = (CURL_SSLVERSION_TLSv1_3 << 16), + + /* never use, keep last */ + CURL_SSLVERSION_MAX_LAST = (CURL_SSLVERSION_LAST << 16) +}; + +enum CURL_TLSAUTH { + CURL_TLSAUTH_NONE, + CURL_TLSAUTH_SRP, + CURL_TLSAUTH_LAST /* never use, keep last */ +}; + +/* symbols to use with CURLOPT_POSTREDIR. + CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303 + can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302 + | CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */ + +#define CURL_REDIR_GET_ALL 0 +#define CURL_REDIR_POST_301 1 +#define CURL_REDIR_POST_302 2 +#define CURL_REDIR_POST_303 4 +#define CURL_REDIR_POST_ALL \ + (CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303) + +typedef enum { + CURL_TIMECOND_NONE, + + CURL_TIMECOND_IFMODSINCE, + CURL_TIMECOND_IFUNMODSINCE, + CURL_TIMECOND_LASTMOD, + + CURL_TIMECOND_LAST +} curl_TimeCond; + + +/* curl_strequal() and curl_strnequal() are subject for removal in a future + libcurl, see lib/README.curlx for details + + !checksrc! disable SPACEBEFOREPAREN 2 +*/ +CURL_EXTERN int (curl_strequal)(const char *s1, const char *s2); +CURL_EXTERN int (curl_strnequal)(const char *s1, const char *s2, size_t n); + +/* name is uppercase CURLFORM_ */ +#ifdef CFINIT +#undef CFINIT +#endif + +#ifdef CURL_ISOCPP +#define CFINIT(name) CURLFORM_ ## name +#else +/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ +#define CFINIT(name) CURLFORM_/**/name +#endif + +typedef enum { + CFINIT(NOTHING), /********* the first one is unused ************/ + + /* */ + CFINIT(COPYNAME), + CFINIT(PTRNAME), + CFINIT(NAMELENGTH), + CFINIT(COPYCONTENTS), + CFINIT(PTRCONTENTS), + CFINIT(CONTENTSLENGTH), + CFINIT(FILECONTENT), + CFINIT(ARRAY), + CFINIT(OBSOLETE), + CFINIT(FILE), + + CFINIT(BUFFER), + CFINIT(BUFFERPTR), + CFINIT(BUFFERLENGTH), + + CFINIT(CONTENTTYPE), + CFINIT(CONTENTHEADER), + CFINIT(FILENAME), + CFINIT(END), + CFINIT(OBSOLETE2), + + CFINIT(STREAM), + CFINIT(CONTENTLEN), /* added in 7.46.0, provide a curl_off_t length */ + + CURLFORM_LASTENTRY /* the last unused */ +} CURLformoption; + +#undef CFINIT /* done */ + +/* structure to be used as parameter for CURLFORM_ARRAY */ +struct curl_forms { + CURLformoption option; + const char *value; +}; + +/* use this for multipart formpost building */ +/* Returns code for curl_formadd() + * + * Returns: + * CURL_FORMADD_OK on success + * CURL_FORMADD_MEMORY if the FormInfo allocation fails + * CURL_FORMADD_OPTION_TWICE if one option is given twice for one Form + * CURL_FORMADD_NULL if a null pointer was given for a char + * CURL_FORMADD_MEMORY if the allocation of a FormInfo struct failed + * CURL_FORMADD_UNKNOWN_OPTION if an unknown option was used + * CURL_FORMADD_INCOMPLETE if the some FormInfo is not complete (or error) + * CURL_FORMADD_MEMORY if a curl_httppost struct cannot be allocated + * CURL_FORMADD_MEMORY if some allocation for string copying failed. + * CURL_FORMADD_ILLEGAL_ARRAY if an illegal option is used in an array + * + ***************************************************************************/ +typedef enum { + CURL_FORMADD_OK, /* first, no error */ + + CURL_FORMADD_MEMORY, + CURL_FORMADD_OPTION_TWICE, + CURL_FORMADD_NULL, + CURL_FORMADD_UNKNOWN_OPTION, + CURL_FORMADD_INCOMPLETE, + CURL_FORMADD_ILLEGAL_ARRAY, + CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */ + + CURL_FORMADD_LAST /* last */ +} CURLFORMcode; + +/* + * NAME curl_formadd() + * + * DESCRIPTION + * + * Pretty advanced function for building multi-part formposts. Each invoke + * adds one part that together construct a full post. Then use + * CURLOPT_HTTPPOST to send it off to libcurl. + */ +CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, + struct curl_httppost **last_post, + ...); + +/* + * callback function for curl_formget() + * The void *arg pointer will be the one passed as second argument to + * curl_formget(). + * The character buffer passed to it must not be freed. + * Should return the buffer length passed to it as the argument "len" on + * success. + */ +typedef size_t (*curl_formget_callback)(void *arg, const char *buf, + size_t len); + +/* + * NAME curl_formget() + * + * DESCRIPTION + * + * Serialize a curl_httppost struct built with curl_formadd(). + * Accepts a void pointer as second argument which will be passed to + * the curl_formget_callback function. + * Returns 0 on success. + */ +CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg, + curl_formget_callback append); +/* + * NAME curl_formfree() + * + * DESCRIPTION + * + * Free a multipart formpost previously built with curl_formadd(). + */ +CURL_EXTERN void curl_formfree(struct curl_httppost *form); + +/* + * NAME curl_getenv() + * + * DESCRIPTION + * + * Returns a malloc()'ed string that MUST be curl_free()ed after usage is + * complete. DEPRECATED - see lib/README.curlx + */ +CURL_EXTERN char *curl_getenv(const char *variable); + +/* + * NAME curl_version() + * + * DESCRIPTION + * + * Returns a static ascii string of the libcurl version. + */ +CURL_EXTERN char *curl_version(void); + +/* + * NAME curl_easy_escape() + * + * DESCRIPTION + * + * Escapes URL strings (converts all letters consider illegal in URLs to their + * %XX versions). This function returns a new allocated string or NULL if an + * error occurred. + */ +CURL_EXTERN char *curl_easy_escape(CURL *handle, + const char *string, + int length); + +/* the previous version: */ +CURL_EXTERN char *curl_escape(const char *string, + int length); + + +/* + * NAME curl_easy_unescape() + * + * DESCRIPTION + * + * Unescapes URL encoding in strings (converts all %XX codes to their 8bit + * versions). This function returns a new allocated string or NULL if an error + * occurred. + * Conversion Note: On non-ASCII platforms the ASCII %XX codes are + * converted into the host encoding. + */ +CURL_EXTERN char *curl_easy_unescape(CURL *handle, + const char *string, + int length, + int *outlength); + +/* the previous version */ +CURL_EXTERN char *curl_unescape(const char *string, + int length); + +/* + * NAME curl_free() + * + * DESCRIPTION + * + * Provided for de-allocation in the same translation unit that did the + * allocation. Added in libcurl 7.10 + */ +CURL_EXTERN void curl_free(void *p); + +/* + * NAME curl_global_init() + * + * DESCRIPTION + * + * curl_global_init() should be invoked exactly once for each application that + * uses libcurl and before any call of other libcurl functions. + * + * This function is not thread-safe! + */ +CURL_EXTERN CURLcode curl_global_init(long flags); + +/* + * NAME curl_global_init_mem() + * + * DESCRIPTION + * + * curl_global_init() or curl_global_init_mem() should be invoked exactly once + * for each application that uses libcurl. This function can be used to + * initialize libcurl and set user defined memory management callback + * functions. Users can implement memory management routines to check for + * memory leaks, check for mis-use of the curl library etc. User registered + * callback routines with be invoked by this library instead of the system + * memory management routines like malloc, free etc. + */ +CURL_EXTERN CURLcode curl_global_init_mem(long flags, + curl_malloc_callback m, + curl_free_callback f, + curl_realloc_callback r, + curl_strdup_callback s, + curl_calloc_callback c); + +/* + * NAME curl_global_cleanup() + * + * DESCRIPTION + * + * curl_global_cleanup() should be invoked exactly once for each application + * that uses libcurl + */ +CURL_EXTERN void curl_global_cleanup(void); + +/* linked-list structure for the CURLOPT_QUOTE option (and other) */ +struct curl_slist { + char *data; + struct curl_slist *next; +}; + +/* + * NAME curl_slist_append() + * + * DESCRIPTION + * + * Appends a string to a linked list. If no list exists, it will be created + * first. Returns the new list, after appending. + */ +CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *, + const char *); + +/* + * NAME curl_slist_free_all() + * + * DESCRIPTION + * + * free a previously built curl_slist. + */ +CURL_EXTERN void curl_slist_free_all(struct curl_slist *); + +/* + * NAME curl_getdate() + * + * DESCRIPTION + * + * Returns the time, in seconds since 1 Jan 1970 of the time string given in + * the first argument. The time argument in the second parameter is unused + * and should be set to NULL. + */ +CURL_EXTERN time_t curl_getdate(const char *p, const time_t *unused); + +/* info about the certificate chain, only for OpenSSL builds. Asked + for with CURLOPT_CERTINFO / CURLINFO_CERTINFO */ +struct curl_certinfo { + int num_of_certs; /* number of certificates with information */ + struct curl_slist **certinfo; /* for each index in this array, there's a + linked list with textual information in the + format "name: value" */ +}; + +/* enum for the different supported SSL backends */ +typedef enum { + CURLSSLBACKEND_NONE = 0, + CURLSSLBACKEND_OPENSSL = 1, + CURLSSLBACKEND_GNUTLS = 2, + CURLSSLBACKEND_NSS = 3, + CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */ + CURLSSLBACKEND_GSKIT = 5, + CURLSSLBACKEND_POLARSSL = 6, + CURLSSLBACKEND_CYASSL = 7, + CURLSSLBACKEND_SCHANNEL = 8, + CURLSSLBACKEND_DARWINSSL = 9, + CURLSSLBACKEND_AXTLS = 10, + CURLSSLBACKEND_MBEDTLS = 11 +} curl_sslbackend; + +/* aliases for library clones and renames */ +#define CURLSSLBACKEND_LIBRESSL 1 +#define CURLSSLBACKEND_BORINGSSL 1 +#define CURLSSLBACKEND_WOLFSSL 6 + +/* Information about the SSL library used and the respective internal SSL + handle, which can be used to obtain further information regarding the + connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */ +struct curl_tlssessioninfo { + curl_sslbackend backend; + void *internals; +}; + +#define CURLINFO_STRING 0x100000 +#define CURLINFO_LONG 0x200000 +#define CURLINFO_DOUBLE 0x300000 +#define CURLINFO_SLIST 0x400000 ++#define CURLINFO_PTR 0x400000 /* same as SLIST */ +#define CURLINFO_SOCKET 0x500000 +#define CURLINFO_MASK 0x0fffff +#define CURLINFO_TYPEMASK 0xf00000 + +typedef enum { + CURLINFO_NONE, /* first, never use this */ + CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1, + CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2, + CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3, + CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4, + CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5, + CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6, + CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7, + CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8, + CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9, + CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10, + CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11, + CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, + CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, + CURLINFO_FILETIME = CURLINFO_LONG + 14, + CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15, + CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16, + CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, + CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, + CURLINFO_REDIRECT_TIME = CURLINFO_DOUBLE + 19, + CURLINFO_REDIRECT_COUNT = CURLINFO_LONG + 20, + CURLINFO_PRIVATE = CURLINFO_STRING + 21, + CURLINFO_HTTP_CONNECTCODE = CURLINFO_LONG + 22, + CURLINFO_HTTPAUTH_AVAIL = CURLINFO_LONG + 23, + CURLINFO_PROXYAUTH_AVAIL = CURLINFO_LONG + 24, + CURLINFO_OS_ERRNO = CURLINFO_LONG + 25, + CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, + CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, + CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, + CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, + CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, + CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, + CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, + CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, - CURLINFO_CERTINFO = CURLINFO_SLIST + 34, ++ CURLINFO_CERTINFO = CURLINFO_PTR + 34, + CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35, + CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36, + CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37, + CURLINFO_RTSP_SERVER_CSEQ = CURLINFO_LONG + 38, + CURLINFO_RTSP_CSEQ_RECV = CURLINFO_LONG + 39, + CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40, + CURLINFO_LOCAL_IP = CURLINFO_STRING + 41, + CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42, - CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43, ++ CURLINFO_TLS_SESSION = CURLINFO_PTR + 43, + CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44, - CURLINFO_TLS_SSL_PTR = CURLINFO_SLIST + 45, ++ CURLINFO_TLS_SSL_PTR = CURLINFO_PTR + 45, + CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46, + CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47, + CURLINFO_PROTOCOL = CURLINFO_LONG + 48, + CURLINFO_SCHEME = CURLINFO_STRING + 49, + /* Fill in new entries below here! */ + + CURLINFO_LASTONE = 49 +} CURLINFO; + +/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as + CURLINFO_HTTP_CODE */ +#define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE + +typedef enum { + CURLCLOSEPOLICY_NONE, /* first, never use this */ + + CURLCLOSEPOLICY_OLDEST, + CURLCLOSEPOLICY_LEAST_RECENTLY_USED, + CURLCLOSEPOLICY_LEAST_TRAFFIC, + CURLCLOSEPOLICY_SLOWEST, + CURLCLOSEPOLICY_CALLBACK, + + CURLCLOSEPOLICY_LAST /* last, never use this */ +} curl_closepolicy; + +#define CURL_GLOBAL_SSL (1<<0) +#define CURL_GLOBAL_WIN32 (1<<1) +#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32) +#define CURL_GLOBAL_NOTHING 0 +#define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL +#define CURL_GLOBAL_ACK_EINTR (1<<2) + + +/***************************************************************************** + * Setup defines, protos etc for the sharing stuff. + */ + +/* Different data locks for a single share */ +typedef enum { + CURL_LOCK_DATA_NONE = 0, + /* CURL_LOCK_DATA_SHARE is used internally to say that + * the locking is just made to change the internal state of the share + * itself. + */ + CURL_LOCK_DATA_SHARE, + CURL_LOCK_DATA_COOKIE, + CURL_LOCK_DATA_DNS, + CURL_LOCK_DATA_SSL_SESSION, + CURL_LOCK_DATA_CONNECT, + CURL_LOCK_DATA_LAST +} curl_lock_data; + +/* Different lock access types */ +typedef enum { + CURL_LOCK_ACCESS_NONE = 0, /* unspecified action */ + CURL_LOCK_ACCESS_SHARED = 1, /* for read perhaps */ + CURL_LOCK_ACCESS_SINGLE = 2, /* for write perhaps */ + CURL_LOCK_ACCESS_LAST /* never use */ +} curl_lock_access; + +typedef void (*curl_lock_function)(CURL *handle, + curl_lock_data data, + curl_lock_access locktype, + void *userptr); +typedef void (*curl_unlock_function)(CURL *handle, + curl_lock_data data, + void *userptr); + + +typedef enum { + CURLSHE_OK, /* all is fine */ + CURLSHE_BAD_OPTION, /* 1 */ + CURLSHE_IN_USE, /* 2 */ + CURLSHE_INVALID, /* 3 */ + CURLSHE_NOMEM, /* 4 out of memory */ + CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */ + CURLSHE_LAST /* never use */ +} CURLSHcode; + +typedef enum { + CURLSHOPT_NONE, /* don't use */ + CURLSHOPT_SHARE, /* specify a data type to share */ + CURLSHOPT_UNSHARE, /* specify which data type to stop sharing */ + CURLSHOPT_LOCKFUNC, /* pass in a 'curl_lock_function' pointer */ + CURLSHOPT_UNLOCKFUNC, /* pass in a 'curl_unlock_function' pointer */ + CURLSHOPT_USERDATA, /* pass in a user data pointer used in the lock/unlock + callback functions */ + CURLSHOPT_LAST /* never use */ +} CURLSHoption; + +CURL_EXTERN CURLSH *curl_share_init(void); +CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...); +CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *); + +/**************************************************************************** + * Structures for querying information about the curl library at runtime. + */ + +typedef enum { + CURLVERSION_FIRST, + CURLVERSION_SECOND, + CURLVERSION_THIRD, + CURLVERSION_FOURTH, + CURLVERSION_LAST /* never actually use this */ +} CURLversion; + +/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by + basically all programs ever that want to get version information. It is + meant to be a built-in version number for what kind of struct the caller + expects. If the struct ever changes, we redefine the NOW to another enum + from above. */ +#define CURLVERSION_NOW CURLVERSION_FOURTH + +typedef struct { + CURLversion age; /* age of the returned struct */ + const char *version; /* LIBCURL_VERSION */ + unsigned int version_num; /* LIBCURL_VERSION_NUM */ + const char *host; /* OS/host/cpu/machine when configured */ + int features; /* bitmask, see defines below */ + const char *ssl_version; /* human readable string */ + long ssl_version_num; /* not used anymore, always 0 */ + const char *libz_version; /* human readable string */ + /* protocols is terminated by an entry with a NULL protoname */ + const char * const *protocols; + + /* The fields below this were added in CURLVERSION_SECOND */ + const char *ares; + int ares_num; + + /* This field was added in CURLVERSION_THIRD */ + const char *libidn; + + /* These field were added in CURLVERSION_FOURTH */ + + /* Same as '_libiconv_version' if built with HAVE_ICONV */ + int iconv_ver_num; + + const char *libssh_version; /* human readable string */ + +} curl_version_info_data; + +#define CURL_VERSION_IPV6 (1<<0) /* IPv6-enabled */ +#define CURL_VERSION_KERBEROS4 (1<<1) /* Kerberos V4 auth is supported + (deprecated) */ +#define CURL_VERSION_SSL (1<<2) /* SSL options are present */ +#define CURL_VERSION_LIBZ (1<<3) /* libz features are present */ +#define CURL_VERSION_NTLM (1<<4) /* NTLM auth is supported */ +#define CURL_VERSION_GSSNEGOTIATE (1<<5) /* Negotiate auth is supported + (deprecated) */ +#define CURL_VERSION_DEBUG (1<<6) /* Built with debug capabilities */ +#define CURL_VERSION_ASYNCHDNS (1<<7) /* Asynchronous DNS resolves */ +#define CURL_VERSION_SPNEGO (1<<8) /* SPNEGO auth is supported */ +#define CURL_VERSION_LARGEFILE (1<<9) /* Supports files larger than 2GB */ +#define CURL_VERSION_IDN (1<<10) /* Internationized Domain Names are + supported */ +#define CURL_VERSION_SSPI (1<<11) /* Built against Windows SSPI */ +#define CURL_VERSION_CONV (1<<12) /* Character conversions supported */ +#define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported */ +#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */ +#define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegation to winbind helper + is supported */ +#define CURL_VERSION_HTTP2 (1<<16) /* HTTP2 support built-in */ +#define CURL_VERSION_GSSAPI (1<<17) /* Built against a GSS-API library */ +#define CURL_VERSION_KERBEROS5 (1<<18) /* Kerberos V5 auth is supported */ +#define CURL_VERSION_UNIX_SOCKETS (1<<19) /* Unix domain sockets support */ +#define CURL_VERSION_PSL (1<<20) /* Mozilla's Public Suffix List, used + for cookie domain verification */ +#define CURL_VERSION_HTTPS_PROXY (1<<21) /* HTTPS-proxy support built-in */ + + /* + * NAME curl_version_info() + * + * DESCRIPTION + * + * This function returns a pointer to a static copy of the version info + * struct. See above. + */ +CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion); + +/* + * NAME curl_easy_strerror() + * + * DESCRIPTION + * + * The curl_easy_strerror function may be used to turn a CURLcode value + * into the equivalent human readable error string. This is useful + * for printing meaningful error messages. + */ +CURL_EXTERN const char *curl_easy_strerror(CURLcode); + +/* + * NAME curl_share_strerror() + * + * DESCRIPTION + * + * The curl_share_strerror function may be used to turn a CURLSHcode value + * into the equivalent human readable error string. This is useful + * for printing meaningful error messages. + */ +CURL_EXTERN const char *curl_share_strerror(CURLSHcode); + +/* + * NAME curl_easy_pause() + * + * DESCRIPTION + * + * The curl_easy_pause function pauses or unpauses transfers. Select the new + * state by setting the bitmask, use the convenience defines below. + * + */ +CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); + +#define CURLPAUSE_RECV (1<<0) +#define CURLPAUSE_RECV_CONT (0) + +#define CURLPAUSE_SEND (1<<2) +#define CURLPAUSE_SEND_CONT (0) + +#define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND) +#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT) + +#ifdef __cplusplus +} +#endif + +/* unfortunately, the easy.h and multi.h include files need options and info + stuff before they can be included! */ +#include "easy.h" /* nothing in curl is fun without the easy stuff */ +#include "multi.h" + +/* the typechecker doesn't work in C++ (yet) */ +#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \ + ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && \ + !defined(__cplusplus) && !defined(CURL_DISABLE_TYPECHECK) +#include "typecheck-gcc.h" +#else +#if defined(__STDC__) && (__STDC__ >= 1) +#if 0 /* Triggers clang -Wdisabled-macro-expansion, skip for CMake. */ +/* This preprocessor magic that replaces a call with the exact same call is + only done to make sure application authors pass exactly three arguments + to these functions. */ +#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param) +#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg) +#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) +#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) +#endif +#endif /* __STDC__ >= 1 */ +#endif /* gcc >= 4.3 && !__cplusplus */ + +#endif /* __CURL_CURL_H */ diff --cc Utilities/cmcurl/include/curl/curlver.h index 7f0e3b8,0000000..667b7eb mode 100644,000000..100644 --- a/Utilities/cmcurl/include/curl/curlver.h +++ b/Utilities/cmcurl/include/curl/curlver.h @@@ -1,77 -1,0 +1,77 @@@ +#ifndef __CURL_CURLVER_H +#define __CURL_CURLVER_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* This header file contains nothing but libcurl version info, generated by + a script at release-time. This was made its own header file in 7.11.2 */ + +/* This is the global package copyright */ +#define LIBCURL_COPYRIGHT "1996 - 2017 Daniel Stenberg, ." + +/* This is the version number of the libcurl package from which this header + file origins: */ - #define LIBCURL_VERSION "7.54.0" ++#define LIBCURL_VERSION "7.54.1" + +/* The numeric version number is also available "in parts" by using these + defines: */ +#define LIBCURL_VERSION_MAJOR 7 +#define LIBCURL_VERSION_MINOR 54 - #define LIBCURL_VERSION_PATCH 0 ++#define LIBCURL_VERSION_PATCH 1 + +/* This is the numeric version of the libcurl version number, meant for easier + parsing and comparions by programs. The LIBCURL_VERSION_NUM define will + always follow this syntax: + + 0xXXYYZZ + + Where XX, YY and ZZ are the main version, release and patch numbers in + hexadecimal (using 8 bits each). All three numbers are always represented + using two digits. 1.2 would appear as "0x010200" while version 9.11.7 + appears as "0x090b07". + + This 6-digit (24 bits) hexadecimal number does not show pre-release number, + and it is always a greater number in a more recent release. It makes + comparisons with greater than and less than work. + + Note: This define is the full hex number and _does not_ use the + CURL_VERSION_BITS() macro since curl's own configure script greps for it + and needs it to contain the full number. +*/ - #define LIBCURL_VERSION_NUM 0x073600 ++#define LIBCURL_VERSION_NUM 0x073601 + +/* + * This is the date and time when the full source package was created. The + * timestamp is not stored in git, as the timestamp is properly set in the + * tarballs by the maketgz script. + * - * The format of the date should follow this template: ++ * The format of the date follows this template: + * - * "Mon Feb 12 11:35:33 UTC 2007" ++ * "2007-11-23" + */ - #define LIBCURL_TIMESTAMP "DEV" ++#define LIBCURL_TIMESTAMP "[unreleased]" + +#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z) +#define CURL_AT_LEAST_VERSION(x,y,z) \ + (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) + +#endif /* __CURL_CURLVER_H */ diff --cc Utilities/cmcurl/lib/curl_setup.h index 6ab18cd,0000000..a6268ad mode 100644,000000..100644 --- a/Utilities/cmcurl/lib/curl_setup.h +++ b/Utilities/cmcurl/lib/curl_setup.h @@@ -1,769 -1,0 +1,773 @@@ +#ifndef HEADER_CURL_SETUP_H +#define HEADER_CURL_SETUP_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +/* + * Define WIN32 when build target is Win32 API + */ + +#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && \ + !defined(__SYMBIAN32__) +#define WIN32 +#endif + +/* + * Include configuration script results or hand-crafted + * configuration file for platforms which lack config tool. + */ + +#ifdef HAVE_CONFIG_H + +#include "curl_config.h" + +#else /* HAVE_CONFIG_H */ + +#ifdef _WIN32_WCE +# include "config-win32ce.h" +#else +# ifdef WIN32 +# include "config-win32.h" +# endif +#endif + +#if defined(macintosh) && defined(__MRC__) +# include "config-mac.h" +#endif + +#ifdef __riscos__ +# include "config-riscos.h" +#endif + +#ifdef __AMIGA__ +# include "config-amigaos.h" +#endif + +#ifdef __SYMBIAN32__ +# include "config-symbian.h" +#endif + +#ifdef __OS400__ +# include "config-os400.h" +#endif + +#ifdef TPF +# include "config-tpf.h" +#endif + +#ifdef __VXWORKS__ +# include "config-vxworks.h" +#endif + +#endif /* HAVE_CONFIG_H */ + +#if defined(_MSC_VER) +# pragma warning(push,1) +#endif + +/* ================================================================ */ +/* Definition of preprocessor macros/symbols which modify compiler */ +/* behavior or generated code characteristics must be done here, */ +/* as appropriate, before any system header file is included. It is */ +/* also possible to have them defined in the config file included */ +/* before this point. As a result of all this we frown inclusion of */ +/* system header files in our config files, avoid this at any cost. */ +/* ================================================================ */ + +/* + * AIX 4.3 and newer needs _THREAD_SAFE defined to build + * proper reentrant code. Others may also need it. + */ + +#ifdef NEED_THREAD_SAFE +# ifndef _THREAD_SAFE +# define _THREAD_SAFE +# endif +#endif + +/* + * Tru64 needs _REENTRANT set for a few function prototypes and + * things to appear in the system header files. Unixware needs it + * to build proper reentrant code. Others may also need it. + */ + +#ifdef NEED_REENTRANT +# ifndef _REENTRANT +# define _REENTRANT +# endif +#endif + +/* Solaris needs this to get a POSIX-conformant getpwuid_r */ +#if defined(sun) || defined(__sun) +# ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +# endif +#endif + +/* ================================================================ */ +/* If you need to include a system header file for your platform, */ +/* please, do it beyond the point further indicated in this file. */ +/* ================================================================ */ + +#include + +/* + * Ensure that no one is using the old SIZEOF_CURL_OFF_T macro + */ + +#ifdef SIZEOF_CURL_OFF_T +# error "SIZEOF_CURL_OFF_T shall not be defined!" + Error Compilation_aborted_SIZEOF_CURL_OFF_T_shall_not_be_defined +#endif + +/* + * Disable other protocols when http is the only one desired. + */ + +#ifdef HTTP_ONLY +# ifndef CURL_DISABLE_TFTP +# define CURL_DISABLE_TFTP +# endif +# ifndef CURL_DISABLE_FTP +# define CURL_DISABLE_FTP +# endif +# ifndef CURL_DISABLE_LDAP +# define CURL_DISABLE_LDAP +# endif +# ifndef CURL_DISABLE_TELNET +# define CURL_DISABLE_TELNET +# endif +# ifndef CURL_DISABLE_DICT +# define CURL_DISABLE_DICT +# endif +# ifndef CURL_DISABLE_FILE +# define CURL_DISABLE_FILE +# endif +# ifndef CURL_DISABLE_RTSP +# define CURL_DISABLE_RTSP +# endif +# ifndef CURL_DISABLE_POP3 +# define CURL_DISABLE_POP3 +# endif +# ifndef CURL_DISABLE_IMAP +# define CURL_DISABLE_IMAP +# endif +# ifndef CURL_DISABLE_SMTP +# define CURL_DISABLE_SMTP +# endif +# ifndef CURL_DISABLE_RTMP +# define CURL_DISABLE_RTMP +# endif +# ifndef CURL_DISABLE_GOPHER +# define CURL_DISABLE_GOPHER +# endif +# ifndef CURL_DISABLE_SMB +# define CURL_DISABLE_SMB +# endif +#endif + +/* + * When http is disabled rtsp is not supported. + */ + +#if defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_RTSP) +# define CURL_DISABLE_RTSP +#endif + +/* ================================================================ */ +/* No system header file shall be included in this file before this */ +/* point. The only allowed ones are those included from curlbuild.h */ +/* ================================================================ */ + +/* + * OS/400 setup file includes some system headers. + */ + +#ifdef __OS400__ +# include "setup-os400.h" +#endif + +/* + * VMS setup file includes some system headers. + */ + +#ifdef __VMS +# include "setup-vms.h" +#endif + +/* + * Use getaddrinfo to resolve the IPv4 address literal. If the current network + * interface doesn?t support IPv4, but supports IPv6, NAT64, and DNS64, + * performing this task will result in a synthesized IPv6 address. + */ +#ifdef __APPLE__ +#define USE_RESOLVE_ON_IPS 1 +#endif + +/* + * Include header files for windows builds before redefining anything. + * Use this preprocessor block only to include or exclude windows.h, + * winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs + * to any other further and independent block. Under Cygwin things work + * just as under linux (e.g. ) and the winsock headers should + * never be included when __CYGWIN__ is defined. configure script takes + * care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK_H, HAVE_WINSOCK2_H, + * neither HAVE_WS2TCPIP_H when __CYGWIN__ is defined. + */ + +#ifdef HAVE_WINDOWS_H +# if defined(UNICODE) && !defined(_UNICODE) +# define _UNICODE +# endif +# if defined(_UNICODE) && !defined(UNICODE) +# define UNICODE +# endif +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include +# ifdef HAVE_WINSOCK2_H +# include +# ifdef HAVE_WS2TCPIP_H +# include +# endif +# else +# ifdef HAVE_WINSOCK_H +# include +# endif +# endif +# include +# ifdef UNICODE + typedef wchar_t *(*curl_wcsdup_callback)(const wchar_t *str); +# endif +#endif + +/* + * Define USE_WINSOCK to 2 if we have and use WINSOCK2 API, else + * define USE_WINSOCK to 1 if we have and use WINSOCK API, else + * undefine USE_WINSOCK. + */ + +#undef USE_WINSOCK + +#ifdef HAVE_WINSOCK2_H +# define USE_WINSOCK 2 +#else +# ifdef HAVE_WINSOCK_H +# define USE_WINSOCK 1 +# endif +#endif + +#ifdef USE_LWIPSOCK +# include +# include +# include +#endif + +#ifdef HAVE_EXTRA_STRICMP_H +# include +#endif + +#ifdef HAVE_EXTRA_STRDUP_H +# include +#endif + +#ifdef TPF +# include /* for bzero, strcasecmp, and strncasecmp */ +# include /* for strcpy and strlen */ +# include /* for rand and srand */ +# include /* for select and ioctl*/ +# include /* for in_addr_t definition */ +# include /* for tpf_process_signals */ + /* change which select is used for libcurl */ +# define select(a,b,c,d,e) tpf_select_libcurl(a,b,c,d,e) +#endif + +#ifdef __VXWORKS__ +# include /* for generic BSD socket functions */ +# include /* for basic I/O interface functions */ +#endif + +#ifdef __AMIGA__ +# ifndef __ixemul__ +# include +# include +# include +# include +# define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0) +# endif +#endif + +#include +#ifdef HAVE_ASSERT_H +#include +#endif + +#ifdef __TANDEM /* for nsr-tandem-nsk systems */ +#include +#endif + +#ifndef STDC_HEADERS /* no standard C headers! */ +#include +#endif + +#ifdef __POCC__ +# include +# include +# define sys_nerr EILSEQ +#endif + +/* + * Salford-C kludge section (mostly borrowed from wxWidgets). + */ +#ifdef __SALFORDC__ + #pragma suppress 353 /* Possible nested comments */ + #pragma suppress 593 /* Define not used */ + #pragma suppress 61 /* enum has no name */ + #pragma suppress 106 /* unnamed, unused parameter */ + #include +#endif + +/* Default Windows file API selection. */ +#ifdef _WIN32 +# if defined(_MSC_VER) && (_INTEGRAL_MAX_BITS >= 64) +# define USE_WIN32_LARGE_FILES +# elif defined(__MINGW32__) +# define USE_WIN32_LARGE_FILES +# else +# define USE_WIN32_SMALL_FILES +# endif +#endif + +/* + * Large file (>2Gb) support using WIN32 functions. + */ + +#ifdef USE_WIN32_LARGE_FILES +# include +# include +# include +# undef lseek +# define lseek(fdes,offset,whence) _lseeki64(fdes, offset, whence) +# undef fstat +# define fstat(fdes,stp) _fstati64(fdes, stp) +# undef stat +# define stat(fname,stp) _stati64(fname, stp) +# define struct_stat struct _stati64 +# define LSEEK_ERROR (__int64)-1 +#endif + +/* + * Small file (<2Gb) support using WIN32 functions. + */ + +#ifdef USE_WIN32_SMALL_FILES +# include +# include +# include +# ifndef _WIN32_WCE +# undef lseek +# define lseek(fdes,offset,whence) _lseek(fdes, (long)offset, whence) +# define fstat(fdes,stp) _fstat(fdes, stp) +# define stat(fname,stp) _stat(fname, stp) +# define struct_stat struct _stat +# endif +# define LSEEK_ERROR (long)-1 +#endif + +#ifndef struct_stat +# define struct_stat struct stat +#endif + +#ifndef LSEEK_ERROR +# define LSEEK_ERROR (off_t)-1 +#endif + +/* + * Default sizeof(off_t) in case it hasn't been defined in config file. + */ + +#ifndef SIZEOF_OFF_T +# if defined(__VMS) && !defined(__VAX) +# if defined(_LARGEFILE) +# define SIZEOF_OFF_T 8 +# endif +# elif defined(__OS400__) && defined(__ILEC400__) +# if defined(_LARGE_FILES) +# define SIZEOF_OFF_T 8 +# endif +# elif defined(__MVS__) && defined(__IBMC__) +# if defined(_LP64) || defined(_LARGE_FILES) +# define SIZEOF_OFF_T 8 +# endif +# elif defined(__370__) && defined(__IBMC__) +# if defined(_LP64) || defined(_LARGE_FILES) +# define SIZEOF_OFF_T 8 +# endif +# endif +# ifndef SIZEOF_OFF_T +# define SIZEOF_OFF_T 4 +# endif +#endif + +/* + * Arg 2 type for gethostname in case it hasn't been defined in config file. + */ + +#ifndef GETHOSTNAME_TYPE_ARG2 +# ifdef USE_WINSOCK +# define GETHOSTNAME_TYPE_ARG2 int +# else +# define GETHOSTNAME_TYPE_ARG2 size_t +# endif +#endif + +/* Below we define some functions. They should + + 4. set the SIGALRM signal timeout + 5. set dir/file naming defines + */ + +#ifdef WIN32 + +# define DIR_CHAR "\\" +# define DOT_CHAR "_" + +#else /* WIN32 */ + +# ifdef MSDOS /* Watt-32 */ + +# include +# define select(n,r,w,x,t) select_s(n,r,w,x,t) +# define ioctl(x,y,z) ioctlsocket(x,y,(char *)(z)) +# include +# ifdef word +# undef word +# endif +# ifdef byte +# undef byte +# endif + +# endif /* MSDOS */ + +# ifdef __minix + /* Minix 3 versions up to at least 3.1.3 are missing these prototypes */ + extern char *strtok_r(char *s, const char *delim, char **last); + extern struct tm *gmtime_r(const time_t * const timep, struct tm *tmp); +# endif + +# define DIR_CHAR "/" +# ifndef DOT_CHAR +# define DOT_CHAR "." +# endif + +# ifdef MSDOS +# undef DOT_CHAR +# define DOT_CHAR "_" +# endif + +# ifndef fileno /* sunos 4 have this as a macro! */ + int fileno(FILE *stream); +# endif + +#endif /* WIN32 */ + +/* + * msvc 6.0 requires PSDK in order to have INET6_ADDRSTRLEN + * defined in ws2tcpip.h as well as to provide IPv6 support. + * Does not apply if lwIP is used. + */ + +#if defined(_MSC_VER) && !defined(__POCC__) && !defined(USE_LWIPSOCK) +# if !defined(HAVE_WS2TCPIP_H) || \ + ((_MSC_VER < 1300) && !defined(INET6_ADDRSTRLEN)) +# undef HAVE_GETADDRINFO_THREADSAFE +# undef HAVE_FREEADDRINFO +# undef HAVE_GETADDRINFO +# undef HAVE_GETNAMEINFO +# undef ENABLE_IPV6 +# endif +#endif + +/* ---------------------------------------------------------------- */ +/* resolver specialty compile-time defines */ +/* CURLRES_* defines to use in the host*.c sources */ +/* ---------------------------------------------------------------- */ + +/* + * lcc-win32 doesn't have _beginthreadex(), lacks threads support. + */ + +#if defined(__LCC__) && defined(WIN32) +# undef USE_THREADS_POSIX +# undef USE_THREADS_WIN32 +#endif + +/* + * MSVC threads support requires a multi-threaded runtime library. + * _beginthreadex() is not available in single-threaded ones. + */ + +#if defined(_MSC_VER) && !defined(__POCC__) && !defined(_MT) +# undef USE_THREADS_POSIX +# undef USE_THREADS_WIN32 +#endif + +/* + * Mutually exclusive CURLRES_* definitions. + */ + +#ifdef USE_ARES +# define CURLRES_ASYNCH +# define CURLRES_ARES +/* now undef the stock libc functions just to avoid them being used */ +# undef HAVE_GETADDRINFO +# undef HAVE_FREEADDRINFO +# undef HAVE_GETHOSTBYNAME +#elif defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32) +# define CURLRES_ASYNCH +# define CURLRES_THREADED +#else +# define CURLRES_SYNCH +#endif + +#ifdef ENABLE_IPV6 +# define CURLRES_IPV6 +#else +# define CURLRES_IPV4 +#endif + +/* ---------------------------------------------------------------- */ + +/* + * When using WINSOCK, TELNET protocol requires WINSOCK2 API. + */ + +#if defined(USE_WINSOCK) && (USE_WINSOCK != 2) +# define CURL_DISABLE_TELNET 1 +#endif + +/* + * msvc 6.0 does not have struct sockaddr_storage and + * does not define IPPROTO_ESP in winsock2.h. But both + * are available if PSDK is properly installed. + */ + +#if defined(_MSC_VER) && !defined(__POCC__) +# if !defined(HAVE_WINSOCK2_H) || ((_MSC_VER < 1300) && !defined(IPPROTO_ESP)) +# undef HAVE_STRUCT_SOCKADDR_STORAGE +# endif +#endif + +/* + * Intentionally fail to build when using msvc 6.0 without PSDK installed. + * The brave of heart can circumvent this, defining ALLOW_MSVC6_WITHOUT_PSDK + * in lib/config-win32.h although absolutely discouraged and unsupported. + */ + +#if defined(_MSC_VER) && !defined(__POCC__) +# if !defined(HAVE_WINDOWS_H) || ((_MSC_VER < 1300) && !defined(_FILETIME_)) +# if !defined(ALLOW_MSVC6_WITHOUT_PSDK) +# error MSVC 6.0 requires "February 2003 Platform SDK" a.k.a. \ + "Windows Server 2003 PSDK" +# else +# define CURL_DISABLE_LDAP 1 +# endif +# endif +#endif + +#ifdef NETWARE +int netware_init(void); +#ifndef __NOVELL_LIBC__ +#include +#include +#endif +#endif + - #if defined(HAVE_LIBIDN2) && defined(HAVE_IDN2_H) ++#if defined(HAVE_LIBIDN2) && defined(HAVE_IDN2_H) && !defined(USE_WIN32_IDN) +/* The lib and header are present */ +#define USE_LIBIDN2 +#endif + ++#if defined(USE_LIBIDN2) && defined(USE_WIN32_IDN) ++#error "Both libidn2 and WinIDN are enabled, choose one." ++#endif ++ +#ifndef SIZEOF_TIME_T +/* assume default size of time_t to be 32 bit */ +#define SIZEOF_TIME_T 4 +#endif + +#define LIBIDN_REQUIRED_VERSION "0.4.1" + +#if defined(USE_GNUTLS) || defined(USE_OPENSSL) || defined(USE_NSS) || \ + defined(USE_POLARSSL) || defined(USE_AXTLS) || defined(USE_MBEDTLS) || \ + defined(USE_CYASSL) || defined(USE_SCHANNEL) || \ + defined(USE_DARWINSSL) || defined(USE_GSKIT) +#define USE_SSL /* SSL support has been enabled */ +#endif + +/* Single point where USE_SPNEGO definition might be defined */ +#if !defined(CURL_DISABLE_CRYPTO_AUTH) && \ + (defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)) +#define USE_SPNEGO +#endif + +/* Single point where USE_KERBEROS5 definition might be defined */ +#if !defined(CURL_DISABLE_CRYPTO_AUTH) && \ + (defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)) +#define USE_KERBEROS5 +#endif + +/* Single point where USE_NTLM definition might be defined */ +#if !defined(CURL_DISABLE_NTLM) && !defined(CURL_DISABLE_CRYPTO_AUTH) +#if defined(USE_OPENSSL) || defined(USE_WINDOWS_SSPI) || \ + defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) || \ - defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) ++ defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) || \ ++ defined(USE_MBEDTLS) + +#define USE_NTLM + - #elif defined(USE_MBEDTLS) ++# if defined(USE_MBEDTLS) ++/* Get definition of MBEDTLS_MD4_C */ +# include - # if defined(MBEDTLS_MD4_C) - #define USE_NTLM +# endif + +#endif +#endif + +/* non-configure builds may define CURL_WANTS_CA_BUNDLE_ENV */ +#if defined(CURL_WANTS_CA_BUNDLE_ENV) && !defined(CURL_CA_BUNDLE) +#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE") +#endif + +/* + * Provide a mechanism to silence picky compilers, such as gcc 4.6+. + * Parameters should of course normally not be unused, but for example when + * we have multiple implementations of the same interface it may happen. + */ + +#if defined(__GNUC__) && ((__GNUC__ >= 3) || \ + ((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 7))) +# define UNUSED_PARAM __attribute__((__unused__)) +# define WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +# define UNUSED_PARAM /*NOTHING*/ +# define WARN_UNUSED_RESULT +#endif + +/* + * Include macros and defines that should only be processed once. + */ + +#ifndef HEADER_CURL_SETUP_ONCE_H +#include "curl_setup_once.h" +#endif + +/* + * Definition of our NOP statement Object-like macro + */ + +#ifndef Curl_nop_stmt +# define Curl_nop_stmt do { } WHILE_FALSE +#endif + +/* + * Ensure that Winsock and lwIP TCP/IP stacks are not mixed. + */ + +#if defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H) +# if defined(SOCKET) || \ + defined(USE_WINSOCK) || \ + defined(HAVE_WINSOCK_H) || \ + defined(HAVE_WINSOCK2_H) || \ + defined(HAVE_WS2TCPIP_H) +# error "Winsock and lwIP TCP/IP stack definitions shall not coexist!" +# endif +#endif + +/* + * Portable symbolic names for Winsock shutdown() mode flags. + */ + +#ifdef USE_WINSOCK +# define SHUT_RD 0x00 +# define SHUT_WR 0x01 +# define SHUT_RDWR 0x02 +#endif + +/* Define S_ISREG if not defined by system headers, f.e. MSVC */ +#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG) +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#endif + +/* Define S_ISDIR if not defined by system headers, f.e. MSVC */ +#if !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR) +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#endif + +/* In Windows the default file mode is text but an application can override it. +Therefore we specify it explicitly. https://github.com/curl/curl/pull/258 +*/ +#if defined(WIN32) || defined(MSDOS) +#define FOPEN_READTEXT "rt" +#define FOPEN_WRITETEXT "wt" +#elif defined(__CYGWIN__) +/* Cygwin has specific behavior we need to address when WIN32 is not defined. +https://cygwin.com/cygwin-ug-net/using-textbinary.html +For write we want our output to have line endings of LF and be compatible with +other Cygwin utilities. For read we want to handle input that may have line +endings either CRLF or LF so 't' is appropriate. +*/ +#define FOPEN_READTEXT "rt" +#define FOPEN_WRITETEXT "w" +#else +#define FOPEN_READTEXT "r" +#define FOPEN_WRITETEXT "w" +#endif + +/* WinSock destroys recv() buffer when send() failed. + * Enabled automatically for Windows and for Cygwin as Cygwin sockets are + * wrappers for WinSock sockets. https://github.com/curl/curl/issues/657 + * Define DONT_USE_RECV_BEFORE_SEND_WORKAROUND to force disable workaround. + */ +#if !defined(DONT_USE_RECV_BEFORE_SEND_WORKAROUND) +# if defined(WIN32) || defined(__CYGWIN__) +# define USE_RECV_BEFORE_SEND_WORKAROUND +# endif +#else /* DONT_USE_RECV_BEFORE_SEND_WORKAROUNDS */ +# ifdef USE_RECV_BEFORE_SEND_WORKAROUND +# undef USE_RECV_BEFORE_SEND_WORKAROUND +# endif +#endif /* DONT_USE_RECV_BEFORE_SEND_WORKAROUNDS */ + +/* Detect Windows App environment which has a restricted access + * to the Win32 APIs. */ +# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602) +# include +# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \ + !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +# define CURL_WINDOWS_APP +# endif +# endif + +#endif /* HEADER_CURL_SETUP_H */ diff --cc Utilities/cmcurl/lib/ftp.c index a5ca2ab,0000000..783dbe1 mode 100644,000000..100644 --- a/Utilities/cmcurl/lib/ftp.c +++ b/Utilities/cmcurl/lib/ftp.c @@@ -1,4545 -1,0 +1,4546 @@@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at https://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ***************************************************************************/ + +#include "curl_setup.h" + +#ifndef CURL_DISABLE_FTP + +#ifdef HAVE_NETINET_IN_H +#include +#endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_UTSNAME_H +#include +#endif +#ifdef HAVE_NETDB_H +#include +#endif +#ifdef __VMS +#include +#include +#endif + +#if (defined(NETWARE) && defined(__NOVELL_LIBC__)) +#undef in_addr_t +#define in_addr_t unsigned long +#endif + +#include +#include "urldata.h" +#include "sendf.h" +#include "if2ip.h" +#include "hostip.h" +#include "progress.h" +#include "transfer.h" +#include "escape.h" +#include "http.h" /* for HTTP proxy tunnel stuff */ +#include "socks.h" +#include "ftp.h" +#include "fileinfo.h" +#include "ftplistparser.h" +#include "curl_sec.h" +#include "strtoofft.h" +#include "strcase.h" +#include "vtls/vtls.h" +#include "connect.h" +#include "strerror.h" +#include "inet_ntop.h" +#include "inet_pton.h" +#include "select.h" +#include "parsedate.h" /* for the week day and month names */ +#include "sockaddr.h" /* required for Curl_sockaddr_storage */ +#include "multiif.h" +#include "url.h" +#include "strcase.h" +#include "speedcheck.h" +#include "warnless.h" +#include "http_proxy.h" +#include "non-ascii.h" +/* The last 3 #include files should be in this order */ +#include "curl_printf.h" +#include "curl_memory.h" +#include "memdebug.h" + +#ifndef NI_MAXHOST +#define NI_MAXHOST 1025 +#endif +#ifndef INET_ADDRSTRLEN +#define INET_ADDRSTRLEN 16 +#endif + +#ifdef CURL_DISABLE_VERBOSE_STRINGS +#define ftp_pasv_verbose(a,b,c,d) Curl_nop_stmt +#endif + +/* Local API functions */ +#ifndef DEBUGBUILD +static void _state(struct connectdata *conn, + ftpstate newstate); +#define state(x,y) _state(x,y) +#else +static void _state(struct connectdata *conn, + ftpstate newstate, + int lineno); +#define state(x,y) _state(x,y,__LINE__) +#endif + +static CURLcode ftp_sendquote(struct connectdata *conn, + struct curl_slist *quote); +static CURLcode ftp_quit(struct connectdata *conn); +static CURLcode ftp_parse_url_path(struct connectdata *conn); +static CURLcode ftp_regular_transfer(struct connectdata *conn, bool *done); +#ifndef CURL_DISABLE_VERBOSE_STRINGS +static void ftp_pasv_verbose(struct connectdata *conn, + Curl_addrinfo *ai, + char *newhost, /* ascii version */ + int port); +#endif +static CURLcode ftp_state_prepare_transfer(struct connectdata *conn); +static CURLcode ftp_state_mdtm(struct connectdata *conn); +static CURLcode ftp_state_quote(struct connectdata *conn, + bool init, ftpstate instate); +static CURLcode ftp_nb_type(struct connectdata *conn, + bool ascii, ftpstate newstate); +static int ftp_need_type(struct connectdata *conn, + bool ascii); +static CURLcode ftp_do(struct connectdata *conn, bool *done); +static CURLcode ftp_done(struct connectdata *conn, + CURLcode, bool premature); +static CURLcode ftp_connect(struct connectdata *conn, bool *done); +static CURLcode ftp_disconnect(struct connectdata *conn, bool dead_connection); +static CURLcode ftp_do_more(struct connectdata *conn, int *completed); +static CURLcode ftp_multi_statemach(struct connectdata *conn, bool *done); +static int ftp_getsock(struct connectdata *conn, curl_socket_t *socks, + int numsocks); +static int ftp_domore_getsock(struct connectdata *conn, curl_socket_t *socks, + int numsocks); +static CURLcode ftp_doing(struct connectdata *conn, + bool *dophase_done); +static CURLcode ftp_setup_connection(struct connectdata * conn); + +static CURLcode init_wc_data(struct connectdata *conn); +static CURLcode wc_statemach(struct connectdata *conn); + +static void wc_data_dtor(void *ptr); + +static CURLcode ftp_state_retr(struct connectdata *conn, curl_off_t filesize); + +static CURLcode ftp_readresp(curl_socket_t sockfd, + struct pingpong *pp, + int *ftpcode, + size_t *size); +static CURLcode ftp_dophase_done(struct connectdata *conn, + bool connected); + +/* easy-to-use macro: */ +#define PPSENDF(x,y,z) result = Curl_pp_sendf(x,y,z); \ + if(result) \ + return result + + +/* + * FTP protocol handler. + */ + +const struct Curl_handler Curl_handler_ftp = { + "FTP", /* scheme */ + ftp_setup_connection, /* setup_connection */ + ftp_do, /* do_it */ + ftp_done, /* done */ + ftp_do_more, /* do_more */ + ftp_connect, /* connect_it */ + ftp_multi_statemach, /* connecting */ + ftp_doing, /* doing */ + ftp_getsock, /* proto_getsock */ + ftp_getsock, /* doing_getsock */ + ftp_domore_getsock, /* domore_getsock */ + ZERO_NULL, /* perform_getsock */ + ftp_disconnect, /* disconnect */ + ZERO_NULL, /* readwrite */ + PORT_FTP, /* defport */ + CURLPROTO_FTP, /* protocol */ + PROTOPT_DUAL | PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD + | PROTOPT_NOURLQUERY /* flags */ +}; + + +#ifdef USE_SSL +/* + * FTPS protocol handler. + */ + +const struct Curl_handler Curl_handler_ftps = { + "FTPS", /* scheme */ + ftp_setup_connection, /* setup_connection */ + ftp_do, /* do_it */ + ftp_done, /* done */ + ftp_do_more, /* do_more */ + ftp_connect, /* connect_it */ + ftp_multi_statemach, /* connecting */ + ftp_doing, /* doing */ + ftp_getsock, /* proto_getsock */ + ftp_getsock, /* doing_getsock */ + ftp_domore_getsock, /* domore_getsock */ + ZERO_NULL, /* perform_getsock */ + ftp_disconnect, /* disconnect */ + ZERO_NULL, /* readwrite */ + PORT_FTPS, /* defport */ + CURLPROTO_FTPS, /* protocol */ + PROTOPT_SSL | PROTOPT_DUAL | PROTOPT_CLOSEACTION | + PROTOPT_NEEDSPWD | PROTOPT_NOURLQUERY /* flags */ +}; +#endif + +#ifndef CURL_DISABLE_HTTP +/* + * HTTP-proxyed FTP protocol handler. + */ + +static const struct Curl_handler Curl_handler_ftp_proxy = { + "FTP", /* scheme */ + Curl_http_setup_conn, /* setup_connection */ + Curl_http, /* do_it */ + Curl_http_done, /* done */ + ZERO_NULL, /* do_more */ + ZERO_NULL, /* connect_it */ + ZERO_NULL, /* connecting */ + ZERO_NULL, /* doing */ + ZERO_NULL, /* proto_getsock */ + ZERO_NULL, /* doing_getsock */ + ZERO_NULL, /* domore_getsock */ + ZERO_NULL, /* perform_getsock */ + ZERO_NULL, /* disconnect */ + ZERO_NULL, /* readwrite */ + PORT_FTP, /* defport */ + CURLPROTO_HTTP, /* protocol */ + PROTOPT_NONE /* flags */ +}; + + +#ifdef USE_SSL +/* + * HTTP-proxyed FTPS protocol handler. + */ + +static const struct Curl_handler Curl_handler_ftps_proxy = { + "FTPS", /* scheme */ + Curl_http_setup_conn, /* setup_connection */ + Curl_http, /* do_it */ + Curl_http_done, /* done */ + ZERO_NULL, /* do_more */ + ZERO_NULL, /* connect_it */ + ZERO_NULL, /* connecting */ + ZERO_NULL, /* doing */ + ZERO_NULL, /* proto_getsock */ + ZERO_NULL, /* doing_getsock */ + ZERO_NULL, /* domore_getsock */ + ZERO_NULL, /* perform_getsock */ + ZERO_NULL, /* disconnect */ + ZERO_NULL, /* readwrite */ + PORT_FTPS, /* defport */ + CURLPROTO_HTTP, /* protocol */ + PROTOPT_NONE /* flags */ +}; +#endif +#endif + +static void close_secondarysocket(struct connectdata *conn) +{ + if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET]) { + Curl_closesocket(conn, conn->sock[SECONDARYSOCKET]); + conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD; + } + conn->bits.tcpconnect[SECONDARYSOCKET] = FALSE; + conn->tunnel_state[SECONDARYSOCKET] = TUNNEL_INIT; +} + +/* + * NOTE: back in the old days, we added code in the FTP code that made NOBODY + * requests on files respond with headers passed to the client/stdout that + * looked like HTTP ones. + * + * This approach is not very elegant, it causes confusion and is error-prone. + * It is subject for removal at the next (or at least a future) soname bump. + * Until then you can test the effects of the removal by undefining the + * following define named CURL_FTP_HTTPSTYLE_HEAD. + */ +#define CURL_FTP_HTTPSTYLE_HEAD 1 + +static void freedirs(struct ftp_conn *ftpc) +{ + int i; + if(ftpc->dirs) { + for(i=0; i < ftpc->dirdepth; i++) { + free(ftpc->dirs[i]); + ftpc->dirs[i]=NULL; + } + free(ftpc->dirs); + ftpc->dirs = NULL; + ftpc->dirdepth = 0; + } + Curl_safefree(ftpc->file); + + /* no longer of any use */ + Curl_safefree(ftpc->newhost); +} + +/* Returns non-zero if the given string contains CR (\r) or LF (\n), + which are not allowed within RFC 959 . + Note: The input string is in the client's encoding which might + not be ASCII, so escape sequences \r & \n must be used instead + of hex values 0x0d & 0x0a. +*/ +static bool isBadFtpString(const char *string) +{ + return ((NULL != strchr(string, '\r')) || + (NULL != strchr(string, '\n'))) ? TRUE : FALSE; +} + +/*********************************************************************** + * + * AcceptServerConnect() + * + * After connection request is received from the server this function is + * called to accept the connection and close the listening socket + * + */ +static CURLcode AcceptServerConnect(struct connectdata *conn) +{ + struct Curl_easy *data = conn->data; + curl_socket_t sock = conn->sock[SECONDARYSOCKET]; + curl_socket_t s = CURL_SOCKET_BAD; +#ifdef ENABLE_IPV6 + struct Curl_sockaddr_storage add; +#else + struct sockaddr_in add; +#endif + curl_socklen_t size = (curl_socklen_t) sizeof(add); + + if(0 == getsockname(sock, (struct sockaddr *) &add, &size)) { + size = sizeof(add); + + s=accept(sock, (struct sockaddr *) &add, &size); + } + Curl_closesocket(conn, sock); /* close the first socket */ + + if(CURL_SOCKET_BAD == s) { + failf(data, "Error accept()ing server connect"); + return CURLE_FTP_PORT_FAILED; + } + infof(data, "Connection accepted from server\n"); + /* when this happens within the DO state it is important that we mark us as + not needing DO_MORE anymore */ + conn->bits.do_more = FALSE; + + conn->sock[SECONDARYSOCKET] = s; + (void)curlx_nonblock(s, TRUE); /* enable non-blocking */ + conn->sock_accepted[SECONDARYSOCKET] = TRUE; + + if(data->set.fsockopt) { + int error = 0; + + /* activate callback for setting socket options */ + error = data->set.fsockopt(data->set.sockopt_client, + s, + CURLSOCKTYPE_ACCEPT); + + if(error) { + close_secondarysocket(conn); + return CURLE_ABORTED_BY_CALLBACK; + } + } + + return CURLE_OK; + +} + +/* + * ftp_timeleft_accept() returns the amount of milliseconds left allowed for + * waiting server to connect. If the value is negative, the timeout time has + * already elapsed. + * + * The start time is stored in progress.t_acceptdata - as set with + * Curl_pgrsTime(..., TIMER_STARTACCEPT); + * + */ +static time_t ftp_timeleft_accept(struct Curl_easy *data) +{ + time_t timeout_ms = DEFAULT_ACCEPT_TIMEOUT; + time_t other; + struct timeval now; + + if(data->set.accepttimeout > 0) + timeout_ms = data->set.accepttimeout; + + now = Curl_tvnow(); + + /* check if the generic timeout possibly is set shorter */ + other = Curl_timeleft(data, &now, FALSE); + if(other && (other < timeout_ms)) + /* note that this also works fine for when other happens to be negative + due to it already having elapsed */ + timeout_ms = other; + else { + /* subtract elapsed time */ + timeout_ms -= Curl_tvdiff(now, data->progress.t_acceptdata); + if(!timeout_ms) + /* avoid returning 0 as that means no timeout! */ + return -1; + } + + return timeout_ms; +} + + +/*********************************************************************** + * + * ReceivedServerConnect() + * + * After allowing server to connect to us from data port, this function + * checks both data connection for connection establishment and ctrl + * connection for a negative response regarding a failure in connecting + * + */ +static CURLcode ReceivedServerConnect(struct connectdata *conn, bool *received) +{ + struct Curl_easy *data = conn->data; + curl_socket_t ctrl_sock = conn->sock[FIRSTSOCKET]; + curl_socket_t data_sock = conn->sock[SECONDARYSOCKET]; + struct ftp_conn *ftpc = &conn->proto.ftpc; + struct pingpong *pp = &ftpc->pp; + int result; + time_t timeout_ms; + ssize_t nread; + int ftpcode; + + *received = FALSE; + + timeout_ms = ftp_timeleft_accept(data); + infof(data, "Checking for server connect\n"); + if(timeout_ms < 0) { + /* if a timeout was already reached, bail out */ + failf(data, "Accept timeout occurred while waiting server connect"); + return CURLE_FTP_ACCEPT_TIMEOUT; + } + + /* First check whether there is a cached response from server */ + if(pp->cache_size && pp->cache && pp->cache[0] > '3') { + /* Data connection could not be established, let's return */ + infof(data, "There is negative response in cache while serv connect\n"); + Curl_GetFTPResponse(&nread, conn, &ftpcode); + return CURLE_FTP_ACCEPT_FAILED; + } + + result = Curl_socket_check(ctrl_sock, data_sock, CURL_SOCKET_BAD, 0); + + /* see if the connection request is already here */ + switch(result) { + case -1: /* error */ + /* let's die here */ + failf(data, "Error while waiting for server connect"); + return CURLE_FTP_ACCEPT_FAILED; + case 0: /* Server connect is not received yet */ + break; /* loop */ + default: + + if(result & CURL_CSELECT_IN2) { + infof(data, "Ready to accept data connection from server\n"); + *received = TRUE; + } + else if(result & CURL_CSELECT_IN) { + infof(data, "Ctrl conn has data while waiting for data conn\n"); + Curl_GetFTPResponse(&nread, conn, &ftpcode); + + if(ftpcode/100 > 3) + return CURLE_FTP_ACCEPT_FAILED; + + return CURLE_WEIRD_SERVER_REPLY; + } + + break; + } /* switch() */ + + return CURLE_OK; +} + + +/*********************************************************************** + * + * InitiateTransfer() + * + * After connection from server is accepted this function is called to + * setup transfer parameters and initiate the data transfer. + * + */ +static CURLcode InitiateTransfer(struct connectdata *conn) +{ + struct Curl_easy *data = conn->data; + struct FTP *ftp = data->req.protop; + CURLcode result = CURLE_OK; + + if(conn->bits.ftp_use_data_ssl) { + /* since we only have a plaintext TCP connection here, we must now + * do the TLS stuff */ + infof(data, "Doing the SSL/TLS handshake on the data stream\n"); + result = Curl_ssl_connect(conn, SECONDARYSOCKET); + if(result) + return result; + } + + if(conn->proto.ftpc.state_saved == FTP_STOR) { + *(ftp->bytecountp)=0; + + /* When we know we're uploading a specified file, we can get the file + size prior to the actual upload. */ + + Curl_pgrsSetUploadSize(data, data->state.infilesize); + + /* set the SO_SNDBUF for the secondary socket for those who need it */ + Curl_sndbufset(conn->sock[SECONDARYSOCKET]); + + Curl_setup_transfer(conn, -1, -1, FALSE, NULL, /* no download */ + SECONDARYSOCKET, ftp->bytecountp); + } + else { + /* FTP download: */ + Curl_setup_transfer(conn, SECONDARYSOCKET, + conn->proto.ftpc.retr_size_saved, FALSE, + ftp->bytecountp, -1, NULL); /* no upload here */ + } + + conn->proto.ftpc.pp.pending_resp = TRUE; /* expect server response */ + state(conn, FTP_STOP); + + return CURLE_OK; +} + +/*********************************************************************** + * + * AllowServerConnect() + * + * When we've issue the PORT command, we have told the server to connect to + * us. This function checks whether data connection is established if so it is + * accepted. + * + */ +static CURLcode AllowServerConnect(struct connectdata *conn, bool *connected) +{ + struct Curl_easy *data = conn->data; + time_t timeout_ms; + CURLcode result = CURLE_OK; + + *connected = FALSE; + infof(data, "Preparing for accepting server on data port\n"); + + /* Save the time we start accepting server connect */ + Curl_pgrsTime(data, TIMER_STARTACCEPT); + + timeout_ms = ftp_timeleft_accept(data); + if(timeout_ms < 0) { + /* if a timeout was already reached, bail out */ + failf(data, "Accept timeout occurred while waiting server connect"); + return CURLE_FTP_ACCEPT_TIMEOUT; + } + + /* see if the connection request is already here */ + result = ReceivedServerConnect(conn, connected); + if(result) + return result; + + if(*connected) { + result = AcceptServerConnect(conn); + if(result) + return result; + + result = InitiateTransfer(conn); + if(result) + return result; + } + else { + /* Add timeout to multi handle and break out of the loop */ + if(!result && *connected == FALSE) { - if(data->set.accepttimeout > 0) - Curl_expire(data, data->set.accepttimeout); - else - Curl_expire(data, DEFAULT_ACCEPT_TIMEOUT); ++ Curl_expire(data, data->set.accepttimeout > 0 ? ++ data->set.accepttimeout: DEFAULT_ACCEPT_TIMEOUT, 0); + } + } + + return result; +} + +/* macro to check for a three-digit ftp status code at the start of the + given string */ +#define STATUSCODE(line) (ISDIGIT(line[0]) && ISDIGIT(line[1]) && \ + ISDIGIT(line[2])) + +/* macro to check for the last line in an FTP server response */ +#define LASTLINE(line) (STATUSCODE(line) && (' ' == line[3])) + +static bool ftp_endofresp(struct connectdata *conn, char *line, size_t len, + int *code) +{ + (void)conn; + + if((len > 3) && LASTLINE(line)) { + *code = curlx_sltosi(strtol(line, NULL, 10)); + return TRUE; + } + + return FALSE; +} + +static CURLcode ftp_readresp(curl_socket_t sockfd, + struct pingpong *pp, + int *ftpcode, /* return the ftp-code if done */ + size_t *size) /* size of the response */ +{ + struct connectdata *conn = pp->conn; + struct Curl_easy *data = conn->data; +#ifdef HAVE_GSSAPI + char * const buf = data->state.buffer; +#endif + CURLcode result = CURLE_OK; + int code; + + result = Curl_pp_readresp(sockfd, pp, &code, size); + +#if defined(HAVE_GSSAPI) + /* handle the security-oriented responses 6xx ***/ + /* FIXME: some errorchecking perhaps... ***/ + switch(code) { + case 631: + code = Curl_sec_read_msg(conn, buf, PROT_SAFE); + break; + case 632: + code = Curl_sec_read_msg(conn, buf, PROT_PRIVATE); + break; + case 633: + code = Curl_sec_read_msg(conn, buf, PROT_CONFIDENTIAL); + break; + default: + /* normal ftp stuff we pass through! */ + break; + } +#endif + + /* store the latest code for later retrieval */ + data->info.httpcode=code; + + if(ftpcode) + *ftpcode = code; + + if(421 == code) { + /* 421 means "Service not available, closing control connection." and FTP + * servers use it to signal that idle session timeout has been exceeded. + * If we ignored the response, it could end up hanging in some cases. + * + * This response code can come at any point so having it treated + * generically is a good idea. + */ + infof(data, "We got a 421 - timeout!\n"); + state(conn, FTP_STOP); + return CURLE_OPERATION_TIMEDOUT; + } + + return result; +} + +/* --- parse FTP server responses --- */ + +/* + * Curl_GetFTPResponse() is a BLOCKING function to read the full response + * from a server after a command. + * + */ + +CURLcode Curl_GetFTPResponse(ssize_t *nreadp, /* return number of bytes read */ + struct connectdata *conn, + int *ftpcode) /* return the ftp-code */ +{ + /* + * We cannot read just one byte per read() and then go back to select() as + * the OpenSSL read() doesn't grok that properly. + * + * Alas, read as much as possible, split up into lines, use the ending + * line in a response or continue reading. */ + + curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; + time_t timeout; /* timeout in milliseconds */ + time_t interval_ms; + struct Curl_easy *data = conn->data; + CURLcode result = CURLE_OK; + struct ftp_conn *ftpc = &conn->proto.ftpc; + struct pingpong *pp = &ftpc->pp; + size_t nread; + int cache_skip=0; + int value_to_be_ignored=0; + + if(ftpcode) + *ftpcode = 0; /* 0 for errors */ + else + /* make the pointer point to something for the rest of this function */ + ftpcode = &value_to_be_ignored; + + *nreadp=0; + + while(!*ftpcode && !result) { + /* check and reset timeout value every lap */ + timeout = Curl_pp_state_timeout(pp); + + if(timeout <=0) { + failf(data, "FTP response timeout"); + return CURLE_OPERATION_TIMEDOUT; /* already too little time */ + } + + interval_ms = 1000; /* use 1 second timeout intervals */ + if(timeout < interval_ms) + interval_ms = timeout; + + /* + * Since this function is blocking, we need to wait here for input on the + * connection and only then we call the response reading function. We do + * timeout at least every second to make the timeout check run. + * + * A caution here is that the ftp_readresp() function has a cache that may + * contain pieces of a response from the previous invoke and we need to + * make sure we don't just wait for input while there is unhandled data in + * that cache. But also, if the cache is there, we call ftp_readresp() and + * the cache wasn't good enough to continue we must not just busy-loop + * around this function. + * + */ + + if(pp->cache && (cache_skip < 2)) { + /* + * There's a cache left since before. We then skipping the wait for + * socket action, unless this is the same cache like the previous round + * as then the cache was deemed not enough to act on and we then need to + * wait for more data anyway. + */ + } + else if(!Curl_conn_data_pending(conn, FIRSTSOCKET)) { + switch(SOCKET_READABLE(sockfd, interval_ms)) { + case -1: /* select() error, stop reading */ + failf(data, "FTP response aborted due to select/poll error: %d", + SOCKERRNO); + return CURLE_RECV_ERROR; + + case 0: /* timeout */ + if(Curl_pgrsUpdate(conn)) + return CURLE_ABORTED_BY_CALLBACK; + continue; /* just continue in our loop for the timeout duration */ + + default: /* for clarity */ + break; + } + } + result = ftp_readresp(sockfd, pp, ftpcode, &nread); + if(result) + break; + + if(!nread && pp->cache) + /* bump cache skip counter as on repeated skips we must wait for more + data */ + cache_skip++; + else + /* when we got data or there is no cache left, we reset the cache skip + counter */ + cache_skip=0; + + *nreadp += nread; + + } /* while there's buffer left and loop is requested */ + + pp->pending_resp = FALSE; + + return result; +} + +#if defined(DEBUGBUILD) && !defined(CURL_DISABLE_VERBOSE_STRINGS) + /* for debug purposes */ +static const char * const ftp_state_names[]={ + "STOP", + "WAIT220", + "AUTH", + "USER", + "PASS", + "ACCT", + "PBSZ", + "PROT", + "CCC", + "PWD", + "SYST", + "NAMEFMT", + "QUOTE", + "RETR_PREQUOTE", + "STOR_PREQUOTE", + "POSTQUOTE", + "CWD", + "MKD", + "MDTM", + "TYPE", + "LIST_TYPE", + "RETR_TYPE", + "STOR_TYPE", + "SIZE", + "RETR_SIZE", + "STOR_SIZE", + "REST", + "RETR_REST", + "PORT", + "PRET", + "PASV", + "LIST", + "RETR", + "STOR", + "QUIT" +}; +#endif + +/* This is the ONLY way to change FTP state! */ +static void _state(struct connectdata *conn, + ftpstate newstate +#ifdef DEBUGBUILD + , int lineno +#endif + ) +{ + struct ftp_conn *ftpc = &conn->proto.ftpc; + +#if defined(DEBUGBUILD) + +#if defined(CURL_DISABLE_VERBOSE_STRINGS) + (void) lineno; +#else + if(ftpc->state != newstate) + infof(conn->data, "FTP %p (line %d) state change from %s to %s\n", + (void *)ftpc, lineno, ftp_state_names[ftpc->state], + ftp_state_names[newstate]); +#endif +#endif + + ftpc->state = newstate; +} + +static CURLcode ftp_state_user(struct connectdata *conn) +{ + CURLcode result; + struct FTP *ftp = conn->data->req.protop; + /* send USER */ + PPSENDF(&conn->proto.ftpc.pp, "USER %s", ftp->user?ftp->user:""); + + state(conn, FTP_USER); + conn->data->state.ftp_trying_alternative = FALSE; + + return CURLE_OK; +} + +static CURLcode ftp_state_pwd(struct connectdata *conn) +{ + CURLcode result; + + /* send PWD to discover our entry point */ + PPSENDF(&conn->proto.ftpc.pp, "%s", "PWD"); + state(conn, FTP_PWD); + + return CURLE_OK; +} + +/* For the FTP "protocol connect" and "doing" phases only */ +static int ftp_getsock(struct connectdata *conn, + curl_socket_t *socks, + int numsocks) +{ + return Curl_pp_getsock(&conn->proto.ftpc.pp, socks, numsocks); +} + +/* For the FTP "DO_MORE" phase only */ +static int ftp_domore_getsock(struct connectdata *conn, curl_socket_t *socks, + int numsocks) +{ + struct ftp_conn *ftpc = &conn->proto.ftpc; + + if(!numsocks) + return GETSOCK_BLANK; + + /* When in DO_MORE state, we could be either waiting for us to connect to a + * remote site, or we could wait for that site to connect to us. Or just + * handle ordinary commands. + */ + + if(FTP_STOP == ftpc->state) { + int bits = GETSOCK_READSOCK(0); + + /* if stopped and still in this state, then we're also waiting for a + connect on the secondary connection */ + socks[0] = conn->sock[FIRSTSOCKET]; + + if(!conn->data->set.ftp_use_port) { + int s; + int i; + /* PORT is used to tell the server to connect to us, and during that we + don't do happy eyeballs, but we do if we connect to the server */ + for(s=1, i=0; i<2; i++) { + if(conn->tempsock[i] != CURL_SOCKET_BAD) { + socks[s] = conn->tempsock[i]; + bits |= GETSOCK_WRITESOCK(s++); + } + } + } + else { + socks[1] = conn->sock[SECONDARYSOCKET]; + bits |= GETSOCK_WRITESOCK(1) | GETSOCK_READSOCK(1); + } + + return bits; + } + return Curl_pp_getsock(&conn->proto.ftpc.pp, socks, numsocks); +} + +/* This is called after the FTP_QUOTE state is passed. + + ftp_state_cwd() sends the range of CWD commands to the server to change to + the correct directory. It may also need to send MKD commands to create + missing ones, if that option is enabled. +*/ +static CURLcode ftp_state_cwd(struct connectdata *conn) +{ + CURLcode result = CURLE_OK; + struct ftp_conn *ftpc = &conn->proto.ftpc; + + if(ftpc->cwddone) + /* already done and fine */ + result = ftp_state_mdtm(conn); + else { + ftpc->count2 = 0; /* count2 counts failed CWDs */ + + /* count3 is set to allow a MKD to fail once. In the case when first CWD + fails and then MKD fails (due to another session raced it to create the + dir) this then allows for a second try to CWD to it */ + ftpc->count3 = (conn->data->set.ftp_create_missing_dirs==2)?1:0; + + if(conn->bits.reuse && ftpc->entrypath) { + /* This is a re-used connection. Since we change directory to where the + transfer is taking place, we must first get back to the original dir + where we ended up after login: */ + ftpc->count1 = 0; /* we count this as the first path, then we add one + for all upcoming ones in the ftp->dirs[] array */ + PPSENDF(&conn->proto.ftpc.pp, "CWD %s", ftpc->entrypath); + state(conn, FTP_CWD); + } + else { + if(ftpc->dirdepth) { + ftpc->count1 = 1; + /* issue the first CWD, the rest is sent when the CWD responses are + received... */ + PPSENDF(&conn->proto.ftpc.pp, "CWD %s", ftpc->dirs[ftpc->count1 -1]); + state(conn, FTP_CWD); + } + else { + /* No CWD necessary */ + result = ftp_state_mdtm(conn); + } + } + } + return result; +} + +typedef enum { + EPRT, + PORT, + DONE +} ftpport; + +static CURLcode ftp_state_use_port(struct connectdata *conn, + ftpport fcmd) /* start with this */ + +{ + CURLcode result = CURLE_OK; + struct ftp_conn *ftpc = &conn->proto.ftpc; + struct Curl_easy *data=conn->data; + curl_socket_t portsock= CURL_SOCKET_BAD; + char myhost[256] = ""; + + struct Curl_sockaddr_storage ss; + Curl_addrinfo *res, *ai; + curl_socklen_t sslen; + char hbuf[NI_MAXHOST]; + struct sockaddr *sa=(struct sockaddr *)&ss; + struct sockaddr_in * const sa4 = (void *)sa; +#ifdef ENABLE_IPV6 + struct sockaddr_in6 * const sa6 = (void *)sa; +#endif + char tmp[1024]; + static const char mode[][5] = { "EPRT", "PORT" }; + int rc; + int error; + char *host = NULL; + char *string_ftpport = data->set.str[STRING_FTPPORT]; + struct Curl_dns_entry *h=NULL; + unsigned short port_min = 0; + unsigned short port_max = 0; + unsigned short port; + bool possibly_non_local = TRUE; + + char *addr = NULL; + + /* Step 1, figure out what is requested, + * accepted format : + * (ipv4|ipv6|domain|interface)?(:port(-range)?)? + */ + + if(data->set.str[STRING_FTPPORT] && + (strlen(data->set.str[STRING_FTPPORT]) > 1)) { + +#ifdef ENABLE_IPV6 + size_t addrlen = INET6_ADDRSTRLEN > strlen(string_ftpport) ? + INET6_ADDRSTRLEN : strlen(string_ftpport); +#else + size_t addrlen = INET_ADDRSTRLEN > strlen(string_ftpport) ? + INET_ADDRSTRLEN : strlen(string_ftpport); +#endif + char *ip_start = string_ftpport; + char *ip_end = NULL; + char *port_start = NULL; + char *port_sep = NULL; + + addr = calloc(addrlen+1, 1); + if(!addr) + return CURLE_OUT_OF_MEMORY; + +#ifdef ENABLE_IPV6 + if(*string_ftpport == '[') { + /* [ipv6]:port(-range) */ + ip_start = string_ftpport + 1; + ip_end = strchr(string_ftpport, ']'); + if(ip_end) + strncpy(addr, ip_start, ip_end - ip_start); + } + else +#endif + if(*string_ftpport == ':') { + /* :port */ + ip_end = string_ftpport; + } + else { + ip_end = strchr(string_ftpport, ':'); + if(ip_end) { + /* either ipv6 or (ipv4|domain|interface):port(-range) */ +#ifdef ENABLE_IPV6 + if(Curl_inet_pton(AF_INET6, string_ftpport, sa6) == 1) { + /* ipv6 */ + port_min = port_max = 0; + strcpy(addr, string_ftpport); + ip_end = NULL; /* this got no port ! */ + } + else +#endif + /* (ipv4|domain|interface):port(-range) */ + strncpy(addr, string_ftpport, ip_end - ip_start); + } + else + /* ipv4|interface */ + strcpy(addr, string_ftpport); + } + + /* parse the port */ + if(ip_end != NULL) { + port_start = strchr(ip_end, ':'); + if(port_start) { + port_min = curlx_ultous(strtoul(port_start+1, NULL, 10)); + port_sep = strchr(port_start, '-'); + if(port_sep) { + port_max = curlx_ultous(strtoul(port_sep + 1, NULL, 10)); + } + else + port_max = port_min; + } + } + + /* correct errors like: + * :1234-1230 + * :-4711, in this case port_min is (unsigned)-1, + * therefore port_min > port_max for all cases + * but port_max = (unsigned)-1 + */ + if(port_min > port_max) + port_min = port_max = 0; + + + if(*addr != '\0') { + /* attempt to get the address of the given interface name */ + switch(Curl_if2ip(conn->ip_addr->ai_family, + Curl_ipv6_scope(conn->ip_addr->ai_addr), + conn->scope_id, addr, hbuf, sizeof(hbuf))) { + case IF2IP_NOT_FOUND: + /* not an interface, use the given string as host name instead */ + host = addr; + break; + case IF2IP_AF_NOT_SUPPORTED: + return CURLE_FTP_PORT_FAILED; + case IF2IP_FOUND: + host = hbuf; /* use the hbuf for host name */ + } + } + else + /* there was only a port(-range) given, default the host */ + host = NULL; + } /* data->set.ftpport */ + + if(!host) { + /* not an interface and not a host name, get default by extracting + the IP from the control connection */ + + sslen = sizeof(ss); + if(getsockname(conn->sock[FIRSTSOCKET], sa, &sslen)) { + failf(data, "getsockname() failed: %s", + Curl_strerror(conn, SOCKERRNO) ); + free(addr); + return CURLE_FTP_PORT_FAILED; + } + switch(sa->sa_family) { +#ifdef ENABLE_IPV6 + case AF_INET6: + Curl_inet_ntop(sa->sa_family, &sa6->sin6_addr, hbuf, sizeof(hbuf)); + break; +#endif + default: + Curl_inet_ntop(sa->sa_family, &sa4->sin_addr, hbuf, sizeof(hbuf)); + break; + } + host = hbuf; /* use this host name */ + possibly_non_local = FALSE; /* we know it is local now */ + } + + /* resolv ip/host to ip */ + rc = Curl_resolv(conn, host, 0, &h); + if(rc == CURLRESOLV_PENDING) + (void)Curl_resolver_wait_resolv(conn, &h); + if(h) { + res = h->addr; + /* when we return from this function, we can forget about this entry + to we can unlock it now already */ + Curl_resolv_unlock(data, h); + } /* (h) */ + else + res = NULL; /* failure! */ + + if(res == NULL) { + failf(data, "failed to resolve the address provided to PORT: %s", host); + free(addr); + return CURLE_FTP_PORT_FAILED; + } + + free(addr); + host = NULL; + + /* step 2, create a socket for the requested address */ + + portsock = CURL_SOCKET_BAD; + error = 0; + for(ai = res; ai; ai = ai->ai_next) { + result = Curl_socket(conn, ai, NULL, &portsock); + if(result) { + error = SOCKERRNO; + continue; + } + break; + } + if(!ai) { + failf(data, "socket failure: %s", Curl_strerror(conn, error)); + return CURLE_FTP_PORT_FAILED; + } + + /* step 3, bind to a suitable local address */ + + memcpy(sa, ai->ai_addr, ai->ai_addrlen); + sslen = ai->ai_addrlen; + + for(port = port_min; port <= port_max;) { + if(sa->sa_family == AF_INET) + sa4->sin_port = htons(port); +#ifdef ENABLE_IPV6 + else + sa6->sin6_port = htons(port); +#endif + /* Try binding the given address. */ + if(bind(portsock, sa, sslen) ) { + /* It failed. */ + error = SOCKERRNO; + if(possibly_non_local && (error == EADDRNOTAVAIL)) { + /* The requested bind address is not local. Use the address used for + * the control connection instead and restart the port loop + */ + + infof(data, "bind(port=%hu) on non-local address failed: %s\n", port, + Curl_strerror(conn, error) ); + + sslen = sizeof(ss); + if(getsockname(conn->sock[FIRSTSOCKET], sa, &sslen)) { + failf(data, "getsockname() failed: %s", + Curl_strerror(conn, SOCKERRNO) ); + Curl_closesocket(conn, portsock); + return CURLE_FTP_PORT_FAILED; + } + port = port_min; + possibly_non_local = FALSE; /* don't try this again */ + continue; + } + if(error != EADDRINUSE && error != EACCES) { + failf(data, "bind(port=%hu) failed: %s", port, + Curl_strerror(conn, error) ); + Curl_closesocket(conn, portsock); + return CURLE_FTP_PORT_FAILED; + } + } + else + break; + + port++; + } + + /* maybe all ports were in use already*/ + if(port > port_max) { + failf(data, "bind() failed, we ran out of ports!"); + Curl_closesocket(conn, portsock); + return CURLE_FTP_PORT_FAILED; + } + + /* get the name again after the bind() so that we can extract the + port number it uses now */ + sslen = sizeof(ss); + if(getsockname(portsock, (struct sockaddr *)sa, &sslen)) { + failf(data, "getsockname() failed: %s", + Curl_strerror(conn, SOCKERRNO) ); + Curl_closesocket(conn, portsock); + return CURLE_FTP_PORT_FAILED; + } + + /* step 4, listen on the socket */ + + if(listen(portsock, 1)) { + failf(data, "socket failure: %s", Curl_strerror(conn, SOCKERRNO)); + Curl_closesocket(conn, portsock); + return CURLE_FTP_PORT_FAILED; + } + + /* step 5, send the proper FTP command */ + + /* get a plain printable version of the numerical address to work with + below */ + Curl_printable_address(ai, myhost, sizeof(myhost)); + +#ifdef ENABLE_IPV6 + if(!conn->bits.ftp_use_eprt && conn->bits.ipv6) + /* EPRT is disabled but we are connected to a IPv6 host, so we ignore the + request and enable EPRT again! */ + conn->bits.ftp_use_eprt = TRUE; +#endif + + for(; fcmd != DONE; fcmd++) { + + if(!conn->bits.ftp_use_eprt && (EPRT == fcmd)) + /* if disabled, goto next */ + continue; + + if((PORT == fcmd) && sa->sa_family != AF_INET) + /* PORT is IPv4 only */ + continue; + + switch(sa->sa_family) { + case AF_INET: + port = ntohs(sa4->sin_port); + break; +#ifdef ENABLE_IPV6 + case AF_INET6: + port = ntohs(sa6->sin6_port); + break; +#endif + default: + continue; /* might as well skip this */ + } + + if(EPRT == fcmd) { + /* + * Two fine examples from RFC2428; + * + * EPRT |1|132.235.1.2|6275| + * + * EPRT |2|1080::8:800:200C:417A|5282| + */ + + result = Curl_pp_sendf(&ftpc->pp, "%s |%d|%s|%hu|", mode[fcmd], + sa->sa_family == AF_INET?1:2, + myhost, port); + if(result) { + failf(data, "Failure sending EPRT command: %s", + curl_easy_strerror(result)); + Curl_closesocket(conn, portsock); + /* don't retry using PORT */ + ftpc->count1 = PORT; + /* bail out */ + state(conn, FTP_STOP); + return result; + } + break; + } + if(PORT == fcmd) { + char *source = myhost; + char *dest = tmp; + + /* translate x.x.x.x to x,x,x,x */ + while(source && *source) { + if(*source == '.') + *dest=','; + else + *dest = *source; + dest++; + source++; + } + *dest = 0; + snprintf(dest, 20, ",%d,%d", (int)(port>>8), (int)(port&0xff)); + + result = Curl_pp_sendf(&ftpc->pp, "%s %s", mode[fcmd], tmp); + if(result) { + failf(data, "Failure sending PORT command: %s", + curl_easy_strerror(result)); + Curl_closesocket(conn, portsock); + /* bail out */ + state(conn, FTP_STOP); + return result; + } + break; + } + } + + /* store which command was sent */ + ftpc->count1 = fcmd; + + close_secondarysocket(conn); + + /* we set the secondary socket variable to this for now, it is only so that + the cleanup function will close it in case we fail before the true + secondary stuff is made */ + conn->sock[SECONDARYSOCKET] = portsock; + + /* this tcpconnect assignment below is a hackish work-around to make the + multi interface with active FTP work - as it will not wait for a + (passive) connect in Curl_is_connected(). + + The *proper* fix is to make sure that the active connection from the + server is done in a non-blocking way. Currently, it is still BLOCKING. + */ + conn->bits.tcpconnect[SECONDARYSOCKET] = TRUE; + + state(conn, FTP_PORT); + return result; +} + +static CURLcode ftp_state_use_pasv(struct connectdata *conn) +{ + struct ftp_conn *ftpc = &conn->proto.ftpc; + CURLcode result = CURLE_OK; + /* + Here's the excecutive summary on what to do: + + PASV is RFC959, expect: + 227 Entering Passive Mode (a1,a2,a3,a4,p1,p2) + + LPSV is RFC1639, expect: + 228 Entering Long Passive Mode (4,4,a1,a2,a3,a4,2,p1,p2) + + EPSV is RFC2428, expect: + 229 Entering Extended Passive Mode (|||port|) + + */ + + static const char mode[][5] = { "EPSV", "PASV" }; + int modeoff; + +#ifdef PF_INET6 + if(!conn->bits.ftp_use_epsv && conn->bits.ipv6) + /* EPSV is disabled but we are connected to a IPv6 host, so we ignore the + request and enable EPSV again! */ + conn->bits.ftp_use_epsv = TRUE; +#endif + + modeoff = conn->bits.ftp_use_epsv?0:1; + + PPSENDF(&ftpc->pp, "%s", mode[modeoff]); + + ftpc->count1 = modeoff; + state(conn, FTP_PASV); + infof(conn->data, "Connect data stream passively\n"); + + return result; +} + +/* + * ftp_state_prepare_transfer() starts PORT, PASV or PRET etc. + * + * REST is the last command in the chain of commands when a "head"-like + * request is made. Thus, if an actual transfer is to be made this is where we + * take off for real. + */ +static CURLcode ftp_state_prepare_transfer(struct connectdata *conn) +{ + CURLcode result = CURLE_OK; + struct FTP *ftp = conn->data->req.protop; + struct Curl_easy *data = conn->data; + + if(ftp->transfer != FTPTRANSFER_BODY) { + /* doesn't transfer any data */ + + /* still possibly do PRE QUOTE jobs */ + state(conn, FTP_RETR_PREQUOTE); + result = ftp_state_quote(conn, TRUE, FTP_RETR_PREQUOTE); + } + else if(data->set.ftp_use_port) { + /* We have chosen to use the PORT (or similar) command */ + result = ftp_state_use_port(conn, EPRT); + } + else { + /* We have chosen (this is default) to use the PASV (or similar) command */ + if(data->set.ftp_use_pret) { + /* The user has requested that we send a PRET command + to prepare the server for the upcoming PASV */ + if(!conn->proto.ftpc.file) { + PPSENDF(&conn->proto.ftpc.pp, "PRET %s", + data->set.str[STRING_CUSTOMREQUEST]? + data->set.str[STRING_CUSTOMREQUEST]: + (data->set.ftp_list_only?"NLST":"LIST")); + } + else if(data->set.upload) { + PPSENDF(&conn->proto.ftpc.pp, "PRET STOR %s", conn->proto.ftpc.file); + } + else { + PPSENDF(&conn->proto.ftpc.pp, "PRET RETR %s", conn->proto.ftpc.file); + } + state(conn, FTP_PRET); + } + else { + result = ftp_state_use_pasv(conn); + } + } + return result; +} + +static CURLcode ftp_state_rest(struct connectdata *conn) +{ + CURLcode result = CURLE_OK; + struct FTP *ftp = conn->data->req.protop; + struct ftp_conn *ftpc = &conn->proto.ftpc; + + if((ftp->transfer != FTPTRANSFER_BODY) && ftpc->file) { + /* if a "head"-like request is being made (on a file) */ + + /* Determine if server can respond to REST command and therefore + whether it supports range */ + PPSENDF(&conn->proto.ftpc.pp, "REST %d", 0); + + state(conn, FTP_REST); + } + else + result = ftp_state_prepare_transfer(conn); + + return result; +} + +static CURLcode ftp_state_size(struct connectdata *conn) +{ + CURLcode result = CURLE_OK; + struct FTP *ftp = conn->data->req.protop; + struct ftp_conn *ftpc = &conn->proto.ftpc; + + if((ftp->transfer == FTPTRANSFER_INFO) && ftpc->file) { + /* if a "head"-like request is being made (on a file) */ + + /* we know ftpc->file is a valid pointer to a file name */ + PPSENDF(&ftpc->pp, "SIZE %s", ftpc->file); + + state(conn, FTP_SIZE); + } + else + result = ftp_state_rest(conn); + + return result; +} + +static CURLcode ftp_state_list(struct connectdata *conn) +{ + CURLcode result = CURLE_OK; + struct Curl_easy *data = conn->data; + + /* If this output is to be machine-parsed, the NLST command might be better + to use, since the LIST command output is not specified or standard in any + way. It has turned out that the NLST list output is not the same on all + servers either... */ + + /* + if FTPFILE_NOCWD was specified, we are currently in + the user's home directory, so we should add the path + as argument for the LIST / NLST / or custom command. + Whether the server will support this, is uncertain. + + The other ftp_filemethods will CWD into dir/dir/ first and + then just do LIST (in that case: nothing to do here) + */ + char *cmd, *lstArg, *slashPos; + + lstArg = NULL; + if((data->set.ftp_filemethod == FTPFILE_NOCWD) && + data->state.path && + data->state.path[0] && + strchr(data->state.path, '/')) { + + lstArg = strdup(data->state.path); + if(!lstArg) + return CURLE_OUT_OF_MEMORY; + + /* Check if path does not end with /, as then we cut off the file part */ + if(lstArg[strlen(lstArg) - 1] != '/') { + + /* chop off the file part if format is dir/dir/file */ + slashPos = strrchr(lstArg, '/'); + if(slashPos) + *(slashPos+1) = '\0'; + } + } + + cmd = aprintf("%s%s%s", + data->set.str[STRING_CUSTOMREQUEST]? + data->set.str[STRING_CUSTOMREQUEST]: + (data->set.ftp_list_only?"NLST":"LIST"), + lstArg? " ": "", + lstArg? lstArg: ""); + + if(!cmd) { + free(lstArg); + return CURLE_OUT_OF_MEMORY; + } + + result = Curl_pp_sendf(&conn->proto.ftpc.pp, "%s", cmd); + + free(lstArg); + free(cmd); + + if(result) + return result; + + state(conn, FTP_LIST); + + return result; +} + +static CURLcode ftp_state_retr_prequote(struct connectdata *conn) +{ + CURLcode result = CURLE_OK; + + /* We've sent the TYPE, now we must send the list of prequote strings */ + + result = ftp_state_quote(conn, TRUE, FTP_RETR_PREQUOTE); + + return result; +} + +static CURLcode ftp_state_stor_prequote(struct connectdata *conn) +{ + CURLcode result = CURLE_OK; + + /* We've sent the TYPE, now we must send the list of prequote strings */ + + result = ftp_state_quote(conn, TRUE, FTP_STOR_PREQUOTE); + + return result; +} + +static CURLcode ftp_state_type(struct connectdata *conn) +{ + CURLcode result = CURLE_OK; + struct FTP *ftp = conn->data->req.protop; + struct Curl_easy *data = conn->data; + struct ftp_conn *ftpc = &conn->proto.ftpc; + + /* If we have selected NOBODY and HEADER, it means that we only want file + information. Which in FTP can't be much more than the file size and + date. */ + if(data->set.opt_no_body && ftpc->file && + ftp_need_type(conn, data->set.prefer_ascii)) { + /* The SIZE command is _not_ RFC 959 specified, and therefor many servers + may not support it! It is however the only way we have to get a file's + size! */ + + ftp->transfer = FTPTRANSFER_INFO; + /* this means no actual transfer will be made */ + + /* Some servers return different sizes for different modes, and thus we + must set the proper type before we check the size */ + result = ftp_nb_type(conn, data->set.prefer_ascii, FTP_TYPE); + if(result) + return result; + } + else + result = ftp_state_size(conn); + + return result; +} + +/* This is called after the CWD commands have been done in the beginning of + the DO phase */ +static CURLcode ftp_state_mdtm(struct connectdata *conn) +{ + CURLcode result = CURLE_OK; + struct Curl_easy *data = conn->data; + struct ftp_conn *ftpc = &conn->proto.ftpc; + + /* Requested time of file or time-depended transfer? */ + if((data->set.get_filetime || data->set.timecondition) && ftpc->file) { + + /* we have requested to get the modified-time of the file, this is a white + spot as the MDTM is not mentioned in RFC959 */ + PPSENDF(&ftpc->pp, "MDTM %s", ftpc->file); + + state(conn, FTP_MDTM); + } + else + result = ftp_state_type(conn); + + return result; +} + + +/* This is called after the TYPE and possible quote commands have been sent */ +static CURLcode ftp_state_ul_setup(struct connectdata *conn, + bool sizechecked) +{ + CURLcode result = CURLE_OK; + struct FTP *ftp = conn->data->req.protop; + struct Curl_easy *data = conn->data; + struct ftp_conn *ftpc = &conn->proto.ftpc; + int seekerr = CURL_SEEKFUNC_OK; + + if((data->state.resume_from && !sizechecked) || + ((data->state.resume_from > 0) && sizechecked)) { + /* we're about to continue the uploading of a file */ + /* 1. get already existing file's size. We use the SIZE command for this + which may not exist in the server! The SIZE command is not in + RFC959. */ + + /* 2. This used to set REST. But since we can do append, we + don't another ftp command. We just skip the source file + offset and then we APPEND the rest on the file instead */ + + /* 3. pass file-size number of bytes in the source file */ + /* 4. lower the infilesize counter */ + /* => transfer as usual */ + + if(data->state.resume_from < 0) { + /* Got no given size to start from, figure it out */ + PPSENDF(&ftpc->pp, "SIZE %s", ftpc->file); + state(conn, FTP_STOR_SIZE); + return result; + } + + /* enable append */ + data->set.ftp_append = TRUE; + + /* Let's read off the proper amount of bytes from the input. */ + if(conn->seek_func) { + seekerr = conn->seek_func(conn->seek_client, data->state.resume_from, + SEEK_SET); + } + + if(seekerr != CURL_SEEKFUNC_OK) { + curl_off_t passed=0; + if(seekerr != CURL_SEEKFUNC_CANTSEEK) { + failf(data, "Could not seek stream"); + return CURLE_FTP_COULDNT_USE_REST; + } + /* seekerr == CURL_SEEKFUNC_CANTSEEK (can't seek to offset) */ + do { + size_t readthisamountnow = - (data->state.resume_from - passed > CURL_OFF_T_C(BUFSIZE)) ? - BUFSIZE : curlx_sotouz(data->state.resume_from - passed); ++ (data->state.resume_from - passed > data->set.buffer_size) ? ++ (size_t)data->set.buffer_size : ++ curlx_sotouz(data->state.resume_from - passed); + + size_t actuallyread = + data->state.fread_func(data->state.buffer, 1, readthisamountnow, + data->state.in); + + passed += actuallyread; + if((actuallyread == 0) || (actuallyread > readthisamountnow)) { + /* this checks for greater-than only to make sure that the + CURL_READFUNC_ABORT return code still aborts */ + failf(data, "Failed to read data"); + return CURLE_FTP_COULDNT_USE_REST; + } + } while(passed < data->state.resume_from); + } + /* now, decrease the size of the read */ + if(data->state.infilesize>0) { + data->state.infilesize -= data->state.resume_from; + + if(data->state.infilesize <= 0) { + infof(data, "File already completely uploaded\n"); + + /* no data to transfer */ + Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); + + /* Set ->transfer so that we won't get any error in + * ftp_done() because we didn't transfer anything! */ + ftp->transfer = FTPTRANSFER_NONE; + + state(conn, FTP_STOP); + return CURLE_OK; + } + } + /* we've passed, proceed as normal */ + } /* resume_from */ + + PPSENDF(&ftpc->pp, data->set.ftp_append?"APPE %s":"STOR %s", + ftpc->file); + + state(conn, FTP_STOR); + + return result; +} + +static CURLcode ftp_state_quote(struct connectdata *conn, + bool init, + ftpstate instate) +{ + CURLcode result = CURLE_OK; + struct Curl_easy *data = conn->data; + struct FTP *ftp = data->req.protop; + struct ftp_conn *ftpc = &conn->proto.ftpc; + bool quote=FALSE; + struct curl_slist *item; + + switch(instate) { + case FTP_QUOTE: + default: + item = data->set.quote; + break; + case FTP_RETR_PREQUOTE: + case FTP_STOR_PREQUOTE: + item = data->set.prequote; + break; + case FTP_POSTQUOTE: + item = data->set.postquote; + break; + } + + /* + * This state uses: + * 'count1' to iterate over the commands to send + * 'count2' to store whether to allow commands to fail + */ + + if(init) + ftpc->count1 = 0; + else + ftpc->count1++; + + if(item) { + int i = 0; + + /* Skip count1 items in the linked list */ + while((i< ftpc->count1) && item) { + item = item->next; + i++; + } + if(item) { + char *cmd = item->data; + if(cmd[0] == '*') { + cmd++; + ftpc->count2 = 1; /* the sent command is allowed to fail */ + } + else + ftpc->count2 = 0; /* failure means cancel operation */ + + PPSENDF(&ftpc->pp, "%s", cmd); + state(conn, instate); + quote = TRUE; + } + } + + if(!quote) { + /* No more quote to send, continue to ... */ + switch(instate) { + case FTP_QUOTE: + default: + result = ftp_state_cwd(conn); + break; + case FTP_RETR_PREQUOTE: + if(ftp->transfer != FTPTRANSFER_BODY) + state(conn, FTP_STOP); + else { + if(ftpc->known_filesize != -1) { + Curl_pgrsSetDownloadSize(data, ftpc->known_filesize); + result = ftp_state_retr(conn, ftpc->known_filesize); + } + else { + if(data->set.ignorecl) { + /* This code is to support download of growing files. It prevents + the state machine from requesting the file size from the + server. With an unknown file size the download continues until + the server terminates it, otherwise the client stops if the + received byte count exceeds the reported file size. Set option + CURLOPT_IGNORE_CONTENT_LENGTH to 1 to enable this behavior.*/ + PPSENDF(&ftpc->pp, "RETR %s", ftpc->file); + state(conn, FTP_RETR); + } + else { + PPSENDF(&ftpc->pp, "SIZE %s", ftpc->file); + state(conn, FTP_RETR_SIZE); + } + } + } + break; + case FTP_STOR_PREQUOTE: + result = ftp_state_ul_setup(conn, FALSE); + break; + case FTP_POSTQUOTE: + break; + } + } + + return result; +} + +/* called from ftp_state_pasv_resp to switch to PASV in case of EPSV + problems */ +static CURLcode ftp_epsv_disable(struct connectdata *conn) +{ + CURLcode result = CURLE_OK; + + if(conn->bits.ipv6) { + /* We can't disable EPSV when doing IPv6, so this is instead a fail */ + failf(conn->data, "Failed EPSV attempt, exiting\n"); + return CURLE_WEIRD_SERVER_REPLY; + } + + infof(conn->data, "Failed EPSV attempt. Disabling EPSV\n"); + /* disable it for next transfer */ + conn->bits.ftp_use_epsv = FALSE; + conn->data->state.errorbuf = FALSE; /* allow error message to get + rewritten */ + PPSENDF(&conn->proto.ftpc.pp, "%s", "PASV"); + conn->proto.ftpc.count1++; + /* remain in/go to the FTP_PASV state */ + state(conn, FTP_PASV); + return result; +} + + +static char *control_address(struct connectdata *conn) +{ + /* Returns the control connection IP address. + If a proxy tunnel is used, returns the original host name instead, because + the effective control connection address is the proxy address, + not the ftp host. */ + if(conn->bits.tunnel_proxy || conn->bits.socksproxy) + return conn->host.name; + + return conn->ip_addr_str; +} + +static CURLcode ftp_state_pasv_resp(struct connectdata *conn, + int ftpcode) +{ + struct ftp_conn *ftpc = &conn->proto.ftpc; + CURLcode result; + struct Curl_easy *data=conn->data; + struct Curl_dns_entry *addr=NULL; + int rc; + unsigned short connectport; /* the local port connect() should use! */ + char *str=&data->state.buffer[4]; /* start on the first letter */ + + /* if we come here again, make sure the former name is cleared */ + Curl_safefree(ftpc->newhost); + + if((ftpc->count1 == 0) && + (ftpcode == 229)) { + /* positive EPSV response */ + char *ptr = strchr(str, '('); + if(ptr) { + unsigned int num; + char separator[4]; + ptr++; + if(5 == sscanf(ptr, "%c%c%c%u%c", + &separator[0], + &separator[1], + &separator[2], + &num, + &separator[3])) { + const char sep1 = separator[0]; + int i; + + /* The four separators should be identical, or else this is an oddly + formatted reply and we bail out immediately. */ + for(i=1; i<4; i++) { + if(separator[i] != sep1) { + ptr=NULL; /* set to NULL to signal error */ + break; + } + } + if(num > 0xffff) { + failf(data, "Illegal port number in EPSV reply"); + return CURLE_FTP_WEIRD_PASV_REPLY; + } + if(ptr) { + ftpc->newport = (unsigned short)(num & 0xffff); + ftpc->newhost = strdup(control_address(conn)); + if(!ftpc->newhost) + return CURLE_OUT_OF_MEMORY; + } + } + else + ptr=NULL; + } + if(!ptr) { + failf(data, "Weirdly formatted EPSV reply"); + return CURLE_FTP_WEIRD_PASV_REPLY; + } + } + else if((ftpc->count1 == 1) && + (ftpcode == 227)) { + /* positive PASV response */ + int ip[4]; + int port[2]; + + /* + * Scan for a sequence of six comma-separated numbers and use them as + * IP+port indicators. + * + * Found reply-strings include: + * "227 Entering Passive Mode (127,0,0,1,4,51)" + * "227 Data transfer will passively listen to 127,0,0,1,4,51" + * "227 Entering passive mode. 127,0,0,1,4,51" + */ + while(*str) { + if(6 == sscanf(str, "%d,%d,%d,%d,%d,%d", + &ip[0], &ip[1], &ip[2], &ip[3], + &port[0], &port[1])) + break; + str++; + } + + if(!*str) { + failf(data, "Couldn't interpret the 227-response"); + return CURLE_FTP_WEIRD_227_FORMAT; + } + + /* we got OK from server */ + if(data->set.ftp_skip_ip) { + /* told to ignore the remotely given IP but instead use the host we used + for the control connection */ + infof(data, "Skip %d.%d.%d.%d for data connection, re-use %s instead\n", + ip[0], ip[1], ip[2], ip[3], + conn->host.name); + ftpc->newhost = strdup(control_address(conn)); + } + else + ftpc->newhost = aprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]); + + if(!ftpc->newhost) + return CURLE_OUT_OF_MEMORY; + + ftpc->newport = (unsigned short)(((port[0]<<8) + port[1]) & 0xffff); + } + else if(ftpc->count1 == 0) { + /* EPSV failed, move on to PASV */ + return ftp_epsv_disable(conn); + } + else { + failf(data, "Bad PASV/EPSV response: %03d", ftpcode); + return CURLE_FTP_WEIRD_PASV_REPLY; + } + + if(conn->bits.proxy) { + /* + * This connection uses a proxy and we need to connect to the proxy again + * here. We don't want to rely on a former host lookup that might've + * expired now, instead we remake the lookup here and now! + */ + const char * const host_name = conn->bits.socksproxy ? + conn->socks_proxy.host.name : conn->http_proxy.host.name; + rc = Curl_resolv(conn, host_name, (int)conn->port, &addr); + if(rc == CURLRESOLV_PENDING) + /* BLOCKING, ignores the return code but 'addr' will be NULL in + case of failure */ + (void)Curl_resolver_wait_resolv(conn, &addr); + + connectport = + (unsigned short)conn->port; /* we connect to the proxy's port */ + + if(!addr) { + failf(data, "Can't resolve proxy host %s:%hu", host_name, connectport); + return CURLE_COULDNT_RESOLVE_PROXY; + } + } + else { + /* normal, direct, ftp connection */ + rc = Curl_resolv(conn, ftpc->newhost, ftpc->newport, &addr); + if(rc == CURLRESOLV_PENDING) + /* BLOCKING */ + (void)Curl_resolver_wait_resolv(conn, &addr); + + connectport = ftpc->newport; /* we connect to the remote port */ + + if(!addr) { + failf(data, "Can't resolve new host %s:%hu", ftpc->newhost, connectport); + return CURLE_FTP_CANT_GET_HOST; + } + } + + conn->bits.tcpconnect[SECONDARYSOCKET] = FALSE; + result = Curl_connecthost(conn, addr); + + if(result) { + Curl_resolv_unlock(data, addr); /* we're done using this address */ + if(ftpc->count1 == 0 && ftpcode == 229) + return ftp_epsv_disable(conn); + + return result; + } + + + /* + * When this is used from the multi interface, this might've returned with + * the 'connected' set to FALSE and thus we are now awaiting a non-blocking + * connect to connect. + */ + + if(data->set.verbose) + /* this just dumps information about this second connection */ + ftp_pasv_verbose(conn, addr->addr, ftpc->newhost, connectport); + + Curl_resolv_unlock(data, addr); /* we're done using this address */ + + Curl_safefree(conn->secondaryhostname); + conn->secondary_port = ftpc->newport; + conn->secondaryhostname = strdup(ftpc->newhost); + if(!conn->secondaryhostname) + return CURLE_OUT_OF_MEMORY; + + conn->bits.do_more = TRUE; + state(conn, FTP_STOP); /* this phase is completed */ + + return result; +} + +static CURLcode ftp_state_port_resp(struct connectdata *conn, + int ftpcode) +{ + struct Curl_easy *data = conn->data; + struct ftp_conn *ftpc = &conn->proto.ftpc; + ftpport fcmd = (ftpport)ftpc->count1; + CURLcode result = CURLE_OK; + + /* The FTP spec tells a positive response should have code 200. + Be more permissive here to tolerate deviant servers. */ + if(ftpcode / 100 != 2) { + /* the command failed */ + + if(EPRT == fcmd) { + infof(data, "disabling EPRT usage\n"); + conn->bits.ftp_use_eprt = FALSE; + } + fcmd++; + + if(fcmd == DONE) { + failf(data, "Failed to do PORT"); + result = CURLE_FTP_PORT_FAILED; + } + else + /* try next */ + result = ftp_state_use_port(conn, fcmd); + } + else { + infof(data, "Connect data stream actively\n"); + state(conn, FTP_STOP); /* end of DO phase */ + result = ftp_dophase_done(conn, FALSE); + } + + return result; +} + +static CURLcode ftp_state_mdtm_resp(struct connectdata *conn, + int ftpcode) +{ + CURLcode result = CURLE_OK; + struct Curl_easy *data=conn->data; + struct FTP *ftp = data->req.protop; + struct ftp_conn *ftpc = &conn->proto.ftpc; + + switch(ftpcode) { + case 213: + { + /* we got a time. Format should be: "YYYYMMDDHHMMSS[.sss]" where the + last .sss part is optional and means fractions of a second */ + int year, month, day, hour, minute, second; - char *buf = data->state.buffer; - if(6 == sscanf(buf+4, "%04d%02d%02d%02d%02d%02d", ++ if(6 == sscanf(&data->state.buffer[4], "%04d%02d%02d%02d%02d%02d", + &year, &month, &day, &hour, &minute, &second)) { + /* we have a time, reformat it */ ++ char timebuf[24]; + time_t secs=time(NULL); - /* using the good old yacc/bison yuck */ - snprintf(buf, CURL_BUFSIZE(conn->data->set.buffer_size), ++ ++ snprintf(timebuf, sizeof(timebuf), + "%04d%02d%02d %02d:%02d:%02d GMT", + year, month, day, hour, minute, second); + /* now, convert this into a time() value: */ - data->info.filetime = (long)curl_getdate(buf, &secs); ++ data->info.filetime = (long)curl_getdate(timebuf, &secs); + } + +#ifdef CURL_FTP_HTTPSTYLE_HEAD + /* If we asked for a time of the file and we actually got one as well, + we "emulate" a HTTP-style header in our output. */ + + if(data->set.opt_no_body && + ftpc->file && + data->set.get_filetime && + (data->info.filetime>=0) ) { ++ char headerbuf[128]; + time_t filetime = (time_t)data->info.filetime; + struct tm buffer; + const struct tm *tm = &buffer; + + result = Curl_gmtime(filetime, &buffer); + if(result) + return result; + + /* format: "Tue, 15 Nov 1994 12:45:26" */ - snprintf(buf, BUFSIZE-1, ++ snprintf(headerbuf, sizeof(headerbuf), + "Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n", + Curl_wkday[tm->tm_wday?tm->tm_wday-1:6], + tm->tm_mday, + Curl_month[tm->tm_mon], + tm->tm_year + 1900, + tm->tm_hour, + tm->tm_min, + tm->tm_sec); - result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0); ++ result = Curl_client_write(conn, CLIENTWRITE_BOTH, headerbuf, 0); + if(result) + return result; + } /* end of a ridiculous amount of conditionals */ +#endif + } + break; + default: + infof(data, "unsupported MDTM reply format\n"); + break; + case 550: /* "No such file or directory" */ + failf(data, "Given file does not exist"); + result = CURLE_FTP_COULDNT_RETR_FILE; + break; + } + + if(data->set.timecondition) { + if((data->info.filetime > 0) && (data->set.timevalue > 0)) { + switch(data->set.timecondition) { + case CURL_TIMECOND_IFMODSINCE: + default: + if(data->info.filetime <= data->set.timevalue) { + infof(data, "The requested document is not new enough\n"); + ftp->transfer = FTPTRANSFER_NONE; /* mark to not transfer data */ + data->info.timecond = TRUE; + state(conn, FTP_STOP); + return CURLE_OK; + } + break; + case CURL_TIMECOND_IFUNMODSINCE: + if(data->info.filetime > data->set.timevalue) { + infof(data, "The requested document is not old enough\n"); + ftp->transfer = FTPTRANSFER_NONE; /* mark to not transfer data */ + data->info.timecond = TRUE; + state(conn, FTP_STOP); + return CURLE_OK; + } + break; + } /* switch */ + } + else { + infof(data, "Skipping time comparison\n"); + } + } + + if(!result) + result = ftp_state_type(conn); + + return result; +} + +static CURLcode ftp_state_type_resp(struct connectdata *conn, + int ftpcode, + ftpstate instate) +{ + CURLcode result = CURLE_OK; + struct Curl_easy *data=conn->data; + + if(ftpcode/100 != 2) { + /* "sasserftpd" and "(u)r(x)bot ftpd" both responds with 226 after a + successful 'TYPE I'. While that is not as RFC959 says, it is still a + positive response code and we allow that. */ + failf(data, "Couldn't set desired mode"); + return CURLE_FTP_COULDNT_SET_TYPE; + } + if(ftpcode != 200) + infof(data, "Got a %03d response code instead of the assumed 200\n", + ftpcode); + + if(instate == FTP_TYPE) + result = ftp_state_size(conn); + else if(instate == FTP_LIST_TYPE) + result = ftp_state_list(conn); + else if(instate == FTP_RETR_TYPE) + result = ftp_state_retr_prequote(conn); + else if(instate == FTP_STOR_TYPE) + result = ftp_state_stor_prequote(conn); + + return result; +} + +static CURLcode ftp_state_retr(struct connectdata *conn, + curl_off_t filesize) +{ + CURLcode result = CURLE_OK; + struct Curl_easy *data=conn->data; + struct FTP *ftp = data->req.protop; + struct ftp_conn *ftpc = &conn->proto.ftpc; + + if(data->set.max_filesize && (filesize > data->set.max_filesize)) { + failf(data, "Maximum file size exceeded"); + return CURLE_FILESIZE_EXCEEDED; + } + ftp->downloadsize = filesize; + + if(data->state.resume_from) { + /* We always (attempt to) get the size of downloads, so it is done before + this even when not doing resumes. */ + if(filesize == -1) { + infof(data, "ftp server doesn't support SIZE\n"); + /* We couldn't get the size and therefore we can't know if there really + is a part of the file left to get, although the server will just + close the connection when we start the connection so it won't cause + us any harm, just not make us exit as nicely. */ + } + else { + /* We got a file size report, so we check that there actually is a + part of the file left to get, or else we go home. */ + if(data->state.resume_from< 0) { + /* We're supposed to download the last abs(from) bytes */ + if(filesize < -data->state.resume_from) { + failf(data, "Offset (%" CURL_FORMAT_CURL_OFF_T + ") was beyond file size (%" CURL_FORMAT_CURL_OFF_T ")", + data->state.resume_from, filesize); + return CURLE_BAD_DOWNLOAD_RESUME; + } + /* convert to size to download */ + ftp->downloadsize = -data->state.resume_from; + /* download from where? */ + data->state.resume_from = filesize - ftp->downloadsize; + } + else { + if(filesize < data->state.resume_from) { + failf(data, "Offset (%" CURL_FORMAT_CURL_OFF_T + ") was beyond file size (%" CURL_FORMAT_CURL_OFF_T ")", + data->state.resume_from, filesize); + return CURLE_BAD_DOWNLOAD_RESUME; + } + /* Now store the number of bytes we are expected to download */ + ftp->downloadsize = filesize-data->state.resume_from; + } + } + + if(ftp->downloadsize == 0) { + /* no data to transfer */ + Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); + infof(data, "File already completely downloaded\n"); + + /* Set ->transfer so that we won't get any error in ftp_done() + * because we didn't transfer the any file */ + ftp->transfer = FTPTRANSFER_NONE; + state(conn, FTP_STOP); + return CURLE_OK; + } + + /* Set resume file transfer offset */ + infof(data, "Instructs server to resume from offset %" + CURL_FORMAT_CURL_OFF_T "\n", data->state.resume_from); + + PPSENDF(&ftpc->pp, "REST %" CURL_FORMAT_CURL_OFF_T, + data->state.resume_from); + + state(conn, FTP_RETR_REST); + } + else { + /* no resume */ + PPSENDF(&ftpc->pp, "RETR %s", ftpc->file); + state(conn, FTP_RETR); + } + + return result; +} + +static CURLcode ftp_state_size_resp(struct connectdata *conn, + int ftpcode, + ftpstate instate) +{ + CURLcode result = CURLE_OK; + struct Curl_easy *data=conn->data; + curl_off_t filesize; + char *buf = data->state.buffer; + + /* get the size from the ascii string: */ + filesize = (ftpcode == 213)?curlx_strtoofft(buf+4, NULL, 0):-1; + + if(instate == FTP_SIZE) { +#ifdef CURL_FTP_HTTPSTYLE_HEAD + if(-1 != filesize) { - snprintf(buf, CURL_BUFSIZE(data->set.buffer_size), ++ char clbuf[128]; ++ snprintf(clbuf, sizeof(clbuf), + "Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n", filesize); - result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0); ++ result = Curl_client_write(conn, CLIENTWRITE_BOTH, clbuf, 0); + if(result) + return result; + } +#endif + Curl_pgrsSetDownloadSize(data, filesize); + result = ftp_state_rest(conn); + } + else if(instate == FTP_RETR_SIZE) { + Curl_pgrsSetDownloadSize(data, filesize); + result = ftp_state_retr(conn, filesize); + } + else if(instate == FTP_STOR_SIZE) { + data->state.resume_from = filesize; + result = ftp_state_ul_setup(conn, TRUE); + } + + return result; +} + +static CURLcode ftp_state_rest_resp(struct connectdata *conn, + int ftpcode, + ftpstate instate) +{ + CURLcode result = CURLE_OK; + struct ftp_conn *ftpc = &conn->proto.ftpc; + + switch(instate) { + case FTP_REST: + default: +#ifdef CURL_FTP_HTTPSTYLE_HEAD + if(ftpcode == 350) { + char buffer[24]= { "Accept-ranges: bytes\r\n" }; + result = Curl_client_write(conn, CLIENTWRITE_BOTH, buffer, 0); + if(result) + return result; + } +#endif + result = ftp_state_prepare_transfer(conn); + break; + + case FTP_RETR_REST: + if(ftpcode != 350) { + failf(conn->data, "Couldn't use REST"); + result = CURLE_FTP_COULDNT_USE_REST; + } + else { + PPSENDF(&ftpc->pp, "RETR %s", ftpc->file); + state(conn, FTP_RETR); + } + break; + } + + return result; +} + +static CURLcode ftp_state_stor_resp(struct connectdata *conn, + int ftpcode, ftpstate instate) +{ + CURLcode result = CURLE_OK; + struct Curl_easy *data = conn->data; + + if(ftpcode>=400) { + failf(data, "Failed FTP upload: %0d", ftpcode); + state(conn, FTP_STOP); + /* oops, we never close the sockets! */ + return CURLE_UPLOAD_FAILED; + } + + conn->proto.ftpc.state_saved = instate; + + /* PORT means we are now awaiting the server to connect to us. */ + if(data->set.ftp_use_port) { + bool connected; + + state(conn, FTP_STOP); /* no longer in STOR state */ + + result = AllowServerConnect(conn, &connected); + if(result) + return result; + + if(!connected) { + struct ftp_conn *ftpc = &conn->proto.ftpc; + infof(data, "Data conn was not available immediately\n"); + ftpc->wait_data_conn = TRUE; + } + + return CURLE_OK; + } + return InitiateTransfer(conn); +} + +/* for LIST and RETR responses */ +static CURLcode ftp_state_get_resp(struct connectdata *conn, + int ftpcode, + ftpstate instate) +{ + CURLcode result = CURLE_OK; + struct Curl_easy *data = conn->data; + struct FTP *ftp = data->req.protop; - char *buf = data->state.buffer; + + if((ftpcode == 150) || (ftpcode == 125)) { + + /* + A; + 150 Opening BINARY mode data connection for /etc/passwd (2241 + bytes). (ok, the file is being transferred) + + B: + 150 Opening ASCII mode data connection for /bin/ls + + C: + 150 ASCII data connection for /bin/ls (137.167.104.91,37445) (0 bytes). + + D: + 150 Opening ASCII mode data connection for [file] (0.0.0.0,0) (545 bytes) + + E: + 125 Data connection already open; Transfer starting. */ + + curl_off_t size=-1; /* default unknown size */ + + + /* + * It appears that there are FTP-servers that return size 0 for files when + * SIZE is used on the file while being in BINARY mode. To work around + * that (stupid) behavior, we attempt to parse the RETR response even if + * the SIZE returned size zero. + * + * Debugging help from Salvatore Sorrentino on February 26, 2003. + */ + + if((instate != FTP_LIST) && + !data->set.prefer_ascii && + (ftp->downloadsize < 1)) { + /* + * It seems directory listings either don't show the size or very + * often uses size 0 anyway. ASCII transfers may very well turn out + * that the transferred amount of data is not the same as this line + * tells, why using this number in those cases only confuses us. + * + * Example D above makes this parsing a little tricky */ + char *bytes; ++ char *buf = data->state.buffer; + bytes=strstr(buf, " bytes"); + if(bytes--) { + long in=(long)(bytes-buf); + /* this is a hint there is size information in there! ;-) */ + while(--in) { + /* scan for the left parenthesis and break there */ + if('(' == *bytes) + break; + /* skip only digits */ + if(!ISDIGIT(*bytes)) { + bytes=NULL; + break; + } + /* one more estep backwards */ + bytes--; + } + /* if we have nothing but digits: */ + if(bytes++) { + /* get the number! */ + size = curlx_strtoofft(bytes, NULL, 0); + } + } + } + else if(ftp->downloadsize > -1) + size = ftp->downloadsize; + + if(size > data->req.maxdownload && data->req.maxdownload > 0) + size = data->req.size = data->req.maxdownload; + else if((instate != FTP_LIST) && (data->set.prefer_ascii)) + size = -1; /* kludge for servers that understate ASCII mode file size */ + + infof(data, "Maxdownload = %" CURL_FORMAT_CURL_OFF_T "\n", + data->req.maxdownload); + + if(instate != FTP_LIST) + infof(data, "Getting file with size: %" CURL_FORMAT_CURL_OFF_T "\n", + size); + + /* FTP download: */ + conn->proto.ftpc.state_saved = instate; + conn->proto.ftpc.retr_size_saved = size; + + if(data->set.ftp_use_port) { + bool connected; + + result = AllowServerConnect(conn, &connected); + if(result) + return result; + + if(!connected) { + struct ftp_conn *ftpc = &conn->proto.ftpc; + infof(data, "Data conn was not available immediately\n"); + state(conn, FTP_STOP); + ftpc->wait_data_conn = TRUE; + } + } + else + return InitiateTransfer(conn); + } + else { + if((instate == FTP_LIST) && (ftpcode == 450)) { + /* simply no matching files in the dir listing */ + ftp->transfer = FTPTRANSFER_NONE; /* don't download anything */ + state(conn, FTP_STOP); /* this phase is over */ + } + else { + failf(data, "RETR response: %03d", ftpcode); + return instate == FTP_RETR && ftpcode == 550? + CURLE_REMOTE_FILE_NOT_FOUND: + CURLE_FTP_COULDNT_RETR_FILE; + } + } + + return result; +} + +/* after USER, PASS and ACCT */ +static CURLcode ftp_state_loggedin(struct connectdata *conn) +{ + CURLcode result = CURLE_OK; + + if(conn->ssl[FIRSTSOCKET].use) { + /* PBSZ = PROTECTION BUFFER SIZE. + + The 'draft-murray-auth-ftp-ssl' (draft 12, page 7) says: + + Specifically, the PROT command MUST be preceded by a PBSZ + command and a PBSZ command MUST be preceded by a successful + security data exchange (the TLS negotiation in this case) + + ... (and on page 8): + + Thus the PBSZ command must still be issued, but must have a + parameter of '0' to indicate that no buffering is taking place + and the data connection should not be encapsulated. + */ + PPSENDF(&conn->proto.ftpc.pp, "PBSZ %d", 0); + state(conn, FTP_PBSZ); + } + else { + result = ftp_state_pwd(conn); + } + return result; +} + +/* for USER and PASS responses */ +static CURLcode ftp_state_user_resp(struct connectdata *conn, + int ftpcode, + ftpstate instate) +{ + CURLcode result = CURLE_OK; + struct Curl_easy *data = conn->data; + struct FTP *ftp = data->req.protop; + struct ftp_conn *ftpc = &conn->proto.ftpc; + (void)instate; /* no use for this yet */ + + /* some need password anyway, and others just return 2xx ignored */ + if((ftpcode == 331) && (ftpc->state == FTP_USER)) { + /* 331 Password required for ... + (the server requires to send the user's password too) */ + PPSENDF(&ftpc->pp, "PASS %s", ftp->passwd?ftp->passwd:""); + state(conn, FTP_PASS); + } + else if(ftpcode/100 == 2) { + /* 230 User ... logged in. + (the user logged in with or without password) */ + result = ftp_state_loggedin(conn); + } + else if(ftpcode == 332) { + if(data->set.str[STRING_FTP_ACCOUNT]) { + PPSENDF(&ftpc->pp, "ACCT %s", data->set.str[STRING_FTP_ACCOUNT]); + state(conn, FTP_ACCT); + } + else { + failf(data, "ACCT requested but none available"); + result = CURLE_LOGIN_DENIED; + } + } + else { + /* All other response codes, like: + + 530 User ... access denied + (the server denies to log the specified user) */ + + if(conn->data->set.str[STRING_FTP_ALTERNATIVE_TO_USER] && + !conn->data->state.ftp_trying_alternative) { + /* Ok, USER failed. Let's try the supplied command. */ + PPSENDF(&conn->proto.ftpc.pp, "%s", + conn->data->set.str[STRING_FTP_ALTERNATIVE_TO_USER]); + conn->data->state.ftp_trying_alternative = TRUE; + state(conn, FTP_USER); + result = CURLE_OK; + } + else { + failf(data, "Access denied: %03d", ftpcode); + result = CURLE_LOGIN_DENIED; + } + } + return result; +} + +/* for ACCT response */ +static CURLcode ftp_state_acct_resp(struct connectdata *conn, + int ftpcode) +{ + CURLcode result = CURLE_OK; + struct Curl_easy *data = conn->data; + if(ftpcode != 230) { + failf(data, "ACCT rejected by server: %03d", ftpcode); + result = CURLE_FTP_WEIRD_PASS_REPLY; /* FIX */ + } + else + result = ftp_state_loggedin(conn); + + return result; +} + + +static CURLcode ftp_statemach_act(struct connectdata *conn) +{ + CURLcode result; + curl_socket_t sock = conn->sock[FIRSTSOCKET]; + struct Curl_easy *data=conn->data; + int ftpcode; + struct ftp_conn *ftpc = &conn->proto.ftpc; + struct pingpong *pp = &ftpc->pp; + static const char ftpauth[][4] = { "SSL", "TLS" }; + size_t nread = 0; + + if(pp->sendleft) + return Curl_pp_flushsend(pp); + + result = ftp_readresp(sock, pp, &ftpcode, &nread); + if(result) + return result; + + if(ftpcode) { + /* we have now received a full FTP server response */ + switch(ftpc->state) { + case FTP_WAIT220: + if(ftpcode == 230) + /* 230 User logged in - already! */ + return ftp_state_user_resp(conn, ftpcode, ftpc->state); + else if(ftpcode != 220) { + failf(data, "Got a %03d ftp-server response when 220 was expected", + ftpcode); + return CURLE_WEIRD_SERVER_REPLY; + } + + /* We have received a 220 response fine, now we proceed. */ +#ifdef HAVE_GSSAPI + if(data->set.krb) { + /* If not anonymous login, try a secure login. Note that this + procedure is still BLOCKING. */ + + Curl_sec_request_prot(conn, "private"); + /* We set private first as default, in case the line below fails to + set a valid level */ + Curl_sec_request_prot(conn, data->set.str[STRING_KRB_LEVEL]); + + if(Curl_sec_login(conn)) + infof(data, "Logging in with password in cleartext!\n"); + else + infof(data, "Authentication successful\n"); + } +#endif + + if(data->set.use_ssl && + (!conn->ssl[FIRSTSOCKET].use || + (conn->bits.proxy_ssl_connected[FIRSTSOCKET] && + !conn->proxy_ssl[FIRSTSOCKET].use))) { + /* We don't have a SSL/TLS connection yet, but FTPS is + requested. Try a FTPS connection now */ + + ftpc->count3=0; + switch(data->set.ftpsslauth) { + case CURLFTPAUTH_DEFAULT: + case CURLFTPAUTH_SSL: + ftpc->count2 = 1; /* add one to get next */ + ftpc->count1 = 0; + break; + case CURLFTPAUTH_TLS: + ftpc->count2 = -1; /* subtract one to get next */ + ftpc->count1 = 1; + break; + default: + failf(data, "unsupported parameter to CURLOPT_FTPSSLAUTH: %d", + (int)data->set.ftpsslauth); + return CURLE_UNKNOWN_OPTION; /* we don't know what to do */ + } + PPSENDF(&ftpc->pp, "AUTH %s", ftpauth[ftpc->count1]); + state(conn, FTP_AUTH); + } + else { + result = ftp_state_user(conn); + if(result) + return result; + } + + break; + + case FTP_AUTH: + /* we have gotten the response to a previous AUTH command */ + + /* RFC2228 (page 5) says: + * + * If the server is willing to accept the named security mechanism, + * and does not require any security data, it must respond with + * reply code 234/334. + */ + + if((ftpcode == 234) || (ftpcode == 334)) { + /* Curl_ssl_connect is BLOCKING */ + result = Curl_ssl_connect(conn, FIRSTSOCKET); + if(!result) { + conn->bits.ftp_use_data_ssl = FALSE; /* clear-text data */ + result = ftp_state_user(conn); + } + } + else if(ftpc->count3 < 1) { + ftpc->count3++; + ftpc->count1 += ftpc->count2; /* get next attempt */ + result = Curl_pp_sendf(&ftpc->pp, "AUTH %s", ftpauth[ftpc->count1]); + /* remain in this same state */ + } + else { + if(data->set.use_ssl > CURLUSESSL_TRY) + /* we failed and CURLUSESSL_CONTROL or CURLUSESSL_ALL is set */ + result = CURLE_USE_SSL_FAILED; + else + /* ignore the failure and continue */ + result = ftp_state_user(conn); + } + + if(result) + return result; + break; + + case FTP_USER: + case FTP_PASS: + result = ftp_state_user_resp(conn, ftpcode, ftpc->state); + break; + + case FTP_ACCT: + result = ftp_state_acct_resp(conn, ftpcode); + break; + + case FTP_PBSZ: + PPSENDF(&ftpc->pp, "PROT %c", + data->set.use_ssl == CURLUSESSL_CONTROL ? 'C' : 'P'); + state(conn, FTP_PROT); + + break; + + case FTP_PROT: + if(ftpcode/100 == 2) + /* We have enabled SSL for the data connection! */ + conn->bits.ftp_use_data_ssl = + (data->set.use_ssl != CURLUSESSL_CONTROL) ? TRUE : FALSE; + /* FTP servers typically responds with 500 if they decide to reject + our 'P' request */ + else if(data->set.use_ssl > CURLUSESSL_CONTROL) + /* we failed and bails out */ + return CURLE_USE_SSL_FAILED; + + if(data->set.ftp_ccc) { + /* CCC - Clear Command Channel + */ + PPSENDF(&ftpc->pp, "%s", "CCC"); + state(conn, FTP_CCC); + } + else { + result = ftp_state_pwd(conn); + if(result) + return result; + } + break; + + case FTP_CCC: + if(ftpcode < 500) { + /* First shut down the SSL layer (note: this call will block) */ + result = Curl_ssl_shutdown(conn, FIRSTSOCKET); + + if(result) { + failf(conn->data, "Failed to clear the command channel (CCC)"); + return result; + } + } + + /* Then continue as normal */ + result = ftp_state_pwd(conn); + if(result) + return result; + break; + + case FTP_PWD: + if(ftpcode == 257) { + char *ptr=&data->state.buffer[4]; /* start on the first letter */ - const size_t buf_size = CURL_BUFSIZE(data->set.buffer_size); ++ const size_t buf_size = data->set.buffer_size; + char *dir; + char *store; + + dir = malloc(nread + 1); + if(!dir) + return CURLE_OUT_OF_MEMORY; + + /* Reply format is like + 257[rubbish]"" and the + RFC959 says + + The directory name can contain any character; embedded + double-quotes should be escaped by double-quotes (the + "quote-doubling" convention). + */ + + /* scan for the first double-quote for non-standard responses */ + while(ptr < &data->state.buffer[buf_size] + && *ptr != '\n' && *ptr != '\0' && *ptr != '"') + ptr++; + + if('\"' == *ptr) { + /* it started good */ + ptr++; + for(store = dir; *ptr;) { + if('\"' == *ptr) { + if('\"' == ptr[1]) { + /* "quote-doubling" */ + *store = ptr[1]; + ptr++; + } + else { + /* end of path */ + *store = '\0'; /* zero terminate */ + break; /* get out of this loop */ + } + } + else + *store = *ptr; + store++; + ptr++; + } + + /* If the path name does not look like an absolute path (i.e.: it + does not start with a '/'), we probably need some server-dependent + adjustments. For example, this is the case when connecting to + an OS400 FTP server: this server supports two name syntaxes, + the default one being incompatible with standard paths. In + addition, this server switches automatically to the regular path + syntax when one is encountered in a command: this results in + having an entrypath in the wrong syntax when later used in CWD. + The method used here is to check the server OS: we do it only + if the path name looks strange to minimize overhead on other + systems. */ + + if(!ftpc->server_os && dir[0] != '/') { + + result = Curl_pp_sendf(&ftpc->pp, "%s", "SYST"); + if(result) { + free(dir); + return result; + } + Curl_safefree(ftpc->entrypath); + ftpc->entrypath = dir; /* remember this */ + infof(data, "Entry path is '%s'\n", ftpc->entrypath); + /* also save it where getinfo can access it: */ + data->state.most_recent_ftp_entrypath = ftpc->entrypath; + state(conn, FTP_SYST); + break; + } + + Curl_safefree(ftpc->entrypath); + ftpc->entrypath = dir; /* remember this */ + infof(data, "Entry path is '%s'\n", ftpc->entrypath); + /* also save it where getinfo can access it: */ + data->state.most_recent_ftp_entrypath = ftpc->entrypath; + } + else { + /* couldn't get the path */ + free(dir); + infof(data, "Failed to figure out path\n"); + } + } + state(conn, FTP_STOP); /* we are done with the CONNECT phase! */ + DEBUGF(infof(data, "protocol connect phase DONE\n")); + break; + + case FTP_SYST: + if(ftpcode == 215) { + char *ptr=&data->state.buffer[4]; /* start on the first letter */ + char *os; + char *store; + + os = malloc(nread + 1); + if(!os) + return CURLE_OUT_OF_MEMORY; + + /* Reply format is like + 215 + */ + while(*ptr == ' ') + ptr++; + for(store = os; *ptr && *ptr != ' ';) + *store++ = *ptr++; + *store = '\0'; /* zero terminate */ + + /* Check for special servers here. */ + + if(strcasecompare(os, "OS/400")) { + /* Force OS400 name format 1. */ + result = Curl_pp_sendf(&ftpc->pp, "%s", "SITE NAMEFMT 1"); + if(result) { + free(os); + return result; + } + /* remember target server OS */ + Curl_safefree(ftpc->server_os); + ftpc->server_os = os; + state(conn, FTP_NAMEFMT); + break; + } + /* Nothing special for the target server. */ + /* remember target server OS */ + Curl_safefree(ftpc->server_os); + ftpc->server_os = os; + } + else { + /* Cannot identify server OS. Continue anyway and cross fingers. */ + } + + state(conn, FTP_STOP); /* we are done with the CONNECT phase! */ + DEBUGF(infof(data, "protocol connect phase DONE\n")); + break; + + case FTP_NAMEFMT: + if(ftpcode == 250) { + /* Name format change successful: reload initial path. */ + ftp_state_pwd(conn); + break; + } + + state(conn, FTP_STOP); /* we are done with the CONNECT phase! */ + DEBUGF(infof(data, "protocol connect phase DONE\n")); + break; + + case FTP_QUOTE: + case FTP_POSTQUOTE: + case FTP_RETR_PREQUOTE: + case FTP_STOR_PREQUOTE: + if((ftpcode >= 400) && !ftpc->count2) { + /* failure response code, and not allowed to fail */ + failf(conn->data, "QUOT command failed with %03d", ftpcode); + return CURLE_QUOTE_ERROR; + } + result = ftp_state_quote(conn, FALSE, ftpc->state); + if(result) + return result; + + break; + + case FTP_CWD: + if(ftpcode/100 != 2) { + /* failure to CWD there */ + if(conn->data->set.ftp_create_missing_dirs && + ftpc->count1 && !ftpc->count2) { + /* try making it */ + ftpc->count2++; /* counter to prevent CWD-MKD loops */ + PPSENDF(&ftpc->pp, "MKD %s", ftpc->dirs[ftpc->count1 - 1]); + state(conn, FTP_MKD); + } + else { + /* return failure */ + failf(data, "Server denied you to change to the given directory"); + ftpc->cwdfail = TRUE; /* don't remember this path as we failed + to enter it */ + return CURLE_REMOTE_ACCESS_DENIED; + } + } + else { + /* success */ + ftpc->count2=0; + if(++ftpc->count1 <= ftpc->dirdepth) { + /* send next CWD */ + PPSENDF(&ftpc->pp, "CWD %s", ftpc->dirs[ftpc->count1 - 1]); + } + else { + result = ftp_state_mdtm(conn); + if(result) + return result; + } + } + break; + + case FTP_MKD: + if((ftpcode/100 != 2) && !ftpc->count3--) { + /* failure to MKD the dir */ + failf(data, "Failed to MKD dir: %03d", ftpcode); + return CURLE_REMOTE_ACCESS_DENIED; + } + state(conn, FTP_CWD); + /* send CWD */ + PPSENDF(&ftpc->pp, "CWD %s", ftpc->dirs[ftpc->count1 - 1]); + break; + + case FTP_MDTM: + result = ftp_state_mdtm_resp(conn, ftpcode); + break; + + case FTP_TYPE: + case FTP_LIST_TYPE: + case FTP_RETR_TYPE: + case FTP_STOR_TYPE: + result = ftp_state_type_resp(conn, ftpcode, ftpc->state); + break; + + case FTP_SIZE: + case FTP_RETR_SIZE: + case FTP_STOR_SIZE: + result = ftp_state_size_resp(conn, ftpcode, ftpc->state); + break; + + case FTP_REST: + case FTP_RETR_REST: + result = ftp_state_rest_resp(conn, ftpcode, ftpc->state); + break; + + case FTP_PRET: + if(ftpcode != 200) { + /* there only is this one standard OK return code. */ + failf(data, "PRET command not accepted: %03d", ftpcode); + return CURLE_FTP_PRET_FAILED; + } + result = ftp_state_use_pasv(conn); + break; + + case FTP_PASV: + result = ftp_state_pasv_resp(conn, ftpcode); + break; + + case FTP_PORT: + result = ftp_state_port_resp(conn, ftpcode); + break; + + case FTP_LIST: + case FTP_RETR: + result = ftp_state_get_resp(conn, ftpcode, ftpc->state); + break; + + case FTP_STOR: + result = ftp_state_stor_resp(conn, ftpcode, ftpc->state); + break; + + case FTP_QUIT: + /* fallthrough, just stop! */ + default: + /* internal error */ + state(conn, FTP_STOP); + break; + } + } /* if(ftpcode) */ + + return result; +} + + +/* called repeatedly until done from multi.c */ +static CURLcode ftp_multi_statemach(struct connectdata *conn, + bool *done) +{ + struct ftp_conn *ftpc = &conn->proto.ftpc; + CURLcode result = Curl_pp_statemach(&ftpc->pp, FALSE); + + /* Check for the state outside of the Curl_socket_check() return code checks + since at times we are in fact already in this state when this function + gets called. */ + *done = (ftpc->state == FTP_STOP) ? TRUE : FALSE; + + return result; +} + +static CURLcode ftp_block_statemach(struct connectdata *conn) +{ + struct ftp_conn *ftpc = &conn->proto.ftpc; + struct pingpong *pp = &ftpc->pp; + CURLcode result = CURLE_OK; + + while(ftpc->state != FTP_STOP) { + result = Curl_pp_statemach(pp, TRUE); + if(result) + break; + } + + return result; +} + +/* + * ftp_connect() should do everything that is to be considered a part of + * the connection phase. + * + * The variable 'done' points to will be TRUE if the protocol-layer connect + * phase is done when this function returns, or FALSE if not. + * + */ +static CURLcode ftp_connect(struct connectdata *conn, + bool *done) /* see description above */ +{ + CURLcode result; + struct ftp_conn *ftpc = &conn->proto.ftpc; + struct pingpong *pp = &ftpc->pp; + + *done = FALSE; /* default to not done yet */ + + /* We always support persistent connections on ftp */ + connkeep(conn, "FTP default"); + + pp->response_time = RESP_TIMEOUT; /* set default response time-out */ + pp->statemach_act = ftp_statemach_act; + pp->endofresp = ftp_endofresp; + pp->conn = conn; + + if(conn->handler->flags & PROTOPT_SSL) { + /* BLOCKING */ + result = Curl_ssl_connect(conn, FIRSTSOCKET); + if(result) + return result; + } + + Curl_pp_init(pp); /* init the generic pingpong data */ + + /* When we connect, we start in the state where we await the 220 + response */ + state(conn, FTP_WAIT220); + + result = ftp_multi_statemach(conn, done); + + return result; +} + +/*********************************************************************** + * + * ftp_done() + * + * The DONE function. This does what needs to be done after a single DO has + * performed. + * + * Input argument is already checked for validity. + */ +static CURLcode ftp_done(struct connectdata *conn, CURLcode status, + bool premature) +{ + struct Curl_easy *data = conn->data; + struct FTP *ftp = data->req.protop; + struct ftp_conn *ftpc = &conn->proto.ftpc; + struct pingpong *pp = &ftpc->pp; + ssize_t nread; + int ftpcode; + CURLcode result = CURLE_OK; + char *path = NULL; + const char *path_to_use = data->state.path; + + if(!ftp) + return CURLE_OK; + + switch(status) { + case CURLE_BAD_DOWNLOAD_RESUME: + case CURLE_FTP_WEIRD_PASV_REPLY: + case CURLE_FTP_PORT_FAILED: + case CURLE_FTP_ACCEPT_FAILED: + case CURLE_FTP_ACCEPT_TIMEOUT: + case CURLE_FTP_COULDNT_SET_TYPE: + case CURLE_FTP_COULDNT_RETR_FILE: + case CURLE_PARTIAL_FILE: + case CURLE_UPLOAD_FAILED: + case CURLE_REMOTE_ACCESS_DENIED: + case CURLE_FILESIZE_EXCEEDED: + case CURLE_REMOTE_FILE_NOT_FOUND: + case CURLE_WRITE_ERROR: + /* the connection stays alive fine even though this happened */ + /* fall-through */ + case CURLE_OK: /* doesn't affect the control connection's status */ + if(!premature) + break; + + /* until we cope better with prematurely ended requests, let them + * fallback as if in complete failure */ + /* FALLTHROUGH */ + default: /* by default, an error means the control connection is + wedged and should not be used anymore */ + ftpc->ctl_valid = FALSE; + ftpc->cwdfail = TRUE; /* set this TRUE to prevent us to remember the + current path, as this connection is going */ + connclose(conn, "FTP ended with bad error code"); + result = status; /* use the already set error code */ + break; + } + + /* now store a copy of the directory we are in */ + free(ftpc->prevpath); + + if(data->set.wildcardmatch) { + if(data->set.chunk_end && ftpc->file) { + data->set.chunk_end(data->wildcard.customptr); + } + ftpc->known_filesize = -1; + } + + if(!result) + /* get the "raw" path */ + result = Curl_urldecode(data, path_to_use, 0, &path, NULL, FALSE); + if(result) { + /* We can limp along anyway (and should try to since we may already be in + * the error path) */ + ftpc->ctl_valid = FALSE; /* mark control connection as bad */ + connclose(conn, "FTP: out of memory!"); /* mark for connection closure */ + ftpc->prevpath = NULL; /* no path remembering */ + } + else { + size_t flen = ftpc->file?strlen(ftpc->file):0; /* file is "raw" already */ + size_t dlen = strlen(path)-flen; + if(!ftpc->cwdfail) { + if(dlen && (data->set.ftp_filemethod != FTPFILE_NOCWD)) { + ftpc->prevpath = path; + if(flen) + /* if 'path' is not the whole string */ + ftpc->prevpath[dlen]=0; /* terminate */ + } + else { + /* we never changed dir */ + ftpc->prevpath=strdup(""); + free(path); + } + if(ftpc->prevpath) + infof(data, "Remembering we are in dir \"%s\"\n", ftpc->prevpath); + } + else { + ftpc->prevpath = NULL; /* no path */ + free(path); + } + } + /* free the dir tree and file parts */ + freedirs(ftpc); + + /* shut down the socket to inform the server we're done */ + +#ifdef _WIN32_WCE + shutdown(conn->sock[SECONDARYSOCKET], 2); /* SD_BOTH */ +#endif + + if(conn->sock[SECONDARYSOCKET] != CURL_SOCKET_BAD) { + if(!result && ftpc->dont_check && data->req.maxdownload > 0) { + /* partial download completed */ + result = Curl_pp_sendf(pp, "%s", "ABOR"); + if(result) { + failf(data, "Failure sending ABOR command: %s", + curl_easy_strerror(result)); + ftpc->ctl_valid = FALSE; /* mark control connection as bad */ + connclose(conn, "ABOR command failed"); /* connection closure */ + } + } + + if(conn->ssl[SECONDARYSOCKET].use) { + /* The secondary socket is using SSL so we must close down that part + first before we close the socket for real */ + Curl_ssl_close(conn, SECONDARYSOCKET); + + /* Note that we keep "use" set to TRUE since that (next) connection is + still requested to use SSL */ + } + close_secondarysocket(conn); + } + + if(!result && (ftp->transfer == FTPTRANSFER_BODY) && ftpc->ctl_valid && + pp->pending_resp && !premature) { + /* + * Let's see what the server says about the transfer we just performed, + * but lower the timeout as sometimes this connection has died while the + * data has been transferred. This happens when doing through NATs etc that + * abandon old silent connections. + */ + long old_time = pp->response_time; + + pp->response_time = 60*1000; /* give it only a minute for now */ + pp->response = Curl_tvnow(); /* timeout relative now */ + + result = Curl_GetFTPResponse(&nread, conn, &ftpcode); + + pp->response_time = old_time; /* set this back to previous value */ + + if(!nread && (CURLE_OPERATION_TIMEDOUT == result)) { + failf(data, "control connection looks dead"); + ftpc->ctl_valid = FALSE; /* mark control connection as bad */ + connclose(conn, "Timeout or similar in FTP DONE operation"); /* close */ + } + + if(result) + return result; + + if(ftpc->dont_check && data->req.maxdownload > 0) { + /* we have just sent ABOR and there is no reliable way to check if it was + * successful or not; we have to close the connection now */ + infof(data, "partial download completed, closing connection\n"); + connclose(conn, "Partial download with no ability to check"); + return result; + } + + if(!ftpc->dont_check) { + /* 226 Transfer complete, 250 Requested file action okay, completed. */ + if((ftpcode != 226) && (ftpcode != 250)) { + failf(data, "server did not report OK, got %d", ftpcode); + result = CURLE_PARTIAL_FILE; + } + } + } + + if(result || premature) + /* the response code from the transfer showed an error already so no + use checking further */ + ; + else if(data->set.upload) { + if((-1 != data->state.infilesize) && + (data->state.infilesize != *ftp->bytecountp) && + !data->set.crlf && + (ftp->transfer == FTPTRANSFER_BODY)) { + failf(data, "Uploaded unaligned file size (%" CURL_FORMAT_CURL_OFF_T + " out of %" CURL_FORMAT_CURL_OFF_T " bytes)", + *ftp->bytecountp, data->state.infilesize); + result = CURLE_PARTIAL_FILE; + } + } + else { + if((-1 != data->req.size) && + (data->req.size != *ftp->bytecountp) && +#ifdef CURL_DO_LINEEND_CONV + /* Most FTP servers don't adjust their file SIZE response for CRLFs, so + * we'll check to see if the discrepancy can be explained by the number + * of CRLFs we've changed to LFs. + */ + ((data->req.size + data->state.crlf_conversions) != + *ftp->bytecountp) && +#endif /* CURL_DO_LINEEND_CONV */ + (data->req.maxdownload != *ftp->bytecountp)) { + failf(data, "Received only partial file: %" CURL_FORMAT_CURL_OFF_T + " bytes", *ftp->bytecountp); + result = CURLE_PARTIAL_FILE; + } + else if(!ftpc->dont_check && + !*ftp->bytecountp && + (data->req.size>0)) { + failf(data, "No data was received!"); + result = CURLE_FTP_COULDNT_RETR_FILE; + } + } + + /* clear these for next connection */ + ftp->transfer = FTPTRANSFER_BODY; + ftpc->dont_check = FALSE; + + /* Send any post-transfer QUOTE strings? */ + if(!status && !result && !premature && data->set.postquote) + result = ftp_sendquote(conn, data->set.postquote); + + return result; +} + +/*********************************************************************** + * + * ftp_sendquote() + * + * Where a 'quote' means a list of custom commands to send to the server. + * The quote list is passed as an argument. + * + * BLOCKING + */ + +static +CURLcode ftp_sendquote(struct connectdata *conn, struct curl_slist *quote) +{ + struct curl_slist *item; + ssize_t nread; + int ftpcode; + CURLcode result; + struct ftp_conn *ftpc = &conn->proto.ftpc; + struct pingpong *pp = &ftpc->pp; + + item = quote; + while(item) { + if(item->data) { + char *cmd = item->data; + bool acceptfail = FALSE; + + /* if a command starts with an asterisk, which a legal FTP command never + can, the command will be allowed to fail without it causing any + aborts or cancels etc. It will cause libcurl to act as if the command + is successful, whatever the server reponds. */ + + if(cmd[0] == '*') { + cmd++; + acceptfail = TRUE; + } + + PPSENDF(&conn->proto.ftpc.pp, "%s", cmd); + + pp->response = Curl_tvnow(); /* timeout relative now */ + + result = Curl_GetFTPResponse(&nread, conn, &ftpcode); + if(result) + return result; + + if(!acceptfail && (ftpcode >= 400)) { + failf(conn->data, "QUOT string not accepted: %s", cmd); + return CURLE_QUOTE_ERROR; + } + } + + item = item->next; + } + + return CURLE_OK; +} + +/*********************************************************************** + * + * ftp_need_type() + * + * Returns TRUE if we in the current situation should send TYPE + */ +static int ftp_need_type(struct connectdata *conn, + bool ascii_wanted) +{ + return conn->proto.ftpc.transfertype != (ascii_wanted?'A':'I'); +} + +/*********************************************************************** + * + * ftp_nb_type() + * + * Set TYPE. We only deal with ASCII or BINARY so this function + * sets one of them. + * If the transfer type is not sent, simulate on OK response in newstate + */ +static CURLcode ftp_nb_type(struct connectdata *conn, + bool ascii, ftpstate newstate) +{ + struct ftp_conn *ftpc = &conn->proto.ftpc; + CURLcode result; + char want = (char)(ascii?'A':'I'); + + if(ftpc->transfertype == want) { + state(conn, newstate); + return ftp_state_type_resp(conn, 200, newstate); + } + + PPSENDF(&ftpc->pp, "TYPE %c", want); + state(conn, newstate); + + /* keep track of our current transfer type */ + ftpc->transfertype = want; + return CURLE_OK; +} + +/*************************************************************************** + * + * ftp_pasv_verbose() + * + * This function only outputs some informationals about this second connection + * when we've issued a PASV command before and thus we have connected to a + * possibly new IP address. + * + */ +#ifndef CURL_DISABLE_VERBOSE_STRINGS +static void +ftp_pasv_verbose(struct connectdata *conn, + Curl_addrinfo *ai, + char *newhost, /* ascii version */ + int port) +{ + char buf[256]; + Curl_printable_address(ai, buf, sizeof(buf)); + infof(conn->data, "Connecting to %s (%s) port %d\n", newhost, buf, port); +} +#endif + +/* + Check if this is a range download, and if so, set the internal variables + properly. + */ + +static CURLcode ftp_range(struct connectdata *conn) +{ + curl_off_t from, to; + char *ptr; + char *ptr2; + struct Curl_easy *data = conn->data; + struct ftp_conn *ftpc = &conn->proto.ftpc; + + if(data->state.use_range && data->state.range) { + from=curlx_strtoofft(data->state.range, &ptr, 0); + while(*ptr && (ISSPACE(*ptr) || (*ptr=='-'))) + ptr++; + to=curlx_strtoofft(ptr, &ptr2, 0); + if(ptr == ptr2) { + /* we didn't get any digit */ + to=-1; + } + if((-1 == to) && (from>=0)) { + /* X - */ + data->state.resume_from = from; + DEBUGF(infof(conn->data, "FTP RANGE %" CURL_FORMAT_CURL_OFF_T + " to end of file\n", from)); + } + else if(from < 0) { + /* -Y */ + data->req.maxdownload = -from; + data->state.resume_from = from; + DEBUGF(infof(conn->data, "FTP RANGE the last %" CURL_FORMAT_CURL_OFF_T + " bytes\n", -from)); + } + else { + /* X-Y */ + data->req.maxdownload = (to-from)+1; /* include last byte */ + data->state.resume_from = from; + DEBUGF(infof(conn->data, "FTP RANGE from %" CURL_FORMAT_CURL_OFF_T + " getting %" CURL_FORMAT_CURL_OFF_T " bytes\n", + from, data->req.maxdownload)); + } + DEBUGF(infof(conn->data, "range-download from %" CURL_FORMAT_CURL_OFF_T + " to %" CURL_FORMAT_CURL_OFF_T ", totally %" + CURL_FORMAT_CURL_OFF_T " bytes\n", + from, to, data->req.maxdownload)); + ftpc->dont_check = TRUE; /* don't check for successful transfer */ + } + else + data->req.maxdownload = -1; + return CURLE_OK; +} + + +/* + * ftp_do_more() + * + * This function shall be called when the second FTP (data) connection is + * connected. + * + * 'complete' can return 0 for incomplete, 1 for done and -1 for go back + * (which basically is only for when PASV is being sent to retry a failed + * EPSV). + */ + +static CURLcode ftp_do_more(struct connectdata *conn, int *completep) +{ + struct Curl_easy *data=conn->data; + struct ftp_conn *ftpc = &conn->proto.ftpc; + CURLcode result = CURLE_OK; + bool connected = FALSE; + bool complete = FALSE; + + /* the ftp struct is inited in ftp_connect() */ + struct FTP *ftp = data->req.protop; + + /* if the second connection isn't done yet, wait for it */ + if(!conn->bits.tcpconnect[SECONDARYSOCKET]) { + if(conn->tunnel_state[SECONDARYSOCKET] == TUNNEL_CONNECT) { + /* As we're in TUNNEL_CONNECT state now, we know the proxy name and port + aren't used so we blank their arguments. TODO: make this nicer */ - result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0, FALSE); ++ result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0); + + return result; + } + + result = Curl_is_connected(conn, SECONDARYSOCKET, &connected); + + /* Ready to do more? */ + if(connected) { + DEBUGF(infof(data, "DO-MORE connected phase starts\n")); + } + else { + if(result && (ftpc->count1 == 0)) { + *completep = -1; /* go back to DOING please */ + /* this is a EPSV connect failing, try PASV instead */ + return ftp_epsv_disable(conn); + } + return result; + } + } + + result = Curl_proxy_connect(conn, SECONDARYSOCKET); + if(result) + return result; + + if(CONNECT_SECONDARYSOCKET_PROXY_SSL()) + return result; + + if(conn->bits.tunnel_proxy && conn->bits.httpproxy && + conn->tunnel_state[SECONDARYSOCKET] != TUNNEL_COMPLETE) + return result; + + + if(ftpc->state) { + /* already in a state so skip the initial commands. + They are only done to kickstart the do_more state */ + result = ftp_multi_statemach(conn, &complete); + + *completep = (int)complete; + + /* if we got an error or if we don't wait for a data connection return + immediately */ + if(result || (ftpc->wait_data_conn != TRUE)) + return result; + + if(ftpc->wait_data_conn) + /* if we reach the end of the FTP state machine here, *complete will be + TRUE but so is ftpc->wait_data_conn, which says we need to wait for + the data connection and therefore we're not actually complete */ + *completep = 0; + } + + if(ftp->transfer <= FTPTRANSFER_INFO) { + /* a transfer is about to take place, or if not a file name was given + so we'll do a SIZE on it later and then we need the right TYPE first */ + + if(ftpc->wait_data_conn == TRUE) { + bool serv_conned; + + result = ReceivedServerConnect(conn, &serv_conned); + if(result) + return result; /* Failed to accept data connection */ + + if(serv_conned) { + /* It looks data connection is established */ + result = AcceptServerConnect(conn); + ftpc->wait_data_conn = FALSE; + if(!result) + result = InitiateTransfer(conn); + + if(result) + return result; + + *completep = 1; /* this state is now complete when the server has + connected back to us */ + } + } + else if(data->set.upload) { + result = ftp_nb_type(conn, data->set.prefer_ascii, FTP_STOR_TYPE); + if(result) + return result; + + result = ftp_multi_statemach(conn, &complete); + if(ftpc->wait_data_conn) + /* if we reach the end of the FTP state machine here, *complete will be + TRUE but so is ftpc->wait_data_conn, which says we need to wait for + the data connection and therefore we're not actually complete */ + *completep = 0; + else + *completep = (int)complete; + } + else { + /* download */ + ftp->downloadsize = -1; /* unknown as of yet */ + + result = ftp_range(conn); + if(result) + ; + else if(data->set.ftp_list_only || !ftpc->file) { + /* The specified path ends with a slash, and therefore we think this + is a directory that is requested, use LIST. But before that we + need to set ASCII transfer mode. */ + + /* But only if a body transfer was requested. */ + if(ftp->transfer == FTPTRANSFER_BODY) { + result = ftp_nb_type(conn, TRUE, FTP_LIST_TYPE); + if(result) + return result; + } + /* otherwise just fall through */ + } + else { + result = ftp_nb_type(conn, data->set.prefer_ascii, FTP_RETR_TYPE); + if(result) + return result; + } + + result = ftp_multi_statemach(conn, &complete); + *completep = (int)complete; + } + return result; + } + + if(!result && (ftp->transfer != FTPTRANSFER_BODY)) + /* no data to transfer. FIX: it feels like a kludge to have this here + too! */ + Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); + + if(!ftpc->wait_data_conn) { + /* no waiting for the data connection so this is now complete */ + *completep = 1; + DEBUGF(infof(data, "DO-MORE phase ends with %d\n", (int)result)); + } + + return result; +} + + + +/*********************************************************************** + * + * ftp_perform() + * + * This is the actual DO function for FTP. Get a file/directory according to + * the options previously setup. + */ + +static +CURLcode ftp_perform(struct connectdata *conn, + bool *connected, /* connect status after PASV / PORT */ + bool *dophase_done) +{ + /* this is FTP and no proxy */ + CURLcode result=CURLE_OK; + + DEBUGF(infof(conn->data, "DO phase starts\n")); + + if(conn->data->set.opt_no_body) { + /* requested no body means no transfer... */ + struct FTP *ftp = conn->data->req.protop; + ftp->transfer = FTPTRANSFER_INFO; + } + + *dophase_done = FALSE; /* not done yet */ + + /* start the first command in the DO phase */ + result = ftp_state_quote(conn, TRUE, FTP_QUOTE); + if(result) + return result; + + /* run the state-machine */ + result = ftp_multi_statemach(conn, dophase_done); + + *connected = conn->bits.tcpconnect[SECONDARYSOCKET]; + + infof(conn->data, "ftp_perform ends with SECONDARY: %d\n", *connected); + + if(*dophase_done) { + DEBUGF(infof(conn->data, "DO phase is complete1\n")); + } + + return result; +} + +static void wc_data_dtor(void *ptr) +{ + struct ftp_wc_tmpdata *tmp = ptr; + if(tmp) + Curl_ftp_parselist_data_free(&tmp->parser); + free(tmp); +} + +static CURLcode init_wc_data(struct connectdata *conn) +{ + char *last_slash; + char *path = conn->data->state.path; + struct WildcardData *wildcard = &(conn->data->wildcard); + CURLcode result = CURLE_OK; + struct ftp_wc_tmpdata *ftp_tmp; + + last_slash = strrchr(conn->data->state.path, '/'); + if(last_slash) { + last_slash++; + if(last_slash[0] == '\0') { + wildcard->state = CURLWC_CLEAN; + result = ftp_parse_url_path(conn); + return result; + } + wildcard->pattern = strdup(last_slash); + if(!wildcard->pattern) + return CURLE_OUT_OF_MEMORY; + last_slash[0] = '\0'; /* cut file from path */ + } + else { /* there is only 'wildcard pattern' or nothing */ + if(path[0]) { + wildcard->pattern = strdup(path); + if(!wildcard->pattern) + return CURLE_OUT_OF_MEMORY; + path[0] = '\0'; + } + else { /* only list */ + wildcard->state = CURLWC_CLEAN; + result = ftp_parse_url_path(conn); + return result; + } + } + + /* program continues only if URL is not ending with slash, allocate needed + resources for wildcard transfer */ + + /* allocate ftp protocol specific temporary wildcard data */ + ftp_tmp = calloc(1, sizeof(struct ftp_wc_tmpdata)); + if(!ftp_tmp) { + Curl_safefree(wildcard->pattern); + return CURLE_OUT_OF_MEMORY; + } + + /* INITIALIZE parselist structure */ + ftp_tmp->parser = Curl_ftp_parselist_data_alloc(); + if(!ftp_tmp->parser) { + Curl_safefree(wildcard->pattern); + free(ftp_tmp); + return CURLE_OUT_OF_MEMORY; + } + + wildcard->tmp = ftp_tmp; /* put it to the WildcardData tmp pointer */ + wildcard->tmp_dtor = wc_data_dtor; + + /* wildcard does not support NOCWD option (assert it?) */ + if(conn->data->set.ftp_filemethod == FTPFILE_NOCWD) + conn->data->set.ftp_filemethod = FTPFILE_MULTICWD; + + /* try to parse ftp url */ + result = ftp_parse_url_path(conn); + if(result) { + Curl_safefree(wildcard->pattern); + wildcard->tmp_dtor(wildcard->tmp); + wildcard->tmp_dtor = ZERO_NULL; + wildcard->tmp = NULL; + return result; + } + + wildcard->path = strdup(conn->data->state.path); + if(!wildcard->path) { + Curl_safefree(wildcard->pattern); + wildcard->tmp_dtor(wildcard->tmp); + wildcard->tmp_dtor = ZERO_NULL; + wildcard->tmp = NULL; + return CURLE_OUT_OF_MEMORY; + } + + /* backup old write_function */ + ftp_tmp->backup.write_function = conn->data->set.fwrite_func; + /* parsing write function */ + conn->data->set.fwrite_func = Curl_ftp_parselist; + /* backup old file descriptor */ + ftp_tmp->backup.file_descriptor = conn->data->set.out; + /* let the writefunc callback know what curl pointer is working with */ + conn->data->set.out = conn; + + infof(conn->data, "Wildcard - Parsing started\n"); + return CURLE_OK; +} + +/* This is called recursively */ +static CURLcode wc_statemach(struct connectdata *conn) +{ + struct WildcardData * const wildcard = &(conn->data->wildcard); + CURLcode result = CURLE_OK; + + switch(wildcard->state) { + case CURLWC_INIT: + result = init_wc_data(conn); + if(wildcard->state == CURLWC_CLEAN) + /* only listing! */ + break; + wildcard->state = result ? CURLWC_ERROR : CURLWC_MATCHING; + break; + + case CURLWC_MATCHING: { + /* In this state is LIST response successfully parsed, so lets restore + previous WRITEFUNCTION callback and WRITEDATA pointer */ + struct ftp_wc_tmpdata *ftp_tmp = wildcard->tmp; + conn->data->set.fwrite_func = ftp_tmp->backup.write_function; + conn->data->set.out = ftp_tmp->backup.file_descriptor; + ftp_tmp->backup.write_function = ZERO_NULL; + ftp_tmp->backup.file_descriptor = NULL; + wildcard->state = CURLWC_DOWNLOADING; + + if(Curl_ftp_parselist_geterror(ftp_tmp->parser)) { + /* error found in LIST parsing */ + wildcard->state = CURLWC_CLEAN; + return wc_statemach(conn); + } + if(wildcard->filelist.size == 0) { + /* no corresponding file */ + wildcard->state = CURLWC_CLEAN; + return CURLE_REMOTE_FILE_NOT_FOUND; + } + return wc_statemach(conn); + } + + case CURLWC_DOWNLOADING: { + /* filelist has at least one file, lets get first one */ + struct ftp_conn *ftpc = &conn->proto.ftpc; + struct curl_fileinfo *finfo = wildcard->filelist.head->ptr; + + char *tmp_path = aprintf("%s%s", wildcard->path, finfo->filename); + if(!tmp_path) + return CURLE_OUT_OF_MEMORY; + + /* switch default "state.pathbuffer" and tmp_path, good to see + ftp_parse_url_path function to understand this trick */ + Curl_safefree(conn->data->state.pathbuffer); + conn->data->state.pathbuffer = tmp_path; + conn->data->state.path = tmp_path; + + infof(conn->data, "Wildcard - START of \"%s\"\n", finfo->filename); + if(conn->data->set.chunk_bgn) { + long userresponse = conn->data->set.chunk_bgn( + finfo, wildcard->customptr, (int)wildcard->filelist.size); + switch(userresponse) { + case CURL_CHUNK_BGN_FUNC_SKIP: + infof(conn->data, "Wildcard - \"%s\" skipped by user\n", + finfo->filename); + wildcard->state = CURLWC_SKIP; + return wc_statemach(conn); + case CURL_CHUNK_BGN_FUNC_FAIL: + return CURLE_CHUNK_FAILED; + } + } + + if(finfo->filetype != CURLFILETYPE_FILE) { + wildcard->state = CURLWC_SKIP; + return wc_statemach(conn); + } + + if(finfo->flags & CURLFINFOFLAG_KNOWN_SIZE) + ftpc->known_filesize = finfo->size; + + result = ftp_parse_url_path(conn); + if(result) + return result; + + /* we don't need the Curl_fileinfo of first file anymore */ + Curl_llist_remove(&wildcard->filelist, wildcard->filelist.head, NULL); + + if(wildcard->filelist.size == 0) { /* remains only one file to down. */ + wildcard->state = CURLWC_CLEAN; + /* after that will be ftp_do called once again and no transfer + will be done because of CURLWC_CLEAN state */ + return CURLE_OK; + } + } break; + + case CURLWC_SKIP: { + if(conn->data->set.chunk_end) + conn->data->set.chunk_end(conn->data->wildcard.customptr); + Curl_llist_remove(&wildcard->filelist, wildcard->filelist.head, NULL); + wildcard->state = (wildcard->filelist.size == 0) ? + CURLWC_CLEAN : CURLWC_DOWNLOADING; + return wc_statemach(conn); + } + + case CURLWC_CLEAN: { + struct ftp_wc_tmpdata *ftp_tmp = wildcard->tmp; + result = CURLE_OK; + if(ftp_tmp) + result = Curl_ftp_parselist_geterror(ftp_tmp->parser); + + wildcard->state = result ? CURLWC_ERROR : CURLWC_DONE; + } break; + + case CURLWC_DONE: + case CURLWC_ERROR: + case CURLWC_CLEAR: + break; + } + + return result; +} + +/*********************************************************************** + * + * ftp_do() + * + * This function is registered as 'curl_do' function. It decodes the path + * parts etc as a wrapper to the actual DO function (ftp_perform). + * + * The input argument is already checked for validity. + */ +static CURLcode ftp_do(struct connectdata *conn, bool *done) +{ + CURLcode result = CURLE_OK; + struct ftp_conn *ftpc = &conn->proto.ftpc; + + *done = FALSE; /* default to false */ + ftpc->wait_data_conn = FALSE; /* default to no such wait */ + + if(conn->data->set.wildcardmatch) { + result = wc_statemach(conn); + if(conn->data->wildcard.state == CURLWC_SKIP || + conn->data->wildcard.state == CURLWC_DONE) { + /* do not call ftp_regular_transfer */ + return CURLE_OK; + } + if(result) /* error, loop or skipping the file */ + return result; + } + else { /* no wildcard FSM needed */ + result = ftp_parse_url_path(conn); + if(result) + return result; + } + + result = ftp_regular_transfer(conn, done); + + return result; +} + + +CURLcode Curl_ftpsend(struct connectdata *conn, const char *cmd) +{ + ssize_t bytes_written; +#define SBUF_SIZE 1024 + char s[SBUF_SIZE]; + size_t write_len; + char *sptr=s; + CURLcode result = CURLE_OK; +#ifdef HAVE_GSSAPI + enum protection_level data_sec = conn->data_prot; +#endif + + write_len = strlen(cmd); + if(write_len > (sizeof(s) -3)) + return CURLE_BAD_FUNCTION_ARGUMENT; + + strcpy(&s[write_len], "\r\n"); /* append a trailing CRLF */ + write_len +=2; + + bytes_written=0; + + result = Curl_convert_to_network(conn->data, s, write_len); + /* Curl_convert_to_network calls failf if unsuccessful */ + if(result) + return result; + + for(;;) { +#ifdef HAVE_GSSAPI + conn->data_prot = PROT_CMD; +#endif + result = Curl_write(conn, conn->sock[FIRSTSOCKET], sptr, write_len, + &bytes_written); +#ifdef HAVE_GSSAPI + DEBUGASSERT(data_sec > PROT_NONE && data_sec < PROT_LAST); + conn->data_prot = data_sec; +#endif + + if(result) + break; + + if(conn->data->set.verbose) + Curl_debug(conn->data, CURLINFO_HEADER_OUT, + sptr, (size_t)bytes_written, conn); + + if(bytes_written != (ssize_t)write_len) { + write_len -= bytes_written; + sptr += bytes_written; + } + else + break; + } + + return result; +} + +/*********************************************************************** + * + * ftp_quit() + * + * This should be called before calling sclose() on an ftp control connection + * (not data connections). We should then wait for the response from the + * server before returning. The calling code should then try to close the + * connection. + * + */ +static CURLcode ftp_quit(struct connectdata *conn) +{ + CURLcode result = CURLE_OK; + + if(conn->proto.ftpc.ctl_valid) { + result = Curl_pp_sendf(&conn->proto.ftpc.pp, "%s", "QUIT"); + if(result) { + failf(conn->data, "Failure sending QUIT command: %s", + curl_easy_strerror(result)); + conn->proto.ftpc.ctl_valid = FALSE; /* mark control connection as bad */ + connclose(conn, "QUIT command failed"); /* mark for connection closure */ + state(conn, FTP_STOP); + return result; + } + + state(conn, FTP_QUIT); + + result = ftp_block_statemach(conn); + } + + return result; +} + +/*********************************************************************** + * + * ftp_disconnect() + * + * Disconnect from an FTP server. Cleanup protocol-specific per-connection + * resources. BLOCKING. + */ +static CURLcode ftp_disconnect(struct connectdata *conn, bool dead_connection) +{ + struct ftp_conn *ftpc= &conn->proto.ftpc; + struct pingpong *pp = &ftpc->pp; + + /* We cannot send quit unconditionally. If this connection is stale or + bad in any way, sending quit and waiting around here will make the + disconnect wait in vain and cause more problems than we need to. + + ftp_quit() will check the state of ftp->ctl_valid. If it's ok it + will try to send the QUIT command, otherwise it will just return. + */ + if(dead_connection) + ftpc->ctl_valid = FALSE; + + /* The FTP session may or may not have been allocated/setup at this point! */ + (void)ftp_quit(conn); /* ignore errors on the QUIT */ + + if(ftpc->entrypath) { + struct Curl_easy *data = conn->data; + if(data->state.most_recent_ftp_entrypath == ftpc->entrypath) { + data->state.most_recent_ftp_entrypath = NULL; + } + free(ftpc->entrypath); + ftpc->entrypath = NULL; + } + + freedirs(ftpc); + free(ftpc->prevpath); + ftpc->prevpath = NULL; + free(ftpc->server_os); + ftpc->server_os = NULL; + + Curl_pp_disconnect(pp); + +#ifdef HAVE_GSSAPI + Curl_sec_end(conn); +#endif + + return CURLE_OK; +} + +/*********************************************************************** + * + * ftp_parse_url_path() + * + * Parse the URL path into separate path components. + * + */ +static +CURLcode ftp_parse_url_path(struct connectdata *conn) +{ + struct Curl_easy *data = conn->data; + /* the ftp struct is already inited in ftp_connect() */ + struct FTP *ftp = data->req.protop; + struct ftp_conn *ftpc = &conn->proto.ftpc; + const char *slash_pos; /* position of the first '/' char in curpos */ + const char *path_to_use = data->state.path; + const char *cur_pos; + const char *filename = NULL; + + cur_pos = path_to_use; /* current position in path. point at the begin of + next path component */ + + ftpc->ctl_valid = FALSE; + ftpc->cwdfail = FALSE; + + switch(data->set.ftp_filemethod) { + case FTPFILE_NOCWD: + /* fastest, but less standard-compliant */ + + /* + The best time to check whether the path is a file or directory is right + here. so: + + the first condition in the if() right here, is there just in case + someone decides to set path to NULL one day + */ + if(path_to_use[0] && + (path_to_use[strlen(path_to_use) - 1] != '/') ) + filename = path_to_use; /* this is a full file path */ + /* + else { + ftpc->file is not used anywhere other than for operations on a file. + In other words, never for directory operations. + So we can safely leave filename as NULL here and use it as a + argument in dir/file decisions. + } + */ + break; + + case FTPFILE_SINGLECWD: + /* get the last slash */ + if(!path_to_use[0]) { + /* no dir, no file */ + ftpc->dirdepth = 0; + break; + } + slash_pos=strrchr(cur_pos, '/'); + if(slash_pos || !*cur_pos) { + size_t dirlen = slash_pos-cur_pos; + CURLcode result; + + ftpc->dirs = calloc(1, sizeof(ftpc->dirs[0])); + if(!ftpc->dirs) + return CURLE_OUT_OF_MEMORY; + + if(!dirlen) + dirlen++; + + result = Curl_urldecode(conn->data, slash_pos ? cur_pos : "/", + slash_pos ? dirlen : 1, + &ftpc->dirs[0], NULL, + FALSE); + if(result) { + freedirs(ftpc); + return result; + } + ftpc->dirdepth = 1; /* we consider it to be a single dir */ + filename = slash_pos ? slash_pos+1 : cur_pos; /* rest is file name */ + } + else + filename = cur_pos; /* this is a file name only */ + break; + + default: /* allow pretty much anything */ + case FTPFILE_MULTICWD: + ftpc->dirdepth = 0; + ftpc->diralloc = 5; /* default dir depth to allocate */ + ftpc->dirs = calloc(ftpc->diralloc, sizeof(ftpc->dirs[0])); + if(!ftpc->dirs) + return CURLE_OUT_OF_MEMORY; + + /* we have a special case for listing the root dir only */ + if(!strcmp(path_to_use, "/")) { + cur_pos++; /* make it point to the zero byte */ + ftpc->dirs[0] = strdup("/"); + ftpc->dirdepth++; + } + else { + /* parse the URL path into separate path components */ + while((slash_pos = strchr(cur_pos, '/')) != NULL) { + /* 1 or 0 pointer offset to indicate absolute directory */ + ssize_t absolute_dir = ((cur_pos - data->state.path > 0) && + (ftpc->dirdepth == 0))?1:0; + + /* seek out the next path component */ + if(slash_pos-cur_pos) { + /* we skip empty path components, like "x//y" since the FTP command + CWD requires a parameter and a non-existent parameter a) doesn't + work on many servers and b) has no effect on the others. */ + size_t len = slash_pos - cur_pos + absolute_dir; + CURLcode result = + Curl_urldecode(conn->data, cur_pos - absolute_dir, len, + &ftpc->dirs[ftpc->dirdepth], NULL, + TRUE); + if(result) { + freedirs(ftpc); + return result; + } + } + else { + cur_pos = slash_pos + 1; /* jump to the rest of the string */ + if(!ftpc->dirdepth) { + /* path starts with a slash, add that as a directory */ + ftpc->dirs[ftpc->dirdepth] = strdup("/"); + if(!ftpc->dirs[ftpc->dirdepth++]) { /* run out of memory ... */ + failf(data, "no memory"); + freedirs(ftpc); + return CURLE_OUT_OF_MEMORY; + } + } + continue; + } + + cur_pos = slash_pos + 1; /* jump to the rest of the string */ + if(++ftpc->dirdepth >= ftpc->diralloc) { + /* enlarge array */ + char **bigger; + ftpc->diralloc *= 2; /* double the size each time */ + bigger = realloc(ftpc->dirs, ftpc->diralloc * sizeof(ftpc->dirs[0])); + if(!bigger) { + freedirs(ftpc); + return CURLE_OUT_OF_MEMORY; + } + ftpc->dirs = bigger; + } + } + } + filename = cur_pos; /* the rest is the file name */ + break; + } /* switch */ + + if(filename && *filename) { + CURLcode result = + Curl_urldecode(conn->data, filename, 0, &ftpc->file, NULL, TRUE); + + if(result) { + freedirs(ftpc); + return result; + } + } + else + ftpc->file=NULL; /* instead of point to a zero byte, we make it a NULL + pointer */ + + if(data->set.upload && !ftpc->file && (ftp->transfer == FTPTRANSFER_BODY)) { + /* We need a file name when uploading. Return error! */ + failf(data, "Uploading to a URL without a file name!"); + return CURLE_URL_MALFORMAT; + } + + ftpc->cwddone = FALSE; /* default to not done */ + + if(ftpc->prevpath) { + /* prevpath is "raw" so we convert the input path before we compare the + strings */ + size_t dlen; + char *path; + CURLcode result = + Curl_urldecode(conn->data, data->state.path, 0, &path, &dlen, FALSE); + if(result) { + freedirs(ftpc); + return result; + } + + dlen -= ftpc->file?strlen(ftpc->file):0; + if((dlen == strlen(ftpc->prevpath)) && + !strncmp(path, ftpc->prevpath, dlen)) { + infof(data, "Request has same path as previous transfer\n"); + ftpc->cwddone = TRUE; + } + free(path); + } + + return CURLE_OK; +} + +/* call this when the DO phase has completed */ +static CURLcode ftp_dophase_done(struct connectdata *conn, + bool connected) +{ + struct FTP *ftp = conn->data->req.protop; + struct ftp_conn *ftpc = &conn->proto.ftpc; + + if(connected) { + int completed; + CURLcode result = ftp_do_more(conn, &completed); + + if(result) { + close_secondarysocket(conn); + return result; + } + } + + if(ftp->transfer != FTPTRANSFER_BODY) + /* no data to transfer */ + Curl_setup_transfer(conn, -1, -1, FALSE, NULL, -1, NULL); + else if(!connected) + /* since we didn't connect now, we want do_more to get called */ + conn->bits.do_more = TRUE; + + ftpc->ctl_valid = TRUE; /* seems good */ + + return CURLE_OK; +} + +/* called from multi.c while DOing */ +static CURLcode ftp_doing(struct connectdata *conn, + bool *dophase_done) +{ + CURLcode result = ftp_multi_statemach(conn, dophase_done); + + if(result) + DEBUGF(infof(conn->data, "DO phase failed\n")); + else if(*dophase_done) { + result = ftp_dophase_done(conn, FALSE /* not connected */); + + DEBUGF(infof(conn->data, "DO phase is complete2\n")); + } + return result; +} + +/*********************************************************************** + * + * ftp_regular_transfer() + * + * The input argument is already checked for validity. + * + * Performs all commands done before a regular transfer between a local and a + * remote host. + * + * ftp->ctl_valid starts out as FALSE, and gets set to TRUE if we reach the + * ftp_done() function without finding any major problem. + */ +static +CURLcode ftp_regular_transfer(struct connectdata *conn, + bool *dophase_done) +{ + CURLcode result=CURLE_OK; + bool connected=FALSE; + struct Curl_easy *data = conn->data; + struct ftp_conn *ftpc = &conn->proto.ftpc; + data->req.size = -1; /* make sure this is unknown at this point */ + + Curl_pgrsSetUploadCounter(data, 0); + Curl_pgrsSetDownloadCounter(data, 0); + Curl_pgrsSetUploadSize(data, -1); + Curl_pgrsSetDownloadSize(data, -1); + + ftpc->ctl_valid = TRUE; /* starts good */ + + result = ftp_perform(conn, + &connected, /* have we connected after PASV/PORT */ + dophase_done); /* all commands in the DO-phase done? */ + + if(!result) { + + if(!*dophase_done) + /* the DO phase has not completed yet */ + return CURLE_OK; + + result = ftp_dophase_done(conn, connected); + + if(result) + return result; + } + else + freedirs(ftpc); + + return result; +} + +static CURLcode ftp_setup_connection(struct connectdata *conn) +{ + struct Curl_easy *data = conn->data; + char *type; + char command; + struct FTP *ftp; + + if(conn->bits.httpproxy && !data->set.tunnel_thru_httpproxy) { + /* Unless we have asked to tunnel ftp operations through the proxy, we + switch and use HTTP operations only */ +#ifndef CURL_DISABLE_HTTP + if(conn->handler == &Curl_handler_ftp) + conn->handler = &Curl_handler_ftp_proxy; + else { +#ifdef USE_SSL + conn->handler = &Curl_handler_ftps_proxy; +#else + failf(data, "FTPS not supported!"); + return CURLE_UNSUPPORTED_PROTOCOL; +#endif + } + /* set it up as a HTTP connection instead */ + return conn->handler->setup_connection(conn); +#else + failf(data, "FTP over http proxy requires HTTP support built-in!"); + return CURLE_UNSUPPORTED_PROTOCOL; +#endif + } + + conn->data->req.protop = ftp = malloc(sizeof(struct FTP)); + if(NULL == ftp) + return CURLE_OUT_OF_MEMORY; + + data->state.path++; /* don't include the initial slash */ + data->state.slash_removed = TRUE; /* we've skipped the slash */ + + /* FTP URLs support an extension like ";type=" that + * we'll try to get now! */ + type = strstr(data->state.path, ";type="); + + if(!type) + type = strstr(conn->host.rawalloc, ";type="); + + if(type) { + *type = 0; /* it was in the middle of the hostname */ + command = Curl_raw_toupper(type[6]); + conn->bits.type_set = TRUE; + + switch(command) { + case 'A': /* ASCII mode */ + data->set.prefer_ascii = TRUE; + break; + + case 'D': /* directory mode */ + data->set.ftp_list_only = TRUE; + break; + + case 'I': /* binary mode */ + default: + /* switch off ASCII */ + data->set.prefer_ascii = FALSE; + break; + } + } + + /* get some initial data into the ftp struct */ + ftp->bytecountp = &conn->data->req.bytecount; + ftp->transfer = FTPTRANSFER_BODY; + ftp->downloadsize = 0; + + /* No need to duplicate user+password, the connectdata struct won't change + during a session, but we re-init them here since on subsequent inits + since the conn struct may have changed or been replaced. + */ + ftp->user = conn->user; + ftp->passwd = conn->passwd; + if(isBadFtpString(ftp->user)) + return CURLE_URL_MALFORMAT; + if(isBadFtpString(ftp->passwd)) + return CURLE_URL_MALFORMAT; + + conn->proto.ftpc.known_filesize = -1; /* unknown size for now */ + + return CURLE_OK; +} + +#endif /* CURL_DISABLE_FTP */ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=06d6d6c4aee149cd6560b919ef6935ef0867d921 commit 06d6d6c4aee149cd6560b919ef6935ef0867d921 Author: Curl Upstream AuthorDate: Wed Jun 14 08:08:56 2017 +0200 Commit: Brad King CommitDate: Wed Jun 14 10:46:35 2017 -0400 curl 2017-06-14 (54b636f1) Code extracted from: https://github.com/curl/curl.git at commit 54b636f14546d3fde9f9c67c3b32701d78563161 (curl-7_54_1). diff --git a/CMakeLists.txt b/CMakeLists.txt index 58d159e..d2e1c2b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -380,7 +380,7 @@ if(CMAKE_USE_MBEDTLS) set(SSL_ENABLED ON) set(USE_MBEDTLS ON) list(APPEND CURL_LIBS ${MBEDTLS_LIBRARIES}) - include_directories(${MBEDTLS_INCLUDE_DIR}) + include_directories(${MBEDTLS_INCLUDE_DIRS}) endif() option(USE_NGHTTP2 "Use Nghttp2 library" OFF) @@ -623,6 +623,78 @@ else() endif() +# +# CA handling +# +set(CURL_CA_BUNDLE "auto" CACHE STRING + "Path to the CA bundle. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.") +set(CURL_CA_FALLBACK OFF CACHE BOOL + "Set ON to use built-in CA store of TLS backend. Defaults to OFF") +set(CURL_CA_PATH "auto" CACHE STRING + "Location of default CA path. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.") + +if("${CURL_CA_BUNDLE}" STREQUAL "") + message(FATAL_ERROR "Invalid value of CURL_CA_BUNDLE. Use 'none', 'auto' or file path.") +elseif("${CURL_CA_BUNDLE}" STREQUAL "none") + unset(CURL_CA_BUNDLE CACHE) +elseif("${CURL_CA_BUNDLE}" STREQUAL "auto") + unset(CURL_CA_BUNDLE CACHE) + set(CURL_CA_BUNDLE_AUTODETECT TRUE) +else() + set(CURL_CA_BUNDLE_SET TRUE) +endif() + +if("${CURL_CA_PATH}" STREQUAL "") + message(FATAL_ERROR "Invalid value of CURL_CA_PATH. Use 'none', 'auto' or directory path.") +elseif("${CURL_CA_PATH}" STREQUAL "none") + unset(CURL_CA_PATH CACHE) +elseif("${CURL_CA_PATH}" STREQUAL "auto") + unset(CURL_CA_PATH CACHE) + set(CURL_CA_PATH_AUTODETECT TRUE) +else() + set(CURL_CA_PATH_SET TRUE) +endif() + +if(CURL_CA_BUNDLE_SET AND CURL_CA_PATH_AUTODETECT) + # Skip autodetection of unset CA path because CA bundle is set explicitly +elseif(CURL_CA_PATH_SET AND CURL_CA_BUNDLE_AUTODETECT) + # Skip autodetection of unset CA bundle because CA path is set explicitly +elseif(CURL_CA_PATH_AUTODETECT OR CURL_CA_BUNDLE_AUTODETECT) + # first try autodetecting a CA bundle, then a CA path + + if(CURL_CA_BUNDLE_AUTODETECT) + set(SEARCH_CA_BUNDLE_PATHS + /etc/ssl/certs/ca-certificates.crt + /etc/pki/tls/certs/ca-bundle.crt + /usr/share/ssl/certs/ca-bundle.crt + /usr/local/share/certs/ca-root-nss.crt + /etc/ssl/cert.pem) + + foreach(SEARCH_CA_BUNDLE_PATH ${SEARCH_CA_BUNDLE_PATHS}) + if(EXISTS "${SEARCH_CA_BUNDLE_PATH}") + message(STATUS "Found CA bundle: ${SEARCH_CA_BUNDLE_PATH}") + set(CURL_CA_BUNDLE "${SEARCH_CA_BUNDLE_PATH}") + set(CURL_CA_BUNDLE_SET TRUE CACHE BOOL "Path to the CA bundle has been set") + break() + endif() + endforeach() + endif() + + if(CURL_CA_PATH_AUTODETECT AND (NOT CURL_CA_PATH_SET)) + if(EXISTS "/etc/ssl/certs") + set(CURL_CA_PATH "/etc/ssl/certs") + set(CURL_CA_PATH_SET TRUE CACHE BOOL "Path to the CA bundle has been set") + endif() + endif() +endif() + +if(CURL_CA_PATH_SET AND NOT USE_OPENSSL AND NOT USE_MBEDTLS) + message(FATAL_ERROR + "CA path only supported by OpenSSL, GnuTLS or mbed TLS. " + "Set CURL_CA_PATH=none or enable one of those TLS backends.") +endif() + + # Check for header files if(NOT UNIX) check_include_file_concat("windows.h" HAVE_WINDOWS_H) @@ -1127,8 +1199,7 @@ _add_if("Kerberos" NOT CURL_DISABLE_CRYPTO_AUTH AND (HAVE_GSSAPI OR USE_WINDOWS_SSPI)) # NTLM support requires crypto function adaptions from various SSL libs # TODO alternative SSL libs tests for SSP1, GNUTLS, NSS -if(NOT CURL_DISABLE_CRYPTO_AUTH AND (USE_OPENSSL OR - USE_WINDOWS_SSPI OR GNUTLS_ENABLED OR NSS_ENABLED OR USE_DARWINSSL OR USE_MBEDTLS)) +if(NOT CURL_DISABLE_CRYPTO_AUTH AND (USE_OPENSSL OR USE_WINDOWS_SSPI OR USE_DARWINSSL OR USE_MBEDTLS)) _add_if("NTLM" 1) # TODO missing option (autoconf: --enable-ntlm-wb) _add_if("NTLM_WB" NOT CURL_DISABLE_HTTP AND NTLM_WB_ENABLED) @@ -1177,8 +1248,6 @@ set(CC "${CMAKE_C_COMPILER}") set(CONFIGURE_OPTIONS "") # TODO when to set "-DCURL_STATICLIB" for CPPFLAG_CURL_STATICLIB? set(CPPFLAG_CURL_STATICLIB "") -# TODO need to set this (see CURL_CHECK_CA_BUNDLE in acinclude.m4) -set(CURL_CA_BUNDLE "") set(CURLVERSION "${CURL_VERSION}") set(ENABLE_SHARED "yes") if(CURL_STATICLIB) diff --git a/include/curl/curl.h b/include/curl/curl.h index 1030712..ddba98c 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -2251,6 +2251,7 @@ struct curl_tlssessioninfo { #define CURLINFO_LONG 0x200000 #define CURLINFO_DOUBLE 0x300000 #define CURLINFO_SLIST 0x400000 +#define CURLINFO_PTR 0x400000 /* same as SLIST */ #define CURLINFO_SOCKET 0x500000 #define CURLINFO_MASK 0x0fffff #define CURLINFO_TYPEMASK 0xf00000 @@ -2290,7 +2291,7 @@ typedef enum { CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33, - CURLINFO_CERTINFO = CURLINFO_SLIST + 34, + CURLINFO_CERTINFO = CURLINFO_PTR + 34, CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35, CURLINFO_RTSP_SESSION_ID = CURLINFO_STRING + 36, CURLINFO_RTSP_CLIENT_CSEQ = CURLINFO_LONG + 37, @@ -2299,9 +2300,9 @@ typedef enum { CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40, CURLINFO_LOCAL_IP = CURLINFO_STRING + 41, CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42, - CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43, + CURLINFO_TLS_SESSION = CURLINFO_PTR + 43, CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44, - CURLINFO_TLS_SSL_PTR = CURLINFO_SLIST + 45, + CURLINFO_TLS_SSL_PTR = CURLINFO_PTR + 45, CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46, CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47, CURLINFO_PROTOCOL = CURLINFO_LONG + 48, diff --git a/include/curl/curlver.h b/include/curl/curlver.h index 7beda3f..227571c 100644 --- a/include/curl/curlver.h +++ b/include/curl/curlver.h @@ -30,13 +30,13 @@ /* This is the version number of the libcurl package from which this header file origins: */ -#define LIBCURL_VERSION "7.54.0-DEV" +#define LIBCURL_VERSION "7.54.1-DEV" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MINOR 54 -#define LIBCURL_VERSION_PATCH 0 +#define LIBCURL_VERSION_PATCH 1 /* This is the numeric version of the libcurl version number, meant for easier parsing and comparions by programs. The LIBCURL_VERSION_NUM define will @@ -57,18 +57,18 @@ CURL_VERSION_BITS() macro since curl's own configure script greps for it and needs it to contain the full number. */ -#define LIBCURL_VERSION_NUM 0x073600 +#define LIBCURL_VERSION_NUM 0x073601 /* * This is the date and time when the full source package was created. The * timestamp is not stored in git, as the timestamp is properly set in the * tarballs by the maketgz script. * - * The format of the date should follow this template: + * The format of the date follows this template: * - * "Mon Feb 12 11:35:33 UTC 2007" + * "2007-11-23" */ -#define LIBCURL_TIMESTAMP "DEV" +#define LIBCURL_TIMESTAMP "[unreleased]" #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z) #define CURL_AT_LEAST_VERSION(x,y,z) \ diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index 3d68315..10b5de2 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -124,6 +124,15 @@ __extension__ ({ \ if(_curl_is_slist_info(_curl_info)) \ if(!_curl_is_arr((arg), struct curl_slist *)) \ _curl_easy_getinfo_err_curl_slist(); \ + if(_curl_is_tlssessioninfo_info(_curl_info)) \ + if(!_curl_is_arr((arg), struct curl_tlssessioninfo *)) \ + _curl_easy_getinfo_err_curl_tlssesssioninfo(); \ + if(_curl_is_certinfo_info(_curl_info)) \ + if(!_curl_is_arr((arg), struct curl_certinfo *)) \ + _curl_easy_getinfo_err_curl_certinfo(); \ + if(_curl_is_socket_info(_curl_info)) \ + if(!_curl_is_arr((arg), curl_socket_t)) \ + _curl_easy_getinfo_err_curl_socket(); \ } \ curl_easy_getinfo(handle, _curl_info, arg); \ }) @@ -201,6 +210,14 @@ _CURL_WARNING(_curl_easy_getinfo_err_double, "curl_easy_getinfo expects a pointer to double for this info") _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, "curl_easy_getinfo expects a pointer to 'struct curl_slist *' for this info") +_CURL_WARNING(_curl_easy_getinfo_err_curl_tlssesssioninfo, + "curl_easy_getinfo expects a pointer to " + "'struct curl_tlssessioninfo *' for this info") +_CURL_WARNING(_curl_easy_getinfo_err_curl_certinfo, + "curl_easy_getinfo expects a pointer to " + "'struct curl_certinfo *' for this info") +_CURL_WARNING(_curl_easy_getinfo_err_curl_socket, + "curl_easy_getinfo expects a pointer to curl_socket_t for this info") /* groups of curl_easy_setops options that take the same type of argument */ @@ -249,11 +266,25 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (option) == CURLOPT_NOPROXY || \ (option) == CURLOPT_PASSWORD || \ (option) == CURLOPT_PINNEDPUBLICKEY || \ + (option) == CURLOPT_PRE_PROXY || \ (option) == CURLOPT_PROXY || \ (option) == CURLOPT_PROXYPASSWORD || \ (option) == CURLOPT_PROXYUSERNAME || \ (option) == CURLOPT_PROXYUSERPWD || \ + (option) == CURLOPT_PROXY_CAINFO || \ + (option) == CURLOPT_PROXY_CAPATH || \ + (option) == CURLOPT_PROXY_CRLFILE || \ + (option) == CURLOPT_PROXY_KEYPASSWD || \ + (option) == CURLOPT_PROXY_PINNEDPUBLICKEY || \ (option) == CURLOPT_PROXY_SERVICE_NAME || \ + (option) == CURLOPT_PROXY_SSLCERT || \ + (option) == CURLOPT_PROXY_SSLCERTTYPE || \ + (option) == CURLOPT_PROXY_SSLKEY || \ + (option) == CURLOPT_PROXY_SSLKEYTYPE || \ + (option) == CURLOPT_PROXY_SSL_CIPHER_LIST || \ + (option) == CURLOPT_PROXY_TLSAUTH_PASSWORD || \ + (option) == CURLOPT_PROXY_TLSAUTH_USERNAME || \ + (option) == CURLOPT_PROXY_TLSAUTH_TYPE || \ (option) == CURLOPT_RANDOM_FILE || \ (option) == CURLOPT_RANGE || \ (option) == CURLOPT_REFERER || \ @@ -348,8 +379,19 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, (CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST) /* true if info expects a pointer to struct curl_slist * argument */ -#define _curl_is_slist_info(info) \ - (CURLINFO_SLIST < (info)) +#define _curl_is_slist_info(info) \ + (((info) == CURLINFO_SSL_ENGINES) || ((info) == CURLINFO_COOKIELIST)) + +/* true if info expects a pointer to struct curl_tlssessioninfo * argument */ +#define _curl_is_tlssessioninfo_info(info) \ + (((info) == CURLINFO_TLS_SSL_PTR) || ((info) == CURLINFO_TLS_SESSION)) + +/* true if info expects a pointer to struct curl_certinfo * argument */ +#define _curl_is_certinfo_info(info) ((info) == CURLINFO_CERTINFO) + +/* true if info expects a pointer to struct curl_socket_t argument */ +#define _curl_is_socket_info(info) \ + (CURLINFO_SOCKET < (info)) /* typecheck helpers -- check whether given expression has requested type*/ @@ -428,8 +470,9 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, #endif /* evaluates to true if expr is of type FILE* */ -#define _curl_is_FILE(expr) \ - (__builtin_types_compatible_p(__typeof__(expr), FILE *)) +#define _curl_is_FILE(expr) \ + (_curl_is_NULL(expr) || \ + (__builtin_types_compatible_p(__typeof__(expr), FILE *))) /* evaluates to true if expr can be passed as POST data (void* or char*) */ #define _curl_is_postfields(expr) \ @@ -444,102 +487,102 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist, * function pointers, hide it */ #define _curl_callback_compatible(func, type) \ (__builtin_types_compatible_p(__typeof__(func), type) || \ - __builtin_types_compatible_p(__typeof__(func), type*)) + __builtin_types_compatible_p(__typeof__(func) *, type)) /* evaluates to true if expr is of type curl_read_callback or "similar" */ #define _curl_is_read_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), __typeof__(fread)) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_read_callback) || \ + _curl_callback_compatible((expr), __typeof__(fread) *) || \ + _curl_callback_compatible((expr), curl_read_callback) || \ _curl_callback_compatible((expr), _curl_read_callback1) || \ _curl_callback_compatible((expr), _curl_read_callback2) || \ _curl_callback_compatible((expr), _curl_read_callback3) || \ _curl_callback_compatible((expr), _curl_read_callback4) || \ _curl_callback_compatible((expr), _curl_read_callback5) || \ _curl_callback_compatible((expr), _curl_read_callback6)) -typedef size_t (_curl_read_callback1)(char *, size_t, size_t, void *); -typedef size_t (_curl_read_callback2)(char *, size_t, size_t, const void *); -typedef size_t (_curl_read_callback3)(char *, size_t, size_t, FILE *); -typedef size_t (_curl_read_callback4)(void *, size_t, size_t, void *); -typedef size_t (_curl_read_callback5)(void *, size_t, size_t, const void *); -typedef size_t (_curl_read_callback6)(void *, size_t, size_t, FILE *); +typedef size_t (*_curl_read_callback1)(char *, size_t, size_t, void *); +typedef size_t (*_curl_read_callback2)(char *, size_t, size_t, const void *); +typedef size_t (*_curl_read_callback3)(char *, size_t, size_t, FILE *); +typedef size_t (*_curl_read_callback4)(void *, size_t, size_t, void *); +typedef size_t (*_curl_read_callback5)(void *, size_t, size_t, const void *); +typedef size_t (*_curl_read_callback6)(void *, size_t, size_t, FILE *); /* evaluates to true if expr is of type curl_write_callback or "similar" */ #define _curl_is_write_cb(expr) \ (_curl_is_read_cb(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), __typeof__(fwrite)) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_write_callback) || \ + _curl_callback_compatible((expr), __typeof__(fwrite) *) || \ + _curl_callback_compatible((expr), curl_write_callback) || \ _curl_callback_compatible((expr), _curl_write_callback1) || \ _curl_callback_compatible((expr), _curl_write_callback2) || \ _curl_callback_compatible((expr), _curl_write_callback3) || \ _curl_callback_compatible((expr), _curl_write_callback4) || \ _curl_callback_compatible((expr), _curl_write_callback5) || \ _curl_callback_compatible((expr), _curl_write_callback6)) -typedef size_t (_curl_write_callback1)(const char *, size_t, size_t, void *); -typedef size_t (_curl_write_callback2)(const char *, size_t, size_t, +typedef size_t (*_curl_write_callback1)(const char *, size_t, size_t, void *); +typedef size_t (*_curl_write_callback2)(const char *, size_t, size_t, const void *); -typedef size_t (_curl_write_callback3)(const char *, size_t, size_t, FILE *); -typedef size_t (_curl_write_callback4)(const void *, size_t, size_t, void *); -typedef size_t (_curl_write_callback5)(const void *, size_t, size_t, +typedef size_t (*_curl_write_callback3)(const char *, size_t, size_t, FILE *); +typedef size_t (*_curl_write_callback4)(const void *, size_t, size_t, void *); +typedef size_t (*_curl_write_callback5)(const void *, size_t, size_t, const void *); -typedef size_t (_curl_write_callback6)(const void *, size_t, size_t, FILE *); +typedef size_t (*_curl_write_callback6)(const void *, size_t, size_t, FILE *); /* evaluates to true if expr is of type curl_ioctl_callback or "similar" */ #define _curl_is_ioctl_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_ioctl_callback) || \ + _curl_callback_compatible((expr), curl_ioctl_callback) || \ _curl_callback_compatible((expr), _curl_ioctl_callback1) || \ _curl_callback_compatible((expr), _curl_ioctl_callback2) || \ _curl_callback_compatible((expr), _curl_ioctl_callback3) || \ _curl_callback_compatible((expr), _curl_ioctl_callback4)) -typedef curlioerr (_curl_ioctl_callback1)(CURL *, int, void *); -typedef curlioerr (_curl_ioctl_callback2)(CURL *, int, const void *); -typedef curlioerr (_curl_ioctl_callback3)(CURL *, curliocmd, void *); -typedef curlioerr (_curl_ioctl_callback4)(CURL *, curliocmd, const void *); +typedef curlioerr (*_curl_ioctl_callback1)(CURL *, int, void *); +typedef curlioerr (*_curl_ioctl_callback2)(CURL *, int, const void *); +typedef curlioerr (*_curl_ioctl_callback3)(CURL *, curliocmd, void *); +typedef curlioerr (*_curl_ioctl_callback4)(CURL *, curliocmd, const void *); /* evaluates to true if expr is of type curl_sockopt_callback or "similar" */ #define _curl_is_sockopt_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_sockopt_callback) || \ + _curl_callback_compatible((expr), curl_sockopt_callback) || \ _curl_callback_compatible((expr), _curl_sockopt_callback1) || \ _curl_callback_compatible((expr), _curl_sockopt_callback2)) -typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); -typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t, +typedef int (*_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); +typedef int (*_curl_sockopt_callback2)(const void *, curl_socket_t, curlsocktype); /* evaluates to true if expr is of type curl_opensocket_callback or "similar" */ #define _curl_is_opensocket_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\ + _curl_callback_compatible((expr), curl_opensocket_callback) || \ _curl_callback_compatible((expr), _curl_opensocket_callback1) || \ _curl_callback_compatible((expr), _curl_opensocket_callback2) || \ _curl_callback_compatible((expr), _curl_opensocket_callback3) || \ _curl_callback_compatible((expr), _curl_opensocket_callback4)) -typedef curl_socket_t (_curl_opensocket_callback1) +typedef curl_socket_t (*_curl_opensocket_callback1) (void *, curlsocktype, struct curl_sockaddr *); -typedef curl_socket_t (_curl_opensocket_callback2) +typedef curl_socket_t (*_curl_opensocket_callback2) (void *, curlsocktype, const struct curl_sockaddr *); -typedef curl_socket_t (_curl_opensocket_callback3) +typedef curl_socket_t (*_curl_opensocket_callback3) (const void *, curlsocktype, struct curl_sockaddr *); -typedef curl_socket_t (_curl_opensocket_callback4) +typedef curl_socket_t (*_curl_opensocket_callback4) (const void *, curlsocktype, const struct curl_sockaddr *); /* evaluates to true if expr is of type curl_progress_callback or "similar" */ #define _curl_is_progress_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_progress_callback) || \ + _curl_callback_compatible((expr), curl_progress_callback) || \ _curl_callback_compatible((expr), _curl_progress_callback1) || \ _curl_callback_compatible((expr), _curl_progress_callback2)) -typedef int (_curl_progress_callback1)(void *, +typedef int (*_curl_progress_callback1)(void *, double, double, double, double); -typedef int (_curl_progress_callback2)(const void *, +typedef int (*_curl_progress_callback2)(const void *, double, double, double, double); /* evaluates to true if expr is of type curl_debug_callback or "similar" */ #define _curl_is_debug_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_debug_callback) || \ + _curl_callback_compatible((expr), curl_debug_callback) || \ _curl_callback_compatible((expr), _curl_debug_callback1) || \ _curl_callback_compatible((expr), _curl_debug_callback2) || \ _curl_callback_compatible((expr), _curl_debug_callback3) || \ @@ -548,28 +591,28 @@ typedef int (_curl_progress_callback2)(const void *, _curl_callback_compatible((expr), _curl_debug_callback6) || \ _curl_callback_compatible((expr), _curl_debug_callback7) || \ _curl_callback_compatible((expr), _curl_debug_callback8)) -typedef int (_curl_debug_callback1) (CURL *, +typedef int (*_curl_debug_callback1) (CURL *, curl_infotype, char *, size_t, void *); -typedef int (_curl_debug_callback2) (CURL *, +typedef int (*_curl_debug_callback2) (CURL *, curl_infotype, char *, size_t, const void *); -typedef int (_curl_debug_callback3) (CURL *, +typedef int (*_curl_debug_callback3) (CURL *, curl_infotype, const char *, size_t, void *); -typedef int (_curl_debug_callback4) (CURL *, +typedef int (*_curl_debug_callback4) (CURL *, curl_infotype, const char *, size_t, const void *); -typedef int (_curl_debug_callback5) (CURL *, +typedef int (*_curl_debug_callback5) (CURL *, curl_infotype, unsigned char *, size_t, void *); -typedef int (_curl_debug_callback6) (CURL *, +typedef int (*_curl_debug_callback6) (CURL *, curl_infotype, unsigned char *, size_t, const void *); -typedef int (_curl_debug_callback7) (CURL *, +typedef int (*_curl_debug_callback7) (CURL *, curl_infotype, const unsigned char *, size_t, void *); -typedef int (_curl_debug_callback8) (CURL *, +typedef int (*_curl_debug_callback8) (CURL *, curl_infotype, const unsigned char *, size_t, const void *); /* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */ /* this is getting even messier... */ #define _curl_is_ssl_ctx_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_ssl_ctx_callback) || \ + _curl_callback_compatible((expr), curl_ssl_ctx_callback) || \ _curl_callback_compatible((expr), _curl_ssl_ctx_callback1) || \ _curl_callback_compatible((expr), _curl_ssl_ctx_callback2) || \ _curl_callback_compatible((expr), _curl_ssl_ctx_callback3) || \ @@ -578,18 +621,19 @@ typedef int (_curl_debug_callback8) (CURL *, _curl_callback_compatible((expr), _curl_ssl_ctx_callback6) || \ _curl_callback_compatible((expr), _curl_ssl_ctx_callback7) || \ _curl_callback_compatible((expr), _curl_ssl_ctx_callback8)) -typedef CURLcode (_curl_ssl_ctx_callback1)(CURL *, void *, void *); -typedef CURLcode (_curl_ssl_ctx_callback2)(CURL *, void *, const void *); -typedef CURLcode (_curl_ssl_ctx_callback3)(CURL *, const void *, void *); -typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *); +typedef CURLcode (*_curl_ssl_ctx_callback1)(CURL *, void *, void *); +typedef CURLcode (*_curl_ssl_ctx_callback2)(CURL *, void *, const void *); +typedef CURLcode (*_curl_ssl_ctx_callback3)(CURL *, const void *, void *); +typedef CURLcode (*_curl_ssl_ctx_callback4)(CURL *, const void *, + const void *); #ifdef HEADER_SSL_H /* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX * this will of course break if we're included before OpenSSL headers... */ -typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); -typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); -typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); -typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, +typedef CURLcode (*_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); +typedef CURLcode (*_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); +typedef CURLcode (*_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); +typedef CURLcode (*_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, const void *); #else typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5; @@ -601,7 +645,7 @@ typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8; /* evaluates to true if expr is of type curl_conv_callback or "similar" */ #define _curl_is_conv_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_conv_callback) || \ + _curl_callback_compatible((expr), curl_conv_callback) || \ _curl_callback_compatible((expr), _curl_conv_callback1) || \ _curl_callback_compatible((expr), _curl_conv_callback2) || \ _curl_callback_compatible((expr), _curl_conv_callback3) || \ @@ -614,7 +658,7 @@ typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length); /* evaluates to true if expr is of type curl_seek_callback or "similar" */ #define _curl_is_seek_cb(expr) \ (_curl_is_NULL(expr) || \ - __builtin_types_compatible_p(__typeof__(expr), curl_seek_callback) || \ + _curl_callback_compatible((expr), curl_seek_callback) || \ _curl_callback_compatible((expr), _curl_seek_callback1) || \ _curl_callback_compatible((expr), _curl_seek_callback2)) typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int); diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index 281fb03..11a914f 100644 --- a/lib/asyn-ares.c +++ b/lib/asyn-ares.c @@ -232,7 +232,7 @@ int Curl_resolver_getsock(struct connectdata *conn, milli = (timeout->tv_sec * 1000) + (timeout->tv_usec/1000); if(milli == 0) milli += 10; - Curl_expire_latest(conn->data, milli); + Curl_expire(conn->data, milli, EXPIRE_ASYNC_NAME); return max; } @@ -373,7 +373,6 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn, /* Wait for the name resolve query to complete. */ while(!result) { struct timeval *tvp, tv, store; - long timediff; int itimeout; int timeout_ms; @@ -402,8 +401,13 @@ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn, result = CURLE_ABORTED_BY_CALLBACK; else { struct timeval now2 = Curl_tvnow(); - timediff = Curl_tvdiff(now2, now); /* spent time */ - timeout -= timediff?timediff:1; /* always deduct at least 1 */ + time_t timediff = Curl_tvdiff(now2, now); /* spent time */ + if(timediff <= 0) + timeout -= 1; /* always deduct at least 1 */ + else if(timediff > timeout) + timeout = -1; + else + timeout -= (long)timediff; now = now2; /* for next loop */ } if(timeout < 0) diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c index 26a15b1..65fa6c5 100644 --- a/lib/asyn-thread.c +++ b/lib/asyn-thread.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -22,6 +22,11 @@ #include "curl_setup.h" +/*********************************************************************** + * Only for threaded name resolves builds + **********************************************************************/ +#ifdef CURLRES_THREADED + #ifdef HAVE_NETINET_IN_H #include #endif @@ -74,11 +79,6 @@ #include "curl_memory.h" #include "memdebug.h" -/*********************************************************************** - * Only for threaded name resolves builds - **********************************************************************/ -#ifdef CURLRES_THREADED - /* * Curl_resolver_global_init() * Called from curl_global_init() to initialize global resolver environment. @@ -540,7 +540,7 @@ CURLcode Curl_resolver_is_resolved(struct connectdata *conn, td->poll_interval = 250; td->interval_end = elapsed + td->poll_interval; - Curl_expire(conn->data, td->poll_interval); + Curl_expire(conn->data, td->poll_interval, EXPIRE_ASYNC_NAME); } return CURLE_OK; diff --git a/lib/conncache.c b/lib/conncache.c index 0590ec6..c79d227 100644 --- a/lib/conncache.c +++ b/lib/conncache.c @@ -72,13 +72,11 @@ static void bundle_destroy(struct connectbundle *cb_ptr) /* Add a connection to a bundle */ static CURLcode bundle_add_conn(struct connectbundle *cb_ptr, - struct connectdata *conn) + struct connectdata *conn) { - if(!Curl_llist_insert_next(&cb_ptr->conn_list, cb_ptr->conn_list.tail, conn)) - return CURLE_OUT_OF_MEMORY; - + Curl_llist_insert_next(&cb_ptr->conn_list, cb_ptr->conn_list.tail, conn, + &conn->bundle_node); conn->bundle = cb_ptr; - cb_ptr->num_connections++; return CURLE_OK; } diff --git a/lib/connect.c b/lib/connect.c index 63ec50f..d4fd52b 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -1070,7 +1070,7 @@ static CURLcode singleipconnect(struct connectdata *conn, conn->connecttime = Curl_tvnow(); if(conn->num_addr > 1) - Curl_expire_latest(data, conn->timeoutms_per_addr); + Curl_expire(data, conn->timeoutms_per_addr, EXPIRE_DNS_PER_NAME); /* Connect TCP sockets, bind UDP */ if(!isconnected && (conn->socktype == SOCK_STREAM)) { @@ -1169,7 +1169,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */ conn->tempaddr[1] = NULL; conn->tempsock[0] = CURL_SOCKET_BAD; conn->tempsock[1] = CURL_SOCKET_BAD; - Curl_expire(conn->data, HAPPY_EYEBALLS_TIMEOUT); + Curl_expire(conn->data, HAPPY_EYEBALLS_TIMEOUT, EXPIRE_HAPPY_EYEBALLS); /* Max time for the next connection attempt */ conn->timeoutms_per_addr = diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake index 9fcdd97..812d969 100644 --- a/lib/curl_config.h.cmake +++ b/lib/curl_config.h.cmake @@ -4,10 +4,13 @@ #cmakedefine BUILDING_LIBCURL 1 /* Location of default ca bundle */ -#cmakedefine CURL_CA_BUNDLE ${CURL_CA_BUNDLE} +#cmakedefine CURL_CA_BUNDLE "${CURL_CA_BUNDLE}" + +/* define "1" to use built-in ca store of TLS backend */ +#cmakedefine CURL_CA_FALLBACK 1 /* Location of default ca path */ -#cmakedefine CURL_CA_PATH ${CURL_CA_PATH} +#cmakedefine CURL_CA_PATH "${CURL_CA_PATH}" /* to disable cookies support */ #cmakedefine CURL_DISABLE_COOKIES 1 diff --git a/lib/curl_endian.c b/lib/curl_endian.c index c2d21de..c25db49 100644 --- a/lib/curl_endian.c +++ b/lib/curl_endian.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -62,44 +62,6 @@ unsigned int Curl_read32_le(const unsigned char *buf) ((unsigned int)buf[2] << 16) | ((unsigned int)buf[3] << 24); } -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* - * Curl_read64_le() - * - * This function converts a 64-bit integer from the little endian format, as - * used in the incoming package to whatever endian format we're using - * natively. - * - * Parameters: - * - * buf [in] - A pointer to a 8 byte buffer. - * - * Returns the integer. - */ -#if defined(HAVE_LONGLONG) -unsigned long long Curl_read64_le(const unsigned char *buf) -{ - return ((unsigned long long)buf[0]) | - ((unsigned long long)buf[1] << 8) | - ((unsigned long long)buf[2] << 16) | - ((unsigned long long)buf[3] << 24) | - ((unsigned long long)buf[4] << 32) | - ((unsigned long long)buf[5] << 40) | - ((unsigned long long)buf[6] << 48) | - ((unsigned long long)buf[7] << 56); -} -#else -unsigned __int64 Curl_read64_le(const unsigned char *buf) -{ - return ((unsigned __int64)buf[0]) | ((unsigned __int64)buf[1] << 8) | - ((unsigned __int64)buf[2] << 16) | ((unsigned __int64)buf[3] << 24) | - ((unsigned __int64)buf[4] << 32) | ((unsigned __int64)buf[5] << 40) | - ((unsigned __int64)buf[6] << 48) | ((unsigned __int64)buf[7] << 56); -} -#endif - -#endif /* CURL_SIZEOF_CURL_OFF_T > 4 */ - /* * Curl_read16_be() * @@ -120,80 +82,6 @@ unsigned short Curl_read16_be(const unsigned char *buf) } /* - * Curl_read32_be() - * - * This function converts a 32-bit integer from the big endian format, as - * used in the incoming package to whatever endian format we're using - * natively. - * - * Parameters: - * - * buf [in] - A pointer to a 4 byte buffer. - * - * Returns the integer. - */ -unsigned int Curl_read32_be(const unsigned char *buf) -{ - return ((unsigned int)buf[0] << 24) | ((unsigned int)buf[1] << 16) | - ((unsigned int)buf[2] << 8) | ((unsigned int)buf[3]); -} - -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* - * Curl_read64_be() - * - * This function converts a 64-bit integer from the big endian format, as - * used in the incoming package to whatever endian format we're using - * natively. - * - * Parameters: - * - * buf [in] - A pointer to a 8 byte buffer. - * - * Returns the integer. - */ -#if defined(HAVE_LONGLONG) -unsigned long long Curl_read64_be(const unsigned char *buf) -{ - return ((unsigned long long)buf[0] << 56) | - ((unsigned long long)buf[1] << 48) | - ((unsigned long long)buf[2] << 40) | - ((unsigned long long)buf[3] << 32) | - ((unsigned long long)buf[4] << 24) | - ((unsigned long long)buf[5] << 16) | - ((unsigned long long)buf[6] << 8) | - ((unsigned long long)buf[7]); -} -#else -unsigned __int64 Curl_read64_be(const unsigned char *buf) -{ - return ((unsigned __int64)buf[0] << 56) | ((unsigned __int64)buf[1] << 48) | - ((unsigned __int64)buf[2] << 40) | ((unsigned __int64)buf[3] << 32) | - ((unsigned __int64)buf[4] << 24) | ((unsigned __int64)buf[5] << 16) | - ((unsigned __int64)buf[6] << 8) | ((unsigned __int64)buf[7]); -} -#endif - -#endif /* CURL_SIZEOF_CURL_OFF_T > 4 */ - -/* - * Curl_write16_le() - * - * This function converts a 16-bit integer from the native endian format, - * to little endian format ready for sending down the wire. - * - * Parameters: - * - * value [in] - The 16-bit integer value. - * buffer [in] - A pointer to the output buffer. - */ -void Curl_write16_le(const short value, unsigned char *buffer) -{ - buffer[0] = (char)(value & 0x00FF); - buffer[1] = (char)((value & 0xFF00) >> 8); -} - -/* * Curl_write32_le() * * This function converts a 32-bit integer from the native endian format, diff --git a/lib/curl_endian.h b/lib/curl_endian.h index 8a2b07a..4f345a6 100644 --- a/lib/curl_endian.h +++ b/lib/curl_endian.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -28,33 +28,9 @@ unsigned short Curl_read16_le(const unsigned char *buf); /* Converts a 32-bit integer from little endian */ unsigned int Curl_read32_le(const unsigned char *buf); -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* Converts a 64-bit integer from little endian */ -#if defined(HAVE_LONGLONG) -unsigned long long Curl_read64_le(const unsigned char *buf); -#else -unsigned __int64 Curl_read64_le(const unsigned char *buf); -#endif -#endif - /* Converts a 16-bit integer from big endian */ unsigned short Curl_read16_be(const unsigned char *buf); -/* Converts a 32-bit integer from big endian */ -unsigned int Curl_read32_be(const unsigned char *buf); - -#if (CURL_SIZEOF_CURL_OFF_T > 4) -/* Converts a 64-bit integer from big endian */ -#if defined(HAVE_LONGLONG) -unsigned long long Curl_read64_be(const unsigned char *buf); -#else -unsigned __int64 Curl_read64_be(const unsigned char *buf); -#endif -#endif - -/* Converts a 16-bit integer to little endian */ -void Curl_write16_le(const short value, unsigned char *buffer); - /* Converts a 32-bit integer to little endian */ void Curl_write32_le(const int value, unsigned char *buffer); diff --git a/lib/curl_md4.h b/lib/curl_md4.h index 8c26d12..e069041 100644 --- a/lib/curl_md4.h +++ b/lib/curl_md4.h @@ -24,12 +24,12 @@ #include "curl_setup.h" -/* NSS and OS/400 crypto library do not provide the MD4 hash algorithm, so - * that we have a local implementation of it */ -#if defined(USE_NSS) || defined(USE_OS400CRYPTO) +#if defined(USE_NSS) || defined(USE_OS400CRYPTO) || \ + (defined(USE_MBEDTLS) && !defined(MBEDTLS_MD4_C)) void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len); -#endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) */ +#endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) || + (defined(USE_MBEDTLS) && !defined(MBEDTLS_MD4_C)) */ #endif /* HEADER_CURL_MD4_H */ diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c index fb43dda..aea5452 100644 --- a/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c @@ -80,6 +80,9 @@ # include # include +# if !defined(MBEDTLS_MD4_C) +# include "curl_md4.h" +# endif #elif defined(USE_NSS) @@ -519,7 +522,7 @@ static void ascii_uppercase_to_unicode_le(unsigned char *dest, { size_t i; for(i = 0; i < srclen; i++) { - dest[2 * i] = (unsigned char)(toupper(src[i])); + dest[2 * i] = (unsigned char)(Curl_raw_toupper(src[i])); dest[2 * i + 1] = '\0'; } } @@ -568,10 +571,11 @@ CURLcode Curl_ntlm_core_mk_nt_hash(struct Curl_easy *data, gcry_md_write(MD4pw, pw, 2 * len); memcpy(ntbuffer, gcry_md_read(MD4pw, 0), MD4_DIGEST_LENGTH); gcry_md_close(MD4pw); +#elif defined(USE_NSS) || defined(USE_OS400CRYPTO) || \ + (defined(USE_MBEDTLS) && !defined(MBEDTLS_MD4_C)) + Curl_md4it(ntbuffer, pw, 2 * len); #elif defined(USE_MBEDTLS) mbedtls_md4(pw, 2 * len, ntbuffer); -#elif defined(USE_NSS) || defined(USE_OS400CRYPTO) - Curl_md4it(ntbuffer, pw, 2 * len); #elif defined(USE_DARWINSSL) (void)CC_MD4(pw, (CC_LONG)(2 * len), ntbuffer); #elif defined(USE_WIN32_CRYPTO) diff --git a/lib/curl_rtmp.c b/lib/curl_rtmp.c index 06dd047..87a6caf 100644 --- a/lib/curl_rtmp.c +++ b/lib/curl_rtmp.c @@ -25,6 +25,7 @@ #ifdef USE_LIBRTMP +#include "curl_rtmp.h" #include "urldata.h" #include "nonblock.h" /* for curlx_nonblock */ #include "progress.h" /* for Curl_pgrsSetUploadSize */ diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c index b3789da..bd574b5 100644 --- a/lib/curl_sasl.c +++ b/lib/curl_sasl.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2012 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 2012 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -415,7 +415,6 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn, conn->host.name; const long int port = SSL_IS_PROXY() ? conn->port : conn->remote_port; #if !defined(CURL_DISABLE_CRYPTO_AUTH) - char *serverdata; char *chlg = NULL; size_t chlglen = 0; #endif @@ -424,6 +423,10 @@ CURLcode Curl_sasl_continue(struct SASL *sasl, struct connectdata *conn, data->set.str[STRING_SERVICE_NAME] : sasl->params->service; #endif +#if !defined(CURL_DISABLE_CRYPTO_AUTH) || defined(USE_KERBEROS5) || \ + defined(USE_NTLM) + char *serverdata; +#endif size_t len = 0; *progress = SASL_INPROGRESS; diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 9d99f13..d22997c 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -588,11 +588,15 @@ int netware_init(void); #endif #endif -#if defined(HAVE_LIBIDN2) && defined(HAVE_IDN2_H) +#if defined(HAVE_LIBIDN2) && defined(HAVE_IDN2_H) && !defined(USE_WIN32_IDN) /* The lib and header are present */ #define USE_LIBIDN2 #endif +#if defined(USE_LIBIDN2) && defined(USE_WIN32_IDN) +#error "Both libidn2 and WinIDN are enabled, choose one." +#endif + #ifndef SIZEOF_TIME_T /* assume default size of time_t to be 32 bit */ #define SIZEOF_TIME_T 4 @@ -623,14 +627,14 @@ int netware_init(void); #if !defined(CURL_DISABLE_NTLM) && !defined(CURL_DISABLE_CRYPTO_AUTH) #if defined(USE_OPENSSL) || defined(USE_WINDOWS_SSPI) || \ defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_DARWINSSL) || \ - defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) + defined(USE_OS400CRYPTO) || defined(USE_WIN32_CRYPTO) || \ + defined(USE_MBEDTLS) #define USE_NTLM -#elif defined(USE_MBEDTLS) +# if defined(USE_MBEDTLS) +/* Get definition of MBEDTLS_MD4_C */ # include -# if defined(MBEDTLS_MD4_C) -#define USE_NTLM # endif #endif diff --git a/lib/curl_setup_once.h b/lib/curl_setup_once.h index 4da8349..684187c 100644 --- a/lib/curl_setup_once.h +++ b/lib/curl_setup_once.h @@ -196,7 +196,7 @@ struct timeval { /* */ #else #define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \ - (SEND_TYPE_ARG2)(y), \ + (SEND_QUAL_ARG2 SEND_TYPE_ARG2)(y), \ (SEND_TYPE_ARG3)(z), \ (SEND_TYPE_ARG4)(SEND_4TH_ARG)) #endif diff --git a/lib/dotdot.c b/lib/dotdot.c index ea7c8a0..20603bc 100644 --- a/lib/dotdot.c +++ b/lib/dotdot.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -147,6 +147,7 @@ char *Curl_dedotdotify(const char *input) else if(!strcmp(".", clone) || !strcmp("..", clone)) { *clone=0; + *out=0; } else { diff --git a/lib/easy.c b/lib/easy.c index 2b5f972..2b1ce9e 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -561,7 +561,7 @@ static void events_setup(struct Curl_multi *multi, struct events *ev) static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev) { bool done = FALSE; - CURLMcode mcode; + CURLMcode mcode = CURLM_OK; CURLcode result = CURLE_OK; while(!done) { @@ -615,12 +615,18 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev) } } - if(!ev->msbump) + if(!ev->msbump) { /* If nothing updated the timeout, we decrease it by the spent time. * If it was updated, it has the new timeout time stored already. */ - ev->ms += (long)curlx_tvdiff(after, before); - + time_t timediff = curlx_tvdiff(after, before); + if(timediff > 0) { + if(timediff > ev->ms) + ev->ms = 0; + else + ev->ms -= (long)timediff; + } + } } else return CURLE_RECV_ERROR; @@ -870,7 +876,7 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data) * the likeliness of us forgetting to init a buffer here in the future. */ outcurl->set.buffer_size = data->set.buffer_size; - outcurl->state.buffer = malloc(CURL_BUFSIZE(outcurl->set.buffer_size) + 1); + outcurl->state.buffer = malloc(outcurl->set.buffer_size + 1); if(!outcurl->state.buffer) goto fail; @@ -1044,7 +1050,7 @@ CURLcode curl_easy_pause(struct Curl_easy *data, int action) if(!result && ((newstate&(KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) != (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) ) - Curl_expire(data, 0); /* get this handle going again */ + Curl_expire(data, 0, EXPIRE_RUN_NOW); /* get this handle going again */ return result; } diff --git a/lib/file.c b/lib/file.c index b26bdea..c804d75 100644 --- a/lib/file.c +++ b/lib/file.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -311,7 +311,6 @@ static CURLcode file_upload(struct connectdata *conn) size_t nread; size_t nwrite; curl_off_t bytecount = 0; - struct timeval now = Curl_tvnow(); struct_stat file_stat; const char *buf2; @@ -360,7 +359,7 @@ static CURLcode file_upload(struct connectdata *conn) while(!result) { int readcount; - result = Curl_fillreadbuffer(conn, BUFSIZE, &readcount); + result = Curl_fillreadbuffer(conn, (int)data->set.buffer_size, &readcount); if(result) break; @@ -399,7 +398,7 @@ static CURLcode file_upload(struct connectdata *conn) if(Curl_pgrsUpdate(conn)) result = CURLE_ABORTED_BY_CALLBACK; else - result = Curl_speedcheck(data, now); + result = Curl_speedcheck(data, Curl_tvnow()); } if(!result && Curl_pgrsUpdate(conn)) result = CURLE_ABORTED_BY_CALLBACK; @@ -436,7 +435,6 @@ static CURLcode file_do(struct connectdata *conn, bool *done) char *buf = data->state.buffer; curl_off_t bytecount = 0; int fd; - struct timeval now = Curl_tvnow(); struct FILEPROTO *file; *done = TRUE; /* unconditionally */ @@ -475,9 +473,10 @@ static CURLcode file_do(struct connectdata *conn, bool *done) time_t filetime; struct tm buffer; const struct tm *tm = &buffer; - snprintf(buf, CURL_BUFSIZE(data->set.buffer_size), + char header[80]; + snprintf(header, sizeof(header), "Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n", expected_size); - result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0); + result = Curl_client_write(conn, CLIENTWRITE_BOTH, header, 0); if(result) return result; @@ -492,7 +491,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done) return result; /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */ - snprintf(buf, BUFSIZE-1, + snprintf(header, sizeof(header), "Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n", Curl_wkday[tm->tm_wday?tm->tm_wday-1:6], tm->tm_mday, @@ -557,12 +556,11 @@ static CURLcode file_do(struct connectdata *conn, bool *done) size_t bytestoread; if(size_known) { - bytestoread = - (expected_size < CURL_OFF_T_C(BUFSIZE) - CURL_OFF_T_C(1)) ? - curlx_sotouz(expected_size) : BUFSIZE - 1; + bytestoread = (expected_size < data->set.buffer_size) ? + curlx_sotouz(expected_size) : (size_t)data->set.buffer_size; } else - bytestoread = BUFSIZE-1; + bytestoread = data->set.buffer_size-1; nread = read(fd, buf, bytestoread); @@ -585,7 +583,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done) if(Curl_pgrsUpdate(conn)) result = CURLE_ABORTED_BY_CALLBACK; else - result = Curl_speedcheck(data, now); + result = Curl_speedcheck(data, Curl_tvnow()); } if(Curl_pgrsUpdate(conn)) result = CURLE_ABORTED_BY_CALLBACK; diff --git a/lib/fileinfo.c b/lib/fileinfo.c index 144c65b..3872988 100644 --- a/lib/fileinfo.c +++ b/lib/fileinfo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2010 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 2010 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -28,23 +28,19 @@ /* The last #include file should be: */ #include "memdebug.h" -struct curl_fileinfo *Curl_fileinfo_alloc(void) +struct fileinfo *Curl_fileinfo_alloc(void) { - struct curl_fileinfo *tmp = malloc(sizeof(struct curl_fileinfo)); - if(!tmp) - return NULL; - memset(tmp, 0, sizeof(struct curl_fileinfo)); - return tmp; + return calloc(1, sizeof(struct fileinfo)); } void Curl_fileinfo_dtor(void *user, void *element) { - struct curl_fileinfo *finfo = element; + struct fileinfo *finfo = element; (void) user; if(!finfo) return; - Curl_safefree(finfo->b_data); + Curl_safefree(finfo->info.b_data); free(finfo); } diff --git a/lib/fileinfo.h b/lib/fileinfo.h index 5324f1a..c5d0ee5 100644 --- a/lib/fileinfo.h +++ b/lib/fileinfo.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2010, Daniel Stenberg, , et al. + * Copyright (C) 2010, 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -23,11 +23,15 @@ ***************************************************************************/ #include +#include "llist.h" -struct curl_fileinfo *Curl_fileinfo_alloc(void); +struct fileinfo { + struct curl_fileinfo info; + struct curl_llist_element list; +}; -void Curl_fileinfo_dtor(void *, void *); +struct fileinfo *Curl_fileinfo_alloc(void); -struct curl_fileinfo *Curl_fileinfo_dup(const struct curl_fileinfo *src); +void Curl_fileinfo_dtor(void *, void *); #endif /* HEADER_CURL_FILEINFO_H */ diff --git a/lib/formdata.c b/lib/formdata.c index 2a93434..e48a627 100644 --- a/lib/formdata.c +++ b/lib/formdata.c @@ -48,15 +48,12 @@ static char *Curl_basename(char *path); #endif static size_t readfromfile(struct Form *form, char *buffer, size_t size); -static char *formboundary(struct Curl_easy *data); +static CURLcode formboundary(struct Curl_easy *data, char *buffer, size_t len); /* What kind of Content-Type to use on un-specified files with unrecognized extensions. */ #define HTTPPOST_CONTENTTYPE_DEFAULT "application/octet-stream" -#define FORM_FILE_SEPARATOR ',' -#define FORM_TYPE_SEPARATOR ';' - #define HTTPPOST_PTRNAME CURL_HTTPPOST_PTRNAME #define HTTPPOST_FILENAME CURL_HTTPPOST_FILENAME #define HTTPPOST_PTRCONTENTS CURL_HTTPPOST_PTRCONTENTS @@ -99,7 +96,7 @@ AddHttpPost(char *name, size_t namelength, post->contenttype = contenttype; post->contentheader = contentHeader; post->showfilename = showfilename; - post->userp = userp, + post->userp = userp; post->flags = flags | CURL_HTTPPOST_LARGE; } else @@ -1162,20 +1159,19 @@ CURLcode Curl_getformdata(struct Curl_easy *data, struct FormData *firstform; struct curl_httppost *file; CURLcode result = CURLE_OK; - curl_off_t size = 0; /* support potentially ENORMOUS formposts */ - char *boundary; - char *fileboundary = NULL; + char fileboundary[42]; struct curl_slist *curList; + char boundary[42]; *finalform = NULL; /* default form is empty */ if(!post) return result; /* no input => no output! */ - boundary = formboundary(data); - if(!boundary) - return CURLE_OUT_OF_MEMORY; + result = formboundary(data, boundary, sizeof(boundary)); + if(result) + return result; /* Make the first line of the output */ result = AddFormDataf(&form, NULL, @@ -1185,7 +1181,6 @@ CURLcode Curl_getformdata(struct Curl_easy *data, boundary); if(result) { - free(boundary); return result; } /* we DO NOT include that line in the total size of the POST, since it'll be @@ -1228,10 +1223,8 @@ CURLcode Curl_getformdata(struct Curl_easy *data, /* If used, this is a link to more file names, we must then do the magic to include several files with the same field name */ - free(fileboundary); - fileboundary = formboundary(data); - if(!fileboundary) { - result = CURLE_OUT_OF_MEMORY; + result = formboundary(data, fileboundary, sizeof(fileboundary)); + if(result) { break; } @@ -1382,16 +1375,10 @@ CURLcode Curl_getformdata(struct Curl_easy *data, if(result) { Curl_formclean(&firstform); - free(fileboundary); - free(boundary); return result; } *sizep = size; - - free(fileboundary); - free(boundary); - *finalform = firstform; return result; @@ -1565,16 +1552,18 @@ char *Curl_formpostheader(void *formp, size_t *len) * formboundary() creates a suitable boundary string and returns an allocated * one. */ -static char *formboundary(struct Curl_easy *data) +static CURLcode formboundary(struct Curl_easy *data, + char *buffer, size_t buflen) { /* 24 dashes and 16 hexadecimal digits makes 64 bit (18446744073709551615) combinations */ - unsigned int rnd[2]; - CURLcode result = Curl_rand(data, &rnd[0], 2); - if(result) - return NULL; + if(buflen < 41) + return CURLE_BAD_FUNCTION_ARGUMENT; + + memset(buffer, '-', 24); + Curl_rand_hex(data, (unsigned char *)&buffer[24], 17); - return aprintf("------------------------%08x%08x", rnd[0], rnd[1]); + return CURLE_OK; } #else /* CURL_DISABLE_HTTP */ diff --git a/lib/ftp.c b/lib/ftp.c index 059bd2a..5edec37 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -580,10 +580,8 @@ static CURLcode AllowServerConnect(struct connectdata *conn, bool *connected) else { /* Add timeout to multi handle and break out of the loop */ if(!result && *connected == FALSE) { - if(data->set.accepttimeout > 0) - Curl_expire(data, data->set.accepttimeout); - else - Curl_expire(data, DEFAULT_ACCEPT_TIMEOUT); + Curl_expire(data, data->set.accepttimeout > 0 ? + data->set.accepttimeout: DEFAULT_ACCEPT_TIMEOUT, 0); } } @@ -1681,8 +1679,9 @@ static CURLcode ftp_state_ul_setup(struct connectdata *conn, /* seekerr == CURL_SEEKFUNC_CANTSEEK (can't seek to offset) */ do { size_t readthisamountnow = - (data->state.resume_from - passed > CURL_OFF_T_C(BUFSIZE)) ? - BUFSIZE : curlx_sotouz(data->state.resume_from - passed); + (data->state.resume_from - passed > data->set.buffer_size) ? + (size_t)data->set.buffer_size : + curlx_sotouz(data->state.resume_from - passed); size_t actuallyread = data->state.fread_func(data->state.buffer, 1, readthisamountnow, @@ -2101,17 +2100,17 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn, /* we got a time. Format should be: "YYYYMMDDHHMMSS[.sss]" where the last .sss part is optional and means fractions of a second */ int year, month, day, hour, minute, second; - char *buf = data->state.buffer; - if(6 == sscanf(buf+4, "%04d%02d%02d%02d%02d%02d", + if(6 == sscanf(&data->state.buffer[4], "%04d%02d%02d%02d%02d%02d", &year, &month, &day, &hour, &minute, &second)) { /* we have a time, reformat it */ + char timebuf[24]; time_t secs=time(NULL); - /* using the good old yacc/bison yuck */ - snprintf(buf, CURL_BUFSIZE(conn->data->set.buffer_size), + + snprintf(timebuf, sizeof(timebuf), "%04d%02d%02d %02d:%02d:%02d GMT", year, month, day, hour, minute, second); /* now, convert this into a time() value: */ - data->info.filetime = (long)curl_getdate(buf, &secs); + data->info.filetime = (long)curl_getdate(timebuf, &secs); } #ifdef CURL_FTP_HTTPSTYLE_HEAD @@ -2122,6 +2121,7 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn, ftpc->file && data->set.get_filetime && (data->info.filetime>=0) ) { + char headerbuf[128]; time_t filetime = (time_t)data->info.filetime; struct tm buffer; const struct tm *tm = &buffer; @@ -2131,7 +2131,7 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn, return result; /* format: "Tue, 15 Nov 1994 12:45:26" */ - snprintf(buf, BUFSIZE-1, + snprintf(headerbuf, sizeof(headerbuf), "Last-Modified: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n", Curl_wkday[tm->tm_wday?tm->tm_wday-1:6], tm->tm_mday, @@ -2140,7 +2140,7 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn, tm->tm_hour, tm->tm_min, tm->tm_sec); - result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0); + result = Curl_client_write(conn, CLIENTWRITE_BOTH, headerbuf, 0); if(result) return result; } /* end of a ridiculous amount of conditionals */ @@ -2318,9 +2318,10 @@ static CURLcode ftp_state_size_resp(struct connectdata *conn, if(instate == FTP_SIZE) { #ifdef CURL_FTP_HTTPSTYLE_HEAD if(-1 != filesize) { - snprintf(buf, CURL_BUFSIZE(data->set.buffer_size), + char clbuf[128]; + snprintf(clbuf, sizeof(clbuf), "Content-Length: %" CURL_FORMAT_CURL_OFF_T "\r\n", filesize); - result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0); + result = Curl_client_write(conn, CLIENTWRITE_BOTH, clbuf, 0); if(result) return result; } @@ -2420,7 +2421,6 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn, CURLcode result = CURLE_OK; struct Curl_easy *data = conn->data; struct FTP *ftp = data->req.protop; - char *buf = data->state.buffer; if((ftpcode == 150) || (ftpcode == 125)) { @@ -2464,6 +2464,7 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn, * * Example D above makes this parsing a little tricky */ char *bytes; + char *buf = data->state.buffer; bytes=strstr(buf, " bytes"); if(bytes--) { long in=(long)(bytes-buf); @@ -2822,7 +2823,7 @@ static CURLcode ftp_statemach_act(struct connectdata *conn) case FTP_PWD: if(ftpcode == 257) { char *ptr=&data->state.buffer[4]; /* start on the first letter */ - const size_t buf_size = CURL_BUFSIZE(data->set.buffer_size); + const size_t buf_size = data->set.buffer_size; char *dir; char *store; @@ -3587,7 +3588,7 @@ static CURLcode ftp_do_more(struct connectdata *conn, int *completep) if(conn->tunnel_state[SECONDARYSOCKET] == TUNNEL_CONNECT) { /* As we're in TUNNEL_CONNECT state now, we know the proxy name and port aren't used so we blank their arguments. TODO: make this nicer */ - result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0, FALSE); + result = Curl_proxyCONNECT(conn, SECONDARYSOCKET, NULL, 0); return result; } diff --git a/lib/ftplistparser.c b/lib/ftplistparser.c index bc18680..2acce31 100644 --- a/lib/ftplistparser.c +++ b/lib/ftplistparser.c @@ -165,7 +165,7 @@ struct ftp_parselist_data { } state; CURLcode error; - struct curl_fileinfo *file_data; + struct fileinfo *file_data; unsigned int item_length; size_t item_offset; struct { @@ -275,7 +275,7 @@ static void PL_ERROR(struct connectdata *conn, CURLcode err) } static CURLcode ftp_pl_insert_finfo(struct connectdata *conn, - struct curl_fileinfo *finfo) + struct fileinfo *infop) { curl_fnmatch_callback compare; struct WildcardData *wc = &conn->data->wildcard; @@ -283,6 +283,7 @@ static CURLcode ftp_pl_insert_finfo(struct connectdata *conn, struct curl_llist *llist = &wc->filelist; struct ftp_parselist_data *parser = tmpdata->parser; bool add = TRUE; + struct curl_fileinfo *finfo = &infop->info; /* move finfo pointers to b_data */ char *str = finfo->b_data; @@ -316,11 +317,7 @@ static CURLcode ftp_pl_insert_finfo(struct connectdata *conn, } if(add) { - if(!Curl_llist_insert_next(llist, llist->tail, finfo)) { - Curl_fileinfo_dtor(NULL, finfo); - tmpdata->parser->file_data = NULL; - return CURLE_OUT_OF_MEMORY; - } + Curl_llist_insert_next(llist, llist->tail, finfo, &infop->list); } else { Curl_fileinfo_dtor(NULL, finfo); @@ -337,6 +334,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, struct connectdata *conn = (struct connectdata *)connptr; struct ftp_wc_tmpdata *tmpdata = conn->data->wildcard.tmp; struct ftp_parselist_data *parser = tmpdata->parser; + struct fileinfo *infop; struct curl_fileinfo *finfo; unsigned long i = 0; CURLcode result; @@ -366,17 +364,18 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->error = CURLE_OUT_OF_MEMORY; return bufflen; } - parser->file_data->b_data = malloc(FTP_BUFFER_ALLOCSIZE); - if(!parser->file_data->b_data) { + parser->file_data->info.b_data = malloc(FTP_BUFFER_ALLOCSIZE); + if(!parser->file_data->info.b_data) { PL_ERROR(conn, CURLE_OUT_OF_MEMORY); return bufflen; } - parser->file_data->b_size = FTP_BUFFER_ALLOCSIZE; + parser->file_data->info.b_size = FTP_BUFFER_ALLOCSIZE; parser->item_offset = 0; parser->item_length = 0; } - finfo = parser->file_data; + infop = parser->file_data; + finfo = &infop->info; finfo->b_data[finfo->b_used++] = c; if(finfo->b_used >= finfo->b_size - 1) { @@ -498,8 +497,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, PL_ERROR(conn, CURLE_FTP_BAD_FILE_LIST); return bufflen; } - parser->file_data->flags |= CURLFINFOFLAG_KNOWN_PERM; - parser->file_data->perm = perm; + parser->file_data->info.flags |= CURLFINFOFLAG_KNOWN_PERM; + parser->file_data->info.perm = perm; parser->offsets.perm = parser->item_offset; parser->item_length = 0; @@ -530,8 +529,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; hlinks = strtol(finfo->b_data + parser->item_offset, &p, 10); if(p[0] == '\0' && hlinks != LONG_MAX && hlinks != LONG_MIN) { - parser->file_data->flags |= CURLFINFOFLAG_KNOWN_HLINKCOUNT; - parser->file_data->hardlinks = hlinks; + parser->file_data->info.flags |= CURLFINFOFLAG_KNOWN_HLINKCOUNT; + parser->file_data->info.hardlinks = hlinks; } parser->item_length = 0; parser->item_offset = 0; @@ -613,8 +612,8 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, fsize = curlx_strtoofft(finfo->b_data+parser->item_offset, &p, 10); if(p[0] == '\0' && fsize != CURL_OFF_T_MAX && fsize != CURL_OFF_T_MIN) { - parser->file_data->flags |= CURLFINFOFLAG_KNOWN_SIZE; - parser->file_data->size = fsize; + parser->file_data->info.flags |= CURLFINFOFLAG_KNOWN_SIZE; + parser->file_data->info.size = fsize; } parser->item_length = 0; parser->item_offset = 0; @@ -731,7 +730,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; parser->offsets.filename = parser->item_offset; parser->state.UNIX.main = PL_UNIX_FILETYPE; - result = ftp_pl_insert_finfo(conn, finfo); + result = ftp_pl_insert_finfo(conn, infop); if(result) { PL_ERROR(conn, result); return bufflen; @@ -743,7 +742,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; parser->offsets.filename = parser->item_offset; parser->state.UNIX.main = PL_UNIX_FILETYPE; - result = ftp_pl_insert_finfo(conn, finfo); + result = ftp_pl_insert_finfo(conn, infop); if(result) { PL_ERROR(conn, result); return bufflen; @@ -838,7 +837,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, else if(c == '\n') { finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; parser->offsets.symlink_target = parser->item_offset; - result = ftp_pl_insert_finfo(conn, finfo); + result = ftp_pl_insert_finfo(conn, infop); if(result) { PL_ERROR(conn, result); return bufflen; @@ -850,7 +849,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, if(c == '\n') { finfo->b_data[parser->item_offset + parser->item_length - 1] = 0; parser->offsets.symlink_target = parser->item_offset; - result = ftp_pl_insert_finfo(conn, finfo); + result = ftp_pl_insert_finfo(conn, infop); if(result) { PL_ERROR(conn, result); return bufflen; @@ -953,10 +952,10 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, return bufflen; } /* correct file type */ - parser->file_data->filetype = CURLFILETYPE_FILE; + parser->file_data->info.filetype = CURLFILETYPE_FILE; } - parser->file_data->flags |= CURLFINFOFLAG_KNOWN_SIZE; + parser->file_data->info.flags |= CURLFINFOFLAG_KNOWN_SIZE; parser->item_length = 0; parser->state.NT.main = PL_WINNT_FILENAME; parser->state.NT.sub.filename = PL_WINNT_FILENAME_PRESPACE; @@ -983,7 +982,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, parser->offsets.filename = parser->item_offset; finfo->b_data[finfo->b_used - 1] = 0; parser->offsets.filename = parser->item_offset; - result = ftp_pl_insert_finfo(conn, finfo); + result = ftp_pl_insert_finfo(conn, infop); if(result) { PL_ERROR(conn, result); return bufflen; @@ -995,7 +994,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb, case PL_WINNT_FILENAME_WINEOL: if(c == '\n') { parser->offsets.filename = parser->item_offset; - result = ftp_pl_insert_finfo(conn, finfo); + result = ftp_pl_insert_finfo(conn, infop); if(result) { PL_ERROR(conn, result); return bufflen; diff --git a/lib/hash.c b/lib/hash.c index b7305a5..6afeaa1 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -124,17 +124,9 @@ Curl_hash_add(struct curl_hash *h, void *key, size_t key_len, void *p) he = mk_hash_element(key, key_len, p); if(he) { - if(Curl_llist_insert_next(l, l->tail, he)) { - ++h->size; - return p; /* return the new entry */ - } - /* - * Couldn't insert it, destroy the 'he' element and the key again. We - * don't call hash_element_dtor() since that would also call the - * "destructor" for the actual data 'p'. When we fail, we shall not touch - * that data. - */ - free(he); + Curl_llist_insert_next(l, l->tail, he, &he->list); + ++h->size; + return p; /* return the new entry */ } return NULL; /* failure */ diff --git a/lib/hash.h b/lib/hash.h index a345c8c..90a25d1 100644 --- a/lib/hash.h +++ b/lib/hash.h @@ -57,6 +57,7 @@ struct curl_hash { }; struct curl_hash_element { + struct curl_llist_element list; void *ptr; size_t key_len; char key[1]; /* allocated memory following the struct */ diff --git a/lib/hostip.c b/lib/hostip.c index ed18763..619ec84 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -538,7 +538,6 @@ RETSIGTYPE alarmfunc(int sig) /* this is for "-ansi -Wall -pedantic" to stop complaining! (rabe) */ (void)sig; siglongjmp(curl_jmpenv, 1); - return; } #endif /* USE_ALARM_TIMEOUT */ @@ -597,7 +596,7 @@ int Curl_resolv_timeout(struct connectdata *conn, /* Ignore the timeout when signals are disabled */ timeout = 0; else - timeout = timeoutms; + timeout = (timeoutms > LONG_MAX) ? LONG_MAX : (long)timeoutms; if(!timeout) /* USE_ALARM_TIMEOUT defined, but no timeout actually requested */ @@ -689,10 +688,11 @@ clean_up: the time we spent until now! */ if(prev_alarm) { /* there was an alarm() set before us, now put it back */ - unsigned long elapsed_ms = Curl_tvdiff(Curl_tvnow(), conn->created); + unsigned long elapsed_secs = (unsigned long) (Curl_tvdiff(Curl_tvnow(), + conn->created) / 1000); /* the alarm period is counted in even number of seconds */ - unsigned long alarm_set = prev_alarm - elapsed_ms/1000; + unsigned long alarm_set = prev_alarm - elapsed_secs; if(!alarm_set || ((alarm_set >= 0x80000000) && (prev_alarm < 0x80000000)) ) { diff --git a/lib/http.c b/lib/http.c index 22d4547..21574e2 100644 --- a/lib/http.c +++ b/lib/http.c @@ -285,6 +285,7 @@ static CURLcode http_output_basic(struct connectdata *conn, bool proxy) const char *user; const char *pwd; CURLcode result; + char *out; if(proxy) { userp = &conn->allocptr.proxyuserpwd; @@ -297,27 +298,32 @@ static CURLcode http_output_basic(struct connectdata *conn, bool proxy) pwd = conn->passwd; } - snprintf(data->state.buffer, CURL_BUFSIZE(data->set.buffer_size), - "%s:%s", user, pwd); + out = aprintf("%s:%s", user, pwd); + if(!out) + return CURLE_OUT_OF_MEMORY; - result = Curl_base64_encode(data, - data->state.buffer, strlen(data->state.buffer), - &authorization, &size); + result = Curl_base64_encode(data, out, strlen(out), &authorization, &size); if(result) - return result; + goto fail; - if(!authorization) - return CURLE_REMOTE_ACCESS_DENIED; + if(!authorization) { + result = CURLE_REMOTE_ACCESS_DENIED; + goto fail; + } free(*userp); *userp = aprintf("%sAuthorization: Basic %s\r\n", proxy ? "Proxy-" : "", authorization); free(authorization); - if(!*userp) - return CURLE_OUT_OF_MEMORY; + if(!*userp) { + result = CURLE_OUT_OF_MEMORY; + goto fail; + } - return CURLE_OK; + fail: + free(out); + return result; } /* pickoneauth() selects the most favourable authentication method from the @@ -413,8 +419,6 @@ static CURLcode http_perhapsrewind(struct connectdata *conn) case HTTPREQ_POST: if(data->state.infilesize != -1) expectsend = data->state.infilesize; - else if(data->set.postfields) - expectsend = (curl_off_t)strlen(data->set.postfields); break; case HTTPREQ_PUT: if(data->state.infilesize != -1) @@ -1111,7 +1115,7 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in, buffer is using this size. */ - sendsize = (size > CURL_MAX_WRITE_SIZE) ? CURL_MAX_WRITE_SIZE : size; + sendsize = CURLMIN(size, CURL_MAX_WRITE_SIZE); /* OpenSSL is very picky and we must send the SAME buffer pointer to the library when we attempt to re-send this buffer. Sending the same data @@ -1689,9 +1693,10 @@ CURLcode Curl_add_timecondition(struct Curl_easy *data, Curl_send_buffer *req_buffer) { const struct tm *tm; - char *buf = data->state.buffer; struct tm keeptime; CURLcode result; + char datestr[80]; + const char *condp; if(data->set.timecondition == CURL_TIMECOND_NONE) /* no condition was asked for */ @@ -1704,6 +1709,21 @@ CURLcode Curl_add_timecondition(struct Curl_easy *data, } tm = &keeptime; + switch(data->set.timecondition) { + default: + return CURLE_BAD_FUNCTION_ARGUMENT; + + case CURL_TIMECOND_IFMODSINCE: + condp = "If-Modified-Since"; + break; + case CURL_TIMECOND_IFUNMODSINCE: + condp = "If-Unmodified-Since"; + break; + case CURL_TIMECOND_LASTMOD: + condp = "Last-Modified"; + break; + } + /* The If-Modified-Since header family should have their times set in * GMT as RFC2616 defines: "All HTTP date/time stamps MUST be * represented in Greenwich Mean Time (GMT), without exception. For the @@ -1712,8 +1732,9 @@ CURLcode Curl_add_timecondition(struct Curl_easy *data, */ /* format: "Tue, 15 Nov 1994 12:45:26 GMT" */ - snprintf(buf, BUFSIZE-1, - "%s, %02d %s %4d %02d:%02d:%02d GMT", + snprintf(datestr, sizeof(datestr), + "%s: %s, %02d %s %4d %02d:%02d:%02d GMT\r\n", + condp, Curl_wkday[tm->tm_wday?tm->tm_wday-1:6], tm->tm_mday, Curl_month[tm->tm_mon], @@ -1722,22 +1743,7 @@ CURLcode Curl_add_timecondition(struct Curl_easy *data, tm->tm_min, tm->tm_sec); - switch(data->set.timecondition) { - default: - break; - case CURL_TIMECOND_IFMODSINCE: - result = Curl_add_bufferf(req_buffer, - "If-Modified-Since: %s\r\n", buf); - break; - case CURL_TIMECOND_IFUNMODSINCE: - result = Curl_add_bufferf(req_buffer, - "If-Unmodified-Since: %s\r\n", buf); - break; - case CURL_TIMECOND_LASTMOD: - result = Curl_add_bufferf(req_buffer, - "Last-Modified: %s\r\n", buf); - break; - } + result = Curl_add_buffer(req_buffer, datestr, strlen(datestr)); return result; } @@ -2164,8 +2170,9 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) /* when seekerr == CURL_SEEKFUNC_CANTSEEK (can't seek to offset) */ do { size_t readthisamountnow = - (data->state.resume_from - passed > CURL_OFF_T_C(BUFSIZE)) ? - BUFSIZE : curlx_sotouz(data->state.resume_from - passed); + (data->state.resume_from - passed > data->set.buffer_size) ? + (size_t)data->set.buffer_size : + curlx_sotouz(data->state.resume_from - passed); size_t actuallyread = data->state.fread_func(data->state.buffer, 1, readthisamountnow, @@ -2550,12 +2557,9 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) if(conn->bits.authneg) postsize = 0; - else { - /* figure out the size of the postfields */ - postsize = (data->state.infilesize != -1)? - data->state.infilesize: - (data->set.postfields? (curl_off_t)strlen(data->set.postfields):-1); - } + else + /* the size of the post body */ + postsize = data->state.infilesize; /* We only set Content-Length and allow a custom Content-Length if we don't upload data chunked, as RFC2616 forbids us to set both @@ -2737,6 +2741,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done) data->req.upload_done = TRUE; data->req.keepon &= ~KEEP_SEND; /* we're done writing */ data->req.exp100 = EXP100_SEND_DATA; /* already sent */ + Curl_expire_done(data, EXPIRE_100_TIMEOUT); } } @@ -3033,6 +3038,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, if(k->exp100 > EXP100_SEND_DATA) { k->exp100 = EXP100_SEND_DATA; k->keepon |= KEEP_SEND; + Curl_expire_done(data, EXPIRE_100_TIMEOUT); } break; case 101: @@ -3159,6 +3165,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data, * request body has been sent we stop sending and mark the * connection for closure after we've read the entire response. */ + Curl_expire_done(data, EXPIRE_100_TIMEOUT); if(!k->upload_done) { if(data->set.http_keep_sending_on_error) { infof(data, "HTTP error before end of send, keep sending\n"); diff --git a/lib/http2.c b/lib/http2.c index 264c667..f8e23c5 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -165,7 +165,7 @@ void Curl_http2_setup_req(struct Curl_easy *data) http->closed = FALSE; http->close_handled = FALSE; http->mem = data->state.buffer; - http->len = BUFSIZE; + http->len = data->set.buffer_size; http->memlen = 0; } @@ -181,7 +181,7 @@ void Curl_http2_setup_conn(struct connectdata *conn) * but will be used at run-time when the protocol is dynamically switched from * HTTP to HTTP2. */ -const struct Curl_handler Curl_handler_http2 = { +static const struct Curl_handler Curl_handler_http2 = { "HTTP", /* scheme */ ZERO_NULL, /* setup_connection */ Curl_http, /* do_it */ @@ -201,7 +201,7 @@ const struct Curl_handler Curl_handler_http2 = { PROTOPT_STREAM /* flags */ }; -const struct Curl_handler Curl_handler_http2_ssl = { +static const struct Curl_handler Curl_handler_http2_ssl = { "HTTPS", /* scheme */ ZERO_NULL, /* setup_connection */ Curl_http, /* do_it */ @@ -569,7 +569,7 @@ static int on_frame_recv(nghttp2_session *session, const nghttp2_frame *frame, /* if we receive data for another handle, wake that up */ if(conn_s->data != data_s) - Curl_expire(data_s, 0); + Curl_expire(data_s, 0, EXPIRE_RUN_NOW); } break; case NGHTTP2_PUSH_PROMISE: @@ -646,7 +646,7 @@ static int on_data_chunk_recv(nghttp2_session *session, uint8_t flags, /* if we receive data for another handle, wake that up */ if(conn->data != data_s) - Curl_expire(data_s, 0); + Curl_expire(data_s, 0, EXPIRE_RUN_NOW); DEBUGF(infof(data_s, "%zu data received for stream %u " "(%zu left in buffer %p, total %zu)\n", @@ -784,7 +784,7 @@ static int on_begin_headers(nghttp2_session *session, /* This is trailer HEADERS started. Allocate buffer for them. */ DEBUGF(infof(data_s, "trailer field started\n")); - assert(stream->trailer_recvbuf == NULL); + DEBUGASSERT(stream->trailer_recvbuf == NULL); stream->trailer_recvbuf = Curl_add_buffer_init(); if(!stream->trailer_recvbuf) { @@ -909,7 +909,7 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame, Curl_add_buffer(stream->header_recvbuf, " \r\n", 3); /* if we receive data for another handle, wake that up */ if(conn->data != data_s) - Curl_expire(data_s, 0); + Curl_expire(data_s, 0, EXPIRE_RUN_NOW); DEBUGF(infof(data_s, "h2 status: HTTP/2 %03d (easy %p)\n", stream->status_code, data_s)); @@ -925,7 +925,7 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame, Curl_add_buffer(stream->header_recvbuf, "\r\n", 2); /* if we receive data for another handle, wake that up */ if(conn->data != data_s) - Curl_expire(data_s, 0); + Curl_expire(data_s, 0, EXPIRE_RUN_NOW); DEBUGF(infof(data_s, "h2 header: %.*s: %.*s\n", namelen, name, valuelen, value)); @@ -1453,7 +1453,7 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, infof(data, "%zu data bytes written\n", nread); if(stream->pauselen == 0) { DEBUGF(infof(data, "Unpaused by stream %u\n", stream->stream_id)); - assert(httpc->pause_stream_id == stream->stream_id); + DEBUGASSERT(httpc->pause_stream_id == stream->stream_id); httpc->pause_stream_id = 0; stream->pausedata = NULL; @@ -2137,35 +2137,37 @@ CURLcode Curl_http2_switched(struct connectdata *conn, void Curl_http2_add_child(struct Curl_easy *parent, struct Curl_easy *child, bool exclusive) { - struct Curl_http2_dep **tail; - struct Curl_http2_dep *dep = calloc(1, sizeof(struct Curl_http2_dep)); - dep->data = child; - - if(parent->set.stream_dependents && exclusive) { - struct Curl_http2_dep *node = parent->set.stream_dependents; - while(node) { - node->data->set.stream_depends_on = child; - node = node->next; + if(parent) { + struct Curl_http2_dep **tail; + struct Curl_http2_dep *dep = calloc(1, sizeof(struct Curl_http2_dep)); + dep->data = child; + + if(parent->set.stream_dependents && exclusive) { + struct Curl_http2_dep *node = parent->set.stream_dependents; + while(node) { + node->data->set.stream_depends_on = child; + node = node->next; + } + + tail = &child->set.stream_dependents; + while(*tail) + tail = &(*tail)->next; + + DEBUGASSERT(!*tail); + *tail = parent->set.stream_dependents; + parent->set.stream_dependents = 0; } - tail = &child->set.stream_dependents; - while(*tail) + tail = &parent->set.stream_dependents; + while(*tail) { + (*tail)->data->set.stream_depends_e = FALSE; tail = &(*tail)->next; + } DEBUGASSERT(!*tail); - *tail = parent->set.stream_dependents; - parent->set.stream_dependents = 0; + *tail = dep; } - tail = &parent->set.stream_dependents; - while(*tail) { - (*tail)->data->set.stream_depends_e = FALSE; - tail = &(*tail)->next; - } - - DEBUGASSERT(!*tail); - *tail = dep; - child->set.stream_depends_on = parent; child->set.stream_depends_e = exclusive; } diff --git a/lib/http_proxy.c b/lib/http_proxy.c index d53685f..9894e2e 100644 --- a/lib/http_proxy.c +++ b/lib/http_proxy.c @@ -122,8 +122,7 @@ CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex) remote_port = conn->conn_to_port; else remote_port = conn->remote_port; - result = Curl_proxyCONNECT(conn, sockindex, hostname, - remote_port, FALSE); + result = Curl_proxyCONNECT(conn, sockindex, hostname, remote_port); conn->data->req.protop = prot_save; if(CURLE_OK != result) return result; @@ -136,20 +135,12 @@ CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex) return CURLE_OK; } -/* - * Curl_proxyCONNECT() requires that we're connected to a HTTP proxy. This - * function will issue the necessary commands to get a seamless tunnel through - * this proxy. After that, the socket can be used just as a normal socket. - * - * 'blocking' set to TRUE means that this function will do the entire CONNECT - * + response in a blocking fashion. Should be avoided! - */ +#define CONNECT_BUFFER_SIZE 16384 -CURLcode Curl_proxyCONNECT(struct connectdata *conn, - int sockindex, - const char *hostname, - int remote_port, - bool blocking) +static CURLcode CONNECT(struct connectdata *conn, + int sockindex, + const char *hostname, + int remote_port) { int subversion=0; struct Curl_easy *data=conn->data; @@ -289,13 +280,10 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, return CURLE_RECV_ERROR; } - if(!blocking) { - if(!Curl_conn_data_pending(conn, sockindex)) - /* return so we'll be called again polling-style */ - return CURLE_OK; - DEBUGF(infof(data, - "Read response immediately from proxy CONNECT\n")); - } + if(!Curl_conn_data_pending(conn, sockindex)) + /* return so we'll be called again polling-style */ + return CURLE_OK; + DEBUGF(infof(data, "Read response immediately from proxy CONNECT\n")); /* at this point, the tunnel_connecting phase is over. */ @@ -307,17 +295,17 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, char *ptr; char *line_start; - ptr = data->state.buffer; + ptr = conn->connect_buffer; line_start = ptr; nread = 0; perline = 0; - while(nread < BUFSIZE && keepon && !error) { + while(nread < (size_t)CONNECT_BUFFER_SIZE && keepon && !error) { if(Curl_pgrsUpdate(conn)) return CURLE_ABORTED_BY_CALLBACK; - if(ptr >= &data->state.buffer[BUFSIZE]) { + if(ptr >= &conn->connect_buffer[CONNECT_BUFFER_SIZE]) { failf(data, "CONNECT response too large!"); return CURLE_RECV_ERROR; } @@ -366,7 +354,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, /* This means we are currently ignoring a response-body */ nread = 0; /* make next read start over in the read buffer */ - ptr = data->state.buffer; + ptr = conn->connect_buffer; if(cl) { /* A Content-Length based body: simply count down the counter and make sure to break out of the loop when we're done! */ @@ -438,7 +426,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, /* end of response-headers from the proxy */ nread = 0; /* make next read start over in the read buffer */ - ptr = data->state.buffer; + ptr = conn->connect_buffer; if((407 == k->httpcode) && !data->state.authproblem) { /* If we get a 407 response code with content length when we have no auth problem, we must ignore the @@ -551,7 +539,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, } perline = 0; /* line starts over here */ - ptr = data->state.buffer; + ptr = conn->connect_buffer; line_start = ptr; } /* while there's buffer left and loop is requested */ @@ -636,4 +624,33 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, document request */ return CURLE_OK; } + +/* + * Curl_proxyCONNECT() requires that we're connected to a HTTP proxy. This + * function will issue the necessary commands to get a seamless tunnel through + * this proxy. After that, the socket can be used just as a normal socket. + */ + +CURLcode Curl_proxyCONNECT(struct connectdata *conn, + int sockindex, + const char *hostname, + int remote_port) +{ + CURLcode result; + if(TUNNEL_INIT == conn->tunnel_state[sockindex]) { + if(!conn->connect_buffer) { + conn->connect_buffer = malloc(CONNECT_BUFFER_SIZE); + if(!conn->connect_buffer) + return CURLE_OUT_OF_MEMORY; + } + } + result = CONNECT(conn, sockindex, hostname, remote_port); + + if(result || (TUNNEL_COMPLETE == conn->tunnel_state[sockindex])) + Curl_safefree(conn->connect_buffer); + + return result; +} + + #endif /* CURL_DISABLE_PROXY */ diff --git a/lib/http_proxy.h b/lib/http_proxy.h index d1f5a7c..cbb1ab4 100644 --- a/lib/http_proxy.h +++ b/lib/http_proxy.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -26,8 +26,7 @@ /* ftp can use this as well */ CURLcode Curl_proxyCONNECT(struct connectdata *conn, int tunnelsocket, - const char *hostname, int remote_port, - bool blocking); + const char *hostname, int remote_port); /* Default proxy timeout in milliseconds */ #define PROXY_TIMEOUT (3600*1000) @@ -35,7 +34,7 @@ CURLcode Curl_proxyCONNECT(struct connectdata *conn, CURLcode Curl_proxy_connect(struct connectdata *conn, int sockindex); #else -#define Curl_proxyCONNECT(x,y,z,w,v) CURLE_NOT_BUILT_IN +#define Curl_proxyCONNECT(x,y,z,w) CURLE_NOT_BUILT_IN #define Curl_proxy_connect(x,y) CURLE_OK #endif diff --git a/lib/if2ip.c b/lib/if2ip.c index d876615..4de81be 100644 --- a/lib/if2ip.c +++ b/lib/if2ip.c @@ -239,7 +239,7 @@ if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, return IF2IP_NOT_FOUND; } - s = (struct sockaddr_in *)&req.ifr_addr; + s = (struct sockaddr_in *)(void *)&req.ifr_addr; memcpy(&in, &s->sin_addr, sizeof(in)); Curl_inet_ntop(s->sin_family, &in, buf, buf_size); diff --git a/lib/krb5.c b/lib/krb5.c index 067b0a5..69a3597 100644 --- a/lib/krb5.c +++ b/lib/krb5.c @@ -164,6 +164,7 @@ krb5_auth(void *app_data, struct connectdata *conn) size_t base64_sz = 0; struct sockaddr_in **remote_addr = (struct sockaddr_in **)&conn->ip_addr->ai_addr; + char *stringp; if(getsockname(conn->sock[FIRSTSOCKET], (struct sockaddr *)&conn->local_addr, &l) < 0) @@ -193,16 +194,19 @@ krb5_auth(void *app_data, struct connectdata *conn) return -1; } - input_buffer.value = data->state.buffer; - input_buffer.length = snprintf(input_buffer.value, BUFSIZE, "%s@%s", - service, host); + stringp = aprintf("%s@%s", service, host); + if(!stringp) + return -2; + + input_buffer.value = stringp; + input_buffer.length = strlen(stringp); maj = gss_import_name(&min, &input_buffer, GSS_C_NT_HOSTBASED_SERVICE, &gssname); + free(stringp); if(maj != GSS_S_COMPLETE) { gss_release_name(&min, &gssname); if(service == srv_host) { - Curl_failf(data, "Error importing service name %s", - input_buffer.value); + Curl_failf(data, "Error importing service name %s@%s", service, host); return AUTH_ERROR; } service = srv_host; diff --git a/lib/ldap.c b/lib/ldap.c index 979ce7d..79e84d9 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -181,6 +181,81 @@ const struct Curl_handler Curl_handler_ldaps = { }; #endif +#if defined(USE_WIN32_LDAP) + +#if defined(USE_WINDOWS_SSPI) +static int ldap_win_bind_auth(LDAP *server, const char *user, + const char *passwd, unsigned long authflags) +{ + ULONG method = 0; + SEC_WINNT_AUTH_IDENTITY cred = { 0, }; + int rc = LDAP_AUTH_METHOD_NOT_SUPPORTED; + +#if defined(USE_SPNEGO) + if(authflags & CURLAUTH_NEGOTIATE) { + method = LDAP_AUTH_NEGOTIATE; + } + else +#endif +#if defined(USE_NTLM) + if(authflags & CURLAUTH_NTLM) { + method = LDAP_AUTH_NTLM; + } + else +#endif +#if !defined(CURL_DISABLE_CRYPTO_AUTH) + if(authflags & CURLAUTH_DIGEST) { + method = LDAP_AUTH_DIGEST; + } + else +#endif + { + /* required anyway if one of upper preprocessor definitions enabled */ + } + + if(method && user && passwd) { + rc = Curl_create_sspi_identity(user, passwd, &cred); + if(!rc) { + rc = ldap_bind_s(server, NULL, (TCHAR *)&cred, method); + Curl_sspi_free_identity(&cred); + } + } + else { + /* proceed with current user credentials */ + method = LDAP_AUTH_NEGOTIATE; + rc = ldap_bind_s(server, NULL, NULL, method); + } + return rc; +} +#endif /* #if defined(USE_WINDOWS_SSPI) */ + +static int ldap_win_bind(struct connectdata *conn, LDAP *server, + const char *user, const char *passwd) +{ + int rc = LDAP_INVALID_CREDENTIALS; + ULONG method = LDAP_AUTH_SIMPLE; + + PTCHAR inuser = NULL; + PTCHAR inpass = NULL; + + if(user && passwd && (conn->data->set.httpauth & CURLAUTH_BASIC)) { + inuser = Curl_convert_UTF8_to_tchar((char *) user); + inpass = Curl_convert_UTF8_to_tchar((char *) passwd); + + rc = ldap_bind_s(server, inuser, inpass, method); + + Curl_unicodefree(inuser); + Curl_unicodefree(inpass); + } +#if defined(USE_WINDOWS_SSPI) + else { + rc = ldap_win_bind_auth(server, user, passwd, conn->data->set.httpauth); + } +#endif + + return rc; +} +#endif /* #if defined(USE_WIN32_LDAP) */ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) { @@ -202,13 +277,11 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) #endif #if defined(USE_WIN32_LDAP) TCHAR *host = NULL; - TCHAR *user = NULL; - TCHAR *passwd = NULL; #else char *host = NULL; +#endif char *user = NULL; char *passwd = NULL; -#endif *done = TRUE; /* unconditionally */ infof(data, "LDAP local: LDAP Vendor = %s ; LDAP Version = %d\n", @@ -239,24 +312,14 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) goto quit; } - - if(conn->bits.user_passwd) { - user = Curl_convert_UTF8_to_tchar(conn->user); - passwd = Curl_convert_UTF8_to_tchar(conn->passwd); - if(!user || !passwd) { - result = CURLE_OUT_OF_MEMORY; - - goto quit; - } - } #else host = conn->host.name; +#endif if(conn->bits.user_passwd) { user = conn->user; passwd = conn->passwd; } -#endif #ifdef LDAP_OPT_NETWORK_TIMEOUT ldap_set_option(NULL, LDAP_OPT_NETWORK_TIMEOUT, &ldap_timeout); @@ -402,11 +465,19 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) ldap_set_option(server, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto); #endif +#ifdef USE_WIN32_LDAP + rc = ldap_win_bind(conn, server, user, passwd); +#else rc = ldap_simple_bind_s(server, user, passwd); +#endif if(!ldap_ssl && rc != 0) { ldap_proto = LDAP_VERSION2; ldap_set_option(server, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto); +#ifdef USE_WIN32_LDAP + rc = ldap_win_bind(conn, server, user, passwd); +#else rc = ldap_simple_bind_s(server, user, passwd); +#endif } if(rc != 0) { failf(data, "LDAP local: ldap_simple_bind_s %s", ldap_err2string(rc)); @@ -669,8 +740,6 @@ quit: #endif /* HAVE_LDAP_SSL && CURL_HAS_NOVELL_LDAPSDK */ #if defined(USE_WIN32_LDAP) - Curl_unicodefree(passwd); - Curl_unicodefree(user); Curl_unicodefree(host); #endif diff --git a/lib/llist.c b/lib/llist.c index b8836bb..4bb0a51 100644 --- a/lib/llist.c +++ b/lib/llist.c @@ -49,18 +49,15 @@ Curl_llist_init(struct curl_llist *l, curl_llist_dtor dtor) * entry is NULL and the list already has elements, the new one will be * inserted first in the list. * - * Returns: 1 on success and 0 on failure. + * The 'ne' argument should be a pointer into the object to store. * * @unittest: 1300 */ -int +void Curl_llist_insert_next(struct curl_llist *list, struct curl_llist_element *e, - const void *p) + const void *p, + struct curl_llist_element *ne) { - struct curl_llist_element *ne = malloc(sizeof(struct curl_llist_element)); - if(!ne) - return 0; - ne->ptr = (void *) p; if(list->size == 0) { list->head = ne; @@ -87,19 +84,18 @@ Curl_llist_insert_next(struct curl_llist *list, struct curl_llist_element *e, } ++list->size; - - return 1; } /* * @unittest: 1300 */ -int +void Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e, void *user) { + void *ptr; if(e == NULL || list->size == 0) - return 1; + return; if(e == list->head) { list->head = e->next; @@ -117,16 +113,17 @@ Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e, e->next->prev = e->prev; } - list->dtor(user, e->ptr); + ptr = e->ptr; e->ptr = NULL; e->prev = NULL; e->next = NULL; - free(e); --list->size; - return 1; + /* call the dtor() last for when it actually frees the 'e' memory itself */ + if(list->dtor) + list->dtor(user, ptr); } void @@ -147,13 +144,13 @@ Curl_llist_count(struct curl_llist *list) /* * @unittest: 1300 */ -int Curl_llist_move(struct curl_llist *list, struct curl_llist_element *e, - struct curl_llist *to_list, - struct curl_llist_element *to_e) +void Curl_llist_move(struct curl_llist *list, struct curl_llist_element *e, + struct curl_llist *to_list, + struct curl_llist_element *to_e) { /* Remove element from list */ if(e == NULL || list->size == 0) - return 0; + return; if(e == list->head) { list->head = e->next; @@ -193,6 +190,4 @@ int Curl_llist_move(struct curl_llist *list, struct curl_llist_element *e, } ++to_list->size; - - return 1; } diff --git a/lib/llist.h b/lib/llist.h index 47935ad..6b644b9 100644 --- a/lib/llist.h +++ b/lib/llist.h @@ -29,7 +29,6 @@ typedef void (*curl_llist_dtor)(void *, void *); struct curl_llist_element { void *ptr; - struct curl_llist_element *prev; struct curl_llist_element *next; }; @@ -37,21 +36,19 @@ struct curl_llist_element { struct curl_llist { struct curl_llist_element *head; struct curl_llist_element *tail; - curl_llist_dtor dtor; - size_t size; }; void Curl_llist_init(struct curl_llist *, curl_llist_dtor); -int Curl_llist_insert_next(struct curl_llist *, struct curl_llist_element *, - const void *); -int Curl_llist_remove(struct curl_llist *, struct curl_llist_element *, - void *); +void Curl_llist_insert_next(struct curl_llist *, struct curl_llist_element *, + const void *, struct curl_llist_element *node); +void Curl_llist_remove(struct curl_llist *, struct curl_llist_element *, + void *); size_t Curl_llist_count(struct curl_llist *); void Curl_llist_destroy(struct curl_llist *, void *); -int Curl_llist_move(struct curl_llist *, struct curl_llist_element *, - struct curl_llist *, struct curl_llist_element *); +void Curl_llist_move(struct curl_llist *, struct curl_llist_element *, + struct curl_llist *, struct curl_llist_element *); #endif /* HEADER_CURL_LLIST_H */ diff --git a/lib/md4.c b/lib/md4.c index 1bdc9f3..2bb7dcc 100644 --- a/lib/md4.c +++ b/lib/md4.c @@ -37,9 +37,10 @@ #include "curl_setup.h" -/* NSS and OS/400 crypto library do not provide the MD4 hash algorithm, so - * that we have a local implementation of it */ -#if defined(USE_NSS) || defined(USE_OS400CRYPTO) +/* The NSS, OS/400 and sometimes mbed TLS crypto libraries do not provide the + * MD4 hash algorithm, so we have a local implementation of it */ +#if defined(USE_NSS) || defined(USE_OS400CRYPTO) || \ + (defined(USE_MBEDTLS) && !defined(MBEDTLS_MD4_C)) #include "curl_md4.h" #include "warnless.h" @@ -89,7 +90,7 @@ static void MD4_Final(unsigned char *result, MD4_CTX *ctx); */ #if defined(__i386__) || defined(__x86_64__) || defined(__vax__) #define SET(n) \ - (*(MD4_u32plus *)&ptr[(n) * 4]) + (*(MD4_u32plus *)(void *)&ptr[(n) * 4]) #define GET(n) \ SET(n) #else @@ -302,4 +303,5 @@ void Curl_md4it(unsigned char *output, const unsigned char *input, size_t len) MD4_Update(&ctx, input, curlx_uztoui(len)); MD4_Final(output, &ctx); } -#endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) */ +#endif /* defined(USE_NSS) || defined(USE_OS400CRYPTO) || + (defined(USE_MBEDTLS) && !defined(MBEDTLS_MD4_C)) */ diff --git a/lib/md5.c b/lib/md5.c index f2dc16c..80301a1 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -260,7 +260,7 @@ static void MD5_Final(unsigned char *result, MD5_CTX *ctx); */ #if defined(__i386__) || defined(__x86_64__) || defined(__vax__) #define SET(n) \ - (*(MD5_u32plus *)&ptr[(n) * 4]) + (*(MD5_u32plus *)(void *)&ptr[(n) * 4]) #define GET(n) \ SET(n) #else diff --git a/lib/memdebug.c b/lib/memdebug.c index 32d2adf..2b8808a 100644 --- a/lib/memdebug.c +++ b/lib/memdebug.c @@ -35,10 +35,6 @@ #include "curl_memory.h" #include "memdebug.h" -#ifndef HAVE_ASSERT_H -# define assert(x) Curl_nop_stmt -#endif - /* * Until 2011-08-17 libcurl's Memory Tracking feature also performed * automatic malloc and free filling operations using 0xA5 and 0x13 @@ -167,7 +163,7 @@ void *curl_domalloc(size_t wantedsize, int line, const char *source) struct memdebug *mem; size_t size; - assert(wantedsize != 0); + DEBUGASSERT(wantedsize != 0); if(countcheck("malloc", line, source)) return NULL; @@ -196,8 +192,8 @@ void *curl_docalloc(size_t wanted_elements, size_t wanted_size, struct memdebug *mem; size_t size, user_size; - assert(wanted_elements != 0); - assert(wanted_size != 0); + DEBUGASSERT(wanted_elements != 0); + DEBUGASSERT(wanted_size != 0); if(countcheck("calloc", line, source)) return NULL; @@ -223,7 +219,7 @@ char *curl_dostrdup(const char *str, int line, const char *source) char *mem; size_t len; - assert(str != NULL); + DEBUGASSERT(str != NULL); if(countcheck("strdup", line, source)) return NULL; @@ -236,7 +232,7 @@ char *curl_dostrdup(const char *str, int line, const char *source) if(source) curl_memlog("MEM %s:%d strdup(%p) (%zu) = %p\n", - source, line, (void *)str, len, (void *)mem); + source, line, (const void *)str, len, (const void *)mem); return mem; } @@ -247,7 +243,7 @@ wchar_t *curl_dowcsdup(const wchar_t *str, int line, const char *source) wchar_t *mem; size_t wsiz, bsiz; - assert(str != NULL); + DEBUGASSERT(str != NULL); if(countcheck("wcsdup", line, source)) return NULL; @@ -276,7 +272,7 @@ void *curl_dorealloc(void *ptr, size_t wantedsize, size_t size = sizeof(struct memdebug)+wantedsize; - assert(wantedsize != 0); + DEBUGASSERT(wantedsize != 0); if(countcheck("realloc", line, source)) return NULL; @@ -445,7 +441,7 @@ int curl_fclose(FILE *file, int line, const char *source) { int res; - assert(file != NULL); + DEBUGASSERT(file != NULL); res=fclose(file); @@ -480,7 +476,7 @@ void curl_memlog(const char *format, ...) nchars = LOGLINE_BUFSIZE - 1; if(nchars > 0) - fwrite(buf, 1, nchars, logfile); + fwrite(buf, 1, (size_t)nchars, logfile); (Curl_cfree)(buf); } diff --git a/lib/mprintf.c b/lib/mprintf.c index 6b7d317..eb7ee0c 100644 --- a/lib/mprintf.c +++ b/lib/mprintf.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1999 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1999 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -42,10 +42,6 @@ /* The last #include file should be: */ #include "memdebug.h" -#ifndef SIZEOF_LONG_DOUBLE -#define SIZEOF_LONG_DOUBLE 0 -#endif - /* * If SIZEOF_SIZE_T has not been defined, default to the size of long. */ @@ -614,7 +610,7 @@ static int dprintf_formatf( int is_neg; /* Base of a number to be written. */ - long base; + unsigned long base; /* Integral values to be written. */ mp_uintmax_t num; @@ -955,9 +951,7 @@ static int dprintf_formatf( /* NOTE NOTE NOTE!! Not all sprintf implementations return number of output characters */ (sprintf)(work, formatbuf, p->data.dnum); -#ifdef CURLDEBUG - assert(strlen(work) <= sizeof(work)); -#endif + DEBUGASSERT(strlen(work) <= sizeof(work)); for(fptr=work; *fptr; fptr++) OUTCHAR(*fptr); } diff --git a/lib/multi.c b/lib/multi.c index b24ce19..c3a0d12 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -99,8 +99,6 @@ static const char * const statename[]={ }; #endif -static void multi_freetimeout(void *a, void *b); - /* function pointer called once when switching TO a state */ typedef void (*init_multistate_func)(struct Curl_easy *data); @@ -280,9 +278,8 @@ static int sh_init(struct curl_hash *hash, int hashsize) static CURLMcode multi_addmsg(struct Curl_multi *multi, struct Curl_message *msg) { - if(!Curl_llist_insert_next(&multi->msglist, multi->msglist.tail, msg)) - return CURLM_OUT_OF_MEMORY; - + Curl_llist_insert_next(&multi->msglist, multi->msglist.tail, msg, + &msg->list); return CURLM_OK; } @@ -370,7 +367,7 @@ CURLMcode curl_multi_add_handle(struct Curl_multi *multi, return CURLM_ADDED_ALREADY; /* Initialize timeout list for this handle */ - Curl_llist_init(&data->state.timeoutlist, multi_freetimeout); + Curl_llist_init(&data->state.timeoutlist, NULL); /* * No failure allowed in this function beyond this point. And no @@ -431,7 +428,7 @@ CURLMcode curl_multi_add_handle(struct Curl_multi *multi, sockets that time-out or have actions will be dealt with. Since this handle has no action yet, we make sure it times out to get things to happen. */ - Curl_expire(data, 0); + Curl_expire(data, 0, EXPIRE_RUN_NOW); /* increase the node-counter */ multi->num_easy++; @@ -1015,7 +1012,7 @@ CURLMcode curl_multi_wait(struct Curl_multi *multi, curlfds = nfds; /* number of internal file descriptors */ nfds += extra_nfds; /* add the externally provided ones */ - if(nfds || extra_nfds) { + if(nfds) { if(nfds > NUM_POLLS_ON_STACK) { ufds = malloc(nfds * sizeof(struct pollfd)); if(!ufds) @@ -1432,10 +1429,9 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, multistate(data, CURLM_STATE_CONNECT_PEND); /* add this handle to the list of connect-pending handles */ - if(!Curl_llist_insert_next(&multi->pending, multi->pending.tail, data)) - result = CURLE_OUT_OF_MEMORY; - else - result = CURLE_OK; + Curl_llist_insert_next(&multi->pending, multi->pending.tail, data, + &data->connect_queue); + result = CURLE_OK; break; } @@ -1719,20 +1715,18 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, else { /* Follow failed */ result = drc; - free(newurl); } } else { /* done didn't return OK or SEND_ERROR */ result = drc; - free(newurl); } } else { /* Have error handler disconnect conn if we can't retry */ stream_error = TRUE; - free(newurl); } + free(newurl); } else { /* failure detected */ @@ -1846,9 +1840,9 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, if(send_timeout_ms <= 0 && recv_timeout_ms <= 0) multistate(data, CURLM_STATE_PERFORM); else if(send_timeout_ms >= recv_timeout_ms) - Curl_expire_latest(data, send_timeout_ms); + Curl_expire(data, send_timeout_ms, EXPIRE_TOOFAST); else - Curl_expire_latest(data, recv_timeout_ms); + Curl_expire(data, recv_timeout_ms, EXPIRE_TOOFAST); } break; @@ -1879,9 +1873,9 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, if(send_timeout_ms > 0 || recv_timeout_ms > 0) { multistate(data, CURLM_STATE_TOOFAST); if(send_timeout_ms >= recv_timeout_ms) - Curl_expire_latest(data, send_timeout_ms); + Curl_expire(data, send_timeout_ms, EXPIRE_TOOFAST); else - Curl_expire_latest(data, recv_timeout_ms); + Curl_expire(data, recv_timeout_ms, EXPIRE_TOOFAST); break; } @@ -1942,7 +1936,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, /* expire the new receiving pipeline head */ if(data->easy_conn->recv_pipe.head) - Curl_expire_latest(data->easy_conn->recv_pipe.head->ptr, 0); + Curl_expire(data->easy_conn->recv_pipe.head->ptr, 0, EXPIRE_RUN_NOW); /* Check if we can move pending requests to send pipe */ Curl_multi_process_pending_handles(multi); @@ -1966,9 +1960,6 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, if(!result) { multistate(data, CURLM_STATE_CONNECT); rc = CURLM_CALL_MULTI_PERFORM; - newurl = NULL; /* handed over the memory ownership to - Curl_follow(), make sure we don't free() it - here */ } } } @@ -1982,9 +1973,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi, newurl = data->req.location; data->req.location = NULL; result = Curl_follow(data, newurl, FOLLOW_FAKE); - if(!result) - newurl = NULL; /* allocation was handed over Curl_follow() */ - else + if(result) stream_error = TRUE; } @@ -2483,8 +2472,6 @@ void Curl_multi_closed(struct connectdata *conn, curl_socket_t s) } } - - /* * add_next_timeout() * @@ -2504,13 +2491,16 @@ static CURLMcode add_next_timeout(struct timeval now, struct timeval *tv = &d->state.expiretime; struct curl_llist *list = &d->state.timeoutlist; struct curl_llist_element *e; + struct time_node *node = NULL; /* move over the timeout list for this specific handle and remove all timeouts that are now passed tense and store the next pending timeout in *tv */ for(e = list->head; e;) { struct curl_llist_element *n = e->next; - time_t diff = curlx_tvdiff(*(struct timeval *)e->ptr, now); + time_t diff; + node = (struct time_node *)e->ptr; + diff = curlx_tvdiff(node->time, now); if(diff <= 0) /* remove outdated entry */ Curl_llist_remove(list, e, NULL); @@ -2528,7 +2518,7 @@ static CURLMcode add_next_timeout(struct timeval now, } else { /* copy the first entry to 'tv' */ - memcpy(tv, e->ptr, sizeof(*tv)); + memcpy(tv, &node->time, sizeof(*tv)); /* remove first entry from list */ Curl_llist_remove(list, e, NULL); @@ -2854,17 +2844,23 @@ static int update_timer(struct Curl_multi *multi) } /* - * multi_freetimeout() + * multi_deltimeout() * - * Callback used by the llist system when a single timeout list entry is - * destroyed. + * Remove a given timestamp from the list of timeouts. */ -static void multi_freetimeout(void *user, void *entryptr) +static void +multi_deltimeout(struct Curl_easy *data, expire_id eid) { - (void)user; - - /* the entry was plain malloc()'ed */ - free(entryptr); + struct curl_llist_element *e; + struct curl_llist *timeoutlist = &data->state.timeoutlist; + /* find and remove the specific node from the list */ + for(e = timeoutlist->head; e; e = e->next) { + struct time_node *n = (struct time_node *)e->ptr; + if(n->eid == eid) { + Curl_llist_remove(timeoutlist, e, NULL); + return; + } + } } /* @@ -2875,25 +2871,28 @@ static void multi_freetimeout(void *user, void *entryptr) * */ static CURLMcode -multi_addtimeout(struct curl_llist *timeoutlist, - struct timeval *stamp) +multi_addtimeout(struct Curl_easy *data, + struct timeval *stamp, + expire_id eid) { struct curl_llist_element *e; - struct timeval *timedup; + struct time_node *node; struct curl_llist_element *prev = NULL; + size_t n; + struct curl_llist *timeoutlist = &data->state.timeoutlist; - timedup = malloc(sizeof(*timedup)); - if(!timedup) - return CURLM_OUT_OF_MEMORY; + node = &data->state.expires[eid]; - /* copy the timestamp */ - memcpy(timedup, stamp, sizeof(*timedup)); + /* copy the timestamp and id */ + memcpy(&node->time, stamp, sizeof(*stamp)); + node->eid = eid; /* also marks it as in use */ - if(Curl_llist_count(timeoutlist)) { + n = Curl_llist_count(timeoutlist); + if(n) { /* find the correct spot in the list */ for(e = timeoutlist->head; e; e = e->next) { - struct timeval *checktime = e->ptr; - time_t diff = curlx_tvdiff(*checktime, *timedup); + struct time_node *check = (struct time_node *)e->ptr; + time_t diff = curlx_tvdiff(check->time, node->time); if(diff > 0) break; prev = e; @@ -2903,11 +2902,7 @@ multi_addtimeout(struct curl_llist *timeoutlist, /* else this is the first timeout on the list */ - if(!Curl_llist_insert_next(timeoutlist, prev, timedup)) { - free(timedup); - return CURLM_OUT_OF_MEMORY; - } - + Curl_llist_insert_next(timeoutlist, prev, node, &node->list); return CURLM_OK; } @@ -2919,8 +2914,10 @@ multi_addtimeout(struct curl_llist *timeoutlist, * * The timeout will be added to a queue of timeouts if it defines a moment in * time that is later than the current head of queue. + * + * Expire replaces a former timeout using the same id if already set. */ -void Curl_expire(struct Curl_easy *data, time_t milli) +void Curl_expire(struct Curl_easy *data, time_t milli, expire_id id) { struct Curl_multi *multi = data->multi; struct timeval *nowp = &data->state.expiretime; @@ -2932,6 +2929,8 @@ void Curl_expire(struct Curl_easy *data, time_t milli) if(!multi) return; + DEBUGASSERT(id < EXPIRE_LAST); + set = Curl_tvnow(); set.tv_sec += (long)(milli/1000); set.tv_usec += (long)(milli%1000)*1000; @@ -2946,16 +2945,20 @@ void Curl_expire(struct Curl_easy *data, time_t milli) Compare if the new time is earlier, and only remove-old/add-new if it is. */ time_t diff = curlx_tvdiff(set, *nowp); + + /* remove the previous timer first, if there */ + multi_deltimeout(data, id); + if(diff > 0) { /* the new expire time was later so just add it to the queue and get out */ - multi_addtimeout(&data->state.timeoutlist, &set); + multi_addtimeout(data, &set, id); return; } /* the new time is newer than the presently set one, so add the current to the queue and update the head */ - multi_addtimeout(&data->state.timeoutlist, nowp); + multi_addtimeout(data, nowp, id); /* Since this is an updated time, we must remove the previous entry from the splay tree first and then re-add the new value */ @@ -2973,49 +2976,17 @@ void Curl_expire(struct Curl_easy *data, time_t milli) } /* - * Curl_expire_latest() + * Curl_expire_done() * - * This is like Curl_expire() but will only add a timeout node to the list of - * timers if there is no timeout that will expire before the given time. - * - * Use this function if the code logic risks calling this function many times - * or if there's no particular conditional wait in the code for this specific - * time-out period to expire. + * Removes the expire timer. Marks it as done. * */ -void Curl_expire_latest(struct Curl_easy *data, time_t milli) +void Curl_expire_done(struct Curl_easy *data, expire_id id) { - struct timeval *expire = &data->state.expiretime; - - struct timeval set; - - set = Curl_tvnow(); - set.tv_sec += (long)(milli / 1000); - set.tv_usec += (long)(milli % 1000) * 1000; - - if(set.tv_usec >= 1000000) { - set.tv_sec++; - set.tv_usec -= 1000000; - } - - if(expire->tv_sec || expire->tv_usec) { - /* This means that the struct is added as a node in the splay tree. - Compare if the new time is earlier, and only remove-old/add-new if it - is. */ - time_t diff = curlx_tvdiff(set, *expire); - if((diff > 0) && (diff < milli)) { - /* if the new expire time is later than the top time, skip it, but not - if the diff is larger than the new offset since then the previous - time is already expired! */ - return; - } - } - - /* Just add the timeout like normal */ - Curl_expire(data, milli); + /* remove the timer, if there */ + multi_deltimeout(data, id); } - /* * Curl_expire_clear() * @@ -3044,8 +3015,9 @@ void Curl_expire_clear(struct Curl_easy *data) infof(data, "Internal error clearing splay node = %d\n", rc); /* flush the timeout list too */ - while(list->size > 0) + while(list->size > 0) { Curl_llist_remove(list, list->tail, NULL); + } #ifdef DEBUGBUILD infof(data, "Expire cleared\n"); @@ -3118,7 +3090,7 @@ void Curl_multi_process_pending_handles(struct Curl_multi *multi) Curl_llist_remove(&multi->pending, e, NULL); /* Make sure that the handle will be processed soonish. */ - Curl_expire_latest(data, 0); + Curl_expire(data, 0, EXPIRE_RUN_NOW); } e = next; /* operate on next handle */ diff --git a/lib/multihandle.h b/lib/multihandle.h index 915b857..e6ffbf5 100644 --- a/lib/multihandle.h +++ b/lib/multihandle.h @@ -25,6 +25,7 @@ #include "conncache.h" struct Curl_message { + struct curl_llist_element list; /* the 'CURLMsg' is the part that is visible to the external user */ struct CURLMsg extmsg; }; diff --git a/lib/multiif.h b/lib/multiif.h index e5de1fc..a877571 100644 --- a/lib/multiif.h +++ b/lib/multiif.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -25,9 +25,10 @@ /* * Prototypes for library-wide functions provided by multi.c */ -void Curl_expire(struct Curl_easy *data, time_t milli); + +void Curl_expire(struct Curl_easy *data, time_t milli, expire_id); void Curl_expire_clear(struct Curl_easy *data); -void Curl_expire_latest(struct Curl_easy *data, time_t milli); +void Curl_expire_done(struct Curl_easy *data, expire_id id); bool Curl_pipeline_wanted(const struct Curl_multi* multi, int bits); void Curl_multi_handlePipeBreak(struct Curl_easy *data); diff --git a/lib/pingpong.c b/lib/pingpong.c index b833fcd..5ed79b7 100644 --- a/lib/pingpong.c +++ b/lib/pingpong.c @@ -286,7 +286,8 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, /* number of bytes in the current line, so far */ perline = (ssize_t)(ptr-pp->linestart_resp); - while((pp->nread_respnread_resp < (size_t)data->set.buffer_size) && + (keepon && !result)) { if(pp->cache) { /* we had data in the "cache", copy that instead of doing an actual @@ -296,7 +297,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, * it would have been populated with something of size int to begin * with, even though its datatype may be larger than an int. */ - DEBUGASSERT((ptr+pp->cache_size) <= (buf+BUFSIZE+1)); + DEBUGASSERT((ptr+pp->cache_size) <= (buf+data->set.buffer_size+1)); memcpy(ptr, pp->cache, pp->cache_size); gotbytes = (ssize_t)pp->cache_size; free(pp->cache); /* free the cache */ @@ -308,8 +309,10 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, enum protection_level prot = conn->data_prot; conn->data_prot = PROT_CLEAR; #endif - DEBUGASSERT((ptr+BUFSIZE-pp->nread_resp) <= (buf+BUFSIZE+1)); - result = Curl_read(conn, sockfd, ptr, BUFSIZE-pp->nread_resp, + DEBUGASSERT((ptr + data->set.buffer_size - pp->nread_resp) <= + (buf + data->set.buffer_size + 1)); + result = Curl_read(conn, sockfd, ptr, + data->set.buffer_size - pp->nread_resp, &gotbytes); #ifdef HAVE_GSSAPI DEBUGASSERT(prot > PROT_NONE && prot < PROT_LAST); @@ -402,7 +405,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, } else if(keepon) { - if((perline == gotbytes) && (gotbytes > BUFSIZE/2)) { + if((perline == gotbytes) && (gotbytes > data->set.buffer_size/2)) { /* We got an excessive line without newlines and we need to deal with it. We keep the first bytes of the line then we throw away the rest. */ @@ -414,7 +417,7 @@ CURLcode Curl_pp_readresp(curl_socket_t sockfd, interested in the first piece */ clipamount = 40; } - else if(pp->nread_resp > BUFSIZE/2) { + else if(pp->nread_resp > (size_t)data->set.buffer_size/2) { /* We got a large chunk of data and there's potentially still trailing data to take care of, so we put any such part in the "cache", clear the buffer to make space and restart. */ diff --git a/lib/pipeline.c b/lib/pipeline.c index 4a14fdd..b8d2037 100644 --- a/lib/pipeline.c +++ b/lib/pipeline.c @@ -38,16 +38,15 @@ #include "memdebug.h" struct site_blacklist_entry { - char *hostname; + struct curl_llist_element list; unsigned short port; + char hostname[1]; }; static void site_blacklist_llist_dtor(void *user, void *element) { struct site_blacklist_entry *entry = element; (void)user; - - Curl_safefree(entry->hostname); free(entry); } @@ -94,8 +93,8 @@ bool Curl_pipeline_penalized(struct Curl_easy *data, static CURLcode addHandleToPipeline(struct Curl_easy *data, struct curl_llist *pipeline) { - if(!Curl_llist_insert_next(pipeline, pipeline->tail, data)) - return CURLE_OUT_OF_MEMORY; + Curl_llist_insert_next(pipeline, pipeline->tail, data, + &data->pipeline_queue); return CURLE_OK; } @@ -114,7 +113,7 @@ CURLcode Curl_add_handle_to_pipeline(struct Curl_easy *handle, if(pipeline == &conn->send_pipe && sendhead != conn->send_pipe.head) { /* this is a new one as head, expire it */ Curl_pipeline_leave_write(conn); /* not in use yet */ - Curl_expire(conn->send_pipe.head->ptr, 0); + Curl_expire(conn->send_pipe.head->ptr, 0, EXPIRE_RUN_NOW); } #if 0 /* enable for pipeline debugging */ @@ -149,7 +148,7 @@ void Curl_move_handle_from_send_to_recv_pipe(struct Curl_easy *handle, infof(conn->data, "%p is at send pipe head B!\n", (void *)conn->send_pipe.head->ptr); #endif - Curl_expire(conn->send_pipe.head->ptr, 0); + Curl_expire(conn->send_pipe.head->ptr, 0, EXPIRE_RUN_NOW); } /* The receiver's list is not really interesting here since either this @@ -202,24 +201,17 @@ CURLMcode Curl_pipeline_set_site_blacklist(char **sites, /* Parse the URLs and populate the list */ while(*sites) { - char *hostname; char *port; struct site_blacklist_entry *entry; - hostname = strdup(*sites); - if(!hostname) { - Curl_llist_destroy(list, NULL); - return CURLM_OUT_OF_MEMORY; - } - - entry = malloc(sizeof(struct site_blacklist_entry)); + entry = malloc(sizeof(struct site_blacklist_entry) + strlen(*sites)); if(!entry) { - free(hostname); Curl_llist_destroy(list, NULL); return CURLM_OUT_OF_MEMORY; } + strcpy(entry->hostname, *sites); - port = strchr(hostname, ':'); + port = strchr(entry->hostname, ':'); if(port) { *port = '\0'; port++; @@ -230,14 +222,7 @@ CURLMcode Curl_pipeline_set_site_blacklist(char **sites, entry->port = 80; } - entry->hostname = hostname; - - if(!Curl_llist_insert_next(list, list->tail, entry)) { - site_blacklist_llist_dtor(NULL, entry); - Curl_llist_destroy(list, NULL); - return CURLM_OUT_OF_MEMORY; - } - + Curl_llist_insert_next(list, list->tail, entry, &entry->list); sites++; } } @@ -274,6 +259,11 @@ bool Curl_pipeline_server_blacklisted(struct Curl_easy *handle, return FALSE; } +struct blacklist_node { + struct curl_llist_element list; + char server_name[1]; +}; + CURLMcode Curl_pipeline_set_server_blacklist(char **servers, struct curl_llist *list) { @@ -286,20 +276,18 @@ CURLMcode Curl_pipeline_set_server_blacklist(char **servers, /* Parse the URLs and populate the list */ while(*servers) { - char *server_name; - - server_name = strdup(*servers); - if(!server_name) { - Curl_llist_destroy(list, NULL); - return CURLM_OUT_OF_MEMORY; - } + struct blacklist_node *n; + size_t len = strlen(*servers); - if(!Curl_llist_insert_next(list, list->tail, server_name)) { + n = malloc(sizeof(struct blacklist_node) + len); + if(!n) { Curl_llist_destroy(list, NULL); - Curl_safefree(server_name); return CURLM_OUT_OF_MEMORY; } + strcpy(n->server_name, *servers); + Curl_llist_insert_next(list, list->tail, n->server_name, + &n->list); servers++; } } diff --git a/lib/rand.c b/lib/rand.c index 8a14084..b6f40ac 100644 --- a/lib/rand.c +++ b/lib/rand.c @@ -47,10 +47,12 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) char *force_entropy = getenv("CURL_ENTROPY"); if(force_entropy) { if(!seeded) { + unsigned int seed = 0; size_t elen = strlen(force_entropy); - size_t clen = sizeof(randseed); + size_t clen = sizeof(seed); size_t min = elen < clen ? elen : clen; - memcpy((char *)&randseed, force_entropy, min); + memcpy((char *)&seed, force_entropy, min); + randseed = ntohl(seed); seeded = TRUE; } else @@ -115,18 +117,63 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) * */ -CURLcode Curl_rand(struct Curl_easy *data, unsigned int *rndptr, - unsigned int num) +CURLcode Curl_rand(struct Curl_easy *data, unsigned char *rnd, size_t num) { CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT; - unsigned int i; - assert(num > 0); + DEBUGASSERT(num > 0); - for(i = 0; i < num; i++) { - result = randit(data, rndptr++); + while(num) { + unsigned int r; + size_t left = num < sizeof(unsigned int) ? num : sizeof(unsigned int); + + result = randit(data, &r); if(result) return result; + + while(left) { + *rnd++ = (unsigned char)(r & 0xFF); + r >>= 8; + --num; + --left; + } } + + return result; +} + +/* + * Curl_rand_hex() fills the 'rnd' buffer with a given 'num' size with random + * hexadecimal digits PLUS a zero terminating byte. It must be an odd number + * size. + */ + +CURLcode Curl_rand_hex(struct Curl_easy *data, unsigned char *rnd, + size_t num) +{ + CURLcode result = CURLE_BAD_FUNCTION_ARGUMENT; + const char *hex = "0123456789abcdef"; + unsigned char buffer[128]; + unsigned char *bufp = buffer; + DEBUGASSERT(num > 1); + + if((num/2 >= sizeof(buffer)) || !(num&1)) + /* make sure it fits in the local buffer and that it is an odd number! */ + return CURLE_BAD_FUNCTION_ARGUMENT; + + num--; /* save one for zero termination */ + + result = Curl_rand(data, buffer, num/2); + if(result) + return result; + + while(num) { + *rnd++ = hex[(*bufp & 0xF0)>>4]; + *rnd++ = hex[*bufp & 0x0F]; + bufp++; + num -= 2; + } + *rnd = 0; + return result; } diff --git a/lib/rand.h b/lib/rand.h index 0f89861..c6fae35 100644 --- a/lib/rand.h +++ b/lib/rand.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -23,7 +23,7 @@ ***************************************************************************/ /* - * Curl_rand() stores 'num' number of random unsigned integers in the buffer + * Curl_rand() stores 'num' number of random unsigned characters in the buffer * 'rnd' points to. * * If libcurl is built without TLS support or with a TLS backend that lacks a @@ -37,7 +37,11 @@ * easy handle! * */ -CURLcode Curl_rand(struct Curl_easy *data, unsigned int *rnd, - unsigned int num); +CURLcode Curl_rand(struct Curl_easy *data, unsigned char *rnd, size_t num); + +/* Same as above but outputs only random lowercase hex characters. + Does NOT terminate.*/ +CURLcode Curl_rand_hex(struct Curl_easy *data, unsigned char *rnd, + size_t num); #endif /* HEADER_CURL_RAND_H */ diff --git a/lib/sendf.c b/lib/sendf.c index 84b6b4b..595c361 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -149,7 +149,7 @@ static void pre_receive_plain(struct connectdata *conn, int num) /* Have some incoming data */ if(!psnd->buffer) { /* Use buffer double default size for intermediate buffer */ - psnd->allocated_size = 2 * BUFSIZE; + psnd->allocated_size = 2 * conn->data->set.buffer_size; psnd->buffer = malloc(psnd->allocated_size); psnd->recv_size = 0; psnd->recv_processed = 0; @@ -243,21 +243,20 @@ void Curl_failf(struct Curl_easy *data, const char *fmt, ...) { va_list ap; size_t len; + char error[CURL_ERROR_SIZE + 2]; va_start(ap, fmt); - vsnprintf(data->state.buffer, BUFSIZE, fmt, ap); + vsnprintf(error, CURL_ERROR_SIZE, fmt, ap); + len = strlen(error); if(data->set.errorbuffer && !data->state.errorbuf) { - snprintf(data->set.errorbuffer, CURL_ERROR_SIZE, "%s", data->state.buffer); + strcpy(data->set.errorbuffer, error); data->state.errorbuf = TRUE; /* wrote error string */ } if(data->set.verbose) { - len = strlen(data->state.buffer); - if(len < BUFSIZE - 1) { - data->state.buffer[len] = '\n'; - data->state.buffer[++len] = '\0'; - } - Curl_debug(data, CURLINFO_TEXT, data->state.buffer, len, NULL); + error[len] = '\n'; + error[++len] = '\0'; + Curl_debug(data, CURLINFO_TEXT, error, len, NULL); } va_end(ap); @@ -694,9 +693,10 @@ CURLcode Curl_read(struct connectdata *conn, /* connection data */ ssize_t nread = 0; size_t bytesfromsocket = 0; char *buffertofill = NULL; + struct Curl_easy *data = conn->data; /* if HTTP/1 pipelining is both wanted and possible */ - bool pipelining = Curl_pipeline_wanted(conn->data->multi, CURLPIPE_HTTP1) && + bool pipelining = Curl_pipeline_wanted(data->multi, CURLPIPE_HTTP1) && (conn->bundle->multiuse == BUNDLE_PIPELINING); /* Set 'num' to 0 or 1, depending on which socket that has been sent here. @@ -722,13 +722,11 @@ CURLcode Curl_read(struct connectdata *conn, /* connection data */ } /* If we come here, it means that there is no data to read from the buffer, * so we read from the socket */ - bytesfromsocket = CURLMIN(sizerequested, BUFSIZE * sizeof(char)); + bytesfromsocket = CURLMIN(sizerequested, MASTERBUF_SIZE); buffertofill = conn->master_buffer; } else { - bytesfromsocket = CURLMIN((long)sizerequested, - conn->data->set.buffer_size ? - conn->data->set.buffer_size : BUFSIZE); + bytesfromsocket = CURLMIN(sizerequested, (size_t)data->set.buffer_size); buffertofill = buf; } @@ -753,21 +751,19 @@ static int showit(struct Curl_easy *data, curl_infotype type, { static const char s_infotype[CURLINFO_END][3] = { "* ", "< ", "> ", "{ ", "} ", "{ ", "} " }; + int rc = 0; #ifdef CURL_DOES_CONVERSIONS - char buf[BUFSIZE+1]; + char *buf = NULL; size_t conv_size = 0; switch(type) { case CURLINFO_HEADER_OUT: - /* assume output headers are ASCII */ - /* copy the data into my buffer so the original is unchanged */ - if(size > BUFSIZE) { - size = BUFSIZE; /* truncate if necessary */ - buf[BUFSIZE] = '\0'; - } + buf = Curl_memdup(ptr, size); + if(!buf) + return 1; conv_size = size; - memcpy(buf, ptr, size); + /* Special processing is needed for this block if it * contains both headers and data (separated by CRLFCRLF). * We want to convert just the headers, leaving the data as-is. @@ -795,26 +791,29 @@ static int showit(struct Curl_easy *data, curl_infotype type, #endif /* CURL_DOES_CONVERSIONS */ if(data->set.fdebug) - return (*data->set.fdebug)(data, type, ptr, size, - data->set.debugdata); - - switch(type) { - case CURLINFO_TEXT: - case CURLINFO_HEADER_OUT: - case CURLINFO_HEADER_IN: - fwrite(s_infotype[type], 2, 1, data->set.err); - fwrite(ptr, size, 1, data->set.err); + rc = (*data->set.fdebug)(data, type, ptr, size, data->set.debugdata); + else { + switch(type) { + case CURLINFO_TEXT: + case CURLINFO_HEADER_OUT: + case CURLINFO_HEADER_IN: + fwrite(s_infotype[type], 2, 1, data->set.err); + fwrite(ptr, size, 1, data->set.err); #ifdef CURL_DOES_CONVERSIONS - if(size != conv_size) { - /* we had untranslated data so we need an explicit newline */ - fwrite("\n", 1, 1, data->set.err); - } + if(size != conv_size) { + /* we had untranslated data so we need an explicit newline */ + fwrite("\n", 1, 1, data->set.err); + } #endif - break; - default: /* nada */ - break; + break; + default: /* nada */ + break; + } } - return 0; +#ifdef CURL_DOES_CONVERSIONS + free(buf); +#endif + return rc; } int Curl_debug(struct Curl_easy *data, curl_infotype type, diff --git a/lib/smb.c b/lib/smb.c index 51b3434..5b1ffa9 100644 --- a/lib/smb.c +++ b/lib/smb.c @@ -607,7 +607,7 @@ static CURLcode smb_send_and_recv(struct connectdata *conn, void **msg) /* Check if there is data in the transfer buffer */ if(!smbc->send_size && smbc->upload_size) { - int nread = smbc->upload_size > BUFSIZE ? BUFSIZE : + int nread = smbc->upload_size > UPLOAD_BUFSIZE ? UPLOAD_BUFSIZE : (int) smbc->upload_size; conn->data->req.upload_fromhere = conn->data->state.uploadbuffer; result = Curl_fillreadbuffer(conn, nread, &nread); diff --git a/lib/smtp.c b/lib/smtp.c index adc346a..fe064cb 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -1591,7 +1591,7 @@ CURLcode Curl_smtp_escape_eob(struct connectdata *conn, const ssize_t nread) if(!scratch || data->set.crlf) { oldscratch = scratch; - scratch = newscratch = malloc(2 * BUFSIZE); + scratch = newscratch = malloc(2 * data->set.buffer_size); if(!newscratch) { failf(data, "Failed to alloc scratch buffer!"); diff --git a/lib/speedcheck.c b/lib/speedcheck.c index f0daf82..8addedd 100644 --- a/lib/speedcheck.c +++ b/lib/speedcheck.c @@ -67,7 +67,7 @@ CURLcode Curl_speedcheck(struct Curl_easy *data, if(data->set.low_speed_limit) /* if low speed limit is enabled, set the expire timer to make this connection's speed get checked again in a second */ - Curl_expire_latest(data, 1000); + Curl_expire(data, 1000, EXPIRE_SPEEDCHECK); return CURLE_OK; } diff --git a/lib/ssh.c b/lib/ssh.c index 72fa06a..00aeca9 100644 --- a/lib/ssh.c +++ b/lib/ssh.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -113,6 +113,7 @@ libssh2_sftp_symlink_ex((s), (p), curlx_uztoui(strlen(p)), \ (t), (m), LIBSSH2_SFTP_REALPATH) + /* Local functions: */ static const char *sftp_libssh2_strerror(int err); static LIBSSH2_ALLOC_FUNC(my_libssh2_malloc); @@ -1837,8 +1838,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) /* seekerr == CURL_SEEKFUNC_CANTSEEK (can't seek to offset) */ do { size_t readthisamountnow = - (data->state.resume_from - passed > CURL_OFF_T_C(BUFSIZE)) ? - BUFSIZE : curlx_sotouz(data->state.resume_from - passed); + (data->state.resume_from - passed > data->set.buffer_size) ? + (size_t)data->set.buffer_size : + curlx_sotouz(data->state.resume_from - passed); size_t actuallyread = data->state.fread_func(data->state.buffer, 1, @@ -1890,7 +1892,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block) /* since we don't really wait for anything at this point, we want the state machine to move on as soon as possible so we set a very short timeout here */ - Curl_expire(data, 0); + Curl_expire(data, 0, EXPIRE_RUN_NOW); state(conn, SSH_STOP); } @@ -2814,7 +2816,7 @@ static CURLcode ssh_multi_statemach(struct connectdata *conn, bool *done) } static CURLcode ssh_block_statemach(struct connectdata *conn, - bool duringconnect) + bool disconnect) { struct ssh_conn *sshc = &conn->proto.sshc; CURLcode result = CURLE_OK; @@ -2822,24 +2824,26 @@ static CURLcode ssh_block_statemach(struct connectdata *conn, while((sshc->state != SSH_STOP) && !result) { bool block; - time_t left; + time_t left = 1000; struct timeval now = Curl_tvnow(); result = ssh_statemach_act(conn, &block); if(result) break; - if(Curl_pgrsUpdate(conn)) - return CURLE_ABORTED_BY_CALLBACK; + if(!disconnect) { + if(Curl_pgrsUpdate(conn)) + return CURLE_ABORTED_BY_CALLBACK; - result = Curl_speedcheck(data, now); - if(result) - break; + result = Curl_speedcheck(data, now); + if(result) + break; - left = Curl_timeleft(data, NULL, duringconnect); - if(left < 0) { - failf(data, "Operation timed out"); - return CURLE_OPERATION_TIMEDOUT; + left = Curl_timeleft(data, NULL, FALSE); + if(left < 0) { + failf(data, "Operation timed out"); + return CURLE_OPERATION_TIMEDOUT; + } } #ifdef HAVE_LIBSSH2_SESSION_BLOCK_DIRECTION @@ -3055,7 +3059,7 @@ static CURLcode scp_disconnect(struct connectdata *conn, bool dead_connection) state(conn, SSH_SESSION_DISCONNECT); - result = ssh_block_statemach(conn, FALSE); + result = ssh_block_statemach(conn, TRUE); } return result; @@ -3209,7 +3213,7 @@ static CURLcode sftp_disconnect(struct connectdata *conn, bool dead_connection) if(conn->proto.sshc.ssh_session) { /* only if there's a session still around to use! */ state(conn, SSH_SFTP_SHUTDOWN); - result = ssh_block_statemach(conn, FALSE); + result = ssh_block_statemach(conn, TRUE); } DEBUGF(infof(conn->data, "SSH DISCONNECT is done\n")); diff --git a/lib/telnet.c b/lib/telnet.c index 5cceed2..155d4b2 100644 --- a/lib/telnet.c +++ b/lib/telnet.c @@ -81,10 +81,12 @@ } WHILE_FALSE #define CURL_SB_GET(x) ((*x->subpointer++)&0xff) -#define CURL_SB_PEEK(x) ((*x->subpointer)&0xff) -#define CURL_SB_EOF(x) (x->subpointer >= x->subend) #define CURL_SB_LEN(x) (x->subend - x->subpointer) +/* For posterity: +#define CURL_SB_PEEK(x) ((*x->subpointer)&0xff) +#define CURL_SB_EOF(x) (x->subpointer >= x->subend) */ + #ifdef CURL_DISABLE_VERBOSE_STRINGS #define printoption(a,b,c,d) Curl_nop_stmt #endif @@ -1218,43 +1220,63 @@ CURLcode telrcv(struct connectdata *conn, } /* Escape and send a telnet data block */ -/* TODO: write large chunks of data instead of one byte at a time */ static CURLcode send_telnet_data(struct connectdata *conn, char *buffer, ssize_t nread) { - unsigned char outbuf[2]; - ssize_t bytes_written, total_written; - int out_count; + ssize_t escapes, i, j, outlen; + unsigned char *outbuf = NULL; CURLcode result = CURLE_OK; + ssize_t bytes_written, total_written; - while(!result && nread--) { - outbuf[0] = *buffer++; - out_count = 1; - if(outbuf[0] == CURL_IAC) - outbuf[out_count++] = CURL_IAC; - - total_written = 0; - do { - /* Make sure socket is writable to avoid EWOULDBLOCK condition */ - struct pollfd pfd[1]; - pfd[0].fd = conn->sock[FIRSTSOCKET]; - pfd[0].events = POLLOUT; - switch(Curl_poll(pfd, 1, -1)) { - case -1: /* error, abort writing */ - case 0: /* timeout (will never happen) */ - result = CURLE_SEND_ERROR; - break; - default: /* write! */ - bytes_written = 0; - result = Curl_write(conn, conn->sock[FIRSTSOCKET], - outbuf+total_written, out_count-total_written, - &bytes_written); - total_written += bytes_written; - break; - } - /* handle partial write */ - } while(!result && total_written < out_count); + /* Determine size of new buffer after escaping */ + escapes = 0; + for(i = 0; i < nread; i++) + if((unsigned char)buffer[i] == CURL_IAC) + escapes++; + outlen = nread + escapes; + + if(outlen == nread) + outbuf = (unsigned char *)buffer; + else { + outbuf = malloc(nread + escapes + 1); + if(!outbuf) + return CURLE_OUT_OF_MEMORY; + + j = 0; + for(i = 0; i < nread; i++) { + outbuf[j++] = buffer[i]; + if((unsigned char)buffer[i] == CURL_IAC) + outbuf[j++] = CURL_IAC; + } + outbuf[j] = '\0'; } + + total_written = 0; + while(!result && total_written < outlen) { + /* Make sure socket is writable to avoid EWOULDBLOCK condition */ + struct pollfd pfd[1]; + pfd[0].fd = conn->sock[FIRSTSOCKET]; + pfd[0].events = POLLOUT; + switch(Curl_poll(pfd, 1, -1)) { + case -1: /* error, abort writing */ + case 0: /* timeout (will never happen) */ + result = CURLE_SEND_ERROR; + break; + default: /* write! */ + bytes_written = 0; + result = Curl_write(conn, conn->sock[FIRSTSOCKET], + outbuf + total_written, + outlen - total_written, + &bytes_written); + total_written += bytes_written; + break; + } + } + + /* Free malloc copy if escaped */ + if(outbuf != (unsigned char *)buffer) + free(outbuf); + return result; } @@ -1414,7 +1436,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) /* Keep on listening and act on events */ while(keepon) { - const DWORD buf_size = (DWORD)CURL_BUFSIZE(data->set.buffer_size); + const DWORD buf_size = (DWORD)data->set.buffer_size; waitret = WaitForMultipleObjects(obj_count, objs, FALSE, wait_timeout); switch(waitret) { case WAIT_TIMEOUT: @@ -1423,7 +1445,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) if(data->set.is_fread_set) { size_t n; /* read from user-supplied method */ - n = data->state.fread_func(buf, 1, BUFSIZE - 1, data->state.in); + n = data->state.fread_func(buf, 1, buf_size, data->state.in); if(n == CURL_READFUNC_ABORT) { keepon = FALSE; result = CURLE_READ_ERROR; @@ -1498,7 +1520,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) } if(events.lNetworkEvents & FD_READ) { /* read data from network */ - result = Curl_read(conn, sockfd, buf, BUFSIZE - 1, &nread); + result = Curl_read(conn, sockfd, buf, data->set.buffer_size, &nread); /* read would've blocked. Loop again */ if(result == CURLE_AGAIN) break; @@ -1587,7 +1609,7 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) default: /* read! */ if(pfd[0].revents & POLLIN) { /* read data from network */ - result = Curl_read(conn, sockfd, buf, BUFSIZE - 1, &nread); + result = Curl_read(conn, sockfd, buf, data->set.buffer_size, &nread); /* read would've blocked. Loop again */ if(result == CURLE_AGAIN) break; @@ -1623,12 +1645,12 @@ static CURLcode telnet_do(struct connectdata *conn, bool *done) nread = 0; if(poll_cnt == 2) { if(pfd[1].revents & POLLIN) { /* read from in file */ - nread = read(pfd[1].fd, buf, BUFSIZE - 1); + nread = read(pfd[1].fd, buf, data->set.buffer_size); } } else { /* read from user-supplied method */ - nread = (int)data->state.fread_func(buf, 1, BUFSIZE - 1, + nread = (int)data->state.fread_func(buf, 1, data->set.buffer_size, data->state.in); if(nread == CURL_READFUNC_ABORT) { keepon = FALSE; diff --git a/lib/tftp.c b/lib/tftp.c index 098b1bb..b2b3efe 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -1119,7 +1119,8 @@ static CURLcode tftp_receive_packet(struct connectdata *conn) } else { /* The event is given by the TFTP packet time */ - state->event = (tftp_event_t)getrpacketevent(&state->rpacket); + unsigned short event = getrpacketevent(&state->rpacket); + state->event = (tftp_event_t)event; switch(state->event) { case TFTP_EVENT_DATA: @@ -1138,9 +1139,12 @@ static CURLcode tftp_receive_packet(struct connectdata *conn) } break; case TFTP_EVENT_ERROR: - state->error = (tftp_error_t)getrpacketblock(&state->rpacket); + { + unsigned short error = getrpacketblock(&state->rpacket); + state->error = (tftp_error_t)error; infof(data, "%s\n", (const char *)state->rpacket.data+4); break; + } case TFTP_EVENT_ACK: break; case TFTP_EVENT_OACK: diff --git a/lib/timeval.c b/lib/timeval.c index 0d6036b..bed44c5 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -141,9 +141,3 @@ double curlx_tvdiff_secs(struct timeval newer, struct timeval older) (double)(newer.tv_usec-older.tv_usec)/1000000.0; return (double)(newer.tv_usec-older.tv_usec)/1000000.0; } - -/* return the number of seconds in the given input timeval struct */ -time_t Curl_tvlong(struct timeval t1) -{ - return t1.tv_sec; -} diff --git a/lib/timeval.h b/lib/timeval.h index 09f8b3a..3396935 100644 --- a/lib/timeval.h +++ b/lib/timeval.h @@ -46,8 +46,6 @@ time_t curlx_tvdiff(struct timeval t1, struct timeval t2); */ double curlx_tvdiff_secs(struct timeval t1, struct timeval t2); -time_t Curl_tvlong(struct timeval t1); - /* These two defines below exist to provide the older API for library internals only. */ #define Curl_tvnow() curlx_tvnow() diff --git a/lib/transfer.c b/lib/transfer.c index 1f6d26d..43e8f64 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -405,8 +405,7 @@ static CURLcode readwrite_data(struct Curl_easy *data, /* This is where we loop until we have read everything there is to read or we get a CURLE_AGAIN */ do { - size_t buffersize = data->set.buffer_size? - data->set.buffer_size : BUFSIZE; + size_t buffersize = data->set.buffer_size; size_t bytestoread = buffersize; if( @@ -681,8 +680,6 @@ static CURLcode readwrite_data(struct Curl_easy *data, excess = (size_t)(k->bytecount + nread - k->maxdownload); if(excess > 0 && !k->ignorebody) { if(Curl_pipeline_wanted(conn->data->multi, CURLPIPE_HTTP1)) { - /* The 'excess' amount below can't be more than BUFSIZE which - always will fit in a size_t */ infof(data, "Rewinding stream by : %zu" " bytes on url %s (size = %" CURL_FORMAT_CURL_OFF_T @@ -853,7 +850,6 @@ static CURLcode done_sending(struct connectdata *conn, */ static CURLcode readwrite_upload(struct Curl_easy *data, struct connectdata *conn, - struct SingleRequest *k, int *didwhat) { ssize_t i, si; @@ -861,6 +857,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, CURLcode result; ssize_t nread; /* number of bytes read */ bool sending_http_headers = FALSE; + struct SingleRequest *k = &data->req; if((k->bytecount == 0) && (k->writebytecount == 0)) Curl_pgrsTime(data, TIMER_STARTTRANSFER); @@ -871,15 +868,15 @@ static CURLcode readwrite_upload(struct Curl_easy *data, /* only read more data if there's no upload data already present in the upload buffer */ - if(0 == data->req.upload_present) { + if(0 == k->upload_present) { /* init the "upload from here" pointer */ - data->req.upload_fromhere = k->uploadbuf; + k->upload_fromhere = data->state.uploadbuffer; if(!k->upload_done) { /* HTTP pollution, this should be written nicer to become more protocol agnostic. */ int fillcount; - struct HTTP *http = data->req.protop; + struct HTTP *http = k->protop; if((k->exp100 == EXP100_SENDING_REQUEST) && (http->sending == HTTPSEND_BODY)) { @@ -892,7 +889,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, *didwhat &= ~KEEP_SEND; /* we didn't write anything actually */ /* set a timeout for the multi interface */ - Curl_expire(data, data->set.expect_100_timeout); + Curl_expire(data, data->set.expect_100_timeout, EXPIRE_100_TIMEOUT); break; } @@ -905,7 +902,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, sending_http_headers = FALSE; } - result = Curl_fillreadbuffer(conn, BUFSIZE, &fillcount); + result = Curl_fillreadbuffer(conn, UPLOAD_BUFSIZE, &fillcount); if(result) return result; @@ -926,7 +923,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, } /* store number of bytes available for upload */ - data->req.upload_present = nread; + k->upload_present = nread; /* convert LF to CRLF if so asked */ if((!sending_http_headers) && ( @@ -937,7 +934,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, (data->set.crlf))) { /* Do we need to allocate a scratch buffer? */ if(!data->state.scratch) { - data->state.scratch = malloc(2 * BUFSIZE); + data->state.scratch = malloc(2 * data->set.buffer_size); if(!data->state.scratch) { failf(data, "Failed to alloc scratch buffer!"); @@ -952,7 +949,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, * must be used instead of the escape sequences \r & \n. */ for(i = 0, si = 0; i < nread; i++, si++) { - if(data->req.upload_fromhere[i] == 0x0a) { + if(k->upload_fromhere[i] == 0x0a) { data->state.scratch[si++] = 0x0d; data->state.scratch[si] = 0x0a; if(!data->set.crlf) { @@ -963,7 +960,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, } } else - data->state.scratch[si] = data->req.upload_fromhere[i]; + data->state.scratch[si] = k->upload_fromhere[i]; } if(si != nread) { @@ -972,10 +969,10 @@ static CURLcode readwrite_upload(struct Curl_easy *data, nread = si; /* upload from the new (replaced) buffer instead */ - data->req.upload_fromhere = data->state.scratch; + k->upload_fromhere = data->state.scratch; /* set the new amount too */ - data->req.upload_present = nread; + k->upload_present = nread; } } @@ -986,7 +983,7 @@ static CURLcode readwrite_upload(struct Curl_easy *data, return result; } #endif /* CURL_DISABLE_SMTP */ - } /* if 0 == data->req.upload_present */ + } /* if 0 == k->upload_present */ else { /* We have a partial buffer left from a previous "round". Use that instead of reading more data */ @@ -994,17 +991,17 @@ static CURLcode readwrite_upload(struct Curl_easy *data, /* write to socket (send away data) */ result = Curl_write(conn, - conn->writesockfd, /* socket to send to */ - data->req.upload_fromhere, /* buffer pointer */ - data->req.upload_present, /* buffer size */ - &bytes_written); /* actually sent */ + conn->writesockfd, /* socket to send to */ + k->upload_fromhere, /* buffer pointer */ + k->upload_present, /* buffer size */ + &bytes_written); /* actually sent */ if(result) return result; if(data->set.verbose) /* show the data before we change the pointer upload_fromhere */ - Curl_debug(data, CURLINFO_DATA_OUT, data->req.upload_fromhere, + Curl_debug(data, CURLINFO_DATA_OUT, k->upload_fromhere, (size_t)bytes_written, conn); k->writebytecount += bytes_written; @@ -1015,20 +1012,20 @@ static CURLcode readwrite_upload(struct Curl_easy *data, infof(data, "We are completely uploaded and fine\n"); } - if(data->req.upload_present != bytes_written) { + if(k->upload_present != bytes_written) { /* we only wrote a part of the buffer (if anything), deal with it! */ /* store the amount of bytes left in the buffer to write */ - data->req.upload_present -= bytes_written; + k->upload_present -= bytes_written; /* advance the pointer where to find the buffer when the next send is to happen */ - data->req.upload_fromhere += bytes_written; + k->upload_fromhere += bytes_written; } else { /* we've uploaded that buffer now */ - data->req.upload_fromhere = k->uploadbuf; - data->req.upload_present = 0; /* no more bytes left */ + k->upload_fromhere = data->state.uploadbuffer; + k->upload_present = 0; /* no more bytes left */ if(k->upload_done) { result = done_sending(conn, k); @@ -1108,7 +1105,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, if((k->keepon & KEEP_SEND) && (select_res & CURL_CSELECT_OUT)) { /* write */ - result = readwrite_upload(data, conn, k, &didwhat); + result = readwrite_upload(data, conn, &didwhat); if(result) return result; } @@ -1142,6 +1139,7 @@ CURLcode Curl_readwrite(struct connectdata *conn, /* we've waited long enough, continue anyway */ k->exp100 = EXP100_SEND_DATA; k->keepon |= KEEP_SEND; + Curl_expire_done(data, EXPIRE_100_TIMEOUT); infof(data, "Done waiting for 100-continue\n"); } } @@ -1186,15 +1184,13 @@ CURLcode Curl_readwrite(struct connectdata *conn, */ (k->bytecount != (k->size + data->state.crlf_conversions)) && #endif /* CURL_DO_LINEEND_CONV */ - !data->req.newurl) { + !k->newurl) { failf(data, "transfer closed with %" CURL_FORMAT_CURL_OFF_T - " bytes remaining to read", - k->size - k->bytecount); + " bytes remaining to read", k->size - k->bytecount); return CURLE_PARTIAL_FILE; } - if(!(data->set.opt_no_body) && - k->chunk && - (conn->chunk.state != CHUNK_STOP)) { + if(!(data->set.opt_no_body) && k->chunk && + (conn->chunk.state != CHUNK_STOP)) { /* * In chunked mode, return an error if the connection is closed prior to * the empty (terminating) chunk is read. @@ -1313,8 +1309,11 @@ CURLcode Curl_pretransfer(struct Curl_easy *data) if(data->set.httpreq == HTTPREQ_PUT) data->state.infilesize = data->set.filesize; - else + else { data->state.infilesize = data->set.postfieldsize; + if(data->set.postfields && (data->state.infilesize == -1)) + data->state.infilesize = (curl_off_t)strlen(data->set.postfields); + } /* If there is a list of cookie files to read, do it now! */ if(data->change.cookielist) @@ -1343,10 +1342,10 @@ CURLcode Curl_pretransfer(struct Curl_easy *data) Curl_pgrsStartNow(data); if(data->set.timeout) - Curl_expire(data, data->set.timeout); + Curl_expire(data, data->set.timeout, EXPIRE_TIMEOUT); if(data->set.connecttimeout) - Curl_expire(data, data->set.connecttimeout); + Curl_expire(data, data->set.connecttimeout, EXPIRE_CONNECTTIMEOUT); /* In case the handle is re-used and an authentication method was picked in the session we need to make sure we only use the one(s) we now @@ -1628,9 +1627,7 @@ static char *concat_url(const char *base, const char *relurl) * as given by the remote server and set up the new URL to request. */ CURLcode Curl_follow(struct Curl_easy *data, - char *newurl, /* this 'newurl' is the Location: string, - and it must be malloc()ed before passed - here */ + char *newurl, /* the Location: string */ followtype type) /* see transfer.h */ { #ifdef CURL_DISABLE_HTTP @@ -1643,33 +1640,36 @@ CURLcode Curl_follow(struct Curl_easy *data, /* Location: redirect */ bool disallowport = FALSE; + bool reachedmax = FALSE; if(type == FOLLOW_REDIR) { if((data->set.maxredirs != -1) && - (data->set.followlocation >= data->set.maxredirs)) { - failf(data, "Maximum (%ld) redirects followed", data->set.maxredirs); - return CURLE_TOO_MANY_REDIRECTS; + (data->set.followlocation >= data->set.maxredirs)) { + reachedmax = TRUE; + type = FOLLOW_FAKE; /* switch to fake to store the would-be-redirected + to URL */ } + else { + /* mark the next request as a followed location: */ + data->state.this_is_a_follow = TRUE; - /* mark the next request as a followed location: */ - data->state.this_is_a_follow = TRUE; + data->set.followlocation++; /* count location-followers */ - data->set.followlocation++; /* count location-followers */ + if(data->set.http_auto_referer) { + /* We are asked to automatically set the previous URL as the referer + when we get the next URL. We pick the ->url field, which may or may + not be 100% correct */ - if(data->set.http_auto_referer) { - /* We are asked to automatically set the previous URL as the referer - when we get the next URL. We pick the ->url field, which may or may - not be 100% correct */ + if(data->change.referer_alloc) { + Curl_safefree(data->change.referer); + data->change.referer_alloc = FALSE; + } - if(data->change.referer_alloc) { - Curl_safefree(data->change.referer); - data->change.referer_alloc = FALSE; + data->change.referer = strdup(data->change.url); + if(!data->change.referer) + return CURLE_OUT_OF_MEMORY; + data->change.referer_alloc = TRUE; /* yes, free this later */ } - - data->change.referer = strdup(data->change.url); - if(!data->change.referer) - return CURLE_OUT_OF_MEMORY; - data->change.referer_alloc = TRUE; /* yes, free this later */ } } @@ -1681,7 +1681,6 @@ CURLcode Curl_follow(struct Curl_easy *data, char *absolute = concat_url(data->change.url, newurl); if(!absolute) return CURLE_OUT_OF_MEMORY; - free(newurl); newurl = absolute; } else { @@ -1697,8 +1696,6 @@ CURLcode Curl_follow(struct Curl_easy *data, if(!newest) return CURLE_OUT_OF_MEMORY; strcpy_url(newest, newurl); /* create a space-free URL */ - - free(newurl); /* that was no good */ newurl = newest; /* use this instead now */ } @@ -1707,6 +1704,11 @@ CURLcode Curl_follow(struct Curl_easy *data, /* we're only figuring out the new url if we would've followed locations but now we're done so we can get out! */ data->info.wouldredirect = newurl; + + if(reachedmax) { + failf(data, "Maximum (%ld) redirects followed", data->set.maxredirs); + return CURLE_TOO_MANY_REDIRECTS; + } return CURLE_OK; } @@ -1720,7 +1722,6 @@ CURLcode Curl_follow(struct Curl_easy *data, data->change.url = newurl; data->change.url_alloc = TRUE; - newurl = NULL; /* don't free! */ infof(data, "Issue another request to this URL: '%s'\n", data->change.url); @@ -1947,7 +1948,7 @@ Curl_setup_transfer( /* Set a timeout for the multi interface. Add the inaccuracy margin so that we don't fire slightly too early and get denied to run. */ - Curl_expire(data, data->set.expect_100_timeout); + Curl_expire(data, data->set.expect_100_timeout, EXPIRE_100_TIMEOUT); } else { if(data->state.expect100header) diff --git a/lib/url.c b/lib/url.c index caa28f5..87446db 100644 --- a/lib/url.c +++ b/lib/url.c @@ -140,6 +140,19 @@ static CURLcode parse_login_details(const char *login, const size_t len, char **optionsptr); static unsigned int get_protocol_family(unsigned int protocol); +#define READBUFFER_SIZE CURL_MAX_WRITE_SIZE +#define READBUFFER_MAX CURL_MAX_READ_SIZE +#define READBUFFER_MIN 1024 + +/* Some parts of the code (e.g. chunked encoding) assume this buffer has at + * more than just a few bytes to play with. Don't let it become too small or + * bad things will happen. + */ +#if READBUFFER_SIZE < READBUFFER_MIN +# error READBUFFER_SIZE is too small +#endif + + /* * Protocol table. */ @@ -607,6 +620,7 @@ CURLcode Curl_init_userdefined(struct UserDefined *set) set->expect_100_timeout = 1000L; /* Wait for a second by default. */ set->sep_headers = TRUE; /* separated header lists by default */ + set->buffer_size = READBUFFER_SIZE; Curl_http2_init_userset(set); return result; @@ -644,7 +658,7 @@ CURLcode Curl_open(struct Curl_easy **curl) /* We do some initial setup here, all those fields that can't be just 0 */ - data->state.buffer = malloc(BUFSIZE + 1); + data->state.buffer = malloc(READBUFFER_SIZE + 1); if(!data->state.buffer) { DEBUGF(fprintf(stderr, "Error: malloc of buffer failed\n")); result = CURLE_OUT_OF_MEMORY; @@ -1009,8 +1023,8 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, * CURL_REDIR_POST_ALL - POST is kept as POST after 301, 302 and 303 * other - POST is kept as POST after 301 and 302 */ - int postRedir = curlx_sltosi(va_arg(param, long)); - data->set.keep_post = postRedir & CURL_REDIR_POST_ALL; + arg = va_arg(param, long); + data->set.keep_post = arg & CURL_REDIR_POST_ALL; } break; @@ -2061,13 +2075,19 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, /* * Set what local port to bind the socket to when performing an operation. */ - data->set.localport = curlx_sltous(va_arg(param, long)); + arg = va_arg(param, long); + if((arg < 0) || (arg > 65535)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.localport = curlx_sltous(arg); break; case CURLOPT_LOCALPORTRANGE: /* * Set number of local ports to try, starting with CURLOPT_LOCALPORT. */ - data->set.localportrange = curlx_sltosi(va_arg(param, long)); + arg = va_arg(param, long); + if((arg < 0) || (arg > 65535)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.localportrange = curlx_sltosi(arg); break; case CURLOPT_KRBLEVEL: /* @@ -2284,22 +2304,26 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, * The application kindly asks for a differently sized receive buffer. * If it seems reasonable, we'll use it. */ - data->set.buffer_size = va_arg(param, long); - - if(data->set.buffer_size > MAX_BUFSIZE) - data->set.buffer_size = MAX_BUFSIZE; /* huge internal default */ - else if(data->set.buffer_size < 1) - data->set.buffer_size = BUFSIZE; + arg = va_arg(param, long); - /* Resize only if larger than default buffer size. */ - if(data->set.buffer_size > BUFSIZE) { - data->state.buffer = realloc(data->state.buffer, - data->set.buffer_size + 1); - if(!data->state.buffer) { + if(arg > READBUFFER_MAX) + arg = READBUFFER_MAX; + else if(arg < 1) + arg = READBUFFER_SIZE; + else if(arg < READBUFFER_MIN) + arg = READBUFFER_MIN; + + /* Resize if new size */ + if(arg != data->set.buffer_size) { + char *newbuff = realloc(data->state.buffer, arg + 1); + if(!newbuff) { DEBUGF(fprintf(stderr, "Error: realloc of buffer failed\n")); result = CURLE_OUT_OF_MEMORY; } + else + data->state.buffer = newbuff; } + data->set.buffer_size = arg; break; @@ -2592,7 +2616,10 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, * know that an unsigned int will always hold the value so we blindly * typecast to this type */ - data->set.scope_id = curlx_sltoui(va_arg(param, long)); + arg = va_arg(param, long); + if((arg < 0) || (arg > 0xf)) + return CURLE_BAD_FUNCTION_ARGUMENT; + data->set.scope_id = curlx_sltoui(arg); break; case CURLOPT_PROTOCOLS: @@ -2794,13 +2821,17 @@ CURLcode Curl_setopt(struct Curl_easy *data, CURLoption option, data->set.proxy_ssl.authtype = CURL_TLSAUTH_SRP; /* default to SRP */ break; case CURLOPT_TLSAUTH_TYPE: - if(strncasecompare((char *)va_arg(param, char *), "SRP", strlen("SRP"))) + argptr = va_arg(param, char *); + if(!argptr || + strncasecompare(argptr, "SRP", strlen("SRP"))) data->set.ssl.authtype = CURL_TLSAUTH_SRP; else data->set.ssl.authtype = CURL_TLSAUTH_NONE; break; case CURLOPT_PROXY_TLSAUTH_TYPE: - if(strncasecompare((char *)va_arg(param, char *), "SRP", strlen("SRP"))) + argptr = va_arg(param, char *); + if(!argptr || + strncasecompare(argptr, "SRP", strlen("SRP"))) data->set.proxy_ssl.authtype = CURL_TLSAUTH_SRP; else data->set.proxy_ssl.authtype = CURL_TLSAUTH_NONE; @@ -2935,8 +2966,7 @@ static void conn_reset_all_postponed_data(struct connectdata *conn) conn_reset_postponed_data(conn, 1); } #else /* ! USE_RECV_BEFORE_SEND_WORKAROUND */ -/* Use "do-nothing" macros instead of functions when workaround not used */ -#define conn_reset_postponed_data(c,n) do {} WHILE_FALSE +/* Use "do-nothing" macro instead of function when workaround not used */ #define conn_reset_all_postponed_data(c) do {} WHILE_FALSE #endif /* ! USE_RECV_BEFORE_SEND_WORKAROUND */ @@ -2993,6 +3023,7 @@ static void conn_free(struct connectdata *conn) Curl_safefree(conn->http_proxy.host.rawalloc); /* http proxy name buffer */ Curl_safefree(conn->socks_proxy.host.rawalloc); /* socks proxy name buffer */ Curl_safefree(conn->master_buffer); + Curl_safefree(conn->connect_buffer); conn_reset_all_postponed_data(conn); @@ -3100,12 +3131,16 @@ static bool SocketIsDead(curl_socket_t sock) } /* - * IsPipeliningPossible() returns TRUE if the options set would allow - * pipelining/multiplexing and the connection is using a HTTP protocol. + * IsPipeliningPossible() + * + * Return a bitmask with the available pipelining and multiplexing options for + * the given requested connection. */ -static bool IsPipeliningPossible(const struct Curl_easy *handle, - const struct connectdata *conn) +static int IsPipeliningPossible(const struct Curl_easy *handle, + const struct connectdata *conn) { + int avail = 0; + /* If a HTTP protocol and pipelining is enabled */ if((conn->handler->protocol & PROTO_FAMILY_HTTP) && (!conn->bits.protoconnstart || !conn->bits.close)) { @@ -3115,14 +3150,14 @@ static bool IsPipeliningPossible(const struct Curl_easy *handle, (handle->set.httpreq == HTTPREQ_GET || handle->set.httpreq == HTTPREQ_HEAD)) /* didn't ask for HTTP/1.0 and a GET or HEAD */ - return TRUE; + avail |= CURLPIPE_HTTP1; if(Curl_pipeline_wanted(handle->multi, CURLPIPE_MULTIPLEX) && (handle->set.httpversion >= CURL_HTTP_VERSION_2)) /* allows HTTP/2 */ - return TRUE; + avail |= CURLPIPE_MULTIPLEX; } - return FALSE; + return avail; } int Curl_removeHandleFromPipeline(struct Curl_easy *handle, @@ -3409,7 +3444,7 @@ ConnectionExists(struct Curl_easy *data, struct connectdata *check; struct connectdata *chosen = 0; bool foundPendingCandidate = FALSE; - bool canPipeline = IsPipeliningPossible(data, needle); + int canpipe = IsPipeliningPossible(data, needle); struct connectbundle *bundle; #ifdef USE_NTLM @@ -3425,10 +3460,10 @@ ConnectionExists(struct Curl_easy *data, *force_reuse = FALSE; *waitpipe = FALSE; - /* We can't pipe if the site is blacklisted */ - if(canPipeline && Curl_pipeline_site_blacklisted(data, needle)) { - canPipeline = FALSE; - } + /* We can't pipeline if the site is blacklisted */ + if((canpipe & CURLPIPE_HTTP1) && + Curl_pipeline_site_blacklisted(data, needle)) + canpipe &= ~ CURLPIPE_HTTP1; /* Look up the bundle with all the connections to this particular host */ @@ -3448,8 +3483,8 @@ ConnectionExists(struct Curl_easy *data, (bundle->multiuse == BUNDLE_MULTIPLEX ? "can multiplex" : "serially"))); - /* We can't pipe if we don't know anything about the server */ - if(canPipeline) { + /* We can't pipeline if we don't know anything about the server */ + if(canpipe) { if(bundle->multiuse <= BUNDLE_UNKNOWN) { if((bundle->multiuse == BUNDLE_UNKNOWN) && data->set.pipewait) { infof(data, "Server doesn't support multi-use yet, wait\n"); @@ -3458,18 +3493,18 @@ ConnectionExists(struct Curl_easy *data, } infof(data, "Server doesn't support multi-use (yet)\n"); - canPipeline = FALSE; + canpipe = 0; } if((bundle->multiuse == BUNDLE_PIPELINING) && !Curl_pipeline_wanted(data->multi, CURLPIPE_HTTP1)) { /* not asked for, switch off */ infof(data, "Could pipeline, but not asked to!\n"); - canPipeline = FALSE; + canpipe = 0; } else if((bundle->multiuse == BUNDLE_MULTIPLEX) && !Curl_pipeline_wanted(data->multi, CURLPIPE_MULTIPLEX)) { infof(data, "Could multiplex, but not asked to!\n"); - canPipeline = FALSE; + canpipe = 0; } } @@ -3490,20 +3525,21 @@ ConnectionExists(struct Curl_easy *data, pipeLen = check->send_pipe.size + check->recv_pipe.size; - if(canPipeline) { + if(canpipe) { if(check->bits.protoconnstart && check->bits.close) continue; if(!check->bits.multiplex) { - /* If not multiplexing, make sure the pipe has only GET requests */ + /* If not multiplexing, make sure the connection is fine for HTTP/1 + pipelining */ struct Curl_easy* sh = gethandleathead(&check->send_pipe); struct Curl_easy* rh = gethandleathead(&check->recv_pipe); if(sh) { - if(!IsPipeliningPossible(sh, check)) + if(!(IsPipeliningPossible(sh, check) & CURLPIPE_HTTP1)) continue; } else if(rh) { - if(!IsPipeliningPossible(rh, check)) + if(!(IsPipeliningPossible(rh, check) & CURLPIPE_HTTP1)) continue; } } @@ -3611,7 +3647,7 @@ ConnectionExists(struct Curl_easy *data, } } - if(!canPipeline && check->inuse) + if(!canpipe && check->inuse) /* this request can't be pipelined but the checked connection is already in use so we skip it */ continue; @@ -3742,7 +3778,7 @@ ConnectionExists(struct Curl_easy *data, continue; } #endif - if(canPipeline) { + if(canpipe) { /* We can pipeline if we want to. Let's continue looking for the optimal connection to use, i.e the shortest pipe that is not blacklisted. */ @@ -4203,7 +4239,7 @@ static struct connectdata *allocate_conn(struct Curl_easy *data) if(Curl_pipeline_wanted(data->multi, CURLPIPE_HTTP1) && !conn->master_buffer) { /* Allocate master_buffer to be used for HTTP/1 pipelining */ - conn->master_buffer = calloc(BUFSIZE, sizeof(char)); + conn->master_buffer = calloc(MASTERBUF_SIZE, sizeof(char)); if(!conn->master_buffer) goto error; } @@ -4430,6 +4466,7 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data, #endif protop = "file"; /* protocol string */ + *prot_missing = !url_has_scheme; } else { /* clear path */ @@ -4593,14 +4630,30 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data, size_t plen = strlen(path); /* new path, should be 1 byte longer than the original */ - size_t urllen = strlen(data->change.url); /* original URL length */ - size_t prefixlen = strlen(conn->host.name); - if(!*prot_missing) - prefixlen += strlen(protop) + strlen("://"); + if(!*prot_missing) { + size_t protolen = strlen(protop); + + if(curl_strnequal(protop, data->change.url, protolen)) + prefixlen += protolen; + else { + failf(data, " malformed"); + return CURLE_URL_MALFORMAT; + } + + if(curl_strnequal("://", &data->change.url[protolen], 3)) + prefixlen += 3; + /* only file: is allowed to omit one or both slashes */ + else if(curl_strnequal("file:", data->change.url, 5)) + prefixlen += 1 + (data->change.url[5] == '/'); + else { + failf(data, " malformed"); + return CURLE_URL_MALFORMAT; + } + } - reurl = malloc(urllen + 2); /* 2 for zerobyte + slash */ + reurl = malloc(prefixlen + plen + 1); if(!reurl) return CURLE_OUT_OF_MEMORY; @@ -6961,7 +7014,6 @@ CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn) k->bytecount = 0; k->buf = data->state.buffer; - k->uploadbuf = data->state.uploadbuffer; k->hbufp = data->state.headerbuff; k->ignorebody=FALSE; @@ -6985,7 +7037,7 @@ CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn) * Returns the family as a single bit protocol identifier. */ -unsigned int get_protocol_family(unsigned int protocol) +static unsigned int get_protocol_family(unsigned int protocol) { unsigned int family; diff --git a/lib/urldata.h b/lib/urldata.h index 3c94553..d4a4a98 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -200,12 +200,12 @@ #include #endif /* HAVE_LIBSSH2_H */ -/* Download buffer size, keep it fairly big for speed reasons */ -#undef BUFSIZE -#define BUFSIZE CURL_MAX_WRITE_SIZE -#undef MAX_BUFSIZE -#define MAX_BUFSIZE CURL_MAX_READ_SIZE -#define CURL_BUFSIZE(x) ((x)?(x):(BUFSIZE)) +/* The upload buffer size, should not be smaller than CURL_MAX_WRITE_SIZE, as + it needs to hold a full buffer as could be sent in a write callback */ +#define UPLOAD_BUFSIZE CURL_MAX_WRITE_SIZE + +/* The "master buffer" is for HTTP pipelining */ +#define MASTERBUF_SIZE 16384 /* Initial size of the buffer to store headers in, it'll be enlarged in case of need. */ @@ -333,6 +333,11 @@ struct ssl_connect_data { size_t encdata_length, decdata_length; size_t encdata_offset, decdata_offset; unsigned char *encdata_buffer, *decdata_buffer; + /* encdata_is_incomplete: if encdata contains only a partial record that + can't be decrypted without another Curl_read_plain (that is, status is + SEC_E_INCOMPLETE_MESSAGE) then set this true. after Curl_read_plain writes + more bytes into encdata then set this back to false. */ + bool encdata_is_incomplete; unsigned long req_flags, ret_flags; CURLcode recv_unrecoverable_err; /* schannel_recv had an unrecoverable err */ bool recv_sspi_close_notify; /* true if connection closed by close_notify */ @@ -716,7 +721,6 @@ struct SingleRequest { long bodywrites; char *buf; - char *uploadbuf; curl_socket_t maxfd; int keepon; @@ -898,6 +902,8 @@ struct connectdata { connection is used! */ struct Curl_easy *data; + struct curl_llist_element bundle_node; /* conncache */ + /* chunk is for HTTP chunked encoding, but is in the general connectdata struct only because we can do just about any protocol through a HTTP proxy and a HTTP proxy may in fact respond using chunked encoding */ @@ -1138,6 +1144,7 @@ struct connectdata { struct connectbundle *bundle; /* The bundle we are member of */ int negnpn; /* APLN or NPN TLS negotiated protocol, CURL_HTTP_VERSION* */ + char *connect_buffer; /* for CONNECT business */ #ifdef USE_UNIX_SOCKETS char *unix_domain_socket; @@ -1307,6 +1314,30 @@ struct tempbuf { Curl_client_write() */ }; +/* Timers */ +typedef enum { + EXPIRE_100_TIMEOUT, + EXPIRE_ASYNC_NAME, + EXPIRE_CONNECTTIMEOUT, + EXPIRE_DNS_PER_NAME, + EXPIRE_HAPPY_EYEBALLS, + EXPIRE_MULTI_PENDING, + EXPIRE_RUN_NOW, + EXPIRE_SPEEDCHECK, + EXPIRE_TIMEOUT, + EXPIRE_TOOFAST, + EXPIRE_LAST /* not an actual timer, used as a marker only */ +} expire_id; + +/* + * One instance for each timeout an easy handle can set. + */ +struct time_node { + struct curl_llist_element list; + struct timeval time; + expire_id eid; +}; + struct UrlState { /* Points to the connection cache */ @@ -1326,7 +1357,7 @@ struct UrlState { size_t headersize; /* size of the allocation */ char *buffer; /* download buffer */ - char uploadbuffer[BUFSIZE+1]; /* upload buffer */ + char uploadbuffer[UPLOAD_BUFSIZE+1]; /* upload buffer */ curl_off_t current_speed; /* the ProgressShow() function sets this, bytes / second */ bool this_is_a_follow; /* this is a followed Location: request */ @@ -1342,7 +1373,7 @@ struct UrlState { long sessionage; /* number of the most recent session */ unsigned int tempcount; /* number of entries in use in tempwrite, 0 - 3 */ struct tempbuf tempwrite[3]; /* BOTH, HEADER, BODY */ - char *scratch; /* huge buffer[BUFSIZE*2] when doing upload CRLF replacing */ + char *scratch; /* huge buffer[set.buffer_size*2] for upload CRLF replacing */ bool errorbuf; /* Set to TRUE if the error buffer is already filled in. This must be set to FALSE every time _easy_perform() is called. */ @@ -1375,6 +1406,7 @@ struct UrlState { struct timeval expiretime; /* set this with Curl_expire() only */ struct Curl_tree timenode; /* for the splay stuff */ struct curl_llist timeoutlist; /* list of pending timeouts */ + struct time_node expires[EXPIRE_LAST]; /* nodes for each expire type */ /* a place to store the most recently set FTP entrypath */ char *most_recent_ftp_entrypath; @@ -1804,6 +1836,8 @@ struct Curl_easy { struct Curl_easy *prev; struct connectdata *easy_conn; /* the "unit's" connection */ + struct curl_llist_element connect_queue; + struct curl_llist_element pipeline_queue; CURLMstate mstate; /* the handle's state */ CURLcode result; /* previous result */ diff --git a/lib/vauth/digest.c b/lib/vauth/digest.c index 31d25cf..185098e 100644 --- a/lib/vauth/digest.c +++ b/lib/vauth/digest.c @@ -205,7 +205,7 @@ static CURLcode auth_digest_get_qop_values(const char *options, int *value) { char *tmp; char *token; - char *tok_buf; + char *tok_buf = NULL; /* Initialise the output */ *value = 0; @@ -360,7 +360,6 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data, char qop_options[64]; int qop_values; char cnonce[33]; - unsigned int entropy[4]; char nonceCount[] = "00000001"; char method[] = "AUTHENTICATE"; char qop[] = DIGEST_QOP_VALUE_STRING_AUTH; @@ -387,15 +386,11 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data, if(!(qop_values & DIGEST_QOP_VALUE_AUTH)) return CURLE_BAD_CONTENT_ENCODING; - /* Generate 16 bytes of random data */ - result = Curl_rand(data, &entropy[0], 4); + /* Generate 32 random hex chars, 32 bytes + 1 zero termination */ + result = Curl_rand_hex(data, (unsigned char *)cnonce, sizeof(cnonce)); if(result) return result; - /* Convert the random data into a 32 byte hex string */ - snprintf(cnonce, sizeof(cnonce), "%08x%08x%08x%08x", - entropy[0], entropy[1], entropy[2], entropy[3]); - /* So far so good, now calculate A1 and H(A1) according to RFC 2831 */ ctxt = Curl_MD5_init(Curl_DIGEST_MD5); if(!ctxt) @@ -563,7 +558,7 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg, return CURLE_OUT_OF_MEMORY; } else if(strcasecompare(value, "qop")) { - char *tok_buf; + char *tok_buf = NULL; /* Tokenize the list and choose auth if possible, use a temporary clone of the buffer since strtok_r() ruins it */ tmp = strdup(content); @@ -684,12 +679,10 @@ CURLcode Curl_auth_create_digest_http_message(struct Curl_easy *data, digest->nc = 1; if(!digest->cnonce) { - unsigned int rnd[4]; - result = Curl_rand(data, &rnd[0], 4); + result = Curl_rand_hex(data, (unsigned char *)cnoncebuf, + sizeof(cnoncebuf)); if(result) return result; - snprintf(cnoncebuf, sizeof(cnoncebuf), "%08x%08x%08x%08x", - rnd[0], rnd[1], rnd[2], rnd[3]); result = Curl_base64_encode(data, cnoncebuf, strlen(cnoncebuf), &cnonce, &cnonce_sz); diff --git a/lib/vauth/ntlm.c b/lib/vauth/ntlm.c index d02eec4..4219645 100644 --- a/lib/vauth/ntlm.c +++ b/lib/vauth/ntlm.c @@ -555,10 +555,10 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, #if defined(USE_NTRESPONSES) && defined(USE_NTLM_V2) if(ntlm->target_info_len) { unsigned char ntbuffer[0x18]; - unsigned int entropy[2]; + unsigned char entropy[8]; unsigned char ntlmv2hash[0x18]; - result = Curl_rand(data, &entropy[0], 2); + result = Curl_rand(data, entropy, 8); if(result) return result; @@ -572,15 +572,13 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, return result; /* LMv2 response */ - result = Curl_ntlm_core_mk_lmv2_resp(ntlmv2hash, - (unsigned char *)&entropy[0], + result = Curl_ntlm_core_mk_lmv2_resp(ntlmv2hash, entropy, &ntlm->nonce[0], lmresp); if(result) return result; /* NTLMv2 response */ - result = Curl_ntlm_core_mk_ntlmv2_resp(ntlmv2hash, - (unsigned char *)&entropy[0], + result = Curl_ntlm_core_mk_ntlmv2_resp(ntlmv2hash, entropy, ntlm, &ntlmv2resp, &ntresplen); if(result) return result; @@ -596,10 +594,10 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data, unsigned char ntbuffer[0x18]; unsigned char tmp[0x18]; unsigned char md5sum[MD5_DIGEST_LENGTH]; - unsigned int entropy[2]; + unsigned char entropy[8]; /* Need to create 8 bytes random data */ - result = Curl_rand(data, &entropy[0], 2); + result = Curl_rand(data, entropy, 8); if(result) return result; diff --git a/lib/vtls/cyassl.c b/lib/vtls/cyassl.c index 5f51ad5..01bfdab 100644 --- a/lib/vtls/cyassl.c +++ b/lib/vtls/cyassl.c @@ -44,6 +44,38 @@ and that's a problem since options.h hasn't been included yet. */ #include #endif +/* To determine what functions are available we rely on one or both of: + - the user's options.h generated by CyaSSL/wolfSSL + - the symbols detected by curl's configure + Since they are markedly different from one another, and one or the other may + not be available, we do some checking below to bring things in sync. */ + +/* HAVE_ALPN is wolfSSL's build time symbol for enabling ALPN in options.h. */ +#ifndef HAVE_ALPN +#ifdef HAVE_WOLFSSL_USEALPN +#define HAVE_ALPN +#endif +#endif + +/* WOLFSSL_ALLOW_SSLV3 is wolfSSL's build time symbol for enabling SSLv3 in + options.h, but is only seen in >= 3.6.6 since that's when they started + disabling SSLv3 by default. */ +#ifndef WOLFSSL_ALLOW_SSLV3 +#if (LIBCYASSL_VERSION_HEX < 0x03006006) || \ + defined(HAVE_WOLFSSLV3_CLIENT_METHOD) +#define WOLFSSL_ALLOW_SSLV3 +#endif +#endif + +/* HAVE_SUPPORTED_CURVES is wolfSSL's build time symbol for enabling the ECC + supported curve extension in options.h. Note ECC is enabled separately. */ +#ifndef HAVE_SUPPORTED_CURVES +#if defined(HAVE_CYASSL_CTX_USESUPPORTEDCURVE) || \ + defined(HAVE_WOLFSSL_CTX_USESUPPORTEDCURVE) +#define HAVE_SUPPORTED_CURVES +#endif +#endif + #ifdef HAVE_LIMITS_H #include #endif @@ -78,38 +110,6 @@ and that's a problem since options.h hasn't been included yet. */ #define CYASSL_MAX_ERROR_SZ 80 #endif -/* To determine what functions are available we rely on one or both of: - - the user's options.h generated by CyaSSL/wolfSSL - - the symbols detected by curl's configure - Since they are markedly different from one another, and one or the other may - not be available, we do some checking below to bring things in sync. */ - -/* HAVE_ALPN is wolfSSL's build time symbol for enabling ALPN in options.h. */ -#ifndef HAVE_ALPN -#ifdef HAVE_WOLFSSL_USEALPN -#define HAVE_ALPN -#endif -#endif - -/* WOLFSSL_ALLOW_SSLV3 is wolfSSL's build time symbol for enabling SSLv3 in - options.h, but is only seen in >= 3.6.6 since that's when they started - disabling SSLv3 by default. */ -#ifndef WOLFSSL_ALLOW_SSLV3 -#if (LIBCYASSL_VERSION_HEX < 0x03006006) || \ - defined(HAVE_WOLFSSLV3_CLIENT_METHOD) -#define WOLFSSL_ALLOW_SSLV3 -#endif -#endif - -/* HAVE_SUPPORTED_CURVES is wolfSSL's build time symbol for enabling the ECC - supported curve extension in options.h. Note ECC is enabled separately. */ -#ifndef HAVE_SUPPORTED_CURVES -#if defined(HAVE_CYASSL_CTX_USESUPPORTEDCURVE) || \ - defined(HAVE_WOLFSSL_CTX_USESUPPORTEDCURVE) -#define HAVE_SUPPORTED_CURVES -#endif -#endif - static Curl_recv cyassl_recv; static Curl_send cyassl_send; diff --git a/lib/vtls/darwinssl.c b/lib/vtls/darwinssl.c index 5533dfe..0417665 100644 --- a/lib/vtls/darwinssl.c +++ b/lib/vtls/darwinssl.c @@ -113,6 +113,36 @@ #define ioErr -36 #define paramErr -50 +#ifdef DARWIN_SSL_PINNEDPUBKEY +/* both new and old APIs return rsa keys missing the spki header (not DER) */ +static const unsigned char rsa4096SpkiHeader[] = { + 0x30, 0x82, 0x02, 0x22, 0x30, 0x0d, + 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, + 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, + 0x00, 0x03, 0x82, 0x02, 0x0f, 0x00}; + +static const unsigned char rsa2048SpkiHeader[] = { + 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, + 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, + 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, + 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00}; +#ifdef DARWIN_SSL_PINNEDPUBKEY_V1 +/* the *new* version doesn't return DER encoded ecdsa certs like the old... */ +static const unsigned char ecDsaSecp256r1SpkiHeader[] = { + 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, + 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, + 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, + 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, + 0x42, 0x00}; + +static const unsigned char ecDsaSecp384r1SpkiHeader[] = { + 0x30, 0x76, 0x30, 0x10, 0x06, 0x07, + 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, + 0x01, 0x06, 0x05, 0x2b, 0x81, 0x04, + 0x00, 0x22, 0x03, 0x62, 0x00}; +#endif /* DARWIN_SSL_PINNEDPUBKEY_V1 */ +#endif /* DARWIN_SSL_PINNEDPUBKEY */ + /* The following two functions were ripped from Apple sample code, * with some modifications: */ static OSStatus SocketRead(SSLConnectionRef connection, @@ -1374,7 +1404,7 @@ static CURLcode darwinssl_connect_step1(struct connectdata *conn, else err = CopyIdentityWithLabel(ssl_cert, &cert_and_key); - if(err == noErr) { + if(err == noErr && cert_and_key) { SecCertificateRef cert = NULL; CFTypeRef certs_c[1]; CFArrayRef certs; @@ -1996,6 +2026,112 @@ static int verify_cert(const char *cafile, struct Curl_easy *data, } } +#ifdef DARWIN_SSL_PINNEDPUBKEY +static CURLcode pkp_pin_peer_pubkey(struct SessionHandle *data, + SSLContextRef ctx, + const char *pinnedpubkey) +{ /* Scratch */ + size_t pubkeylen, realpubkeylen, spkiHeaderLength = 24; + unsigned char *pubkey = NULL, *realpubkey = NULL, *spkiHeader = NULL; + CFDataRef publicKeyBits = NULL; + + /* Result is returned to caller */ + CURLcode result = CURLE_SSL_PINNEDPUBKEYNOTMATCH; + + /* if a path wasn't specified, don't pin */ + if(!pinnedpubkey) + return CURLE_OK; + + + if(!ctx) + return result; + + do { + SecTrustRef trust; + OSStatus ret = SSLCopyPeerTrust(ctx, &trust); + if(ret != noErr || trust == NULL) + break; + + SecKeyRef keyRef = SecTrustCopyPublicKey(trust); + CFRelease(trust); + if(keyRef == NULL) + break; + +#ifdef DARWIN_SSL_PINNEDPUBKEY_V1 + + publicKeyBits = SecKeyCopyExternalRepresentation(keyRef, NULL); + CFRelease(keyRef); + if(publicKeyBits == NULL) + break; + +#elif DARWIN_SSL_PINNEDPUBKEY_V2 + + OSStatus success = SecItemExport(keyRef, kSecFormatOpenSSL, 0, NULL, + &publicKeyBits); + CFRelease(keyRef); + if(success != errSecSuccess || publicKeyBits == NULL) + break; + +#endif /* DARWIN_SSL_PINNEDPUBKEY_V2 */ + + pubkeylen = CFDataGetLength(publicKeyBits); + pubkey = CFDataGetBytePtr(publicKeyBits); + + switch(pubkeylen) { + case 526: + /* 4096 bit RSA pubkeylen == 526 */ + spkiHeader = rsa4096SpkiHeader; + break; + case 270: + /* 2048 bit RSA pubkeylen == 270 */ + spkiHeader = rsa2048SpkiHeader; + break; +#ifdef DARWIN_SSL_PINNEDPUBKEY_V1 + case 65: + /* ecDSA secp256r1 pubkeylen == 65 */ + spkiHeader = ecDsaSecp256r1SpkiHeader; + spkiHeaderLength = 26; + break; + case 97: + /* ecDSA secp384r1 pubkeylen == 97 */ + spkiHeader = ecDsaSecp384r1SpkiHeader; + spkiHeaderLength = 23; + break; + default: + infof(data, "SSL: unhandled public key length: %d\n", pubkeylen); +#elif DARWIN_SSL_PINNEDPUBKEY_V2 + default: + /* ecDSA secp256r1 pubkeylen == 91 header already included? + * ecDSA secp384r1 header already included too + * we assume rest of algorithms do same, so do nothing + */ + result = Curl_pin_peer_pubkey(data, pinnedpubkey, pubkey, + pubkeylen); +#endif /* DARWIN_SSL_PINNEDPUBKEY_V2 */ + continue; /* break from loop */ + } + + realpubkeylen = pubkeylen + spkiHeaderLength; + realpubkey = malloc(realpubkeylen); + if(!realpubkey) + break; + + memcpy(realpubkey, spkiHeader, spkiHeaderLength); + memcpy(realpubkey + spkiHeaderLength, pubkey, pubkeylen); + + result = Curl_pin_peer_pubkey(data, pinnedpubkey, realpubkey, + realpubkeylen); + + } while(0); + + Curl_safefree(realpubkey); + if(publicKeyBits != NULL) + CFRelease(publicKeyBits); + + return result; +} +#endif /* DARWIN_SSL_PINNEDPUBKEY */ + static CURLcode darwinssl_connect_step2(struct connectdata *conn, int sockindex) { @@ -2102,6 +2238,17 @@ darwinssl_connect_step2(struct connectdata *conn, int sockindex) /* we have been connected fine, we're not waiting for anything else. */ connssl->connecting_state = ssl_connect_3; +#ifdef DARWIN_SSL_PINNEDPUBKEY + if(data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]) { + CURLcode result = pkp_pin_peer_pubkey(data, connssl->ssl_ctx, + data->set.str[STRING_SSL_PINNEDPUBLICKEY_ORIG]); + if(result) { + failf(data, "SSL: public key does not match pinned public key!"); + return result; + } + } +#endif /* DARWIN_SSL_PINNEDPUBKEY */ + /* Informational message */ (void)SSLGetNegotiatedCipher(connssl->ssl_ctx, &cipher); (void)SSLGetNegotiatedProtocolVersion(connssl->ssl_ctx, &protocol); @@ -2573,6 +2720,15 @@ void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */ (void)CC_MD5(tmp, (CC_LONG)tmplen, md5sum); } +void Curl_darwinssl_sha256sum(unsigned char *tmp, /* input */ + size_t tmplen, + unsigned char *sha256sum, /* output */ + size_t sha256len) +{ + assert(sha256len >= SHA256_DIGEST_LENGTH); + (void)CC_SHA256(tmp, (CC_LONG)tmplen, sha256sum); +} + bool Curl_darwinssl_false_start(void) { #if CURL_BUILD_MAC_10_9 || CURL_BUILD_IOS_7 diff --git a/lib/vtls/darwinssl.h b/lib/vtls/darwinssl.h index 4bd41ca..fd372ff 100644 --- a/lib/vtls/darwinssl.h +++ b/lib/vtls/darwinssl.h @@ -48,11 +48,34 @@ void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */ size_t tmplen, unsigned char *md5sum, /* output */ size_t md5len); +void Curl_darwinssl_sha256sum(unsigned char *tmp, /* input */ + size_t tmplen, + unsigned char *sha256sum, /* output */ + size_t sha256len); bool Curl_darwinssl_false_start(void); /* Set the API backend definition to SecureTransport */ #define CURL_SSL_BACKEND CURLSSLBACKEND_DARWINSSL +/* pinned public key support tests */ + +/* version 1 supports macOS 10.12+ and iOS 10+ */ +#if ((TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000) || \ + (!TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)) +#define DARWIN_SSL_PINNEDPUBKEY_V1 1 +#endif + +/* version 2 supports MacOSX 10.7+ */ +#if (!TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) +#define DARWIN_SSL_PINNEDPUBKEY_V2 1 +#endif + +#if defined(DARWIN_SSL_PINNEDPUBKEY_V1) || defined(DARWIN_SSL_PINNEDPUBKEY_V2) +/* this backend supports CURLOPT_PINNEDPUBLICKEY */ +#define DARWIN_SSL_PINNEDPUBKEY 1 +#define have_curlssl_pinnedpubkey 1 +#endif /* DARWIN_SSL_PINNEDPUBKEY */ + /* API setup for SecureTransport */ #define curlssl_init() (1) #define curlssl_cleanup() Curl_nop_stmt @@ -70,6 +93,7 @@ bool Curl_darwinssl_false_start(void); #define curlssl_data_pending(x,y) Curl_darwinssl_data_pending(x, y) #define curlssl_random(x,y,z) ((void)x, Curl_darwinssl_random(y,z)) #define curlssl_md5sum(a,b,c,d) Curl_darwinssl_md5sum(a,b,c,d) +#define curlssl_sha256sum(a,b,c,d) Curl_darwinssl_sha256sum(a,b,c,d) #define curlssl_false_start() Curl_darwinssl_false_start() #endif /* USE_DARWINSSL */ diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c index 0230778..844be2d 100644 --- a/lib/vtls/gtls.c +++ b/lib/vtls/gtls.c @@ -211,18 +211,20 @@ int Curl_gtls_cleanup(void) return 1; } +#ifndef CURL_DISABLE_VERBOSE_STRINGS static void showtime(struct Curl_easy *data, const char *text, time_t stamp) { struct tm buffer; const struct tm *tm = &buffer; + char str[96]; CURLcode result = Curl_gmtime(stamp, &buffer); if(result) return; - snprintf(data->state.buffer, - BUFSIZE, + snprintf(str, + sizeof(str), "\t %s: %s, %02d %s %4d %02d:%02d:%02d GMT", text, Curl_wkday[tm->tm_wday?tm->tm_wday-1:6], @@ -232,8 +234,9 @@ static void showtime(struct Curl_easy *data, tm->tm_hour, tm->tm_min, tm->tm_sec); - infof(data, "%s\n", data->state.buffer); + infof(data, "%s\n", str); } +#endif static gnutls_datum_t load_file(const char *file) { @@ -962,8 +965,6 @@ gtls_connect_step3(struct connectdata *conn, gnutls_datum_t issuerp; char certbuf[256] = ""; /* big enough? */ size_t size; - unsigned int algo; - unsigned int bits; time_t certclock; const char *ptr; struct Curl_easy *data = conn->data; @@ -974,6 +975,8 @@ gtls_connect_step3(struct connectdata *conn, #endif CURLcode result = CURLE_OK; #ifndef CURL_DISABLE_VERBOSE_STRINGS + unsigned int algo; + unsigned int bits; gnutls_protocol_t version = gnutls_protocol_get_version(session); #endif const char * const hostname = SSL_IS_PROXY() ? conn->http_proxy.host.name : @@ -1344,6 +1347,7 @@ gtls_connect_step3(struct connectdata *conn, */ +#ifndef CURL_DISABLE_VERBOSE_STRINGS /* public key algorithm's parameters */ algo = gnutls_x509_crt_get_pk_algorithm(x509_cert, &bits); infof(data, "\t certificate public key: %s\n", @@ -1368,12 +1372,13 @@ gtls_connect_step3(struct connectdata *conn, gnutls_x509_crt_get_issuer_dn(x509_cert, certbuf, &size); infof(data, "\t issuer: %s\n", certbuf); - gnutls_x509_crt_deinit(x509_cert); - /* compression algorithm (if any) */ ptr = gnutls_compression_get_name(gnutls_compression_get(session)); /* the *_get_name() says "NULL" if GNUTLS_COMP_NULL is returned */ infof(data, "\t compression: %s\n", ptr); +#endif + + gnutls_x509_crt_deinit(x509_cert); #ifdef HAS_ALPN if(conn->bits.tls_enable_alpn) { diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c index 3ffa957..037babe 100644 --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c @@ -67,7 +67,7 @@ #endif #if defined(THREADING_SUPPORT) -static mbedtls_entropy_context entropy; +static mbedtls_entropy_context ts_entropy; static int entropy_init_initialized = 0; @@ -131,7 +131,7 @@ static void mbed_debug(void *context, int level, const char *f_name, /* * profile */ -const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_fr = +static const mbedtls_x509_crt_profile mbedtls_x509_crt_profile_fr = { /* Hashes from SHA-1 and above */ MBEDTLS_X509_ID_FLAG(MBEDTLS_MD_SHA1) | @@ -247,11 +247,11 @@ mbed_connect_step1(struct connectdata *conn, } #ifdef THREADING_SUPPORT - entropy_init_mutex(&entropy); + entropy_init_mutex(&ts_entropy); mbedtls_ctr_drbg_init(&connssl->ctr_drbg); ret = mbedtls_ctr_drbg_seed(&connssl->ctr_drbg, entropy_func_mutex, - &entropy, NULL, 0); + &ts_entropy, NULL, 0); if(ret) { #ifdef MBEDTLS_ERROR_C mbedtls_strerror(ret, errorbuf, sizeof(errorbuf)); @@ -424,6 +424,11 @@ mbed_connect_step1(struct connectdata *conn, mbedtls_ssl_conf_ciphersuites(&connssl->config, mbedtls_ssl_list_ciphersuites()); +#if defined(MBEDTLS_SSL_RENEGOTIATION) + mbedtls_ssl_conf_renegotiation(&connssl->config, + MBEDTLS_SSL_RENEGOTIATION_ENABLED); +#endif + #if defined(MBEDTLS_SSL_SESSION_TICKETS) mbedtls_ssl_conf_session_tickets(&connssl->config, MBEDTLS_SSL_SESSION_TICKETS_DISABLED); diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c index 89a16d3..cd01389 100644 --- a/lib/vtls/nss.c +++ b/lib/vtls/nss.c @@ -81,10 +81,17 @@ static PRLock *nss_initlock = NULL; static PRLock *nss_crllock = NULL; static PRLock *nss_findslot_lock = NULL; +static PRLock *nss_trustload_lock = NULL; static struct curl_llist nss_crl_list; static NSSInitContext *nss_context = NULL; static volatile int initialized = 0; +/* type used to wrap pointers as list nodes */ +struct ptr_list_wrap { + void *ptr; + struct curl_llist_element node; +}; + typedef struct { const char *name; int num; @@ -201,7 +208,10 @@ static const cipher_s cipherlist[] = { }; static const char *pem_library = "libnsspem.so"; -static SECMODModule *mod = NULL; +static SECMODModule *pem_module = NULL; + +static const char *trust_library = "libnssckbi.so"; +static SECMODModule *trust_module = NULL; /* NSPR I/O layer we use to detect blocking direction during SSL handshake */ static PRDescIdentity nspr_io_identity = PR_INVALID_IO_LAYER; @@ -371,6 +381,18 @@ static PK11SlotInfo* nss_find_slot_by_name(const char *slot_name) return slot; } +/* wrap 'ptr' as list node and tail-insert into 'list' */ +static CURLcode insert_wrapped_ptr(struct curl_llist *list, void *ptr) +{ + struct ptr_list_wrap *wrap = malloc(sizeof *wrap); + if(!wrap) + return CURLE_OUT_OF_MEMORY; + + wrap->ptr = ptr; + Curl_llist_insert_next(list, list->tail, wrap, &wrap->node); + return CURLE_OK; +} + /* Call PK11_CreateGenericObject() with the given obj_class and filename. If * the call succeeds, append the object handle to the list of objects so that * the object can be destroyed in Curl_nss_close(). */ @@ -413,7 +435,7 @@ static CURLcode nss_create_object(struct ssl_connect_data *ssl, if(!obj) return result; - if(!Curl_llist_insert_next(&ssl->obj_list, ssl->obj_list.tail, obj)) { + if(insert_wrapped_ptr(&ssl->obj_list, obj) != CURLE_OK) { PK11_DestroyGenericObject(obj); return CURLE_OUT_OF_MEMORY; } @@ -430,17 +452,21 @@ static CURLcode nss_create_object(struct ssl_connect_data *ssl, * NSS objects in Curl_nss_close() */ static void nss_destroy_object(void *user, void *ptr) { - PK11GenericObject *obj = (PK11GenericObject *)ptr; + struct ptr_list_wrap *wrap = (struct ptr_list_wrap *) ptr; + PK11GenericObject *obj = (PK11GenericObject *) wrap->ptr; (void) user; PK11_DestroyGenericObject(obj); + free(wrap); } /* same as nss_destroy_object() but for CRL items */ static void nss_destroy_crl_item(void *user, void *ptr) { - SECItem *crl_der = (SECItem *)ptr; + struct ptr_list_wrap *wrap = (struct ptr_list_wrap *) ptr; + SECItem *crl_der = (SECItem *) wrap->ptr; (void) user; SECITEM_FreeItem(crl_der, PR_TRUE); + free(wrap); } static CURLcode nss_load_cert(struct ssl_connect_data *ssl, @@ -496,7 +522,7 @@ static CURLcode nss_cache_crl(SECItem *crl_der) PR_Lock(nss_crllock); /* store the CRL item so that we can free it in Curl_nss_cleanup() */ - if(!Curl_llist_insert_next(&nss_crl_list, nss_crl_list.tail, crl_der)) { + if(insert_wrapped_ptr(&nss_crl_list, crl_der) != CURLE_OK) { SECITEM_FreeItem(crl_der, PR_TRUE); PR_Unlock(nss_crllock); return CURLE_OUT_OF_MEMORY; @@ -581,7 +607,7 @@ fail: static CURLcode nss_load_key(struct connectdata *conn, int sockindex, char *key_file) { - PK11SlotInfo *slot; + PK11SlotInfo *slot, *tmp; SECStatus status; CURLcode result; struct ssl_connect_data *ssl = conn->ssl; @@ -600,7 +626,9 @@ static CURLcode nss_load_key(struct connectdata *conn, int sockindex, return CURLE_SSL_CERTPROBLEM; /* This will force the token to be seen as re-inserted */ - SECMOD_WaitForAnyTokenEvent(mod, 0, 0); + tmp = SECMOD_WaitForAnyTokenEvent(pem_module, 0, 0); + if(tmp) + PK11_FreeSlot(tmp); PK11_IsPresent(slot); status = PK11_Authenticate(slot, PR_TRUE, SSL_SET_OPTION(key_passwd)); @@ -1178,6 +1206,50 @@ static PRStatus nspr_io_close(PRFileDesc *fd) return close_fn(fd); } +/* load a PKCS #11 module */ +static CURLcode nss_load_module(SECMODModule **pmod, const char *library, + const char *name) +{ + char *config_string; + SECMODModule *module = *pmod; + if(module) + /* already loaded */ + return CURLE_OK; + + config_string = aprintf("library=%s name=%s", library, name); + if(!config_string) + return CURLE_OUT_OF_MEMORY; + + module = SECMOD_LoadUserModule(config_string, NULL, PR_FALSE); + free(config_string); + + if(module && module->loaded) { + /* loaded successfully */ + *pmod = module; + return CURLE_OK; + } + + if(module) + SECMOD_DestroyModule(module); + return CURLE_FAILED_INIT; +} + +/* unload a PKCS #11 module */ +static void nss_unload_module(SECMODModule **pmod) +{ + SECMODModule *module = *pmod; + if(!module) + /* not loaded */ + return; + + if(SECMOD_UnloadUserModule(module) != SECSuccess) + /* unload failed */ + return; + + SECMOD_DestroyModule(module); + *pmod = NULL; +} + /* data might be NULL */ static CURLcode nss_init_core(struct Curl_easy *data, const char *cert_dir) { @@ -1287,6 +1359,7 @@ int Curl_nss_init(void) nss_initlock = PR_NewLock(); nss_crllock = PR_NewLock(); nss_findslot_lock = PR_NewLock(); + nss_trustload_lock = PR_NewLock(); } /* We will actually initialize NSS later */ @@ -1325,10 +1398,8 @@ void Curl_nss_cleanup(void) * the certificates. */ SSL_ClearSessionCache(); - if(mod && SECSuccess == SECMOD_UnloadUserModule(mod)) { - SECMOD_DestroyModule(mod); - mod = NULL; - } + nss_unload_module(&pem_module); + nss_unload_module(&trust_module); NSS_ShutdownContext(nss_context); nss_context = NULL; } @@ -1341,6 +1412,7 @@ void Curl_nss_cleanup(void) PR_DestroyLock(nss_initlock); PR_DestroyLock(nss_crllock); PR_DestroyLock(nss_findslot_lock); + PR_DestroyLock(nss_trustload_lock); nss_initlock = NULL; initialized = 0; @@ -1462,12 +1534,44 @@ static CURLcode nss_load_ca_certificates(struct connectdata *conn, struct Curl_easy *data = conn->data; const char *cafile = SSL_CONN_CONFIG(CAfile); const char *capath = SSL_CONN_CONFIG(CApath); + bool use_trust_module; + CURLcode result = CURLE_OK; - if(cafile) { - CURLcode result = nss_load_cert(&conn->ssl[sockindex], cafile, PR_TRUE); - if(result) - return result; + /* treat empty string as unset */ + if(cafile && !cafile[0]) + cafile = NULL; + if(capath && !capath[0]) + capath = NULL; + + infof(data, " CAfile: %s\n CApath: %s\n", + cafile ? cafile : "none", + capath ? capath : "none"); + + /* load libnssckbi.so if no other trust roots were specified */ + use_trust_module = !cafile && !capath; + + PR_Lock(nss_trustload_lock); + if(use_trust_module && !trust_module) { + /* libnssckbi.so needed but not yet loaded --> load it! */ + result = nss_load_module(&trust_module, trust_library, "trust"); + infof(data, "%s %s\n", (result) ? "failed to load" : "loaded", + trust_library); + if(result == CURLE_FAILED_INIT) + /* make the error non-fatal if we are not going to verify peer */ + result = CURLE_SSL_CACERT_BADFILE; } + else if(!use_trust_module && trust_module) { + /* libnssckbi.so not needed but already loaded --> unload it! */ + infof(data, "unloading %s\n", trust_library); + nss_unload_module(&trust_module); + } + PR_Unlock(nss_trustload_lock); + + if(cafile) + result = nss_load_cert(&conn->ssl[sockindex], cafile, PR_TRUE); + + if(result) + return result; if(capath) { struct_stat st; @@ -1501,10 +1605,6 @@ static CURLcode nss_load_ca_certificates(struct connectdata *conn, infof(data, "warning: CURLOPT_CAPATH not a directory (%s)\n", capath); } - infof(data, " CAfile: %s\n CApath: %s\n", - cafile ? cafile : "none", - capath ? capath : "none"); - return CURLE_OK; } @@ -1683,29 +1783,17 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) goto error; } - result = CURLE_SSL_CONNECT_ERROR; - - if(!mod) { - char *configstring = aprintf("library=%s name=PEM", pem_library); - if(!configstring) { - PR_Unlock(nss_initlock); - goto error; - } - mod = SECMOD_LoadUserModule(configstring, NULL, PR_FALSE); - free(configstring); - - if(!mod || !mod->loaded) { - if(mod) { - SECMOD_DestroyModule(mod); - mod = NULL; - } - infof(data, "WARNING: failed to load NSS PEM library %s. Using " - "OpenSSL PEM certificates will not work.\n", pem_library); - } - } - PK11_SetPasswordFunc(nss_get_password); + + result = nss_load_module(&pem_module, pem_library, "PEM"); PR_Unlock(nss_initlock); + if(result == CURLE_FAILED_INIT) + infof(data, "WARNING: failed to load NSS PEM library %s. Using " + "OpenSSL PEM certificates will not work.\n", pem_library); + else if(result) + goto error; + + result = CURLE_SSL_CONNECT_ERROR; model = PR_NewTCPSocket(); if(!model) diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 58a014a..dbee369 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -236,8 +236,8 @@ static CURLcode Curl_ossl_seed(struct Curl_easy *data) /* we have the "SSL is seeded" boolean static to prevent multiple time-consuming seedings in vain */ static bool ssl_seeded = FALSE; - char *buf = data->state.buffer; /* point to the big buffer */ int nread=0; + char fname[256]; if(ssl_seeded) return CURLE_OK; @@ -297,11 +297,11 @@ static CURLcode Curl_ossl_seed(struct Curl_easy *data) } while(!rand_enough()); /* generates a default path for the random seed file */ - buf[0]=0; /* blank it first */ - RAND_file_name(buf, BUFSIZE); - if(buf[0]) { + fname[0]=0; /* blank it first */ + RAND_file_name(fname, sizeof(fname)); + if(fname[0]) { /* we got a file name to try */ - nread += RAND_load_file(buf, RAND_LOAD_LENGTH); + nread += RAND_load_file(fname, RAND_LOAD_LENGTH); if(rand_enough()) return nread; } @@ -1371,7 +1371,8 @@ static CURLcode verifystatus(struct connectdata *conn, st = SSL_CTX_get_cert_store(connssl->ctx); #if ((OPENSSL_VERSION_NUMBER <= 0x1000201fL) /* Fixed after 1.0.2a */ || \ - defined(LIBRESSL_VERSION_NUMBER)) + (defined(LIBRESSL_VERSION_NUMBER) && \ + LIBRESSL_VERSION_NUMBER <= 0x2040200fL)) /* The authorized responder cert in the OCSP response MUST be signed by the peer cert's issuer (see RFC6960 section 4.2.2.2). If that's a root cert, no problem, but if it's an intermediate cert OpenSSL has a bug where it @@ -2807,7 +2808,7 @@ static CURLcode servercert(struct connectdata *conn, struct Curl_easy *data = conn->data; X509 *issuer; FILE *fp; - char *buffer = data->state.buffer; + char buffer[2048]; const char *ptr; long * const certverifyresult = SSL_IS_PROXY() ? &data->set.proxy_ssl.certverifyresult : &data->set.ssl.certverifyresult; @@ -2819,6 +2820,7 @@ static CURLcode servercert(struct connectdata *conn, connssl->server_cert = SSL_get_peer_certificate(connssl->handle); if(!connssl->server_cert) { + BIO_free(mem); if(!strict) return CURLE_OK; @@ -2829,7 +2831,7 @@ static CURLcode servercert(struct connectdata *conn, infof(data, "%s certificate:\n", SSL_IS_PROXY() ? "Proxy" : "Server"); rc = x509_name_oneline(X509_get_subject_name(connssl->server_cert), - buffer, BUFSIZE); + buffer, sizeof(buffer)); infof(data, " subject: %s\n", rc?"[NONE]":buffer); ASN1_TIME_print(mem, X509_get0_notBefore(connssl->server_cert)); @@ -2854,7 +2856,7 @@ static CURLcode servercert(struct connectdata *conn, } rc = x509_name_oneline(X509_get_issuer_name(connssl->server_cert), - buffer, BUFSIZE); + buffer, sizeof(buffer)); if(rc) { if(strict) failf(data, "SSL: couldn't get X509-issuer name!"); diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index c9b5132..9460301 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -432,6 +432,7 @@ schannel_connect_step1(struct connectdata *conn, int sockindex) connssl->recv_unrecoverable_err = CURLE_OK; connssl->recv_sspi_close_notify = false; connssl->recv_connection_closed = false; + connssl->encdata_is_incomplete = false; /* continue to second handshake step */ connssl->connecting_state = ssl_connect_2; @@ -480,6 +481,7 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) /* buffer to store previously received and encrypted data */ if(connssl->encdata_buffer == NULL) { + connssl->encdata_is_incomplete = false; connssl->encdata_offset = 0; connssl->encdata_length = CURL_SCHANNEL_BUFFER_INIT_SIZE; connssl->encdata_buffer = malloc(connssl->encdata_length); @@ -532,6 +534,8 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) /* increase encrypted data buffer offset */ connssl->encdata_offset += nread; + connssl->encdata_is_incomplete = false; + infof(data, "schannel: encrypted data got %zd\n", nread); } infof(data, "schannel: encrypted data buffer: offset %zu length %zu\n", @@ -576,6 +580,7 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) /* check if the handshake was incomplete */ if(sspi_status == SEC_E_INCOMPLETE_MESSAGE) { + connssl->encdata_is_incomplete = true; connssl->connecting_state = ssl_connect_2_reading; infof(data, "schannel: received incomplete message, need more data\n"); return CURLE_OK; @@ -625,7 +630,8 @@ schannel_connect_step2(struct connectdata *conn, int sockindex) else failf(data, "schannel: next InitializeSecurityContext failed: %s", Curl_sspi_strerror(conn, sspi_status)); - return CURLE_SSL_CONNECT_ERROR; + return sspi_status == SEC_E_UNTRUSTED_ROOT ? + CURLE_SSL_CACERT_BADFILE : CURLE_SSL_CONNECT_ERROR; } /* check if there was additional remaining encrypted data */ @@ -1177,6 +1183,7 @@ schannel_recv(struct connectdata *conn, int sockindex, } else if(nread > 0) { connssl->encdata_offset += (size_t)nread; + connssl->encdata_is_incomplete = false; infof(data, "schannel: encrypted data got %zd\n", nread); } } @@ -1313,6 +1320,7 @@ schannel_recv(struct connectdata *conn, int sockindex, } } else if(sspi_status == SEC_E_INCOMPLETE_MESSAGE) { + connssl->encdata_is_incomplete = true; if(!*err) *err = CURLE_AGAIN; infof(data, "schannel: failed to decrypt data, need more data\n"); @@ -1414,8 +1422,8 @@ bool Curl_schannel_data_pending(const struct connectdata *conn, int sockindex) const struct ssl_connect_data *connssl = &conn->ssl[sockindex]; if(connssl->use) /* SSL/TLS is in use */ - return (connssl->encdata_offset > 0 || - connssl->decdata_offset > 0) ? TRUE : FALSE; + return (connssl->decdata_offset > 0 || + (connssl->encdata_offset > 0 && !connssl->encdata_is_incomplete)); else return FALSE; } @@ -1518,6 +1526,7 @@ int Curl_schannel_shutdown(struct connectdata *conn, int sockindex) Curl_safefree(connssl->encdata_buffer); connssl->encdata_length = 0; connssl->encdata_offset = 0; + connssl->encdata_is_incomplete = false; } /* free internal buffer for received decrypted data */ diff --git a/lib/x509asn1.c b/lib/x509asn1.c index c4bc7c1..bba2023 100644 --- a/lib/x509asn1.c +++ b/lib/x509asn1.c @@ -466,6 +466,7 @@ static const char *GTime2str(const char *beg, const char *end) break; case 2: sec1 = fracp[-2]; + /* FALLTHROUGH */ case 1: sec2 = fracp[-1]; break; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=91101f108d68e8fe98c378f06e1ed12a513151fe commit 91101f108d68e8fe98c378f06e1ed12a513151fe Author: Brad King AuthorDate: Wed Jun 14 10:46:19 2017 -0400 Commit: Brad King CommitDate: Wed Jun 14 10:46:19 2017 -0400 curl: Update script to get curl 7.54.1 diff --git a/Utilities/Scripts/update-curl.bash b/Utilities/Scripts/update-curl.bash index d270d37..465841a 100755 --- a/Utilities/Scripts/update-curl.bash +++ b/Utilities/Scripts/update-curl.bash @@ -8,7 +8,7 @@ readonly name="curl" readonly ownership="Curl Upstream " readonly subtree="Utilities/cmcurl" readonly repo="https://github.com/curl/curl.git" -readonly tag="curl-7_54_0" +readonly tag="curl-7_54_1" readonly shortlog=false readonly paths=" CMake/* ----------------------------------------------------------------------- Summary of changes: Source/cmakemain.cxx | 16 +++ Utilities/Scripts/update-curl.bash | 2 +- Utilities/cmcurl/CMakeLists.txt | 81 +++++++++++- Utilities/cmcurl/include/curl/curl.h | 7 +- Utilities/cmcurl/include/curl/curlver.h | 12 +- Utilities/cmcurl/include/curl/typecheck-gcc.h | 160 ++++++++++++++--------- Utilities/cmcurl/lib/asyn-ares.c | 12 +- Utilities/cmcurl/lib/asyn-thread.c | 14 +-- Utilities/cmcurl/lib/conncache.c | 8 +- Utilities/cmcurl/lib/connect.c | 6 +- Utilities/cmcurl/lib/curl_endian.c | 114 +---------------- Utilities/cmcurl/lib/curl_endian.h | 26 +--- Utilities/cmcurl/lib/curl_md4.h | 8 +- Utilities/cmcurl/lib/curl_ntlm_core.c | 10 +- Utilities/cmcurl/lib/curl_rtmp.c | 1 + Utilities/cmcurl/lib/curl_sasl.c | 7 +- Utilities/cmcurl/lib/curl_setup.h | 14 ++- Utilities/cmcurl/lib/curl_setup_once.h | 2 +- Utilities/cmcurl/lib/dotdot.c | 3 +- Utilities/cmcurl/lib/easy.c | 18 ++- Utilities/cmcurl/lib/file.c | 24 ++-- Utilities/cmcurl/lib/fileinfo.c | 14 +-- Utilities/cmcurl/lib/fileinfo.h | 12 +- Utilities/cmcurl/lib/formdata.c | 45 +++---- Utilities/cmcurl/lib/ftp.c | 37 +++--- Utilities/cmcurl/lib/ftplistparser.c | 49 ++++---- Utilities/cmcurl/lib/hash.c | 14 +-- Utilities/cmcurl/lib/hash.h | 1 + Utilities/cmcurl/lib/hostip.c | 8 +- Utilities/cmcurl/lib/http.c | 89 +++++++------ Utilities/cmcurl/lib/http2.c | 64 +++++----- Utilities/cmcurl/lib/http_proxy.c | 73 ++++++----- Utilities/cmcurl/lib/http_proxy.h | 7 +- Utilities/cmcurl/lib/if2ip.c | 2 +- Utilities/cmcurl/lib/krb5.c | 14 ++- Utilities/cmcurl/lib/ldap.c | 101 ++++++++++++--- Utilities/cmcurl/lib/llist.c | 35 +++--- Utilities/cmcurl/lib/llist.h | 15 +-- Utilities/cmcurl/lib/md4.c | 12 +- Utilities/cmcurl/lib/md5.c | 2 +- Utilities/cmcurl/lib/memdebug.c | 22 ++-- Utilities/cmcurl/lib/mprintf.c | 8 +- Utilities/cmcurl/lib/multi.c | 164 ++++++++++-------------- Utilities/cmcurl/lib/multihandle.h | 1 + Utilities/cmcurl/lib/multiif.h | 7 +- Utilities/cmcurl/lib/pingpong.c | 15 ++- Utilities/cmcurl/lib/pipeline.c | 56 ++++----- Utilities/cmcurl/lib/rand.c | 63 ++++++++-- Utilities/cmcurl/lib/rand.h | 12 +- Utilities/cmcurl/lib/sendf.c | 77 ++++++------ Utilities/cmcurl/lib/smb.c | 2 +- Utilities/cmcurl/lib/smtp.c | 2 +- Utilities/cmcurl/lib/speedcheck.c | 2 +- Utilities/cmcurl/lib/ssh.c | 38 +++--- Utilities/cmcurl/lib/telnet.c | 100 +++++++++------ Utilities/cmcurl/lib/tftp.c | 8 +- Utilities/cmcurl/lib/timeval.c | 6 - Utilities/cmcurl/lib/timeval.h | 2 - Utilities/cmcurl/lib/transfer.c | 127 +++++++++---------- Utilities/cmcurl/lib/url.c | 156 +++++++++++++++-------- Utilities/cmcurl/lib/urldata.h | 52 ++++++-- Utilities/cmcurl/lib/vauth/digest.c | 19 +-- Utilities/cmcurl/lib/vauth/ntlm.c | 14 +-- Utilities/cmcurl/lib/vtls/cyassl.c | 64 +++++----- Utilities/cmcurl/lib/vtls/darwinssl.c | 158 ++++++++++++++++++++++- Utilities/cmcurl/lib/vtls/darwinssl.h | 24 ++++ Utilities/cmcurl/lib/vtls/gtls.c | 19 +-- Utilities/cmcurl/lib/vtls/mbedtls.c | 13 +- Utilities/cmcurl/lib/vtls/nss.c | 168 +++++++++++++++++++------ Utilities/cmcurl/lib/vtls/openssl.c | 20 +-- Utilities/cmcurl/lib/vtls/schannel.c | 15 ++- Utilities/cmcurl/lib/x509asn1.c | 1 + 72 files changed, 1531 insertions(+), 1043 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 15 10:15:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 15 Jun 2017 10:15:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-96-g41897b4 Message-ID: <20170615141503.8C98CFA361@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 41897b4665d49690200024eb18e083861730779b (commit) via d3b981ab3ec7a0f66d408aa33700dfe4d570adff (commit) via 61c1848cdc88cc5d36b23d14d0721ba832739a58 (commit) via df1c187f2fdfa48bd36d770bac23f6503fd9b071 (commit) via 8e32bebd8d3e3010240f8187a84e1c2513840920 (commit) via ba247ccabab05c0aad4fe7f56dd020bfa8ff4583 (commit) from df6f3ef9a6a2de945f43bf1f60e19d60f3137188 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=41897b4665d49690200024eb18e083861730779b commit 41897b4665d49690200024eb18e083861730779b Merge: d3b981a 61c1848 Author: Brad King AuthorDate: Thu Jun 15 10:06:25 2017 -0400 Commit: Brad King CommitDate: Thu Jun 15 10:06:25 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d3b981ab3ec7a0f66d408aa33700dfe4d570adff commit d3b981ab3ec7a0f66d408aa33700dfe4d570adff Merge: df6f3ef ba247cc Author: Brad King AuthorDate: Thu Jun 15 14:04:55 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 15 10:05:02 2017 -0400 Merge topic 'ipo-per-lang' ba247cca IPO: Consider support for each language separately Acked-by: Kitware Robot Merge-request: !964 ----------------------------------------------------------------------- Summary of changes: Modules/CheckIPOSupported.cmake | 18 ++++++++------- Modules/Compiler/Clang.cmake | 4 ++-- Modules/Compiler/GNU.cmake | 6 ++--- Modules/Compiler/QCC.cmake | 4 ++-- Modules/Platform/Linux-Intel.cmake | 8 +++---- Source/cmGeneratorTarget.cxx | 23 +++++++++++++------- Source/cmGeneratorTarget.h | 5 +++-- Source/cmGlobalXCodeGenerator.cxx | 2 +- Source/cmLocalGenerator.cxx | 4 ++-- Source/cmLocalVisualStudio7Generator.cxx | 2 +- Source/cmMakefileLibraryTargetGenerator.cxx | 6 ++--- Source/cmNinjaNormalTargetGenerator.cxx | 4 ++-- Source/cmVisualStudio10TargetGenerator.cxx | 2 +- Tests/RunCMake/CMP0069/CMP0069-NEW-cmake.cmake | 2 +- Tests/RunCMake/CMP0069/CMP0069-NEW-compiler.cmake | 4 ++-- Tests/RunCMake/CMP0069/CMP0069-NEW-generator.cmake | 4 ++-- Tests/RunCMake/CMP0069/CMP0069-WARN.cmake | 2 +- .../not-supported-by-cmake-stderr.txt | 2 +- .../CheckIPOSupported/not-supported-by-cmake.cmake | 2 +- .../not-supported-by-compiler-stderr.txt | 2 +- .../not-supported-by-compiler.cmake | 4 ++-- .../not-supported-by-generator.cmake | 4 ++-- 22 files changed, 62 insertions(+), 52 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 15 10:15:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 15 Jun 2017 10:15:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc3-12-g61c1848 Message-ID: <20170615141503.BF8A6FA371@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via 61c1848cdc88cc5d36b23d14d0721ba832739a58 (commit) via df1c187f2fdfa48bd36d770bac23f6503fd9b071 (commit) via 8e32bebd8d3e3010240f8187a84e1c2513840920 (commit) via 871adefce97246ec42a157f62e39855b434c523d (commit) via a3ef36f153f51c33ea2154cff17bbf9abb7ee073 (commit) via 06d6d6c4aee149cd6560b919ef6935ef0867d921 (commit) via 91101f108d68e8fe98c378f06e1ed12a513151fe (commit) via ba247ccabab05c0aad4fe7f56dd020bfa8ff4583 (commit) from fdacfc6604c09e11ef2dd7bc8c4da8dfab9a8244 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Modules/CheckIPOSupported.cmake | 18 ++- Modules/Compiler/Clang.cmake | 4 +- Modules/Compiler/GNU.cmake | 6 +- Modules/Compiler/QCC.cmake | 4 +- Modules/Platform/Linux-Intel.cmake | 8 +- Source/cmGeneratorTarget.cxx | 23 ++- Source/cmGeneratorTarget.h | 5 +- Source/cmGlobalXCodeGenerator.cxx | 2 +- Source/cmLocalGenerator.cxx | 4 +- Source/cmLocalVisualStudio7Generator.cxx | 2 +- Source/cmMakefileLibraryTargetGenerator.cxx | 6 +- Source/cmNinjaNormalTargetGenerator.cxx | 4 +- Source/cmVisualStudio10TargetGenerator.cxx | 2 +- Source/cmakemain.cxx | 16 ++ Tests/RunCMake/CMP0069/CMP0069-NEW-cmake.cmake | 2 +- Tests/RunCMake/CMP0069/CMP0069-NEW-compiler.cmake | 4 +- Tests/RunCMake/CMP0069/CMP0069-NEW-generator.cmake | 4 +- Tests/RunCMake/CMP0069/CMP0069-WARN.cmake | 2 +- .../not-supported-by-cmake-stderr.txt | 2 +- .../CheckIPOSupported/not-supported-by-cmake.cmake | 2 +- .../not-supported-by-compiler-stderr.txt | 2 +- .../not-supported-by-compiler.cmake | 4 +- .../not-supported-by-generator.cmake | 4 +- Utilities/Scripts/update-curl.bash | 2 +- Utilities/cmcurl/CMakeLists.txt | 81 +++++++++- Utilities/cmcurl/include/curl/curl.h | 7 +- Utilities/cmcurl/include/curl/curlver.h | 12 +- Utilities/cmcurl/include/curl/typecheck-gcc.h | 160 ++++++++++++------- Utilities/cmcurl/lib/asyn-ares.c | 12 +- Utilities/cmcurl/lib/asyn-thread.c | 14 +- Utilities/cmcurl/lib/conncache.c | 8 +- Utilities/cmcurl/lib/connect.c | 6 +- Utilities/cmcurl/lib/curl_endian.c | 114 +------------ Utilities/cmcurl/lib/curl_endian.h | 26 +-- Utilities/cmcurl/lib/curl_md4.h | 8 +- Utilities/cmcurl/lib/curl_ntlm_core.c | 10 +- Utilities/cmcurl/lib/curl_rtmp.c | 1 + Utilities/cmcurl/lib/curl_sasl.c | 7 +- Utilities/cmcurl/lib/curl_setup.h | 14 +- Utilities/cmcurl/lib/curl_setup_once.h | 2 +- Utilities/cmcurl/lib/dotdot.c | 3 +- Utilities/cmcurl/lib/easy.c | 18 ++- Utilities/cmcurl/lib/file.c | 24 ++- Utilities/cmcurl/lib/fileinfo.c | 14 +- Utilities/cmcurl/lib/fileinfo.h | 12 +- Utilities/cmcurl/lib/formdata.c | 45 ++---- Utilities/cmcurl/lib/ftp.c | 37 ++--- Utilities/cmcurl/lib/ftplistparser.c | 49 +++--- Utilities/cmcurl/lib/hash.c | 14 +- Utilities/cmcurl/lib/hash.h | 1 + Utilities/cmcurl/lib/hostip.c | 8 +- Utilities/cmcurl/lib/http.c | 89 ++++++----- Utilities/cmcurl/lib/http2.c | 64 ++++---- Utilities/cmcurl/lib/http_proxy.c | 73 +++++---- Utilities/cmcurl/lib/http_proxy.h | 7 +- Utilities/cmcurl/lib/if2ip.c | 2 +- Utilities/cmcurl/lib/krb5.c | 14 +- Utilities/cmcurl/lib/ldap.c | 101 ++++++++++-- Utilities/cmcurl/lib/llist.c | 35 ++-- Utilities/cmcurl/lib/llist.h | 15 +- Utilities/cmcurl/lib/md4.c | 12 +- Utilities/cmcurl/lib/md5.c | 2 +- Utilities/cmcurl/lib/memdebug.c | 22 ++- Utilities/cmcurl/lib/mprintf.c | 8 +- Utilities/cmcurl/lib/multi.c | 164 ++++++++----------- Utilities/cmcurl/lib/multihandle.h | 1 + Utilities/cmcurl/lib/multiif.h | 7 +- Utilities/cmcurl/lib/pingpong.c | 15 +- Utilities/cmcurl/lib/pipeline.c | 56 +++---- Utilities/cmcurl/lib/rand.c | 63 +++++++- Utilities/cmcurl/lib/rand.h | 12 +- Utilities/cmcurl/lib/sendf.c | 77 +++++---- Utilities/cmcurl/lib/smb.c | 2 +- Utilities/cmcurl/lib/smtp.c | 2 +- Utilities/cmcurl/lib/speedcheck.c | 2 +- Utilities/cmcurl/lib/ssh.c | 38 +++-- Utilities/cmcurl/lib/telnet.c | 100 +++++++----- Utilities/cmcurl/lib/tftp.c | 8 +- Utilities/cmcurl/lib/timeval.c | 6 - Utilities/cmcurl/lib/timeval.h | 2 - Utilities/cmcurl/lib/transfer.c | 127 +++++++-------- Utilities/cmcurl/lib/url.c | 156 ++++++++++++------ Utilities/cmcurl/lib/urldata.h | 52 ++++-- Utilities/cmcurl/lib/vauth/digest.c | 19 +-- Utilities/cmcurl/lib/vauth/ntlm.c | 14 +- Utilities/cmcurl/lib/vtls/cyassl.c | 64 ++++---- Utilities/cmcurl/lib/vtls/darwinssl.c | 158 +++++++++++++++++- Utilities/cmcurl/lib/vtls/darwinssl.h | 24 +++ Utilities/cmcurl/lib/vtls/gtls.c | 19 ++- Utilities/cmcurl/lib/vtls/mbedtls.c | 13 +- Utilities/cmcurl/lib/vtls/nss.c | 168 +++++++++++++++----- Utilities/cmcurl/lib/vtls/openssl.c | 20 +-- Utilities/cmcurl/lib/vtls/schannel.c | 15 +- Utilities/cmcurl/lib/x509asn1.c | 1 + 94 files changed, 1593 insertions(+), 1095 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 15 10:25:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 15 Jun 2017 10:25:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-103-g7c5299a Message-ID: <20170615142504.07C21FA78C@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 7c5299add429d4b4714a6070bc6f8186585e9a2f (commit) via f3ffd18ab6ea78d6a13e83a4d890a619a5a2705c (commit) via 2afc4bf60843872e7d9fa883c61427facdbb4cae (commit) via 1c5471527e08b3a1c883889024773678741b77d0 (commit) via 4e3483c0074e07efaffd5269a4b5fb1a38a2bc50 (commit) via 76a0286b1d53ba35d6fa7cee152259bc040d80fb (commit) via c90630c501fed40078b280fe940535ff9545c2c9 (commit) from 41897b4665d49690200024eb18e083861730779b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c5299add429d4b4714a6070bc6f8186585e9a2f commit 7c5299add429d4b4714a6070bc6f8186585e9a2f Merge: f3ffd18 1c54715 Author: Brad King AuthorDate: Thu Jun 15 14:23:34 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 15 10:23:38 2017 -0400 Merge topic 'doc-test-layout' 1c547152 Tests: Document test directory layout in a README.rst 4e3483c0 Help/dev: Update source code guide to cover source tree layout Acked-by: Kitware Robot Merge-request: !967 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f3ffd18ab6ea78d6a13e83a4d890a619a5a2705c commit f3ffd18ab6ea78d6a13e83a4d890a619a5a2705c Merge: 2afc4bf c90630c Author: Brad King AuthorDate: Thu Jun 15 14:22:07 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 15 10:22:12 2017 -0400 Merge topic 'vs_csharp_prop_for_all_extensions' c90630c5 Vs: add support for VS_CSHARP_* target property for additional file extensions Acked-by: Kitware Robot Merge-request: !961 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2afc4bf60843872e7d9fa883c61427facdbb4cae commit 2afc4bf60843872e7d9fa883c61427facdbb4cae Merge: 41897b4 76a0286 Author: Brad King AuthorDate: Thu Jun 15 14:20:04 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 15 10:20:08 2017 -0400 Merge topic 'UseSWIG-avoid-dllimport-repeat' 76a0286b UseSWIG: Add `-dllimport` only if not already specified Acked-by: Kitware Robot Merge-request: !958 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c5471527e08b3a1c883889024773678741b77d0 commit 1c5471527e08b3a1c883889024773678741b77d0 Author: Brad King AuthorDate: Wed Jun 14 15:04:19 2017 -0400 Commit: Brad King CommitDate: Wed Jun 14 15:04:19 2017 -0400 Tests: Document test directory layout in a README.rst Cross-reference the CMake Source Code Guide document. Also drop the outdated `Tests/README` file. diff --git a/Help/dev/source.rst b/Help/dev/source.rst index 0fa8d77..16a9252 100644 --- a/Help/dev/source.rst +++ b/Help/dev/source.rst @@ -93,7 +93,7 @@ The CMake source tree is organized as follows. packagers, etc. * ``Tests/``: - The test suite. + The test suite. See `Tests/README.rst`_. * ``Utilities/``: Scripts, third-party source code. @@ -103,3 +103,5 @@ The CMake source tree is organized as follows. * ``Utilities/Release/``: Scripts used to package CMake itself for distribution on ``cmake.org``. + +.. _`Tests/README.rst`: ../../Tests/README.rst diff --git a/Tests/README b/Tests/README deleted file mode 100644 index 8b2fda8..0000000 --- a/Tests/README +++ /dev/null @@ -1,39 +0,0 @@ -If you think about adding a new testcase then here is a small checklist you -can run through to find a proper place for it. Go through the list from the -beginning and stop once you find something that matches your tests needs, -i.e. if you will test a module and only need the configure mode use the -instructions from section 2, not 3. - -1. Your testcase can run in CMake script mode, i.e. "cmake -P something" - -Put your test in Tests/CMakeTests/ directory as a .cmake.in file. It will be -put into the test binary directory by configure_file(... @ONLY) and run from -there. Use the AddCMakeTest() macro in Tests/CMakeTests/CMakeLists.txt to add -your test to the test runs. - -2. Your test needs CMake to run in configure mode, but will not build anything - -This includes tests that will build something using try_compile() and friends, -but nothing that expects add_executable(), add_library(), or add_test() to run. - -If the test configures the project only once and it must succeed then put it -into the Tests/CMakeOnly/ directory. Create a subdirectory named like your -test and write the CMakeLists.txt you need into that subdirectory. Use the -add_CMakeOnly_test() macro from Tests/CMakeOnly/CMakeLists.txt to add your -test to the test runs. - -If the test configures the project with multiple variations and verifies -success or failure each time then put it into the Tests/RunCMake/ directory. -Read the instructions in Tests/RunCMake/CMakeLists.txt to add a test. - -3. If you are testing something from the Modules directory - -Put your test in the Tests/Modules/ directory. Create a subdirectory there -named after your test. Use the ADD_TEST_MACRO macro from Tests/CMakeLists.txt -to add your test to the test run. If you have put your stuff in -Tests/Modules/Foo then you call it using ADD_TEST_MACRO(Module.Foo Foo). - -4. You are doing other stuff. - -Find a good place ;) In doubt mail to cmake-developers at cmake.org and ask for -advise. diff --git a/Tests/README.rst b/Tests/README.rst new file mode 100644 index 0000000..3e98938 --- /dev/null +++ b/Tests/README.rst @@ -0,0 +1,31 @@ +CMake Tests Directory +********************* + +This directory contains the CMake test suite. +See also the `CMake Source Code Guide`_. + +.. _`CMake Source Code Guide`: ../Help/dev/source.rst + +Many tests exist as immediate subdirectories, but some tests +are organized as follows. + +* ``CMakeLib/``: + Source code, used for tests, that links to the ``CMakeLib`` library + defined over in ``Source/``. + +* ``CMakeOnly/``: + Deprecated. Tests that run CMake to generate a project but not build it. + Superseded by ``Tests/RunCMake/``. + +* ``Find*/``: + Tests for specific find modules that can only be run on machines with + the corresponding packages installed. They are enabled in + ``CMakeLists.txt`` by undocumented options used on CI builds. + +* ``Module/``: + Tests for specific CMake modules. + +* ``RunCMake/``: + Tests that run CMake and/or other tools while precisely checking + their return code and stdout/stderr content. Useful for testing + error cases and diagnostic output. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4e3483c0074e07efaffd5269a4b5fb1a38a2bc50 commit 4e3483c0074e07efaffd5269a4b5fb1a38a2bc50 Author: Brad King AuthorDate: Wed Jun 14 14:47:38 2017 -0400 Commit: Brad King CommitDate: Wed Jun 14 15:03:50 2017 -0400 Help/dev: Update source code guide to cover source tree layout diff --git a/Help/dev/source.rst b/Help/dev/source.rst index 7e44995..0fa8d77 100644 --- a/Help/dev/source.rst +++ b/Help/dev/source.rst @@ -58,3 +58,48 @@ need to be handled with care: When assigning the result of ``.size()`` on a container for example, the result should be assigned to ``size_t`` not to ``std::size_t``, ``unsigned int`` or similar types. + +Source Tree Layout +================== + +The CMake source tree is organized as follows. + +* ``Auxiliary/``: + Shell and editor integration files. + +* ``Help/``: + Documentation. + + * ``Help/dev/``: + Developer documentation. + + * ``Help/release/dev/``: + Release note snippets for development since last release. + +* ``Licenses/``: + License files for third-party libraries in binary distributions. + +* ``Modules/``: + CMake language modules installed with CMake. + +* ``Packaging/``: + Files used for packaging CMake itself for distribution. + +* ``Source/``: + Source code of CMake itself. + +* ``Templates/``: + Files distributed with CMake as implementation details for generators, + packagers, etc. + +* ``Tests/``: + The test suite. + +* ``Utilities/``: + Scripts, third-party source code. + + * ``Utilities/Sphinx/``: + Sphinx configuration to build CMake user documentation. + + * ``Utilities/Release/``: + Scripts used to package CMake itself for distribution on ``cmake.org``. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=76a0286b1d53ba35d6fa7cee152259bc040d80fb commit 76a0286b1d53ba35d6fa7cee152259bc040d80fb Author: Robert Langlois AuthorDate: Mon Jun 12 16:18:27 2017 -0400 Commit: Mona Lisa CommitDate: Tue Jun 13 18:07:32 2017 -0700 UseSWIG: Add `-dllimport` only if not already specified SWIG fails with a redefined macro error when `-dllimport` is specified more than once. One case where you would want to specify your own dllimport is when using SWIG with netstandard2.0. .NET Core does not search for shared library like Mono or .NET, so you need a fully qualified shared library name. diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index bfe1a6f..456a6bd 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -82,10 +82,6 @@ macro(SWIG_MODULE_INITIALIZE name language) set(SWIG_MODULE_${name}_REAL_NAME "_${name}") elseif("x${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "xPERL") set(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow") - elseif("x${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "xCSHARP") - # This makes sure that the name used in the generated DllImport - # matches the library name created by CMake - set(SWIG_MODULE_${name}_EXTRA_FLAGS "-dllimport;${name}") endif() endmacro() @@ -192,6 +188,13 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) if(swig_source_file_cplusplus) set(swig_special_flags ${swig_special_flags} "-c++") endif() + if("x${SWIG_MODULE_${name}_LANGUAGE}" STREQUAL "xCSHARP") + if(NOT ";${swig_source_file_flags};${CMAKE_SWIG_FLAGS};" MATCHES ";-dllimport;") + # This makes sure that the name used in the generated DllImport + # matches the library name created by CMake + set(SWIG_MODULE_${name}_EXTRA_FLAGS "-dllimport;${name}") + endif() + endif() set(swig_extra_flags) if(SWIG_MODULE_${name}_EXTRA_FLAGS) set(swig_extra_flags ${swig_extra_flags} ${SWIG_MODULE_${name}_EXTRA_FLAGS}) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c90630c501fed40078b280fe940535ff9545c2c9 commit c90630c501fed40078b280fe940535ff9545c2c9 Author: Michael St?rmer AuthorDate: Tue Jun 13 14:57:59 2017 +0200 Commit: Michael St?rmer CommitDate: Tue Jun 13 16:04:22 2017 +0200 Vs: add support for VS_CSHARP_* target property for additional file extensions Fixes: #16726 diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 46c2894..d935f21 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1565,6 +1565,10 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) toolHasSettings = true; } + // Collect VS_CSHARP_* property values (if some are set) + std::map sourceFileTags; + this->GetCSharpSourceProperties(sf, sourceFileTags); + if (this->NsightTegra) { // Nsight Tegra needs specific file types to check up-to-dateness. std::string name = cmSystemTools::LowerCase(sf->GetLocation().GetName()); @@ -1681,7 +1685,8 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) (*this->BuildFileStream) << cmVS10EscapeXML(includeInVsix) << "\n"; } - + // write source file specific tags + this->WriteCSharpSourceProperties(sourceFileTags); this->WriteString("BuildFileStream) << tool << ">\n"; } else { @@ -2017,34 +2022,13 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( sourceFileTags["Link"] = link; } } - const cmPropertyMap& props = sf.GetProperties(); - for (cmPropertyMap::const_iterator p = props.begin(); p != props.end(); - ++p) { - static const std::string propNamePrefix = "VS_CSHARP_"; - if (p->first.find(propNamePrefix.c_str()) == 0) { - std::string tagName = p->first.substr(propNamePrefix.length()); - if (!tagName.empty()) { - const std::string val = props.GetPropertyValue(p->first); - if (!val.empty()) { - sourceFileTags[tagName] = val; - } else { - sourceFileTags.erase(tagName); - } - } - } - } + this->GetCSharpSourceProperties(&sf, sourceFileTags); // write source file specific tags if (!sourceFileTags.empty()) { hasFlags = true; (*this->BuildFileStream) << firstString; firstString = ""; - for (CsPropMap::const_iterator i = sourceFileTags.begin(); - i != sourceFileTags.end(); ++i) { - this->WriteString("<", 3); - (*this->BuildFileStream) - << i->first << ">" << cmVS10EscapeXML(i->second) << "first - << ">\n"; - } + this->WriteCSharpSourceProperties(sourceFileTags); } } @@ -4280,6 +4264,42 @@ bool cmVisualStudio10TargetGenerator::ForceOld(const std::string& source) const return true; } +void cmVisualStudio10TargetGenerator::GetCSharpSourceProperties( + cmSourceFile const* sf, std::map& tags) +{ + if (csproj == this->ProjectType) { + const cmPropertyMap& props = sf->GetProperties(); + for (cmPropertyMap::const_iterator p = props.begin(); p != props.end(); + ++p) { + static const std::string propNamePrefix = "VS_CSHARP_"; + if (p->first.find(propNamePrefix.c_str()) == 0) { + std::string tagName = p->first.substr(propNamePrefix.length()); + if (!tagName.empty()) { + const std::string val = props.GetPropertyValue(p->first); + if (!val.empty()) { + tags[tagName] = val; + } else { + tags.erase(tagName); + } + } + } + } + } +} + +void cmVisualStudio10TargetGenerator::WriteCSharpSourceProperties( + const std::map& tags) +{ + if (!tags.empty()) { + for (std::map::const_iterator i = tags.begin(); + i != tags.end(); ++i) { + this->WriteString("<", 3); + (*this->BuildFileStream) << i->first << ">" << cmVS10EscapeXML(i->second) + << "first << ">\n"; + } + } +} + std::string cmVisualStudio10TargetGenerator::GetCMakeFilePath( const char* relativeFilePath) const { diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 6106615..9c10624 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -153,6 +153,11 @@ private: bool ForceOld(const std::string& source) const; + void GetCSharpSourceProperties(cmSourceFile const* sf, + std::map& tags); + void WriteCSharpSourceProperties( + const std::map& tags); + private: typedef cmVisualStudioGeneratorOptions Options; typedef std::map OptionsMap; diff --git a/Tests/RunCMake/VS10Project/VsCSharpCustomTags-check.cmake b/Tests/RunCMake/VS10Project/VsCSharpCustomTags-check.cmake index 70ea193..9eb4619 100644 --- a/Tests/RunCMake/VS10Project/VsCSharpCustomTags-check.cmake +++ b/Tests/RunCMake/VS10Project/VsCSharpCustomTags-check.cmake @@ -4,20 +4,31 @@ if(NOT EXISTS "${csProjectFile}") return() endif() -set(tagFound FALSE) +# test VS_CSHARP_* for the following extensions +set(fileExtensions + "cs" + "png" + "jpg" + "xml" + "settings") +# set(tagName "MyCustomTag") set(tagValue "MyCustomValue") file(STRINGS "${csProjectFile}" lines) -foreach(line IN LISTS lines) - if(line MATCHES "^ *<${tagName}>${tagValue}") - message(STATUS "foo.csproj has tag ${tagName} with value ${tagValue} defined") - set(tagFound TRUE) + +foreach(e ${fileExtensions}) + string(TOUPPER ${e} eUC) + set(tagFound FALSE) + foreach(line IN LISTS lines) + if(line MATCHES "^ *<${tagName}${eUC}>${tagValue}${eUC}") + message(STATUS "foo.csproj has tag ${tagName}${eUC} with value ${tagValue}${eUC} defined") + set(tagFound TRUE) + endif() + endforeach() + if(NOT tagFound) + set(RunCMake_TEST_FAILED "Source file tag ${tagName}${eUC} with value ${tagValue}${eUC} not found.") + return() endif() endforeach() - -if(NOT tagFound) - set(RunCMake_TEST_FAILED "Source file tag ${tagName} with value ${tagValue} not found.") - return() -endif() diff --git a/Tests/RunCMake/VS10Project/VsCSharpCustomTags.cmake b/Tests/RunCMake/VS10Project/VsCSharpCustomTags.cmake index c51e9c3..45766a0 100644 --- a/Tests/RunCMake/VS10Project/VsCSharpCustomTags.cmake +++ b/Tests/RunCMake/VS10Project/VsCSharpCustomTags.cmake @@ -1,11 +1,27 @@ enable_language(CSharp) -add_library(foo foo.cs) -set(props_file "${CMAKE_CURRENT_SOURCE_DIR}/my.props") +# test VS_CSHARP_* for the following extensions +set(fileExtensions + "cs" + "png" + "jpg" + "xml" + "settings") +# set(tagName "MyCustomTag") set(tagValue "MyCustomValue") -set_source_files_properties(foo.cs - PROPERTIES - VS_CSHARP_${tagName} "${tagValue}") +set(fileNames) +foreach(e ${fileExtensions}) + set(currentFile "${CMAKE_CURRENT_BINARY_DIR}/foo.${e}") + list(APPEND fileNames ${currentFile}) + execute_process(COMMAND ${CMAKE_COMMAND} -E touch + "${currentFile}") + string(TOUPPER ${e} eUC) + set_source_files_properties("${currentFile}" + PROPERTIES + VS_CSHARP_${tagName}${eUC} "${tagValue}${eUC}") +endforeach() + +add_library(foo ${fileNames}) ----------------------------------------------------------------------- Summary of changes: Help/dev/source.rst | 47 ++++++++++++++ Modules/UseSWIG.cmake | 11 ++-- Source/cmVisualStudio10TargetGenerator.cxx | 68 +++++++++++++------- Source/cmVisualStudio10TargetGenerator.h | 5 ++ Tests/README | 39 ----------- Tests/README.rst | 31 +++++++++ .../VS10Project/VsCSharpCustomTags-check.cmake | 31 ++++++--- .../RunCMake/VS10Project/VsCSharpCustomTags.cmake | 26 ++++++-- 8 files changed, 176 insertions(+), 82 deletions(-) delete mode 100644 Tests/README create mode 100644 Tests/README.rst hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 16 00:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 16 Jun 2017 00:05:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-104-g2289474 Message-ID: <20170616040507.D6187FAAAE@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 22894747b423c7a634addd7ca80b73eb70947d88 (commit) from 7c5299add429d4b4714a6070bc6f8186585e9a2f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=22894747b423c7a634addd7ca80b73eb70947d88 commit 22894747b423c7a634addd7ca80b73eb70947d88 Author: Kitware Robot AuthorDate: Fri Jun 16 00:01:09 2017 -0400 Commit: Kitware Robot CommitDate: Fri Jun 16 00:01:09 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index d1db7d3..98b6089 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 9) -set(CMake_VERSION_PATCH 20170615) +set(CMake_VERSION_PATCH 20170616) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 16 09:35:19 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 16 Jun 2017 09:35:19 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-107-g6c60ec0 Message-ID: <20170616133519.E14A0FAA20@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 6c60ec0907669b0e91bf97515e93ac7b1208d6e1 (commit) via c4610df03cf29f3f6765c897b47d0f5788cfc1fb (commit) via 69d50a7edb069dc872fbf3d9b2ada258889f8681 (commit) from 22894747b423c7a634addd7ca80b73eb70947d88 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c60ec0907669b0e91bf97515e93ac7b1208d6e1 commit 6c60ec0907669b0e91bf97515e93ac7b1208d6e1 Merge: 2289474 c4610df Author: Brad King AuthorDate: Fri Jun 16 13:33:47 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 16 09:34:07 2017 -0400 Merge topic 'doc-compile-features' c4610df0 Help: Document that VS 2017 compile features are recorded 69d50a7e Help: Fix typo in Cray/PGI/XL compile features docs Acked-by: Kitware Robot Merge-request: !971 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c4610df03cf29f3f6765c897b47d0f5788cfc1fb commit c4610df03cf29f3f6765c897b47d0f5788cfc1fb Author: Brad King AuthorDate: Thu Jun 15 10:11:09 2017 -0400 Commit: Brad King CommitDate: Thu Jun 15 10:11:09 2017 -0400 Help: Document that VS 2017 compile features are recorded They were recorded by commit v3.7.0-rc1~156^2~2 (Features: Record features for VS 15 Preview 4, 2016-09-05). Fixes: #16974 diff --git a/Help/manual/cmake-compile-features.7.rst b/Help/manual/cmake-compile-features.7.rst index 6304ac1..0124395 100644 --- a/Help/manual/cmake-compile-features.7.rst +++ b/Help/manual/cmake-compile-features.7.rst @@ -334,7 +334,7 @@ versions specified for each: * ``AppleClang``: Apple Clang for Xcode versions 4.4 though 6.2. * ``Clang``: Clang compiler versions 2.9 through 3.4. * ``GNU``: GNU compiler versions 4.4 through 5.0. -* ``MSVC``: Microsoft Visual Studio versions 2010 through 2015. +* ``MSVC``: Microsoft Visual Studio versions 2010 through 2017. * ``SunPro``: Oracle SolarisStudio versions 12.4 through 12.5. * ``Intel``: Intel compiler versions 12.1 through 17.0. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69d50a7edb069dc872fbf3d9b2ada258889f8681 commit 69d50a7edb069dc872fbf3d9b2ada258889f8681 Author: Brad King AuthorDate: Thu Jun 15 10:08:59 2017 -0400 Commit: Brad King CommitDate: Thu Jun 15 10:08:59 2017 -0400 Help: Fix typo in Cray/PGI/XL compile features docs Reported-by: Rolf Eike Beer diff --git a/Help/manual/cmake-compile-features.7.rst b/Help/manual/cmake-compile-features.7.rst index cfb1b78..6304ac1 100644 --- a/Help/manual/cmake-compile-features.7.rst +++ b/Help/manual/cmake-compile-features.7.rst @@ -347,7 +347,7 @@ versions specified for each: * ``GNU``: GNU compiler versions 3.4 through 5.0. CMake is currently aware of the :prop_tgt:`C++ standards ` and -thier associated meta-features (e.g. ``cxx_std_11``) available from the +their associated meta-features (e.g. ``cxx_std_11``) available from the following :variable:`compiler ids _COMPILER_ID>` as of the versions specified for each: @@ -356,7 +356,7 @@ versions specified for each: * ``XL``: IBM XL version 10.1 through 13.1.5. CMake is currently aware of the :prop_tgt:`C standards ` and -thier associated meta-features (e.g. ``c_std_99``) available from the +their associated meta-features (e.g. ``c_std_99``) available from the following :variable:`compiler ids _COMPILER_ID>` as of the versions specified for each: diff --git a/Help/release/3.9.rst b/Help/release/3.9.rst index 7222196..cd9476d 100644 --- a/Help/release/3.9.rst +++ b/Help/release/3.9.rst @@ -18,7 +18,7 @@ Languages :ref:`Makefile Generators` and the :generator:`Ninja` generator. * CMake is now aware of the :prop_tgt:`C++ standards ` and - :prop_tgt:`C standards ` and thier associated meta-features for + :prop_tgt:`C standards ` and their associated meta-features for the following :variable:`compiler ids _COMPILER_ID>`: ``Cray``, ``PGI``, and ``XL``. ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-compile-features.7.rst | 6 +++--- Help/release/3.9.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 16 09:45:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 16 Jun 2017 09:45:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-113-gc670d1b Message-ID: <20170616134505.DB2DAC0276@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via c670d1b50bc08e307f021f46c96520701b075b57 (commit) via 97010a5b651b92f239330c1896ff91493803306c (commit) via aa944c88e3e89398eaabab78297b42dea99d69d4 (commit) via 54c51e792e209a4eddd5d3682e8f9ef183d61d78 (commit) via 7b02cb299620ccce270d6c74454d04ee19dd2731 (commit) via c1f15e1c79251bc3fef4bae21020eb5f15437597 (commit) from 6c60ec0907669b0e91bf97515e93ac7b1208d6e1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c670d1b50bc08e307f021f46c96520701b075b57 commit c670d1b50bc08e307f021f46c96520701b075b57 Merge: 97010a5 54c51e7 Author: Brad King AuthorDate: Fri Jun 16 13:37:40 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 16 09:37:58 2017 -0400 Merge topic 'fix-shadow-field-warnings' 54c51e79 cmCPackDragNDropGenerator: Drop unused member 7b02cb29 cmCommonTargetGenerator: Rename member to avoid shadowing c1f15e1c cmGlobalGenerator: Rename member to avoid shadowing Acked-by: Kitware Robot Merge-request: !968 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=97010a5b651b92f239330c1896ff91493803306c commit 97010a5b651b92f239330c1896ff91493803306c Merge: 6c60ec0 aa944c8 Author: Brad King AuthorDate: Fri Jun 16 13:37:25 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 16 09:37:30 2017 -0400 Merge topic 'doc-check-compiler-flag' aa944c88 Check*CompilerFlag: Rewrite documentation of these modules Acked-by: Kitware Robot Merge-request: !972 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa944c88e3e89398eaabab78297b42dea99d69d4 commit aa944c88e3e89398eaabab78297b42dea99d69d4 Author: Brad King AuthorDate: Thu Jun 15 13:49:35 2017 -0400 Commit: Brad King CommitDate: Thu Jun 15 13:49:35 2017 -0400 Check*CompilerFlag: Rewrite documentation of these modules Format with modern markup. Clarify that the setting of `CMAKE_REQUIRED_DEFINITIONS` is temporary. Add a note warning about contamination of the checks by `CMAKE__FLAGS`. Issue: #16973 diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake index 1ba67fc..5a7298b 100644 --- a/Modules/CheckCCompilerFlag.cmake +++ b/Modules/CheckCCompilerFlag.cmake @@ -1,26 +1,36 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -#.rst: -# CheckCCompilerFlag -# ------------------ -# -# Check whether the C compiler supports a given flag. -# -# CHECK_C_COMPILER_FLAG( ) -# -# :: -# -# - the compiler flag -# - variable to store the result -# Will be created as an internal cache variable. -# -# This internally calls the check_c_source_compiles macro and sets -# CMAKE_REQUIRED_DEFINITIONS to . See help for -# CheckCSourceCompiles for a listing of variables that can otherwise -# modify the build. The result only tells that the compiler does not -# give an error message when it encounters the flag. If the flag has -# any effect or even a specific one is beyond the scope of this module. +#[=======================================================================[.rst: +CheckCCompilerFlag +------------------ + +Check whether the C compiler supports a given flag. + +.. command:: check_c_compiler_flag + + :: + + check_c_compiler_flag( ) + + Check that the ```` is accepted by the compiler without + a diagnostic. Stores the result in an internal cache entry + named ````. + +This command temporarily sets the ``CMAKE_REQUIRED_DEFINITIONS`` variable +and calls the ``check_c_source_compiles`` macro from the +:module:`CheckCSourceCompiles` module. See documentation of that +module for a listing of variables that can otherwise modify the build. + +A positive result from this check indicates only that the compiler did not +issue a diagnostic message when given the flag. Whether the flag has any +effect or even a specific one is beyond the scope of this module. + +.. note:: + Since the :command:`try_compile` command forwards flags from variables + like :variable:`CMAKE_C_FLAGS _FLAGS>`, unknown flags + in such variables may cause a false negative for this check. +#]=======================================================================] include(CheckCSourceCompiles) include(CMakeCheckCompilerFlagCommonPatterns) diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake index afbb231..f731b70 100644 --- a/Modules/CheckCXXCompilerFlag.cmake +++ b/Modules/CheckCXXCompilerFlag.cmake @@ -1,25 +1,36 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -#.rst: -# CheckCXXCompilerFlag -# -------------------- -# -# Check whether the CXX compiler supports a given flag. -# -# CHECK_CXX_COMPILER_FLAG( ) -# -# :: -# -# - the compiler flag -# - variable to store the result -# -# This internally calls the check_cxx_source_compiles macro and sets -# CMAKE_REQUIRED_DEFINITIONS to . See help for -# CheckCXXSourceCompiles for a listing of variables that can otherwise -# modify the build. The result only tells that the compiler does not -# give an error message when it encounters the flag. If the flag has -# any effect or even a specific one is beyond the scope of this module. +#[=======================================================================[.rst: +CheckCXXCompilerFlag +------------------------ + +Check whether the CXX compiler supports a given flag. + +.. command:: check_cxx_compiler_flag + + :: + + check_cxx_compiler_flag( ) + + Check that the ```` is accepted by the compiler without + a diagnostic. Stores the result in an internal cache entry + named ````. + +This command temporarily sets the ``CMAKE_REQUIRED_DEFINITIONS`` variable +and calls the ``check_cxx_source_compiles`` macro from the +:module:`CheckCXXSourceCompiles` module. See documentation of that +module for a listing of variables that can otherwise modify the build. + +A positive result from this check indicates only that the compiler did not +issue a diagnostic message when given the flag. Whether the flag has any +effect or even a specific one is beyond the scope of this module. + +.. note:: + Since the :command:`try_compile` command forwards flags from variables + like :variable:`CMAKE_CXX_FLAGS _FLAGS>`, unknown flags + in such variables may cause a false negative for this check. +#]=======================================================================] include(CheckCXXSourceCompiles) include(CMakeCheckCompilerFlagCommonPatterns) diff --git a/Modules/CheckFortranCompilerFlag.cmake b/Modules/CheckFortranCompilerFlag.cmake index 8519fcc..8a1a8b9 100644 --- a/Modules/CheckFortranCompilerFlag.cmake +++ b/Modules/CheckFortranCompilerFlag.cmake @@ -1,27 +1,36 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -#.rst: -# CheckFortranCompilerFlag -# ------------------------ -# -# Check whether the Fortran compiler supports a given flag. -# -# CHECK_Fortran_COMPILER_FLAG( ) -# -# :: -# -# - the compiler flag -# - variable to store the result -# Will be created as an internal cache variable. -# -# This internally calls the check_fortran_source_compiles macro and -# sets CMAKE_REQUIRED_DEFINITIONS to . See help for -# CheckFortranSourceCompiles for a listing of variables that can -# otherwise modify the build. The result only tells that the compiler -# does not give an error message when it encounters the flag. If the -# flag has any effect or even a specific one is beyond the scope of -# this module. +#[=======================================================================[.rst: +CheckFortranCompilerFlag +------------------------ + +Check whether the Fortran compiler supports a given flag. + +.. command:: check_fortran_compiler_flag + + :: + + check_fortran_compiler_flag( ) + + Check that the ```` is accepted by the compiler without + a diagnostic. Stores the result in an internal cache entry + named ````. + +This command temporarily sets the ``CMAKE_REQUIRED_DEFINITIONS`` variable +and calls the ``check_fortran_source_compiles`` macro from the +:module:`CheckFortranSourceCompiles` module. See documentation of that +module for a listing of variables that can otherwise modify the build. + +A positive result from this check indicates only that the compiler did not +issue a diagnostic message when given the flag. Whether the flag has any +effect or even a specific one is beyond the scope of this module. + +.. note:: + Since the :command:`try_compile` command forwards flags from variables + like :variable:`CMAKE_Fortran_FLAGS _FLAGS>`, unknown flags + in such variables may cause a false negative for this check. +#]=======================================================================] include(CheckFortranSourceCompiles) include(CMakeCheckCompilerFlagCommonPatterns) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=54c51e792e209a4eddd5d3682e8f9ef183d61d78 commit 54c51e792e209a4eddd5d3682e8f9ef183d61d78 Author: Brad King AuthorDate: Wed Jun 14 16:34:40 2017 -0400 Commit: Brad King CommitDate: Wed Jun 14 16:34:40 2017 -0400 cmCPackDragNDropGenerator: Drop unused member Drop the unused `InstallPrefix` member that shadows a member in a subclass. diff --git a/Source/CPack/cmCPackDragNDropGenerator.h b/Source/CPack/cmCPackDragNDropGenerator.h index 922325c..ffa9015 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.h +++ b/Source/CPack/cmCPackDragNDropGenerator.h @@ -40,8 +40,6 @@ protected: int CreateDMG(const std::string& src_dir, const std::string& output_file); - std::string InstallPrefix; - private: std::string slaDirectory; bool singleLicense; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7b02cb299620ccce270d6c74454d04ee19dd2731 commit 7b02cb299620ccce270d6c74454d04ee19dd2731 Author: Brad King AuthorDate: Wed Jun 14 16:31:07 2017 -0400 Commit: Brad King CommitDate: Wed Jun 14 16:31:20 2017 -0400 cmCommonTargetGenerator: Rename member to avoid shadowing Rename the `LocalGenerator` and `GlobalGenerator` members to avoid shadowing similar members in subclasses that use more-specific pointer types. diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 391d65c..6a007c8 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -22,10 +22,11 @@ cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt) : GeneratorTarget(gt) , Makefile(gt->Makefile) - , LocalGenerator(static_cast(gt->LocalGenerator)) - , GlobalGenerator(static_cast( + , LocalCommonGenerator( + static_cast(gt->LocalGenerator)) + , GlobalCommonGenerator(static_cast( gt->LocalGenerator->GetGlobalGenerator())) - , ConfigName(LocalGenerator->GetConfigName()) + , ConfigName(LocalCommonGenerator->GetConfigName()) { } @@ -62,10 +63,10 @@ void cmCommonTargetGenerator::AddModuleDefinitionFlag( // Append the flag and value. Use ConvertToLinkReference to help // vs6's "cl -link" pass it to the linker. std::string flag = defFileFlag; - flag += this->LocalGenerator->ConvertToOutputFormat( + flag += this->LocalCommonGenerator->ConvertToOutputFormat( linkLineComputer->ConvertToLinkReference(mdi->DefFile), cmOutputConverter::SHELL); - this->LocalGenerator->AppendFlags(flags, flag); + this->LocalCommonGenerator->AppendFlags(flags, flag); } void cmCommonTargetGenerator::AppendFortranFormatFlags( @@ -90,8 +91,8 @@ void cmCommonTargetGenerator::AppendFortranFormatFlags( break; } if (var) { - this->LocalGenerator->AppendFlags(flags, - this->Makefile->GetDefinition(var)); + this->LocalCommonGenerator->AppendFlags( + flags, this->Makefile->GetDefinition(var)); } } @@ -101,8 +102,8 @@ std::string cmCommonTargetGenerator::GetFlags(const std::string& l) if (i == this->FlagsByLanguage.end()) { std::string flags; - this->LocalGenerator->GetTargetCompileFlags(this->GeneratorTarget, - this->ConfigName, l, flags); + this->LocalCommonGenerator->GetTargetCompileFlags( + this->GeneratorTarget, this->ConfigName, l, flags); ByLanguageMap::value_type entry(l, flags); i = this->FlagsByLanguage.insert(entry).first; @@ -115,11 +116,11 @@ std::string cmCommonTargetGenerator::GetDefines(const std::string& l) ByLanguageMap::iterator i = this->DefinesByLanguage.find(l); if (i == this->DefinesByLanguage.end()) { std::set defines; - this->LocalGenerator->GetTargetDefines(this->GeneratorTarget, - this->ConfigName, l, defines); + this->LocalCommonGenerator->GetTargetDefines(this->GeneratorTarget, + this->ConfigName, l, defines); std::string definesString; - this->LocalGenerator->JoinDefines(defines, definesString, l); + this->LocalCommonGenerator->JoinDefines(defines, definesString, l); ByLanguageMap::value_type entry(l, definesString); i = this->DefinesByLanguage.insert(entry).first; @@ -198,9 +199,10 @@ std::string cmCommonTargetGenerator::GetManifests() std::vector manifests; for (std::vector::iterator mi = manifest_srcs.begin(); mi != manifest_srcs.end(); ++mi) { - manifests.push_back(this->LocalGenerator->ConvertToOutputFormat( - this->LocalGenerator->ConvertToRelativePath( - this->LocalGenerator->GetWorkingDirectory(), (*mi)->GetFullPath()), + manifests.push_back(this->LocalCommonGenerator->ConvertToOutputFormat( + this->LocalCommonGenerator->ConvertToRelativePath( + this->LocalCommonGenerator->GetWorkingDirectory(), + (*mi)->GetFullPath()), cmOutputConverter::SHELL)); } @@ -233,6 +235,6 @@ void cmCommonTargetGenerator::AppendOSXVerFlag(std::string& flags, // Append the flag since a non-zero version is specified. std::ostringstream vflag; vflag << flag << major << "." << minor << "." << patch; - this->LocalGenerator->AppendFlags(flags, vflag.str()); + this->LocalCommonGenerator->AppendFlags(flags, vflag.str()); } } diff --git a/Source/cmCommonTargetGenerator.h b/Source/cmCommonTargetGenerator.h index c36145f..6b0f74e 100644 --- a/Source/cmCommonTargetGenerator.h +++ b/Source/cmCommonTargetGenerator.h @@ -37,8 +37,8 @@ protected: cmGeneratorTarget* GeneratorTarget; cmMakefile* Makefile; - cmLocalCommonGenerator* LocalGenerator; - cmGlobalCommonGenerator* GlobalGenerator; + cmLocalCommonGenerator* LocalCommonGenerator; + cmGlobalCommonGenerator* GlobalCommonGenerator; std::string ConfigName; void AppendFortranFormatFlags(std::string& flags, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c1f15e1c79251bc3fef4bae21020eb5f15437597 commit c1f15e1c79251bc3fef4bae21020eb5f15437597 Author: Brad King AuthorDate: Wed Jun 14 16:24:45 2017 -0400 Commit: Brad King CommitDate: Wed Jun 14 16:24:45 2017 -0400 cmGlobalGenerator: Rename member to avoid shadowing The `CurrentMakefile` member is shadowed by a generate-time member of the same name in `cmGlobalXCodeGenerator`. Rename our member to clarify its configure-time role and avoid the shadow. diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 0bef710..37a2759 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -90,7 +90,7 @@ cmGlobalGenerator::cmGlobalGenerator(cmake* cm) this->TryCompileTimeout = 0; this->ExtraGenerator = CM_NULLPTR; - this->CurrentMakefile = CM_NULLPTR; + this->CurrentConfigureMakefile = CM_NULLPTR; this->TryCompileOuterMakefile = CM_NULLPTR; this->ConfigureDoneCMP0026AndCMP0024 = false; diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 871178b..23c6218 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -187,9 +187,15 @@ public: return this->LocalGenerators; } - cmMakefile* GetCurrentMakefile() const { return this->CurrentMakefile; } + cmMakefile* GetCurrentMakefile() const + { + return this->CurrentConfigureMakefile; + } - void SetCurrentMakefile(cmMakefile* mf) { this->CurrentMakefile = mf; } + void SetCurrentMakefile(cmMakefile* mf) + { + this->CurrentConfigureMakefile = mf; + } void AddMakefile(cmMakefile* mf); @@ -460,7 +466,7 @@ protected: cmake* CMakeInstance; std::vector Makefiles; std::vector LocalGenerators; - cmMakefile* CurrentMakefile; + cmMakefile* CurrentConfigureMakefile; // map from project name to vector of local generators in that project std::map > ProjectMap; ----------------------------------------------------------------------- Summary of changes: Modules/CheckCCompilerFlag.cmake | 50 +++++++++++++++++------------ Modules/CheckCXXCompilerFlag.cmake | 49 +++++++++++++++++----------- Modules/CheckFortranCompilerFlag.cmake | 51 ++++++++++++++++++------------ Source/CPack/cmCPackDragNDropGenerator.h | 2 -- Source/cmCommonTargetGenerator.cxx | 34 ++++++++++---------- Source/cmCommonTargetGenerator.h | 4 +-- Source/cmGlobalGenerator.cxx | 2 +- Source/cmGlobalGenerator.h | 12 +++++-- 8 files changed, 120 insertions(+), 84 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 16 09:55:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 16 Jun 2017 09:55:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-117-g67fe574 Message-ID: <20170616135506.DE1E4F738D@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 67fe57478b88fac76595d71e74934970ca6960f4 (commit) via 4dbbb275d5c25745d8f2b45d092245e61dd1f72f (commit) via b0725f2fcd8c4a89e7e34a0b4eff4c6bc942e304 (commit) via b7799f07d1bcf2708976b41aa07047c04e5ee3d0 (commit) from c670d1b50bc08e307f021f46c96520701b075b57 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=67fe57478b88fac76595d71e74934970ca6960f4 commit 67fe57478b88fac76595d71e74934970ca6960f4 Merge: 4dbbb27 b7799f0 Author: Brad King AuthorDate: Fri Jun 16 09:51:55 2017 -0400 Commit: Brad King CommitDate: Fri Jun 16 09:51:55 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4dbbb275d5c25745d8f2b45d092245e61dd1f72f commit 4dbbb275d5c25745d8f2b45d092245e61dd1f72f Merge: c670d1b b0725f2 Author: Brad King AuthorDate: Fri Jun 16 13:50:45 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 16 09:51:02 2017 -0400 Merge topic 'doc-dev-maint' b0725f2f Help/dev: Add review instructions to maintainer guide Acked-by: Kitware Robot Merge-request: !973 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0725f2fcd8c4a89e7e34a0b4eff4c6bc942e304 commit b0725f2fcd8c4a89e7e34a0b4eff4c6bc942e304 Author: Brad King AuthorDate: Thu Jun 15 14:30:28 2017 -0400 Commit: Brad King CommitDate: Thu Jun 15 14:32:54 2017 -0400 Help/dev: Add review instructions to maintainer guide diff --git a/Help/dev/maint.rst b/Help/dev/maint.rst index 78c06df..c448445 100644 --- a/Help/dev/maint.rst +++ b/Help/dev/maint.rst @@ -8,6 +8,36 @@ See documentation on `CMake Development`_ for more information. .. contents:: Maintainer Processes: +Review a Merge Request +====================== + +The `CMake Review Process`_ requires a maintainer to issue the ``Do: merge`` +command to integrate a merge request. Please check at least the following: + +* If the MR source branch is not named well for the change it makes + (e.g. it is just ``master`` or the patch changed during review), + add a ``Topic-rename: `` trailing line to the MR description + to provide a better topic name. + +* If the MR introduces a new feature or a user-facing behavior change, + such as a policy, ensure that a ``Help/release/dev/$topic.rst`` file + is added with a release note. + +* If a commit changes a specific area, such as a module, its commit + message should have an ``area:`` prefix on its first line. + +* If a commit fixes a tracked issue, its commit message should have + a trailing line such as ``Fixes: #00000``. + +* Ensure that the MR has been tested sufficiently. Typically it should + be staged for nightly testing with ``Do: stage``. Then manually + review the `CMake CDash Page`_ to verify that no regressions were + introduced. (Learn to tolerate spurious failures due to idiosyncrasies + of various nightly builders.) + +.. _`CMake Review Process`: review.rst +.. _`CMake CDash Page`: https://open.cdash.org/index.php?project=CMake + Branch a New Release ==================== ----------------------------------------------------------------------- Summary of changes: Help/dev/maint.rst | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 16 09:55:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 16 Jun 2017 09:55:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc3-15-gb7799f0 Message-ID: <20170616135507.1592AF72EF@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via b7799f07d1bcf2708976b41aa07047c04e5ee3d0 (commit) via c4610df03cf29f3f6765c897b47d0f5788cfc1fb (commit) via 69d50a7edb069dc872fbf3d9b2ada258889f8681 (commit) from 61c1848cdc88cc5d36b23d14d0721ba832739a58 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-compile-features.7.rst | 6 +++--- Help/release/3.9.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Jun 17 00:05:14 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 17 Jun 2017 00:05:14 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-118-g1363a0c Message-ID: <20170617040514.0FA4FFAA21@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 1363a0cbcef00cb9a49eba3b68283b5b6d1b95a5 (commit) from 67fe57478b88fac76595d71e74934970ca6960f4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1363a0cbcef00cb9a49eba3b68283b5b6d1b95a5 commit 1363a0cbcef00cb9a49eba3b68283b5b6d1b95a5 Author: Kitware Robot AuthorDate: Sat Jun 17 00:01:08 2017 -0400 Commit: Kitware Robot CommitDate: Sat Jun 17 00:01:08 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 98b6089..1bd3ae3 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 9) -set(CMake_VERSION_PATCH 20170616) +set(CMake_VERSION_PATCH 20170617) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Jun 18 00:05:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 18 Jun 2017 00:05:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-119-ge10c9ef Message-ID: <20170618040503.8E627FA188@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via e10c9ef1eb937abe8ace0aca7a5ad4d812e19b09 (commit) from 1363a0cbcef00cb9a49eba3b68283b5b6d1b95a5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e10c9ef1eb937abe8ace0aca7a5ad4d812e19b09 commit e10c9ef1eb937abe8ace0aca7a5ad4d812e19b09 Author: Kitware Robot AuthorDate: Sun Jun 18 00:01:04 2017 -0400 Commit: Kitware Robot CommitDate: Sun Jun 18 00:01:04 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 1bd3ae3..2088242 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 9) -set(CMake_VERSION_PATCH 20170617) +set(CMake_VERSION_PATCH 20170618) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 19 00:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 19 Jun 2017 00:05:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-120-g3558fe0 Message-ID: <20170619040505.A603DFAE8E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 3558fe06579d4c4148c01ee112cc492f91fd3045 (commit) from e10c9ef1eb937abe8ace0aca7a5ad4d812e19b09 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3558fe06579d4c4148c01ee112cc492f91fd3045 commit 3558fe06579d4c4148c01ee112cc492f91fd3045 Author: Kitware Robot AuthorDate: Mon Jun 19 00:01:04 2017 -0400 Commit: Kitware Robot CommitDate: Mon Jun 19 00:01:04 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 2088242..ec2cdd6 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 9) -set(CMake_VERSION_PATCH 20170618) +set(CMake_VERSION_PATCH 20170619) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 19 11:35:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 19 Jun 2017 11:35:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-124-g622b4dd Message-ID: <20170619153503.EB475FA977@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 622b4dd785e6491c55b87c3a3f23997d66e95988 (commit) via 7c369ebf03262330bb60d592f18a78f4ac5671db (commit) via 8b9d8c4ddc9ff4d4cac396e84c8a44c622871ee9 (commit) via ec7b3af7e74defa608f4cb0debe329614c401635 (commit) from 3558fe06579d4c4148c01ee112cc492f91fd3045 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=622b4dd785e6491c55b87c3a3f23997d66e95988 commit 622b4dd785e6491c55b87c3a3f23997d66e95988 Merge: 7c369eb ec7b3af Author: Brad King AuthorDate: Mon Jun 19 15:27:20 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 19 11:27:30 2017 -0400 Merge topic 'vs_csharp_fix_win32manifest_param' ec7b3af7 Vs: remove /nowin32manifest from C# flags to enable default VS behavior Acked-by: Kitware Robot Merge-request: !969 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c369ebf03262330bb60d592f18a78f4ac5671db commit 7c369ebf03262330bb60d592f18a78f4ac5671db Merge: 3558fe0 8b9d8c4 Author: Brad King AuthorDate: Mon Jun 19 15:27:03 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 19 11:27:10 2017 -0400 Merge topic 'FindHDF5-parallel-from-wrapper' 8b9d8c4d FindHDF5: Fix parallel detection when primary compiler is an HDF5 wrapper Acked-by: Kitware Robot Merge-request: !974 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b9d8c4ddc9ff4d4cac396e84c8a44c622871ee9 commit 8b9d8c4ddc9ff4d4cac396e84c8a44c622871ee9 Author: Chuck Atkins AuthorDate: Thu Jun 15 15:04:01 2017 -0500 Commit: Brad King CommitDate: Fri Jun 16 11:40:02 2017 -0400 FindHDF5: Fix parallel detection when primary compiler is an HDF5 wrapper This is covering a different use case where your primary compilers are HDF5 wrappers, as is the case when using the Cray Programming Environment. The existing code tries to query the compiler using options only available to h5cc and friends, which doesn't work when your wrapper is not h5cc, as is the case with the CrayPE. This change instead pulls strings out of a test binary when testing for "is your regular compiler an HDF5 wrapper" while the "query wrapper for options" is reserved for the "I found the hdf5 wrappers but they're not your main compiler" mode. diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 5962c5b..2d9d2a2 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -187,8 +187,16 @@ function(_HDF5_test_regular_compiler_C success version is_parallel) file(WRITE ${test_file} "#include \n" "#include \n" - "int main(void) {\n" - " char const* info_ver = \"INFO\" \":\" H5_VERSION;\n" + "const char* info_ver = \"INFO\" \":\" H5_VERSION;\n" + "#ifdef H5_HAVE_PARALLEL\n" + "const char* info_parallel = \"INFO\" \":\" \"PARALLEL\";\n" + "#endif\n" + "int main(int argc, char **argv) {\n" + " int require = 0;\n" + " require += info_ver[argc];\n" + "#ifdef H5_HAVE_PARALLEL\n" + " require += info_parallel[argc];\n" + "#endif\n" " hid_t fid;\n" " fid = H5Fcreate(\"foo.h5\",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT);\n" " return 0;\n" @@ -198,11 +206,11 @@ function(_HDF5_test_regular_compiler_C success version is_parallel) ) endif() if(${success}) - file(STRINGS ${scratch_directory}/compiler_has_h5_c INFO_VER - REGEX "^INFO:([0-9]+\\.[0-9]+\\.[0-9]+)(-patch([0-9]+))?" + file(STRINGS ${scratch_directory}/compiler_has_h5_c INFO_STRINGS + REGEX "^INFO:" ) string(REGEX MATCH "^INFO:([0-9]+\\.[0-9]+\\.[0-9]+)(-patch([0-9]+))?" - INFO_VER "${INFO_VER}" + INFO_VER "${INFO_STRINGS}" ) set(${version} ${CMAKE_MATCH_1}) if(CMAKE_MATCH_3) @@ -210,12 +218,7 @@ function(_HDF5_test_regular_compiler_C success version is_parallel) endif() set(${version} ${${version}} PARENT_SCOPE) - execute_process(COMMAND ${CMAKE_C_COMPILER} -showconfig - OUTPUT_VARIABLE config_output - ERROR_VARIABLE config_error - RESULT_VARIABLE config_result - ) - if(config_output MATCHES "Parallel HDF5: yes") + if(INFO_STRINGS MATCHES "INFO:PARALLEL") set(${is_parallel} TRUE PARENT_SCOPE) else() set(${is_parallel} FALSE PARENT_SCOPE) @@ -233,8 +236,16 @@ function(_HDF5_test_regular_compiler_CXX success version is_parallel) "#ifndef H5_NO_NAMESPACE\n" "using namespace H5;\n" "#endif\n" + "const char* info_ver = \"INFO\" \":\" H5_VERSION;\n" + "#ifdef H5_HAVE_PARALLEL\n" + "const char* info_parallel = \"INFO\" \":\" \"PARALLEL\";\n" + "#endif\n" "int main(int argc, char **argv) {\n" - " char const* info_ver = \"INFO\" \":\" H5_VERSION;\n" + " int require = 0;\n" + " require += info_ver[argc];\n" + "#ifdef H5_HAVE_PARALLEL\n" + " require += info_parallel[argc];\n" + "#endif\n" " H5File file(\"foo.h5\", H5F_ACC_TRUNC);\n" " return 0;\n" "}") @@ -243,11 +254,11 @@ function(_HDF5_test_regular_compiler_CXX success version is_parallel) ) endif() if(${success}) - file(STRINGS ${scratch_directory}/compiler_has_h5_cxx INFO_VER - REGEX "^INFO:([0-9]+\\.[0-9]+\\.[0-9]+)(-patch([0-9]+))?" + file(STRINGS ${scratch_directory}/compiler_has_h5_cxx INFO_STRINGS + REGEX "^INFO:" ) string(REGEX MATCH "^INFO:([0-9]+\\.[0-9]+\\.[0-9]+)(-patch([0-9]+))?" - INFO_VER "${INFO_VER}" + INFO_VER "${INFO_STRINGS}" ) set(${version} ${CMAKE_MATCH_1}) if(CMAKE_MATCH_3) @@ -255,12 +266,7 @@ function(_HDF5_test_regular_compiler_CXX success version is_parallel) endif() set(${version} ${${version}} PARENT_SCOPE) - execute_process(COMMAND ${CMAKE_CXX_COMPILER} -showconfig - OUTPUT_VARIABLE config_output - ERROR_VARIABLE config_error - RESULT_VARIABLE config_result - ) - if(config_output MATCHES "Parallel HDF5: yes") + if(INFO_STRINGS MATCHES "INFO:PARALLEL") set(${is_parallel} TRUE PARENT_SCOPE) else() set(${is_parallel} FALSE PARENT_SCOPE) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ec7b3af7e74defa608f4cb0debe329614c401635 commit ec7b3af7e74defa608f4cb0debe329614c401635 Author: Michael St?rmer AuthorDate: Wed Jun 14 11:30:43 2017 +0200 Commit: Michael St?rmer CommitDate: Fri Jun 16 09:33:06 2017 +0200 Vs: remove /nowin32manifest from C# flags to enable default VS behavior if /nowin32manifest is specified, it will be preferred over any occurring /win32manifest: parameter Fixes: #16969, #16970 diff --git a/Modules/CMakeCSharpInformation.cmake b/Modules/CMakeCSharpInformation.cmake index cd86016..d474c29 100644 --- a/Modules/CMakeCSharpInformation.cmake +++ b/Modules/CMakeCSharpInformation.cmake @@ -10,7 +10,7 @@ get_filename_component(CMAKE_BASE_NAME "${CMAKE_CSharp_COMPILER}" NAME_WE) set(CMAKE_BUILD_TYPE_INIT Debug) -set(CMAKE_CSharp_FLAGS_INIT "/define:TRACE /langversion:3 /nowin32manifest") +set(CMAKE_CSharp_FLAGS_INIT "/define:TRACE /langversion:3") set(CMAKE_CSharp_FLAGS_DEBUG_INIT "/debug:full /optimize- /warn:3 /errorreport:prompt /define:DEBUG") set(CMAKE_CSharp_FLAGS_RELEASE_INIT "/debug:none /optimize /warn:1 /errorreport:queue") set(CMAKE_CSharp_FLAGS_RELWITHDEBINFO_INIT "/debug:full /optimize-") diff --git a/Source/cmVS10CSharpFlagTable.h b/Source/cmVS10CSharpFlagTable.h index 493ec2b..18d587c 100644 --- a/Source/cmVS10CSharpFlagTable.h +++ b/Source/cmVS10CSharpFlagTable.h @@ -25,7 +25,8 @@ static cmVS7FlagTable cmVS10CSharpFlagTable[] = { { "ApplicationIcon", "win32icon", "", "", cmIDEFlagTable::UserValueRequired }, - { "Win32Manifest", "win32manifest:", "", "true", 0 }, + { "ApplicationManifest", "win32manifest:", "", "", + cmIDEFlagTable::UserValueRequired }, { "NoWin32Manifest", "nowin32manifest", "", "true", 0 }, diff --git a/Source/cmVS11CSharpFlagTable.h b/Source/cmVS11CSharpFlagTable.h index 71870b6..e3ba83c 100644 --- a/Source/cmVS11CSharpFlagTable.h +++ b/Source/cmVS11CSharpFlagTable.h @@ -25,7 +25,8 @@ static cmVS7FlagTable cmVS11CSharpFlagTable[] = { { "ApplicationIcon", "win32icon", "", "", cmIDEFlagTable::UserValueRequired }, - { "Win32Manifest", "win32manifest:", "", "true", 0 }, + { "ApplicationManifest", "win32manifest:", "", "", + cmIDEFlagTable::UserValueRequired }, { "NoWin32Manifest", "nowin32manifest", "", "true", 0 }, diff --git a/Source/cmVS12CSharpFlagTable.h b/Source/cmVS12CSharpFlagTable.h index f98b184..f8db636 100644 --- a/Source/cmVS12CSharpFlagTable.h +++ b/Source/cmVS12CSharpFlagTable.h @@ -25,7 +25,8 @@ static cmVS7FlagTable cmVS12CSharpFlagTable[] = { { "ApplicationIcon", "win32icon", "", "", cmIDEFlagTable::UserValueRequired }, - { "Win32Manifest", "win32manifest:", "", "true", 0 }, + { "ApplicationManifest", "win32manifest:", "", "", + cmIDEFlagTable::UserValueRequired }, { "NoWin32Manifest", "nowin32manifest", "", "true", 0 }, diff --git a/Source/cmVS140CSharpFlagTable.h b/Source/cmVS140CSharpFlagTable.h index 256c35f..055d5cb 100644 --- a/Source/cmVS140CSharpFlagTable.h +++ b/Source/cmVS140CSharpFlagTable.h @@ -25,7 +25,8 @@ static cmVS7FlagTable cmVS140CSharpFlagTable[] = { { "ApplicationIcon", "win32icon", "", "", cmIDEFlagTable::UserValueRequired }, - { "Win32Manifest", "win32manifest:", "", "true", 0 }, + { "ApplicationManifest", "win32manifest:", "", "", + cmIDEFlagTable::UserValueRequired }, { "NoWin32Manifest", "nowin32manifest", "", "true", 0 }, diff --git a/Source/cmVS141CSharpFlagTable.h b/Source/cmVS141CSharpFlagTable.h index 8508581..5de9bf3 100644 --- a/Source/cmVS141CSharpFlagTable.h +++ b/Source/cmVS141CSharpFlagTable.h @@ -25,7 +25,8 @@ static cmVS7FlagTable cmVS141CSharpFlagTable[] = { { "ApplicationIcon", "win32icon", "", "", cmIDEFlagTable::UserValueRequired }, - { "Win32Manifest", "win32manifest:", "", "true", 0 }, + { "ApplicationManifest", "win32manifest:", "", "", + cmIDEFlagTable::UserValueRequired }, { "NoWin32Manifest", "nowin32manifest", "", "true", 0 }, diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 5a67477..d689dcf 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2340,6 +2340,12 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( clOptions.AddFlag("CallingConvention", ""); } } + if (csproj == this->ProjectType) { + // /nowin32manifest overrides /win32manifest: parameter + if (clOptions.HasFlag("NoWin32Manifest")) { + clOptions.RemoveFlag("ApplicationManifest"); + } + } this->ClOptions[configName] = pOptions.release(); return true; ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCSharpInformation.cmake | 2 +- Modules/FindHDF5.cmake | 48 ++++++++++++++++------------ Source/cmVS10CSharpFlagTable.h | 3 +- Source/cmVS11CSharpFlagTable.h | 3 +- Source/cmVS12CSharpFlagTable.h | 3 +- Source/cmVS140CSharpFlagTable.h | 3 +- Source/cmVS141CSharpFlagTable.h | 3 +- Source/cmVisualStudio10TargetGenerator.cxx | 6 ++++ 8 files changed, 44 insertions(+), 27 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 20 00:05:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 20 Jun 2017 00:05:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-125-g829ce06 Message-ID: <20170620040508.D412EFA015@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 829ce06c352e84f9b0b5fdd6acd10429181a91ef (commit) from 622b4dd785e6491c55b87c3a3f23997d66e95988 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=829ce06c352e84f9b0b5fdd6acd10429181a91ef commit 829ce06c352e84f9b0b5fdd6acd10429181a91ef Author: Kitware Robot AuthorDate: Tue Jun 20 00:01:06 2017 -0400 Commit: Kitware Robot CommitDate: Tue Jun 20 00:01:06 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index ec2cdd6..684dfa5 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 9) -set(CMake_VERSION_PATCH 20170619) +set(CMake_VERSION_PATCH 20170620) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 20 09:05:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 20 Jun 2017 09:05:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-133-g8308803 Message-ID: <20170620130506.99D18FA77E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 8308803167368b873641e5066017536a082f3c68 (commit) via c2f119310f85948ebce3ed76b79be4fdffa1fdd0 (commit) via 7d83b8010ec6a5479b5860a3aaec5647a143085a (commit) via 95f546ec2b588174e2e1dfe30d803f2a3c66c2ec (commit) via a7a0bf861ad434063228146790e6403f5743d2b9 (commit) via 3566af83f932e6b20feb3e145d3318c556ced270 (commit) via 1844360099b41932df21c1d2abdc7c0ace389c16 (commit) via 8b53dee296baf9dbe53cf93e07f0b88e269b2f98 (commit) from 829ce06c352e84f9b0b5fdd6acd10429181a91ef (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8308803167368b873641e5066017536a082f3c68 commit 8308803167368b873641e5066017536a082f3c68 Merge: c2f1193 3566af8 Author: Brad King AuthorDate: Tue Jun 20 13:00:23 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jun 20 09:00:32 2017 -0400 Merge topic 'FindICU-data-vars' 3566af83 FindICU: Search for packaged data files Acked-by: Kitware Robot Merge-request: !981 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c2f119310f85948ebce3ed76b79be4fdffa1fdd0 commit c2f119310f85948ebce3ed76b79be4fdffa1fdd0 Merge: 7d83b80 a7a0bf8 Author: Brad King AuthorDate: Tue Jun 20 12:59:37 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jun 20 08:59:40 2017 -0400 Merge topic 'FindwxWidgets-fix-flag-parse' a7a0bf86 FindwxWidgets: Fix parsing of cxxflags when paths contain -D or -I Acked-by: Kitware Robot Merge-request: !975 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d83b8010ec6a5479b5860a3aaec5647a143085a commit 7d83b8010ec6a5479b5860a3aaec5647a143085a Merge: 95f546e 8b53dee Author: Brad King AuthorDate: Tue Jun 20 12:58:36 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jun 20 08:58:39 2017 -0400 Merge topic 'curses-form-advanced' 8b53dee2 FindCurses: mark CURSES_FORM_LIBRARY as advanced Acked-by: Kitware Robot Merge-request: !978 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=95f546ec2b588174e2e1dfe30d803f2a3c66c2ec commit 95f546ec2b588174e2e1dfe30d803f2a3c66c2ec Merge: 829ce06 1844360 Author: Brad King AuthorDate: Tue Jun 20 12:57:07 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jun 20 08:57:12 2017 -0400 Merge topic 'vs_dotnet_referenceprop_documentation' 18443600 Vs: fix documentation for target property VS_DOTNET_REFERENCEPROP_* Acked-by: Kitware Robot Merge-request: !980 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a7a0bf861ad434063228146790e6403f5743d2b9 commit a7a0bf861ad434063228146790e6403f5743d2b9 Author: Thierry Crozat AuthorDate: Fri Jun 16 19:50:27 2017 +0100 Commit: Brad King CommitDate: Mon Jun 19 13:56:09 2017 -0400 FindwxWidgets: Fix parsing of cxxflags when paths contain -D or -I Use proper command-line parsing rather than accidentally matching content in the middle of paths that looks like flags. Fixes: #16986 diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index af4daf0..63f2c60 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -778,28 +778,24 @@ else() ) if(RET EQUAL 0) string(STRIP "${wxWidgets_CXX_FLAGS}" wxWidgets_CXX_FLAGS) - separate_arguments(wxWidgets_CXX_FLAGS) + separate_arguments(wxWidgets_CXX_FLAGS_LIST NATIVE_COMMAND "${wxWidgets_CXX_FLAGS}") DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}") - # parse definitions from cxxflags; - # drop -D* from CXXFLAGS and the -D prefix - string(REGEX MATCHALL "-D[^;]+" - wxWidgets_DEFINITIONS "${wxWidgets_CXX_FLAGS}") - string(REGEX REPLACE "-D[^;]+(;|$)" "" - wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") - string(REGEX REPLACE ";$" "" - wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") - string(REPLACE "-D" "" - wxWidgets_DEFINITIONS "${wxWidgets_DEFINITIONS}") - - # parse include dirs from cxxflags; drop -I prefix - string(REGEX MATCHALL "-I[^;]+" - wxWidgets_INCLUDE_DIRS "${wxWidgets_CXX_FLAGS}") - string(REGEX REPLACE "-I[^;]+;" "" - wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") - string(REPLACE "-I" "" - wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}") + # parse definitions and include dirs from cxxflags + # drop the -D and -I prefixes + set(wxWidgets_CXX_FLAGS) + foreach(arg IN LISTS wxWidgets_CXX_FLAGS_LIST) + if("${arg}" MATCHES "^-I(.*)$") + # include directory + list(APPEND wxWidgets_INCLUDE_DIRS "${CMAKE_MATCH_1}") + elseif("${arg}" MATCHES "^-D(.*)$") + # compile definition + list(APPEND wxWidgets_DEFINITIONS "${CMAKE_MATCH_1}") + else() + list(APPEND wxWidgets_CXX_FLAGS "${arg}") + endif() + endforeach() DBG_MSG_V("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}") DBG_MSG_V("wxWidgets_INCLUDE_DIRS=${wxWidgets_INCLUDE_DIRS}") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3566af83f932e6b20feb3e145d3318c556ced270 commit 3566af83f932e6b20feb3e145d3318c556ced270 Author: Roger Leigh AuthorDate: Sat Jun 17 23:05:53 2017 +0100 Commit: Roger Leigh CommitDate: Sat Jun 17 23:07:44 2017 +0100 FindICU: Search for packaged data files The files Makefile.inc and pkgdata.inc are installed by ICU to /icu and on some distributions to //icu. These are required by ICU tools like pkgdata, and so are needed by other package build systems at build time, in addition to the libraries and executables already searched for. Search for the files and create cache entries for them, as done for executables. diff --git a/Modules/FindICU.cmake b/Modules/FindICU.cmake index 5210f08..d9705d9 100644 --- a/Modules/FindICU.cmake +++ b/Modules/FindICU.cmake @@ -55,6 +55,11 @@ # ICU__FOUND - ON if component was found # ICU__LIBRARIES - libraries for component # +# ICU datafiles are reported in:: +# +# ICU_MAKEFILE_INC - Makefile.inc +# ICU_PKGDATA_INC - pkgdata.inc +# # Note that ```` is the uppercased name of the component. # # This module reads hints about search results from:: @@ -100,6 +105,10 @@ set(icu_programs icupkg gencmn) +set(icu_data + Makefile.inc + pkgdata.inc) + # The ICU checks are contained in a function due to the large number # of temporary variables needed. function(_ICU_FIND) @@ -116,6 +125,28 @@ function(_ICU_FIND) endif() endif() + # Find include directory + list(APPEND icu_include_suffixes "include") + find_path(ICU_INCLUDE_DIR + NAMES "unicode/utypes.h" + HINTS ${icu_roots} + PATH_SUFFIXES ${icu_include_suffixes} + DOC "ICU include directory") + set(ICU_INCLUDE_DIR "${ICU_INCLUDE_DIR}" PARENT_SCOPE) + + # Get version + if(ICU_INCLUDE_DIR AND EXISTS "${ICU_INCLUDE_DIR}/unicode/uvernum.h") + file(STRINGS "${ICU_INCLUDE_DIR}/unicode/uvernum.h" icu_header_str + REGEX "^#define[\t ]+U_ICU_VERSION[\t ]+\".*\".*") + + string(REGEX REPLACE "^#define[\t ]+U_ICU_VERSION[\t ]+\"([^ \\n]*)\".*" + "\\1" icu_version_string "${icu_header_str}") + set(ICU_VERSION "${icu_version_string}") + set(ICU_VERSION "${icu_version_string}" PARENT_SCOPE) + unset(icu_header_str) + unset(icu_version_string) + endif() + if(CMAKE_SIZEOF_VOID_P EQUAL 8) # 64-bit binary directory set(_bin64 "bin64") @@ -123,12 +154,9 @@ function(_ICU_FIND) set(_lib64 "lib64") endif() - # Generic 64-bit and 32-bit directories - list(APPEND icu_binary_suffixes "${_bin64}" "bin") - list(APPEND icu_library_suffixes "${_lib64}" "lib") - list(APPEND icu_include_suffixes "include") # Find all ICU programs + list(APPEND icu_binary_suffixes "${_bin64}" "bin") foreach(program ${icu_programs}) string(TOUPPER "${program}" program_upcase) set(cache_var "ICU_${program_upcase}_EXECUTABLE") @@ -141,27 +169,8 @@ function(_ICU_FIND) set("${program_var}" "${${cache_var}}" PARENT_SCOPE) endforeach() - # Find include directory - find_path(ICU_INCLUDE_DIR - NAMES "unicode/utypes.h" - HINTS ${icu_roots} - PATH_SUFFIXES ${icu_include_suffixes} - DOC "ICU include directory") - set(ICU_INCLUDE_DIR "${ICU_INCLUDE_DIR}" PARENT_SCOPE) - - # Get version - if(ICU_INCLUDE_DIR AND EXISTS "${ICU_INCLUDE_DIR}/unicode/uvernum.h") - file(STRINGS "${ICU_INCLUDE_DIR}/unicode/uvernum.h" icu_header_str - REGEX "^#define[\t ]+U_ICU_VERSION[\t ]+\".*\".*") - - string(REGEX REPLACE "^#define[\t ]+U_ICU_VERSION[\t ]+\"([^ \\n]*)\".*" - "\\1" icu_version_string "${icu_header_str}") - set(ICU_VERSION "${icu_version_string}" PARENT_SCOPE) - unset(icu_header_str) - unset(icu_version_string) - endif() - # Find all ICU libraries + list(APPEND icu_library_suffixes "${_lib64}" "lib") set(ICU_REQUIRED_LIBS_FOUND ON) foreach(component ${ICU_FIND_COMPONENTS}) string(TOUPPER "${component}" component_upcase) @@ -233,6 +242,32 @@ function(_ICU_FIND) set(_ICU_REQUIRED_LIBS_FOUND "${ICU_REQUIRED_LIBS_FOUND}" PARENT_SCOPE) set(ICU_LIBRARY "${ICU_LIBRARY}" PARENT_SCOPE) + # Find all ICU data files + if(CMAKE_LIBRARY_ARCHITECTURE) + list(APPEND icu_data_suffixes + "${_lib64}/${CMAKE_LIBRARY_ARCHITECTURE}/icu/${ICU_VERSION}" + "lib/${CMAKE_LIBRARY_ARCHITECTURE}/icu/${ICU_VERSION}" + "${_lib64}/${CMAKE_LIBRARY_ARCHITECTURE}/icu" + "lib/${CMAKE_LIBRARY_ARCHITECTURE}/icu") + endif() + list(APPEND icu_data_suffixes + "${_lib64}/icu/${ICU_VERSION}" + "lib/icu/${ICU_VERSION}" + "${_lib64}/icu" + "lib/icu") + foreach(data ${icu_data}) + string(TOUPPER "${data}" data_upcase) + string(REPLACE "." "_" data_upcase "${data_upcase}") + set(cache_var "ICU_${data_upcase}") + set(data_var "ICU_${data_upcase}") + find_file("${cache_var}" "${data}" + HINTS ${icu_roots} + PATH_SUFFIXES ${icu_data_suffixes} + DOC "ICU ${data} data file") + mark_as_advanced(cache_var) + set("${data_var}" "${${cache_var}}" PARENT_SCOPE) + endforeach() + if(NOT ICU_FIND_QUIETLY) if(ICU_LIBS_FOUND) message(STATUS "Found the following ICU libraries:") @@ -334,6 +369,15 @@ if(ICU_DEBUG) unset(program_lib) endforeach() + foreach(data IN LISTS icu_data) + string(TOUPPER "${data}" data_upcase) + string(REPLACE "." "_" data_upcase "${data_upcase}") + set(data_lib "ICU_${data_upcase}") + message(STATUS "${data} data: ${${data_lib}}") + unset(data_upcase) + unset(data_lib) + endforeach() + foreach(component IN LISTS ICU_FIND_COMPONENTS) string(TOUPPER "${component}" component_upcase) set(component_lib "ICU_${component_upcase}_LIBRARIES") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1844360099b41932df21c1d2abdc7c0ace389c16 commit 1844360099b41932df21c1d2abdc7c0ace389c16 Author: Michael St?rmer AuthorDate: Sat Jun 17 17:20:05 2017 +0200 Commit: Michael St?rmer CommitDate: Sat Jun 17 22:56:28 2017 +0200 Vs: fix documentation for target property VS_DOTNET_REFERENCEPROP_* diff --git a/Help/prop_tgt/VS_DOTNET_REFERENCEPROP_refname_TAG_tagname.rst b/Help/prop_tgt/VS_DOTNET_REFERENCEPROP_refname_TAG_tagname.rst index 478a04c..ab311ea 100644 --- a/Help/prop_tgt/VS_DOTNET_REFERENCEPROP_refname_TAG_tagname.rst +++ b/Help/prop_tgt/VS_DOTNET_REFERENCEPROP_refname_TAG_tagname.rst @@ -1,11 +1,14 @@ VS_DOTNET_REFERENCEPROP__TAG_ ----------------------------------------------- -Visual Studio managed project .NET reference with name ```` -and hint path. +Defines an XML property ```` for a .NET reference +````. -Adds one .NET reference to generated Visual Studio project. The -reference will have the name ```` and will point to the -assembly given as value of the property. +Reference properties can be set for .NET references which are +defined by the target properties :prop_tgt:`VS_DOTNET_REFERENCES`, +:prop_tgt:`VS_DOTNET_REFERENCE_` +and also for project references to other C# targets which are +established by :command:`target_link_libraries()`. -See also the :prop_tgt:`VS_DOTNET_REFERENCE_` target property. +This property is only applicable to C# targets and Visual Studio +generators 2010 and later. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b53dee296baf9dbe53cf93e07f0b88e269b2f98 commit 8b53dee296baf9dbe53cf93e07f0b88e269b2f98 Author: Daniel Pfeifer AuthorDate: Sat Jun 17 15:13:50 2017 +0200 Commit: Daniel Pfeifer CommitDate: Sat Jun 17 15:13:50 2017 +0200 FindCurses: mark CURSES_FORM_LIBRARY as advanced diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake index 4365e99..8d58d03 100644 --- a/Modules/FindCurses.cmake +++ b/Modules/FindCurses.cmake @@ -199,4 +199,5 @@ mark_as_advanced( CURSES_CURSES_LIBRARY CURSES_NCURSES_LIBRARY CURSES_EXTRA_LIBRARY + CURSES_FORM_LIBRARY ) ----------------------------------------------------------------------- Summary of changes: ...VS_DOTNET_REFERENCEPROP_refname_TAG_tagname.rst | 15 ++-- Modules/FindCurses.cmake | 1 + Modules/FindICU.cmake | 92 +++++++++++++++----- Modules/FindwxWidgets.cmake | 34 ++++---- 4 files changed, 93 insertions(+), 49 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 21 00:05:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 21 Jun 2017 00:05:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-134-g782c1e2 Message-ID: <20170621040507.9B7E8FAA97@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 782c1e2f3741977104ef7bd2861162d861bf45d3 (commit) from 8308803167368b873641e5066017536a082f3c68 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=782c1e2f3741977104ef7bd2861162d861bf45d3 commit 782c1e2f3741977104ef7bd2861162d861bf45d3 Author: Kitware Robot AuthorDate: Wed Jun 21 00:01:05 2017 -0400 Commit: Kitware Robot CommitDate: Wed Jun 21 00:01:05 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 684dfa5..52efadf 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 9) -set(CMake_VERSION_PATCH 20170620) +set(CMake_VERSION_PATCH 20170621) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 21 08:45:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 21 Jun 2017 08:45:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-146-gd7c694b Message-ID: <20170621124508.5A3B7F585E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via d7c694b2e7ba43f634e920800efe138987d3b248 (commit) via 1ac07c71d8b410a9c1fedb4854786890b05e7ae0 (commit) via 2beac8991bea8aaa6e168c51605564997b1c4fcc (commit) via ad7cf4b798c71198e8b106b696e25d4d2edceda2 (commit) via f94213a1ee3824b790d8087fabf06f3a46a16347 (commit) via 72ccb9f499a09bae84cf7ee1f148926f68aace3f (commit) via d5afb178f1829fc5fd9332f70986b95ab62aedcc (commit) via 50b3837c6420865f46911f7359040dcb65fc112f (commit) via 01d2b745aa8f2fd27addbd4f94d3f7d5acb35a15 (commit) via 0a40c668f5bd60e68cde3fc7803aec2611f6c1c3 (commit) via 4b8a8c226fd7fe19d9445664c4cb9ff084b44281 (commit) via d9d191a19f4a383e6e5a56d016526323476ce001 (commit) from 782c1e2f3741977104ef7bd2861162d861bf45d3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d7c694b2e7ba43f634e920800efe138987d3b248 commit d7c694b2e7ba43f634e920800efe138987d3b248 Merge: 1ac07c7 50b3837 Author: Brad King AuthorDate: Wed Jun 21 12:38:05 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 21 08:38:11 2017 -0400 Merge topic 'autogen_brace' 50b3837c Autogen: Q_OBJECT behind brace test 01d2b745 Autogen: Check for Q_OBJECT/Q_GADGET after brace Acked-by: Kitware Robot Merge-request: !986 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ac07c71d8b410a9c1fedb4854786890b05e7ae0 commit 1ac07c71d8b410a9c1fedb4854786890b05e7ae0 Merge: 2beac89 72ccb9f Author: Brad King AuthorDate: Wed Jun 21 12:37:13 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 21 08:37:17 2017 -0400 Merge topic 'CheckTypeSize-arm-archs' 72ccb9f4 CheckTypeSize: Add support for arm architectures Acked-by: Kitware Robot Merge-request: !989 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2beac8991bea8aaa6e168c51605564997b1c4fcc commit 2beac8991bea8aaa6e168c51605564997b1c4fcc Merge: ad7cf4b f94213a Author: Brad King AuthorDate: Wed Jun 21 12:36:02 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 21 08:36:05 2017 -0400 Merge topic 'cuda-version-for-vs' f94213a1 Help: Update 3.9 release notes with recommended CUDA version for VS Acked-by: Kitware Robot Merge-request: !990 diff --cc Help/release/3.9.rst index cd9476d,7fef079..c31f533 --- a/Help/release/3.9.rst +++ b/Help/release/3.9.rst @@@ -16,12 -16,9 +16,14 @@@ Language * ``CUDA`` is now supported by the :ref:`Visual Studio Generators` for VS 2010 and above. This complements the existing support by the :ref:`Makefile Generators` and the :generator:`Ninja` generator. + CUDA 8.0.61 or higher is recommended due to known bugs in the VS + integration by earlier versions. +* CMake is now aware of the :prop_tgt:`C++ standards ` and + :prop_tgt:`C standards ` and their associated meta-features for + the following :variable:`compiler ids _COMPILER_ID>`: ``Cray``, + ``PGI``, and ``XL``. + Generators ---------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ad7cf4b798c71198e8b106b696e25d4d2edceda2 commit ad7cf4b798c71198e8b106b696e25d4d2edceda2 Merge: 782c1e2 d5afb17 Author: Brad King AuthorDate: Wed Jun 21 12:35:14 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 21 08:35:18 2017 -0400 Merge topic 'update-expat' d5afb178 expat: Fix compilation on systems without stdint.h 0a40c668 Merge branch 'upstream-expat' into update-expat 4b8a8c22 expat 2017-06-17 (c4446687) d9d191a1 expat: Update script to get Expat 2.2.1 Acked-by: Kitware Robot Merge-request: !987 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f94213a1ee3824b790d8087fabf06f3a46a16347 commit f94213a1ee3824b790d8087fabf06f3a46a16347 Author: Brad King AuthorDate: Tue Jun 20 10:16:55 2017 -0400 Commit: Brad King CommitDate: Tue Jun 20 10:25:05 2017 -0400 Help: Update 3.9 release notes with recommended CUDA version for VS CUDA 8.0.44 contains a bug in its VS integration that breaks preprocessor definitions in some cases. Recommend using at least 8.0.61 which fixes the problem. Fixes: #16993 diff --git a/Help/release/3.9.rst b/Help/release/3.9.rst index 333ba9e..7fef079 100644 --- a/Help/release/3.9.rst +++ b/Help/release/3.9.rst @@ -16,6 +16,8 @@ Languages * ``CUDA`` is now supported by the :ref:`Visual Studio Generators` for VS 2010 and above. This complements the existing support by the :ref:`Makefile Generators` and the :generator:`Ninja` generator. + CUDA 8.0.61 or higher is recommended due to known bugs in the VS + integration by earlier versions. Generators ---------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72ccb9f499a09bae84cf7ee1f148926f68aace3f commit 72ccb9f499a09bae84cf7ee1f148926f68aace3f Author: Douglas McKenzie AuthorDate: Tue Jun 20 19:49:01 2017 +1000 Commit: Brad King CommitDate: Tue Jun 20 10:04:05 2017 -0400 CheckTypeSize: Add support for arm architectures This adds detection for `armv7`, `armv7s` and `arm64` when performing type size checks on universal binaries for iOS. Fixes: #16992 diff --git a/Modules/CheckTypeSize.c.in b/Modules/CheckTypeSize.c.in index b6c3688..2303c4e 100644 --- a/Modules/CheckTypeSize.c.in +++ b/Modules/CheckTypeSize.c.in @@ -9,6 +9,12 @@ # define KEY '_','_','p','p','c','_','_' #elif defined(__ppc64__) # define KEY '_','_','p','p','c','6','4','_','_' +#elif defined(__aarch64__) +# define KEY '_','_','a','a','r','c','h','6','4','_','_' +#elif defined(__ARM_ARCH_7A__) +# define KEY '_','_','A','R','M','_','A','R','C','H','_','7','A','_','_' +#elif defined(__ARM_ARCH_7S__) +# define KEY '_','_','A','R','M','_','A','R','C','H','_','7','S','_','_' #endif #define SIZE (sizeof(@type@)) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d5afb178f1829fc5fd9332f70986b95ab62aedcc commit d5afb178f1829fc5fd9332f70986b95ab62aedcc Author: Brad King AuthorDate: Tue Jun 20 08:52:02 2017 -0400 Commit: Brad King CommitDate: Tue Jun 20 08:55:48 2017 -0400 expat: Fix compilation on systems without stdint.h diff --git a/Utilities/cmexpat/lib/siphash.h b/Utilities/cmexpat/lib/siphash.h index 23b56d2..db17458 100644 --- a/Utilities/cmexpat/lib/siphash.h +++ b/Utilities/cmexpat/lib/siphash.h @@ -76,8 +76,18 @@ #define SIPHASH_H #include /* size_t */ -#include /* uint64_t uint32_t uint8_t */ +#include + +#ifndef KWIML_INT_HAVE_UINT64_T +# define uint64_t KWIML_INT_uint64_t +#endif +#ifndef KWIML_INT_HAVE_UINT32_T +# define uint32_t KWIML_INT_uint32_t +#endif +#ifndef KWIML_INT_HAVE_UINT8_T +# define uint8_t KWIML_INT_uint8_t +#endif #define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ( (x) >> (64 - (b)))) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=50b3837c6420865f46911f7359040dcb65fc112f commit 50b3837c6420865f46911f7359040dcb65fc112f Author: Sebastian Holtermann AuthorDate: Tue Jun 20 10:41:57 2017 +0200 Commit: Sebastian Holtermann CommitDate: Tue Jun 20 10:49:00 2017 +0200 Autogen: Q_OBJECT behind brace test diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 3c6b2b3..89d2b80 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -61,6 +61,21 @@ if(NON_ASCII_BDIR AND WIN32) endif() # -- Test +# MOC only +add_executable(mocOnly mocOnlySource/main.cpp mocOnlySource/StyleA.cpp mocOnlySource/StyleB.cpp) +set_property(TARGET mocOnly PROPERTY AUTOMOC ON) +target_link_libraries(mocOnly ${QT_LIBRARIES}) + +# -- Test +# UIC only +if(ALLOW_WRAP_CPP) + qtx_wrap_cpp(uicOnlyMoc uicOnlySource/uiconly.h) + add_executable(uicOnly uicOnlySource/uiconly.cpp ${uicOnlyMoc}) + set_property(TARGET uicOnly PROPERTY AUTOUIC ON) + target_link_libraries(uicOnly ${QT_LIBRARIES}) +endif() + +# -- Test # RCC only add_executable(rccOnly rccOnly.cpp rccOnlyRes.qrc) set_property(TARGET rccOnly PROPERTY AUTORCC ON) @@ -73,15 +88,6 @@ set_property(TARGET rccEmpty PROPERTY AUTORCC ON) target_link_libraries(rccEmpty ${QT_QTCORE_TARGET}) # -- Test -# UIC only -if(ALLOW_WRAP_CPP) - qtx_wrap_cpp(uicOnlyMoc uicOnlySource/uiconly.h) - add_executable(uicOnly uicOnlySource/uiconly.cpp ${uicOnlyMoc}) - set_property(TARGET uicOnly PROPERTY AUTOUIC ON) - target_link_libraries(uicOnly ${QT_LIBRARIES}) -endif() - -# -- Test # Add not_generated_file.qrc to the source list to get the file-level # dependency, but don't generate a c++ file from it. Disable the AUTORCC # feature for this target. This tests that qrc files in the sources don't diff --git a/Tests/QtAutogen/mocOnlySource/StyleA.cpp b/Tests/QtAutogen/mocOnlySource/StyleA.cpp new file mode 100644 index 0000000..ced1dd1 --- /dev/null +++ b/Tests/QtAutogen/mocOnlySource/StyleA.cpp @@ -0,0 +1,5 @@ +#include "StyleA.hpp" + +StyleA::StyleA() +{ +} diff --git a/Tests/QtAutogen/mocOnlySource/StyleA.hpp b/Tests/QtAutogen/mocOnlySource/StyleA.hpp new file mode 100644 index 0000000..66735b6 --- /dev/null +++ b/Tests/QtAutogen/mocOnlySource/StyleA.hpp @@ -0,0 +1,15 @@ +#ifndef STYLEA_HPP +#define STYLEA_HPP + +#include + +/// Q_OBJECT on a single new line +/// +class StyleA : public QObject +{ + Q_OBJECT +public: + StyleA(); +}; + +#endif diff --git a/Tests/QtAutogen/mocOnlySource/StyleB.cpp b/Tests/QtAutogen/mocOnlySource/StyleB.cpp new file mode 100644 index 0000000..bec6c1c --- /dev/null +++ b/Tests/QtAutogen/mocOnlySource/StyleB.cpp @@ -0,0 +1,5 @@ +#include "StyleB.hpp" + +StyleB::StyleB() +{ +} diff --git a/Tests/QtAutogen/mocOnlySource/StyleB.hpp b/Tests/QtAutogen/mocOnlySource/StyleB.hpp new file mode 100644 index 0000000..425daf8 --- /dev/null +++ b/Tests/QtAutogen/mocOnlySource/StyleB.hpp @@ -0,0 +1,16 @@ +#ifndef STYLEB_HPP +#define STYLEB_HPP + +#include + +/* clang-format off */ +/// Q_OBJECT behind a brace +/// +class StyleB : public QObject +{ Q_OBJECT +public: + StyleB(); +}; +/* clang-format on */ + +#endif diff --git a/Tests/QtAutogen/mocOnlySource/main.cpp b/Tests/QtAutogen/mocOnlySource/main.cpp new file mode 100644 index 0000000..06f8d81 --- /dev/null +++ b/Tests/QtAutogen/mocOnlySource/main.cpp @@ -0,0 +1,9 @@ +#include "StyleA.hpp" +#include "StyleB.hpp" + +int main(int argv, char** args) +{ + StyleA styleA; + StyleB styleB; + return 0; +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=01d2b745aa8f2fd27addbd4f94d3f7d5acb35a15 commit 01d2b745aa8f2fd27addbd4f94d3f7d5acb35a15 Author: Sebastian Holtermann AuthorDate: Mon Jun 19 08:00:46 2017 +0200 Commit: Sebastian Holtermann CommitDate: Tue Jun 20 10:49:00 2017 +0200 Autogen: Check for Q_OBJECT/Q_GADGET after brace Closes #16971 diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 27e4928..7f0bd86 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -281,9 +281,11 @@ cmQtAutoGenerators::cmQtAutoGenerators() // Moc macro filters this->MocMacroFilters[0].first = "Q_OBJECT"; - this->MocMacroFilters[0].second.compile("[\n][ \t]*Q_OBJECT[^a-zA-Z0-9_]"); + this->MocMacroFilters[0].second.compile( + "[\n][ \t]*{?[ \t]*Q_OBJECT[^a-zA-Z0-9_]"); this->MocMacroFilters[1].first = "Q_GADGET"; - this->MocMacroFilters[1].second.compile("[\n][ \t]*Q_GADGET[^a-zA-Z0-9_]"); + this->MocMacroFilters[1].second.compile( + "[\n][ \t]*{?[ \t]*Q_GADGET[^a-zA-Z0-9_]"); // Precompile regular expressions this->MocRegExpInclude.compile( https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a40c668f5bd60e68cde3fc7803aec2611f6c1c3 commit 0a40c668f5bd60e68cde3fc7803aec2611f6c1c3 Merge: d9d191a 4b8a8c2 Author: Brad King AuthorDate: Mon Jun 19 15:26:00 2017 -0400 Commit: Brad King CommitDate: Mon Jun 19 15:26:00 2017 -0400 Merge branch 'upstream-expat' into update-expat * upstream-expat: expat 2017-06-17 (c4446687) diff --cc Utilities/cmexpat/lib/expat_external.h index 07a3c5c,0000000..d60eecc mode 100644,000000..100644 --- a/Utilities/cmexpat/lib/expat_external.h +++ b/Utilities/cmexpat/lib/expat_external.h @@@ -1,131 -1,0 +1,134 @@@ +/* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd + See the file COPYING for copying permission. +*/ + +#ifndef Expat_External_INCLUDED +#define Expat_External_INCLUDED 1 + +/* External API definitions */ + +#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) +#define XML_USE_MSC_EXTENSIONS 1 +#endif + +/* Expat tries very hard to make the API boundary very specifically + defined. There are two macros defined to control this boundary; + each of these can be defined before including this header to + achieve some different behavior, but doing so it not recommended or + tested frequently. + + XMLCALL - The calling convention to use for all calls across the + "library boundary." This will default to cdecl, and + try really hard to tell the compiler that's what we + want. + + XMLIMPORT - Whatever magic is needed to note that a function is + to be imported from a dynamically loaded library + (.dll, .so, or .sl, depending on your platform). + + The XMLCALL macro was added in Expat 1.95.7. The only one which is + expected to be directly useful in client code is XMLCALL. + + Note that on at least some Unix versions, the Expat library must be + compiled with the cdecl calling convention as the default since + system headers may assume the cdecl convention. +*/ +#ifndef XMLCALL +#if defined(_MSC_VER) +#define XMLCALL __cdecl +#elif defined(__GNUC__) && defined(__i386) && !defined(__INTEL_COMPILER) +#define XMLCALL __attribute__((cdecl)) +#else +/* For any platform which uses this definition and supports more than + one calling convention, we need to extend this definition to + declare the convention used on that platform, if it's possible to + do so. + + If this is the case for your platform, please file a bug report + with information on how to identify your platform via the C + pre-processor and how to specify the same calling convention as the + platform's malloc() implementation. +*/ +#define XMLCALL +#endif +#endif /* not defined XMLCALL */ + +/* Build within CMake hard-codes use of a static library. */ +#define XML_STATIC + +#if !defined(XML_STATIC) && !defined(XMLIMPORT) +#ifndef XML_BUILDING_EXPAT +/* using Expat from an application */ + +#ifdef XML_USE_MSC_EXTENSIONS +#define XMLIMPORT __declspec(dllimport) +#endif + +#endif +#endif /* not defined XML_STATIC */ + +#if !defined(XMLIMPORT) && defined(__GNUC__) && (__GNUC__ >= 4) +#define XMLIMPORT __attribute__ ((visibility ("default"))) +#endif + +/* If we didn't define it above, define it away: */ +#ifndef XMLIMPORT +#define XMLIMPORT +#endif + +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) +#define XML_ATTR_MALLOC __attribute__((__malloc__)) +#else +#define XML_ATTR_MALLOC +#endif + +#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) +#define XML_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) +#else +#define XML_ATTR_ALLOC_SIZE(x) +#endif + +#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef XML_UNICODE_WCHAR_T - #define XML_UNICODE ++# define XML_UNICODE ++# if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2) ++# error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc" ++# endif +#endif + +#ifdef XML_UNICODE /* Information is UTF-16 encoded. */ +#ifdef XML_UNICODE_WCHAR_T +typedef wchar_t XML_Char; +typedef wchar_t XML_LChar; +#else +typedef unsigned short XML_Char; +typedef char XML_LChar; +#endif /* XML_UNICODE_WCHAR_T */ +#else /* Information is UTF-8 encoded. */ +typedef char XML_Char; +typedef char XML_LChar; +#endif /* XML_UNICODE */ + +#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */ +#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400 +typedef __int64 XML_Index; +typedef unsigned __int64 XML_Size; +#else +typedef long long XML_Index; +typedef unsigned long long XML_Size; +#endif +#else +typedef long XML_Index; +typedef unsigned long XML_Size; +#endif /* XML_LARGE_SIZE */ + +#ifdef __cplusplus +} +#endif + +#endif /* not Expat_External_INCLUDED */ diff --cc Utilities/cmexpat/lib/siphash.h index 0000000,23b56d2..23b56d2 mode 000000,100644..100644 --- a/Utilities/cmexpat/lib/siphash.h +++ b/Utilities/cmexpat/lib/siphash.h diff --cc Utilities/cmexpat/lib/winconfig.h index d7dad38,0000000..c9dbfea mode 100644,000000..100644 --- a/Utilities/cmexpat/lib/winconfig.h +++ b/Utilities/cmexpat/lib/winconfig.h @@@ -1,27 -1,0 +1,44 @@@ +/*================================================================ +** Copyright 2000, Clark Cooper +** All rights reserved. +** +** This is free software. You are permitted to copy, distribute, or modify +** it under the terms of the MIT/X license (contained in the COPYING file +** with this distribution.) +*/ + +#ifndef WINCONFIG_H +#define WINCONFIG_H + +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN + +#include +#include + - #include "expat_config.h" ++ ++#if defined(HAVE_EXPAT_CONFIG_H) /* e.g. MinGW */ ++# include ++#else /* !defined(HAVE_EXPAT_CONFIG_H) */ ++ ++ ++#define XML_NS 1 ++#define XML_DTD 1 ++#define XML_CONTEXT_BYTES 1024 ++ ++/* we will assume all Windows platforms are little endian */ ++#define BYTEORDER 1234 ++ ++/* Windows has memmove() available. */ ++#define HAVE_MEMMOVE ++ ++ ++#endif /* !defined(HAVE_EXPAT_CONFIG_H) */ + +#if defined(_MSC_VER) +# pragma warning(push,1) +# pragma warning(disable:4311) /* pointer truncation */ +#endif + +#endif /* ndef WINCONFIG_H */ https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b8a8c226fd7fe19d9445664c4cb9ff084b44281 commit 4b8a8c226fd7fe19d9445664c4cb9ff084b44281 Author: Expat Upstream AuthorDate: Sat Jun 17 12:07:38 2017 -0400 Commit: Brad King CommitDate: Mon Jun 19 15:25:46 2017 -0400 expat 2017-06-17 (c4446687) Code extracted from: https://github.com/libexpat/libexpat.git at commit c4446687cfc6c5fd7f6371aeaf24c69402a3589e (R_2_2_1). diff --git a/CMakeLists.txt b/CMakeLists.txt index 6361209..cbb1981 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ project(expat) cmake_minimum_required(VERSION 2.6) set(PACKAGE_BUGREPORT "expat-bugs at libexpat.org") set(PACKAGE_NAME "expat") -set(PACKAGE_VERSION "2.1.1") +set(PACKAGE_VERSION "2.2.1") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_TARNAME "${PACKAGE_NAME}") @@ -14,6 +14,8 @@ option(BUILD_tools "build the xmlwf tool for expat library" ON) option(BUILD_examples "build the examples for expat library" ON) option(BUILD_tests "build the tests for expat library" ON) option(BUILD_shared "build a shared expat library" ON) +option(BUILD_doc "build man page for xmlwf" ON) +option(INSTALL "install expat files in cmake install target" ON) # configuration options set(XML_CONTEXT_BYTES 1024 CACHE STRING "Define to specify how much context to retain around the current parse point") @@ -37,20 +39,25 @@ endif(BUILD_tests) include(ConfigureChecks.cmake) +set(EXTRA_LINK_AND_COMPILE_FLAGS "-fno-strict-aliasing") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${EXTRA_LINK_AND_COMPILE_FLAGS}") + include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/lib) if(MSVC) add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996) endif(MSVC) if(WIN32) - add_definitions(-DCOMPILING_FOR_WINDOWS) set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Add a suffix, usually d on Windows") endif(WIN32) set(expat_SRCS lib/xmlparse.c lib/xmlrole.c - lib/xmltok.c - lib/xmltok_impl.c + lib/xmltok.c + lib/xmltok_impl.c lib/xmltok_ns.c ) @@ -69,15 +76,23 @@ endif(BUILD_shared) add_library(expat ${_SHARED} ${expat_SRCS}) set(LIBCURRENT 7) # sync -set(LIBREVISION 2) # with +set(LIBREVISION 3) # with set(LIBAGE 6) # configure.ac! math(EXPR LIBCURRENT_MINUS_AGE "${LIBCURRENT} - ${LIBAGE}") -set_property(TARGET expat PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION}) -set_property(TARGET expat PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE}) -set_property(TARGET expat PROPERTY NO_SONAME ${NO_SONAME}) +if(NOT WIN32) + set_property(TARGET expat PROPERTY VERSION ${LIBCURRENT_MINUS_AGE}.${LIBAGE}.${LIBREVISION}) + set_property(TARGET expat PROPERTY SOVERSION ${LIBCURRENT_MINUS_AGE}) + set_property(TARGET expat PROPERTY NO_SONAME ${NO_SONAME}) +endif(NOT WIN32) + +macro(expat_install) + if(INSTALL) + install(${ARGN}) + endif() +endmacro() -install(TARGETS expat RUNTIME DESTINATION bin +expat_install(TARGETS expat RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) @@ -87,11 +102,8 @@ set(libdir "\${prefix}/lib") set(includedir "\${prefix}/include") configure_file(expat.pc.in ${CMAKE_CURRENT_BINARY_DIR}/expat.pc) -install(FILES lib/expat.h lib/expat_external.h DESTINATION include) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION lib/pkgconfig) - - -add_custom_command(TARGET expat PRE_BUILD COMMAND $(MAKE) -C doc xmlwf.1) +expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION include) +expat_install(FILES ${CMAKE_CURRENT_BINARY_DIR}/expat.pc DESTINATION lib/pkgconfig) if(BUILD_tools AND NOT WINCE) set(xmlwf_SRCS @@ -104,8 +116,17 @@ if(BUILD_tools AND NOT WINCE) add_executable(xmlwf ${xmlwf_SRCS}) set_property(TARGET xmlwf PROPERTY RUNTIME_OUTPUT_DIRECTORY xmlwf) target_link_libraries(xmlwf expat) - install(TARGETS xmlwf DESTINATION bin) - install(FILES doc/xmlwf.1 DESTINATION share/man/man1) + expat_install(TARGETS xmlwf DESTINATION bin) + if(BUILD_doc AND NOT MSVC) + if(CMAKE_GENERATOR STREQUAL "Unix Makefiles") + set(make_command "$(MAKE)") + else() + set(make_command "make") + endif() + + add_custom_command(TARGET expat PRE_BUILD COMMAND "${make_command}" -C "${PROJECT_SOURCE_DIR}/doc" xmlwf.1) + expat_install(FILES "${PROJECT_SOURCE_DIR}/doc/xmlwf.1" DESTINATION share/man/man1) + endif() endif(BUILD_tools AND NOT WINCE) if(BUILD_examples) @@ -120,12 +141,12 @@ endif(BUILD_examples) if(BUILD_tests) ## these are unittests that can be run on any platform - add_executable(runtests tests/runtests.c tests/chardata.c tests/minicheck.c) + add_executable(runtests tests/runtests.c tests/chardata.c tests/minicheck.c tests/memcheck.c) set_property(TARGET runtests PROPERTY RUNTIME_OUTPUT_DIRECTORY tests) target_link_libraries(runtests expat) add_test(runtests tests/runtests) - add_executable(runtestspp tests/runtestspp.cpp tests/chardata.c tests/minicheck.c) + add_executable(runtestspp tests/runtestspp.cpp tests/chardata.c tests/minicheck.c tests/memcheck.c) set_property(TARGET runtestspp PROPERTY RUNTIME_OUTPUT_DIRECTORY tests) target_link_libraries(runtestspp expat) add_test(runtestspp tests/runtestspp) diff --git a/COPYING b/COPYING index dcb4506..8d288f0 100644 --- a/COPYING +++ b/COPYING @@ -1,6 +1,5 @@ -Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd - and Clark Cooper -Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers. +Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper +Copyright (c) 2001-2017 Expat maintainers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/README b/README index 9ec8d0c..cd11a22 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ - Expat, Release 2.1.1 + Expat, Release 2.2.1 This is Expat, a C library for parsing XML, written by James Clark. Expat is a stream-oriented XML parser. This means that you register @@ -114,7 +114,7 @@ Note for Solaris users: The "ar" command is usually located in "/usr/ccs/bin", which is not in the default PATH. You will need to add this to your path for the "make" command, and probably also switch to GNU make (the "make" found in /usr/ccs/bin does not seem to work -properly -- appearantly it does not understand .PHONY directives). If +properly -- apparently it does not understand .PHONY directives). If you're using ksh or bash, use this command to build: PATH=/usr/ccs/bin:$PATH make diff --git a/lib/expat.h b/lib/expat.h index 5abcefd..28b0f95 100644 --- a/lib/expat.h +++ b/lib/expat.h @@ -95,7 +95,9 @@ enum XML_Error { /* Added in 2.0. */ XML_ERROR_RESERVED_PREFIX_XML, XML_ERROR_RESERVED_PREFIX_XMLNS, - XML_ERROR_RESERVED_NAMESPACE_URI + XML_ERROR_RESERVED_NAMESPACE_URI, + /* Added in 2.2.1. */ + XML_ERROR_INVALID_ARGUMENT }; enum XML_Content_Type { @@ -342,7 +344,7 @@ XML_SetEntityDeclHandler(XML_Parser parser, XML_EntityDeclHandler handler); /* OBSOLETE -- OBSOLETE -- OBSOLETE - This handler has been superceded by the EntityDeclHandler above. + This handler has been superseded by the EntityDeclHandler above. It is provided here for backward compatibility. This is called for a declaration of an unparsed (NDATA) entity. @@ -706,6 +708,7 @@ XML_UseParserAsHandlerArg(XML_Parser parser); be called, despite an external subset being parsed. Note: If XML_DTD is not defined when Expat is compiled, returns XML_ERROR_FEATURE_REQUIRES_XML_DTD. + Note: If parser == NULL, returns XML_ERROR_INVALID_ARGUMENT. */ XMLPARSEAPI(enum XML_Error) XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD); @@ -729,15 +732,16 @@ XML_GetBase(XML_Parser parser); to the XML_StartElementHandler that were specified in the start-tag rather than defaulted. Each attribute/value pair counts as 2; thus this correspondds to an index into the atts array passed to the - XML_StartElementHandler. + XML_StartElementHandler. Returns -1 if parser == NULL. */ XMLPARSEAPI(int) XML_GetSpecifiedAttributeCount(XML_Parser parser); /* Returns the index of the ID attribute passed in the last call to - XML_StartElementHandler, or -1 if there is no ID attribute. Each - attribute/value pair counts as 2; thus this correspondds to an - index into the atts array passed to the XML_StartElementHandler. + XML_StartElementHandler, or -1 if there is no ID attribute or + parser == NULL. Each attribute/value pair counts as 2; thus this + correspondds to an index into the atts array passed to the + XML_StartElementHandler. */ XMLPARSEAPI(int) XML_GetIdAttributeIndex(XML_Parser parser); @@ -901,6 +905,7 @@ enum XML_ParamEntityParsing { entities is requested; otherwise it will return non-zero. Note: If XML_SetParamEntityParsing is called after XML_Parse or XML_ParseBuffer, then it has no effect and will always return 0. + Note: If parser == NULL, the function will do nothing and return 0. */ XMLPARSEAPI(int) XML_SetParamEntityParsing(XML_Parser parser, @@ -910,6 +915,7 @@ XML_SetParamEntityParsing(XML_Parser parser, Helps in preventing DoS attacks based on predicting hash function behavior. This must be called before parsing is started. Returns 1 if successful, 0 when called after parsing has started. + Note: If parser == NULL, the function will do nothing and return 0. */ XMLPARSEAPI(int) XML_SetHashSalt(XML_Parser parser, @@ -936,6 +942,10 @@ XML_GetErrorCode(XML_Parser parser); the location is the location of the character at which the error was detected; otherwise the location is the location of the last parse event, as described above. + + Note: XML_GetCurrentLineNumber and XML_GetCurrentColumnNumber + return 0 to indicate an error. + Note: XML_GetCurrentByteIndex returns -1 to indicate an error. */ XMLPARSEAPI(XML_Size) XML_GetCurrentLineNumber(XML_Parser parser); XMLPARSEAPI(XML_Size) XML_GetCurrentColumnNumber(XML_Parser parser); @@ -1034,13 +1044,11 @@ XMLPARSEAPI(const XML_Feature *) XML_GetFeatureList(void); -/* Expat follows the GNU/Linux convention of odd number minor version for - beta/development releases and even number minor version for stable - releases. Micro is bumped with each release, and set to 0 with each - change to major or minor version. +/* Expat follows the semantic versioning convention. + See http://semver.org. */ #define XML_MAJOR_VERSION 2 -#define XML_MINOR_VERSION 1 +#define XML_MINOR_VERSION 2 #define XML_MICRO_VERSION 1 #ifdef __cplusplus diff --git a/lib/expat_external.h b/lib/expat_external.h index aa08a2f..892eb4b 100644 --- a/lib/expat_external.h +++ b/lib/expat_external.h @@ -93,7 +93,10 @@ extern "C" { #endif #ifdef XML_UNICODE_WCHAR_T -#define XML_UNICODE +# define XML_UNICODE +# if defined(__SIZEOF_WCHAR_T__) && (__SIZEOF_WCHAR_T__ != 2) +# error "sizeof(wchar_t) != 2; Need -fshort-wchar for both Expat and libc" +# endif #endif #ifdef XML_UNICODE /* Information is UTF-16 encoded. */ diff --git a/lib/siphash.h b/lib/siphash.h new file mode 100644 index 0000000..23b56d2 --- /dev/null +++ b/lib/siphash.h @@ -0,0 +1,344 @@ +/* ========================================================================== + * siphash.h - SipHash-2-4 in a single header file + * -------------------------------------------------------------------------- + * Derived by William Ahern from the reference implementation[1] published[2] + * by Jean-Philippe Aumasson and Daniel J. Berstein. Licensed in kind. + * by Jean-Philippe Aumasson and Daniel J. Berstein. + * Minimal changes by Sebastian Pipping on top, details below. + * Licensed under the CC0 Public Domain Dedication license. + * + * 1. https://www.131002.net/siphash/siphash24.c + * 2. https://www.131002.net/siphash/ + * -------------------------------------------------------------------------- + * HISTORY: + * + * 2017-06-10 (Sebastian Pipping) + * - Clarify license note in the header + * - Address C89 issues: + * - Stop using inline keyword (and let compiler decide) + * - Turn integer suffix ULL to UL + * - Replace _Bool by int + * - Turn macro siphash24 into a function + * - Address invalid conversion (void pointer) by explicit cast + * - Always expose sip24_valid (for self-tests) + * + * 2012-11-04 - Born. (William Ahern) + * -------------------------------------------------------------------------- + * USAGE: + * + * SipHash-2-4 takes as input two 64-bit words as the key, some number of + * message bytes, and outputs a 64-bit word as the message digest. This + * implementation employs two data structures: a struct sipkey for + * representing the key, and a struct siphash for representing the hash + * state. + * + * For converting a 16-byte unsigned char array to a key, use either the + * macro sip_keyof or the routine sip_tokey. The former instantiates a + * compound literal key, while the latter requires a key object as a + * parameter. + * + * unsigned char secret[16]; + * arc4random_buf(secret, sizeof secret); + * struct sipkey *key = sip_keyof(secret); + * + * For hashing a message, use either the convenience macro siphash24 or the + * routines sip24_init, sip24_update, and sip24_final. + * + * struct siphash state; + * void *msg; + * size_t len; + * uint64_t hash; + * + * sip24_init(&state, key); + * sip24_update(&state, msg, len); + * hash = sip24_final(&state); + * + * or + * + * hash = siphash24(msg, len, key); + * + * To convert the 64-bit hash value to a canonical 8-byte little-endian + * binary representation, use either the macro sip_binof or the routine + * sip_tobin. The former instantiates and returns a compound literal array, + * while the latter requires an array object as a parameter. + * -------------------------------------------------------------------------- + * NOTES: + * + * o Neither sip_keyof, sip_binof, nor siphash24 will work with compilers + * lacking compound literal support. Instead, you must use the lower-level + * interfaces which take as parameters the temporary state objects. + * + * o Uppercase macros may evaluate parameters more than once. Lowercase + * macros should not exhibit any such side effects. + * ========================================================================== + */ +#ifndef SIPHASH_H +#define SIPHASH_H + +#include /* size_t */ +#include /* uint64_t uint32_t uint8_t */ + + +#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ( (x) >> (64 - (b)))) + +#define SIP_U32TO8_LE(p, v) \ + (p)[0] = (uint8_t)((v) >> 0); (p)[1] = (uint8_t)((v) >> 8); \ + (p)[2] = (uint8_t)((v) >> 16); (p)[3] = (uint8_t)((v) >> 24); + +#define SIP_U64TO8_LE(p, v) \ + SIP_U32TO8_LE((p) + 0, (uint32_t)((v) >> 0)); \ + SIP_U32TO8_LE((p) + 4, (uint32_t)((v) >> 32)); + +#define SIP_U8TO64_LE(p) \ + (((uint64_t)((p)[0]) << 0) | \ + ((uint64_t)((p)[1]) << 8) | \ + ((uint64_t)((p)[2]) << 16) | \ + ((uint64_t)((p)[3]) << 24) | \ + ((uint64_t)((p)[4]) << 32) | \ + ((uint64_t)((p)[5]) << 40) | \ + ((uint64_t)((p)[6]) << 48) | \ + ((uint64_t)((p)[7]) << 56)) + + +#define SIPHASH_INITIALIZER { 0, 0, 0, 0, { 0 }, 0, 0 } + +struct siphash { + uint64_t v0, v1, v2, v3; + + unsigned char buf[8], *p; + uint64_t c; +}; /* struct siphash */ + + +#define SIP_KEYLEN 16 + +struct sipkey { + uint64_t k[2]; +}; /* struct sipkey */ + +#define sip_keyof(k) sip_tokey(&(struct sipkey){ { 0 } }, (k)) + +static struct sipkey *sip_tokey(struct sipkey *key, const void *src) { + key->k[0] = SIP_U8TO64_LE((const unsigned char *)src); + key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8); + return key; +} /* sip_tokey() */ + + +#define sip_binof(v) sip_tobin((unsigned char[8]){ 0 }, (v)) + +static void *sip_tobin(void *dst, uint64_t u64) { + SIP_U64TO8_LE((unsigned char *)dst, u64); + return dst; +} /* sip_tobin() */ + + +static void sip_round(struct siphash *H, const int rounds) { + int i; + + for (i = 0; i < rounds; i++) { + H->v0 += H->v1; + H->v1 = SIP_ROTL(H->v1, 13); + H->v1 ^= H->v0; + H->v0 = SIP_ROTL(H->v0, 32); + + H->v2 += H->v3; + H->v3 = SIP_ROTL(H->v3, 16); + H->v3 ^= H->v2; + + H->v0 += H->v3; + H->v3 = SIP_ROTL(H->v3, 21); + H->v3 ^= H->v0; + + H->v2 += H->v1; + H->v1 = SIP_ROTL(H->v1, 17); + H->v1 ^= H->v2; + H->v2 = SIP_ROTL(H->v2, 32); + } +} /* sip_round() */ + + +static struct siphash *sip24_init(struct siphash *H, const struct sipkey *key) { + H->v0 = 0x736f6d6570736575UL ^ key->k[0]; + H->v1 = 0x646f72616e646f6dUL ^ key->k[1]; + H->v2 = 0x6c7967656e657261UL ^ key->k[0]; + H->v3 = 0x7465646279746573UL ^ key->k[1]; + + H->p = H->buf; + H->c = 0; + + return H; +} /* sip24_init() */ + + +#define sip_endof(a) (&(a)[sizeof (a) / sizeof *(a)]) + +static struct siphash *sip24_update(struct siphash *H, const void *src, size_t len) { + const unsigned char *p = (const unsigned char *)src, *pe = p + len; + uint64_t m; + + do { + while (p < pe && H->p < sip_endof(H->buf)) + *H->p++ = *p++; + + if (H->p < sip_endof(H->buf)) + break; + + m = SIP_U8TO64_LE(H->buf); + H->v3 ^= m; + sip_round(H, 2); + H->v0 ^= m; + + H->p = H->buf; + H->c += 8; + } while (p < pe); + + return H; +} /* sip24_update() */ + + +static uint64_t sip24_final(struct siphash *H) { + char left = H->p - H->buf; + uint64_t b = (H->c + left) << 56; + + switch (left) { + case 7: b |= (uint64_t)H->buf[6] << 48; + case 6: b |= (uint64_t)H->buf[5] << 40; + case 5: b |= (uint64_t)H->buf[4] << 32; + case 4: b |= (uint64_t)H->buf[3] << 24; + case 3: b |= (uint64_t)H->buf[2] << 16; + case 2: b |= (uint64_t)H->buf[1] << 8; + case 1: b |= (uint64_t)H->buf[0] << 0; + case 0: break; + } + + H->v3 ^= b; + sip_round(H, 2); + H->v0 ^= b; + H->v2 ^= 0xff; + sip_round(H, 4); + + return H->v0 ^ H->v1 ^ H->v2 ^ H->v3; +} /* sip24_final() */ + + +static uint64_t siphash24(const void *src, size_t len, const struct sipkey *key) { + struct siphash state = SIPHASH_INITIALIZER; + return sip24_final(sip24_update(sip24_init(&state, key), src, len)); +} /* siphash24() */ + + +/* + * SipHash-2-4 output with + * k = 00 01 02 ... + * and + * in = (empty string) + * in = 00 (1 byte) + * in = 00 01 (2 bytes) + * in = 00 01 02 (3 bytes) + * ... + * in = 00 01 02 ... 3e (63 bytes) + */ +static int sip24_valid(void) { + static const unsigned char vectors[64][8] = { + { 0x31, 0x0e, 0x0e, 0xdd, 0x47, 0xdb, 0x6f, 0x72, }, + { 0xfd, 0x67, 0xdc, 0x93, 0xc5, 0x39, 0xf8, 0x74, }, + { 0x5a, 0x4f, 0xa9, 0xd9, 0x09, 0x80, 0x6c, 0x0d, }, + { 0x2d, 0x7e, 0xfb, 0xd7, 0x96, 0x66, 0x67, 0x85, }, + { 0xb7, 0x87, 0x71, 0x27, 0xe0, 0x94, 0x27, 0xcf, }, + { 0x8d, 0xa6, 0x99, 0xcd, 0x64, 0x55, 0x76, 0x18, }, + { 0xce, 0xe3, 0xfe, 0x58, 0x6e, 0x46, 0xc9, 0xcb, }, + { 0x37, 0xd1, 0x01, 0x8b, 0xf5, 0x00, 0x02, 0xab, }, + { 0x62, 0x24, 0x93, 0x9a, 0x79, 0xf5, 0xf5, 0x93, }, + { 0xb0, 0xe4, 0xa9, 0x0b, 0xdf, 0x82, 0x00, 0x9e, }, + { 0xf3, 0xb9, 0xdd, 0x94, 0xc5, 0xbb, 0x5d, 0x7a, }, + { 0xa7, 0xad, 0x6b, 0x22, 0x46, 0x2f, 0xb3, 0xf4, }, + { 0xfb, 0xe5, 0x0e, 0x86, 0xbc, 0x8f, 0x1e, 0x75, }, + { 0x90, 0x3d, 0x84, 0xc0, 0x27, 0x56, 0xea, 0x14, }, + { 0xee, 0xf2, 0x7a, 0x8e, 0x90, 0xca, 0x23, 0xf7, }, + { 0xe5, 0x45, 0xbe, 0x49, 0x61, 0xca, 0x29, 0xa1, }, + { 0xdb, 0x9b, 0xc2, 0x57, 0x7f, 0xcc, 0x2a, 0x3f, }, + { 0x94, 0x47, 0xbe, 0x2c, 0xf5, 0xe9, 0x9a, 0x69, }, + { 0x9c, 0xd3, 0x8d, 0x96, 0xf0, 0xb3, 0xc1, 0x4b, }, + { 0xbd, 0x61, 0x79, 0xa7, 0x1d, 0xc9, 0x6d, 0xbb, }, + { 0x98, 0xee, 0xa2, 0x1a, 0xf2, 0x5c, 0xd6, 0xbe, }, + { 0xc7, 0x67, 0x3b, 0x2e, 0xb0, 0xcb, 0xf2, 0xd0, }, + { 0x88, 0x3e, 0xa3, 0xe3, 0x95, 0x67, 0x53, 0x93, }, + { 0xc8, 0xce, 0x5c, 0xcd, 0x8c, 0x03, 0x0c, 0xa8, }, + { 0x94, 0xaf, 0x49, 0xf6, 0xc6, 0x50, 0xad, 0xb8, }, + { 0xea, 0xb8, 0x85, 0x8a, 0xde, 0x92, 0xe1, 0xbc, }, + { 0xf3, 0x15, 0xbb, 0x5b, 0xb8, 0x35, 0xd8, 0x17, }, + { 0xad, 0xcf, 0x6b, 0x07, 0x63, 0x61, 0x2e, 0x2f, }, + { 0xa5, 0xc9, 0x1d, 0xa7, 0xac, 0xaa, 0x4d, 0xde, }, + { 0x71, 0x65, 0x95, 0x87, 0x66, 0x50, 0xa2, 0xa6, }, + { 0x28, 0xef, 0x49, 0x5c, 0x53, 0xa3, 0x87, 0xad, }, + { 0x42, 0xc3, 0x41, 0xd8, 0xfa, 0x92, 0xd8, 0x32, }, + { 0xce, 0x7c, 0xf2, 0x72, 0x2f, 0x51, 0x27, 0x71, }, + { 0xe3, 0x78, 0x59, 0xf9, 0x46, 0x23, 0xf3, 0xa7, }, + { 0x38, 0x12, 0x05, 0xbb, 0x1a, 0xb0, 0xe0, 0x12, }, + { 0xae, 0x97, 0xa1, 0x0f, 0xd4, 0x34, 0xe0, 0x15, }, + { 0xb4, 0xa3, 0x15, 0x08, 0xbe, 0xff, 0x4d, 0x31, }, + { 0x81, 0x39, 0x62, 0x29, 0xf0, 0x90, 0x79, 0x02, }, + { 0x4d, 0x0c, 0xf4, 0x9e, 0xe5, 0xd4, 0xdc, 0xca, }, + { 0x5c, 0x73, 0x33, 0x6a, 0x76, 0xd8, 0xbf, 0x9a, }, + { 0xd0, 0xa7, 0x04, 0x53, 0x6b, 0xa9, 0x3e, 0x0e, }, + { 0x92, 0x59, 0x58, 0xfc, 0xd6, 0x42, 0x0c, 0xad, }, + { 0xa9, 0x15, 0xc2, 0x9b, 0xc8, 0x06, 0x73, 0x18, }, + { 0x95, 0x2b, 0x79, 0xf3, 0xbc, 0x0a, 0xa6, 0xd4, }, + { 0xf2, 0x1d, 0xf2, 0xe4, 0x1d, 0x45, 0x35, 0xf9, }, + { 0x87, 0x57, 0x75, 0x19, 0x04, 0x8f, 0x53, 0xa9, }, + { 0x10, 0xa5, 0x6c, 0xf5, 0xdf, 0xcd, 0x9a, 0xdb, }, + { 0xeb, 0x75, 0x09, 0x5c, 0xcd, 0x98, 0x6c, 0xd0, }, + { 0x51, 0xa9, 0xcb, 0x9e, 0xcb, 0xa3, 0x12, 0xe6, }, + { 0x96, 0xaf, 0xad, 0xfc, 0x2c, 0xe6, 0x66, 0xc7, }, + { 0x72, 0xfe, 0x52, 0x97, 0x5a, 0x43, 0x64, 0xee, }, + { 0x5a, 0x16, 0x45, 0xb2, 0x76, 0xd5, 0x92, 0xa1, }, + { 0xb2, 0x74, 0xcb, 0x8e, 0xbf, 0x87, 0x87, 0x0a, }, + { 0x6f, 0x9b, 0xb4, 0x20, 0x3d, 0xe7, 0xb3, 0x81, }, + { 0xea, 0xec, 0xb2, 0xa3, 0x0b, 0x22, 0xa8, 0x7f, }, + { 0x99, 0x24, 0xa4, 0x3c, 0xc1, 0x31, 0x57, 0x24, }, + { 0xbd, 0x83, 0x8d, 0x3a, 0xaf, 0xbf, 0x8d, 0xb7, }, + { 0x0b, 0x1a, 0x2a, 0x32, 0x65, 0xd5, 0x1a, 0xea, }, + { 0x13, 0x50, 0x79, 0xa3, 0x23, 0x1c, 0xe6, 0x60, }, + { 0x93, 0x2b, 0x28, 0x46, 0xe4, 0xd7, 0x06, 0x66, }, + { 0xe1, 0x91, 0x5f, 0x5c, 0xb1, 0xec, 0xa4, 0x6c, }, + { 0xf3, 0x25, 0x96, 0x5c, 0xa1, 0x6d, 0x62, 0x9f, }, + { 0x57, 0x5f, 0xf2, 0x8e, 0x60, 0x38, 0x1b, 0xe5, }, + { 0x72, 0x45, 0x06, 0xeb, 0x4c, 0x32, 0x8a, 0x95, } + }; + unsigned char in[64]; + struct sipkey k; + size_t i; + + sip_tokey(&k, "\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017"); + + for (i = 0; i < sizeof in; ++i) { + in[i] = i; + + if (siphash24(in, i, &k) != SIP_U8TO64_LE(vectors[i])) + return 0; + } + + return 1; +} /* sip24_valid() */ + + +#if SIPHASH_MAIN + +#include + +int main(void) { + int ok = sip24_valid(); + + if (ok) + puts("OK"); + else + puts("FAIL"); + + return !ok; +} /* main() */ + +#endif /* SIPHASH_MAIN */ + + +#endif /* SIPHASH_H */ diff --git a/lib/winconfig.h b/lib/winconfig.h index c1b791d..9bf014d 100644 --- a/lib/winconfig.h +++ b/lib/winconfig.h @@ -17,6 +17,12 @@ #include #include + +#if defined(HAVE_EXPAT_CONFIG_H) /* e.g. MinGW */ +# include +#else /* !defined(HAVE_EXPAT_CONFIG_H) */ + + #define XML_NS 1 #define XML_DTD 1 #define XML_CONTEXT_BYTES 1024 @@ -27,4 +33,8 @@ /* Windows has memmove() available. */ #define HAVE_MEMMOVE + +#endif /* !defined(HAVE_EXPAT_CONFIG_H) */ + + #endif /* ndef WINCONFIG_H */ diff --git a/lib/xmlparse.c b/lib/xmlparse.c index b56b66a..76f078e 100644 --- a/lib/xmlparse.c +++ b/lib/xmlparse.c @@ -1,13 +1,19 @@ /* Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd See the file COPYING for copying permission. + + 77fea421d361dca90041d0040ecf1dca651167fadf2af79e990e35168d70d933 (2.2.1+) */ +#define _GNU_SOURCE /* syscall prototype */ + #include #include /* memset(), memcpy() */ #include #include /* UINT_MAX */ +#include /* fprintf */ +#include /* getenv */ -#ifdef COMPILING_FOR_WINDOWS +#ifdef _WIN32 #define getpid GetCurrentProcessId #else #include /* gettimeofday() */ @@ -17,20 +23,15 @@ #define XML_BUILDING_EXPAT 1 -#ifdef COMPILING_FOR_WINDOWS +#ifdef _WIN32 #include "winconfig.h" -#elif defined(MACOS_CLASSIC) -#include "macconfig.h" -#elif defined(__amigaos__) -#include "amigaconfig.h" -#elif defined(__WATCOMC__) -#include "watcomconfig.h" #elif defined(HAVE_EXPAT_CONFIG_H) #include -#endif /* ndef COMPILING_FOR_WINDOWS */ +#endif /* ndef _WIN32 */ #include "ascii.h" #include "expat.h" +#include "siphash.h" #ifdef XML_UNICODE #define XML_ENCODE_MAX XML_UTF16_ENCODE_MAX @@ -109,17 +110,11 @@ typedef struct { const XML_Memory_Handling_Suite *mem; } HASH_TABLE; -/* Basic character hash algorithm, taken from Python's string hash: - h = h * 1000003 ^ character, the constant being a prime number. +static size_t +keylen(KEY s); -*/ -#ifdef XML_UNICODE -#define CHAR_HASH(h, c) \ - (((h) * 0xF4243) ^ (unsigned short)(c)) -#else -#define CHAR_HASH(h, c) \ - (((h) * 0xF4243) ^ (unsigned char)(c)) -#endif +static void +copy_salt_to_sipkey(XML_Parser parser, struct sipkey * key); /* For probing (after a collision) we need a step size relative prime to the hash table size, which is a power of 2. We use double-hashing, @@ -355,6 +350,8 @@ doIgnoreSection(XML_Parser parser, const ENCODING *, const char **startPtr, const char *end, const char **nextPtr, XML_Bool haveMore); #endif /* XML_DTD */ +static void +freeBindings(XML_Parser parser, BINDING *bindings); static enum XML_Error storeAtts(XML_Parser parser, const ENCODING *, const char *s, TAG_NAME *tagNamePtr, BINDING **bindingsPtr); @@ -697,10 +694,84 @@ static const XML_Char implicitContext[] = { ASCII_s, ASCII_p, ASCII_a, ASCII_c, ASCII_e, '\0' }; + +#if defined(HAVE_GETRANDOM) || defined(HAVE_SYSCALL_GETRANDOM) +# include + +# if defined(HAVE_GETRANDOM) +# include /* getrandom */ +# else +# include /* syscall */ +# include /* SYS_getrandom */ +# endif + +/* Obtain entropy on Linux 3.17+ */ +static int +writeRandomBytes_getrandom(void * target, size_t count) { + int success = 0; /* full count bytes written? */ + size_t bytesWrittenTotal = 0; + const unsigned int getrandomFlags = 0; + + do { + void * const currentTarget = (void*)((char*)target + bytesWrittenTotal); + const size_t bytesToWrite = count - bytesWrittenTotal; + + const int bytesWrittenMore = +#if defined(HAVE_GETRANDOM) + getrandom(currentTarget, bytesToWrite, getrandomFlags); +#else + syscall(SYS_getrandom, currentTarget, bytesToWrite, getrandomFlags); +#endif + + if (bytesWrittenMore > 0) { + bytesWrittenTotal += bytesWrittenMore; + if (bytesWrittenTotal >= count) + success = 1; + } + } while (! success && (errno == EINTR || errno == EAGAIN)); + + return success; +} + +#endif /* defined(HAVE_GETRANDOM) || defined(HAVE_SYSCALL_GETRANDOM) */ + + +#ifdef _WIN32 + +typedef BOOLEAN (APIENTRY *RTLGENRANDOM_FUNC)(PVOID, ULONG); + +/* Obtain entropy on Windows XP / Windows Server 2003 and later. + * Hint on RtlGenRandom and the following article from libsodioum. + * + * Michael Howard: Cryptographically Secure Random number on Windows without using CryptoAPI + * https://blogs.msdn.microsoft.com/michael_howard/2005/01/14/cryptographically-secure-random-number-on-windows-without-using-cryptoapi/ + */ +static int +writeRandomBytes_RtlGenRandom(void * target, size_t count) { + int success = 0; /* full count bytes written? */ + const HMODULE advapi32 = LoadLibrary("ADVAPI32.DLL"); + + if (advapi32) { + const RTLGENRANDOM_FUNC RtlGenRandom + = (RTLGENRANDOM_FUNC)GetProcAddress(advapi32, "SystemFunction036"); + if (RtlGenRandom) { + if (RtlGenRandom((PVOID)target, (ULONG)count) == TRUE) { + success = 1; + } + } + FreeLibrary(advapi32); + } + + return success; +} + +#endif /* _WIN32 */ + + static unsigned long gather_time_entropy(void) { -#ifdef COMPILING_FOR_WINDOWS +#ifdef _WIN32 FILETIME ft; GetSystemTimeAsFileTime(&ft); /* never fails */ return ft.dwHighDateTime ^ ft.dwLowDateTime; @@ -716,20 +787,62 @@ gather_time_entropy(void) #endif } +#if defined(HAVE_ARC4RANDOM_BUF) && defined(HAVE_LIBBSD) +# include +#endif + +static unsigned long +ENTROPY_DEBUG(const char * label, unsigned long entropy) { + const char * const EXPAT_ENTROPY_DEBUG = getenv("EXPAT_ENTROPY_DEBUG"); + if (EXPAT_ENTROPY_DEBUG && ! strcmp(EXPAT_ENTROPY_DEBUG, "1")) { + fprintf(stderr, "Entropy: %s --> 0x%0*lx (%lu bytes)\n", + label, + (int)sizeof(entropy) * 2, entropy, + (unsigned long)sizeof(entropy)); + } + return entropy; +} + static unsigned long generate_hash_secret_salt(XML_Parser parser) { - /* Process ID is 0 bits entropy if attacker has local access - * XML_Parser address is few bits of entropy if attacker has local access */ - const unsigned long entropy = - gather_time_entropy() ^ getpid() ^ (unsigned long)parser; + unsigned long entropy; + (void)parser; +#if defined(HAVE_ARC4RANDOM_BUF) || defined(__CloudABI__) + (void)gather_time_entropy; + arc4random_buf(&entropy, sizeof(entropy)); + return ENTROPY_DEBUG("arc4random_buf", entropy); +#else + /* Try high quality providers first .. */ +#ifdef _WIN32 + if (writeRandomBytes_RtlGenRandom((void *)&entropy, sizeof(entropy))) { + return ENTROPY_DEBUG("RtlGenRandom", entropy); + } +#elif defined(HAVE_GETRANDOM) || defined(HAVE_SYSCALL_GETRANDOM) + if (writeRandomBytes_getrandom((void *)&entropy, sizeof(entropy))) { + return ENTROPY_DEBUG("getrandom", entropy); + } +#endif + /* .. and self-made low quality for backup: */ + + /* Process ID is 0 bits entropy if attacker has local access */ + entropy = gather_time_entropy() ^ getpid(); /* Factors are 2^31-1 and 2^61-1 (Mersenne primes M31 and M61) */ if (sizeof(unsigned long) == 4) { - return entropy * 2147483647; + return ENTROPY_DEBUG("fallback(4)", entropy * 2147483647); } else { - return entropy * 2305843009213693951; + return ENTROPY_DEBUG("fallback(8)", + entropy * (unsigned long)2305843009213693951); } +#endif +} + +static unsigned long +get_hash_secret_salt(XML_Parser parser) { + if (parser->m_parentParser != NULL) + return get_hash_secret_salt(parser->m_parentParser); + return parser->m_hash_secret_salt; } static XML_Bool /* only valid for root parser */ @@ -960,6 +1073,10 @@ XML_ParserReset(XML_Parser parser, const XML_Char *encodingName) { TAG *tStk; OPEN_INTERNAL_ENTITY *openEntityList; + + if (parser == NULL) + return XML_FALSE; + if (parentParser) return XML_FALSE; /* move tagStack to freeTagList */ @@ -994,6 +1111,8 @@ XML_ParserReset(XML_Parser parser, const XML_Char *encodingName) enum XML_Status XMLCALL XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName) { + if (parser == NULL) + return XML_STATUS_ERROR; /* Block after XML_Parse()/XML_ParseBuffer() has been called. XXX There's no way for the caller to determine which of the XXX possible error cases caused the XML_STATUS_ERROR return. @@ -1017,52 +1136,88 @@ XML_ExternalEntityParserCreate(XML_Parser oldParser, { XML_Parser parser = oldParser; DTD *newDtd = NULL; - DTD *oldDtd = _dtd; - XML_StartElementHandler oldStartElementHandler = startElementHandler; - XML_EndElementHandler oldEndElementHandler = endElementHandler; - XML_CharacterDataHandler oldCharacterDataHandler = characterDataHandler; - XML_ProcessingInstructionHandler oldProcessingInstructionHandler - = processingInstructionHandler; - XML_CommentHandler oldCommentHandler = commentHandler; - XML_StartCdataSectionHandler oldStartCdataSectionHandler - = startCdataSectionHandler; - XML_EndCdataSectionHandler oldEndCdataSectionHandler - = endCdataSectionHandler; - XML_DefaultHandler oldDefaultHandler = defaultHandler; - XML_UnparsedEntityDeclHandler oldUnparsedEntityDeclHandler - = unparsedEntityDeclHandler; - XML_NotationDeclHandler oldNotationDeclHandler = notationDeclHandler; - XML_StartNamespaceDeclHandler oldStartNamespaceDeclHandler - = startNamespaceDeclHandler; - XML_EndNamespaceDeclHandler oldEndNamespaceDeclHandler - = endNamespaceDeclHandler; - XML_NotStandaloneHandler oldNotStandaloneHandler = notStandaloneHandler; - XML_ExternalEntityRefHandler oldExternalEntityRefHandler - = externalEntityRefHandler; - XML_SkippedEntityHandler oldSkippedEntityHandler = skippedEntityHandler; - XML_UnknownEncodingHandler oldUnknownEncodingHandler - = unknownEncodingHandler; - XML_ElementDeclHandler oldElementDeclHandler = elementDeclHandler; - XML_AttlistDeclHandler oldAttlistDeclHandler = attlistDeclHandler; - XML_EntityDeclHandler oldEntityDeclHandler = entityDeclHandler; - XML_XmlDeclHandler oldXmlDeclHandler = xmlDeclHandler; - ELEMENT_TYPE * oldDeclElementType = declElementType; - - void *oldUserData = userData; - void *oldHandlerArg = handlerArg; - XML_Bool oldDefaultExpandInternalEntities = defaultExpandInternalEntities; - XML_Parser oldExternalEntityRefHandlerArg = externalEntityRefHandlerArg; + DTD *oldDtd; + XML_StartElementHandler oldStartElementHandler; + XML_EndElementHandler oldEndElementHandler; + XML_CharacterDataHandler oldCharacterDataHandler; + XML_ProcessingInstructionHandler oldProcessingInstructionHandler; + XML_CommentHandler oldCommentHandler; + XML_StartCdataSectionHandler oldStartCdataSectionHandler; + XML_EndCdataSectionHandler oldEndCdataSectionHandler; + XML_DefaultHandler oldDefaultHandler; + XML_UnparsedEntityDeclHandler oldUnparsedEntityDeclHandler; + XML_NotationDeclHandler oldNotationDeclHandler; + XML_StartNamespaceDeclHandler oldStartNamespaceDeclHandler; + XML_EndNamespaceDeclHandler oldEndNamespaceDeclHandler; + XML_NotStandaloneHandler oldNotStandaloneHandler; + XML_ExternalEntityRefHandler oldExternalEntityRefHandler; + XML_SkippedEntityHandler oldSkippedEntityHandler; + XML_UnknownEncodingHandler oldUnknownEncodingHandler; + XML_ElementDeclHandler oldElementDeclHandler; + XML_AttlistDeclHandler oldAttlistDeclHandler; + XML_EntityDeclHandler oldEntityDeclHandler; + XML_XmlDeclHandler oldXmlDeclHandler; + ELEMENT_TYPE * oldDeclElementType; + + void *oldUserData; + void *oldHandlerArg; + XML_Bool oldDefaultExpandInternalEntities; + XML_Parser oldExternalEntityRefHandlerArg; #ifdef XML_DTD - enum XML_ParamEntityParsing oldParamEntityParsing = paramEntityParsing; - int oldInEntityValue = prologState.inEntityValue; + enum XML_ParamEntityParsing oldParamEntityParsing; + int oldInEntityValue; #endif - XML_Bool oldns_triplets = ns_triplets; + XML_Bool oldns_triplets; /* Note that the new parser shares the same hash secret as the old parser, so that dtdCopy and copyEntityTable can lookup values from hash tables associated with either parser without us having to worry which hash secrets each table has. */ - unsigned long oldhash_secret_salt = hash_secret_salt; + unsigned long oldhash_secret_salt; + + /* Validate the oldParser parameter before we pull everything out of it */ + if (oldParser == NULL) + return NULL; + + /* Stash the original parser contents on the stack */ + oldDtd = _dtd; + oldStartElementHandler = startElementHandler; + oldEndElementHandler = endElementHandler; + oldCharacterDataHandler = characterDataHandler; + oldProcessingInstructionHandler = processingInstructionHandler; + oldCommentHandler = commentHandler; + oldStartCdataSectionHandler = startCdataSectionHandler; + oldEndCdataSectionHandler = endCdataSectionHandler; + oldDefaultHandler = defaultHandler; + oldUnparsedEntityDeclHandler = unparsedEntityDeclHandler; + oldNotationDeclHandler = notationDeclHandler; + oldStartNamespaceDeclHandler = startNamespaceDeclHandler; + oldEndNamespaceDeclHandler = endNamespaceDeclHandler; + oldNotStandaloneHandler = notStandaloneHandler; + oldExternalEntityRefHandler = externalEntityRefHandler; + oldSkippedEntityHandler = skippedEntityHandler; + oldUnknownEncodingHandler = unknownEncodingHandler; + oldElementDeclHandler = elementDeclHandler; + oldAttlistDeclHandler = attlistDeclHandler; + oldEntityDeclHandler = entityDeclHandler; + oldXmlDeclHandler = xmlDeclHandler; + oldDeclElementType = declElementType; + + oldUserData = userData; + oldHandlerArg = handlerArg; + oldDefaultExpandInternalEntities = defaultExpandInternalEntities; + oldExternalEntityRefHandlerArg = externalEntityRefHandlerArg; +#ifdef XML_DTD + oldParamEntityParsing = paramEntityParsing; + oldInEntityValue = prologState.inEntityValue; +#endif + oldns_triplets = ns_triplets; + /* Note that the new parser shares the same hash secret as the old + parser, so that dtdCopy and copyEntityTable can lookup values + from hash tables associated with either parser without us having + to worry which hash secrets each table has. + */ + oldhash_secret_salt = hash_secret_salt; #ifdef XML_DTD if (!context) @@ -1228,12 +1383,15 @@ XML_ParserFree(XML_Parser parser) void XMLCALL XML_UseParserAsHandlerArg(XML_Parser parser) { - handlerArg = parser; + if (parser != NULL) + handlerArg = parser; } enum XML_Error XMLCALL XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD) { + if (parser == NULL) + return XML_ERROR_INVALID_ARGUMENT; #ifdef XML_DTD /* block after XML_Parse()/XML_ParseBuffer() has been called */ if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) @@ -1248,6 +1406,8 @@ XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD) void XMLCALL XML_SetReturnNSTriplet(XML_Parser parser, int do_nst) { + if (parser == NULL) + return; /* block after XML_Parse()/XML_ParseBuffer() has been called */ if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) return; @@ -1257,6 +1417,8 @@ XML_SetReturnNSTriplet(XML_Parser parser, int do_nst) void XMLCALL XML_SetUserData(XML_Parser parser, void *p) { + if (parser == NULL) + return; if (handlerArg == userData) handlerArg = userData = p; else @@ -1266,6 +1428,8 @@ XML_SetUserData(XML_Parser parser, void *p) enum XML_Status XMLCALL XML_SetBase(XML_Parser parser, const XML_Char *p) { + if (parser == NULL) + return XML_STATUS_ERROR; if (p) { p = poolCopyString(&_dtd->pool, p); if (!p) @@ -1280,18 +1444,24 @@ XML_SetBase(XML_Parser parser, const XML_Char *p) const XML_Char * XMLCALL XML_GetBase(XML_Parser parser) { + if (parser == NULL) + return NULL; return curBase; } int XMLCALL XML_GetSpecifiedAttributeCount(XML_Parser parser) { + if (parser == NULL) + return -1; return nSpecifiedAtts; } int XMLCALL XML_GetIdAttributeIndex(XML_Parser parser) { + if (parser == NULL) + return -1; return idAttIndex; } @@ -1299,6 +1469,8 @@ XML_GetIdAttributeIndex(XML_Parser parser) const XML_AttrInfo * XMLCALL XML_GetAttributeInfo(XML_Parser parser) { + if (parser == NULL) + return NULL; return attInfo; } #endif @@ -1308,6 +1480,8 @@ XML_SetElementHandler(XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end) { + if (parser == NULL) + return; startElementHandler = start; endElementHandler = end; } @@ -1315,34 +1489,39 @@ XML_SetElementHandler(XML_Parser parser, void XMLCALL XML_SetStartElementHandler(XML_Parser parser, XML_StartElementHandler start) { - startElementHandler = start; + if (parser != NULL) + startElementHandler = start; } void XMLCALL XML_SetEndElementHandler(XML_Parser parser, XML_EndElementHandler end) { - endElementHandler = end; + if (parser != NULL) + endElementHandler = end; } void XMLCALL XML_SetCharacterDataHandler(XML_Parser parser, XML_CharacterDataHandler handler) { - characterDataHandler = handler; + if (parser != NULL) + characterDataHandler = handler; } void XMLCALL XML_SetProcessingInstructionHandler(XML_Parser parser, XML_ProcessingInstructionHandler handler) { - processingInstructionHandler = handler; + if (parser != NULL) + processingInstructionHandler = handler; } void XMLCALL XML_SetCommentHandler(XML_Parser parser, XML_CommentHandler handler) { - commentHandler = handler; + if (parser != NULL) + commentHandler = handler; } void XMLCALL @@ -1350,6 +1529,8 @@ XML_SetCdataSectionHandler(XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end) { + if (parser == NULL) + return; startCdataSectionHandler = start; endCdataSectionHandler = end; } @@ -1357,19 +1538,23 @@ XML_SetCdataSectionHandler(XML_Parser parser, void XMLCALL XML_SetStartCdataSectionHandler(XML_Parser parser, XML_StartCdataSectionHandler start) { - startCdataSectionHandler = start; + if (parser != NULL) + startCdataSectionHandler = start; } void XMLCALL XML_SetEndCdataSectionHandler(XML_Parser parser, XML_EndCdataSectionHandler end) { - endCdataSectionHandler = end; + if (parser != NULL) + endCdataSectionHandler = end; } void XMLCALL XML_SetDefaultHandler(XML_Parser parser, XML_DefaultHandler handler) { + if (parser == NULL) + return; defaultHandler = handler; defaultExpandInternalEntities = XML_FALSE; } @@ -1378,6 +1563,8 @@ void XMLCALL XML_SetDefaultHandlerExpand(XML_Parser parser, XML_DefaultHandler handler) { + if (parser == NULL) + return; defaultHandler = handler; defaultExpandInternalEntities = XML_TRUE; } @@ -1387,6 +1574,8 @@ XML_SetDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end) { + if (parser == NULL) + return; startDoctypeDeclHandler = start; endDoctypeDeclHandler = end; } @@ -1394,27 +1583,31 @@ XML_SetDoctypeDeclHandler(XML_Parser parser, void XMLCALL XML_SetStartDoctypeDeclHandler(XML_Parser parser, XML_StartDoctypeDeclHandler start) { - startDoctypeDeclHandler = start; + if (parser != NULL) + startDoctypeDeclHandler = start; } void XMLCALL XML_SetEndDoctypeDeclHandler(XML_Parser parser, XML_EndDoctypeDeclHandler end) { - endDoctypeDeclHandler = end; + if (parser != NULL) + endDoctypeDeclHandler = end; } void XMLCALL XML_SetUnparsedEntityDeclHandler(XML_Parser parser, XML_UnparsedEntityDeclHandler handler) { - unparsedEntityDeclHandler = handler; + if (parser != NULL) + unparsedEntityDeclHandler = handler; } void XMLCALL XML_SetNotationDeclHandler(XML_Parser parser, XML_NotationDeclHandler handler) { - notationDeclHandler = handler; + if (parser != NULL) + notationDeclHandler = handler; } void XMLCALL @@ -1422,6 +1615,8 @@ XML_SetNamespaceDeclHandler(XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end) { + if (parser == NULL) + return; startNamespaceDeclHandler = start; endNamespaceDeclHandler = end; } @@ -1429,32 +1624,38 @@ XML_SetNamespaceDeclHandler(XML_Parser parser, void XMLCALL XML_SetStartNamespaceDeclHandler(XML_Parser parser, XML_StartNamespaceDeclHandler start) { - startNamespaceDeclHandler = start; + if (parser != NULL) + startNamespaceDeclHandler = start; } void XMLCALL XML_SetEndNamespaceDeclHandler(XML_Parser parser, XML_EndNamespaceDeclHandler end) { - endNamespaceDeclHandler = end; + if (parser != NULL) + endNamespaceDeclHandler = end; } void XMLCALL XML_SetNotStandaloneHandler(XML_Parser parser, XML_NotStandaloneHandler handler) { - notStandaloneHandler = handler; + if (parser != NULL) + notStandaloneHandler = handler; } void XMLCALL XML_SetExternalEntityRefHandler(XML_Parser parser, XML_ExternalEntityRefHandler handler) { - externalEntityRefHandler = handler; + if (parser != NULL) + externalEntityRefHandler = handler; } void XMLCALL XML_SetExternalEntityRefHandlerArg(XML_Parser parser, void *arg) { + if (parser == NULL) + return; if (arg) externalEntityRefHandlerArg = (XML_Parser)arg; else @@ -1465,7 +1666,8 @@ void XMLCALL XML_SetSkippedEntityHandler(XML_Parser parser, XML_SkippedEntityHandler handler) { - skippedEntityHandler = handler; + if (parser != NULL) + skippedEntityHandler = handler; } void XMLCALL @@ -1473,6 +1675,8 @@ XML_SetUnknownEncodingHandler(XML_Parser parser, XML_UnknownEncodingHandler handler, void *data) { + if (parser == NULL) + return; unknownEncodingHandler = handler; unknownEncodingHandlerData = data; } @@ -1481,33 +1685,39 @@ void XMLCALL XML_SetElementDeclHandler(XML_Parser parser, XML_ElementDeclHandler eldecl) { - elementDeclHandler = eldecl; + if (parser != NULL) + elementDeclHandler = eldecl; } void XMLCALL XML_SetAttlistDeclHandler(XML_Parser parser, XML_AttlistDeclHandler attdecl) { - attlistDeclHandler = attdecl; + if (parser != NULL) + attlistDeclHandler = attdecl; } void XMLCALL XML_SetEntityDeclHandler(XML_Parser parser, XML_EntityDeclHandler handler) { - entityDeclHandler = handler; + if (parser != NULL) + entityDeclHandler = handler; } void XMLCALL XML_SetXmlDeclHandler(XML_Parser parser, XML_XmlDeclHandler handler) { - xmlDeclHandler = handler; + if (parser != NULL) + xmlDeclHandler = handler; } int XMLCALL XML_SetParamEntityParsing(XML_Parser parser, enum XML_ParamEntityParsing peParsing) { + if (parser == NULL) + return 0; /* block after XML_Parse()/XML_ParseBuffer() has been called */ if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) return 0; @@ -1523,6 +1733,10 @@ int XMLCALL XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) { + if (parser == NULL) + return 0; + if (parser->m_parentParser) + return XML_SetHashSalt(parser->m_parentParser, hash_salt); /* block after XML_Parse()/XML_ParseBuffer() has been called */ if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) return 0; @@ -1533,6 +1747,10 @@ XML_SetHashSalt(XML_Parser parser, enum XML_Status XMLCALL XML_Parse(XML_Parser parser, const char *s, int len, int isFinal) { + if ((parser == NULL) || (len < 0) || ((s == NULL) && (len != 0))) { + errorCode = XML_ERROR_INVALID_ARGUMENT; + return XML_STATUS_ERROR; + } switch (ps_parsing) { case XML_SUSPENDED: errorCode = XML_ERROR_SUSPENDED; @@ -1585,6 +1803,13 @@ XML_Parse(XML_Parser parser, const char *s, int len, int isFinal) const char *end; int nLeftOver; enum XML_Status result; + /* Detect overflow (a+b > MAX <==> b > MAX-a) */ + if (len > ((XML_Size)-1) / 2 - parseEndByteIndex) { + errorCode = XML_ERROR_NO_MEMORY; + eventPtr = eventEndPtr = NULL; + processor = errorProcessor; + return XML_STATUS_ERROR; + } parseEndByteIndex += len; positionPtr = s; ps_finalBuffer = (XML_Bool)isFinal; @@ -1617,11 +1842,14 @@ XML_Parse(XML_Parser parser, const char *s, int len, int isFinal) nLeftOver = s + len - end; if (nLeftOver) { if (buffer == NULL || nLeftOver > bufferLim - buffer) { - /* FIXME avoid integer overflow */ - char *temp; - temp = (buffer == NULL - ? (char *)MALLOC(len * 2) - : (char *)REALLOC(buffer, len * 2)); + /* avoid _signed_ integer overflow */ + char *temp = NULL; + const int bytesToAllocate = (int)((unsigned)len * 2U); + if (bytesToAllocate > 0) { + temp = (buffer == NULL + ? (char *)MALLOC(bytesToAllocate) + : (char *)REALLOC(buffer, bytesToAllocate)); + } if (temp == NULL) { errorCode = XML_ERROR_NO_MEMORY; eventPtr = eventEndPtr = NULL; @@ -1629,7 +1857,7 @@ XML_Parse(XML_Parser parser, const char *s, int len, int isFinal) return XML_STATUS_ERROR; } buffer = temp; - bufferLim = buffer + len * 2; + bufferLim = buffer + bytesToAllocate; } memcpy(buffer, end, nLeftOver); } @@ -1659,6 +1887,8 @@ XML_ParseBuffer(XML_Parser parser, int len, int isFinal) const char *start; enum XML_Status result = XML_STATUS_OK; + if (parser == NULL) + return XML_STATUS_ERROR; switch (ps_parsing) { case XML_SUSPENDED: errorCode = XML_ERROR_SUSPENDED; @@ -1712,6 +1942,8 @@ XML_ParseBuffer(XML_Parser parser, int len, int isFinal) void * XMLCALL XML_GetBuffer(XML_Parser parser, int len) { + if (parser == NULL) + return NULL; if (len < 0) { errorCode = XML_ERROR_NO_MEMORY; return NULL; @@ -1808,6 +2040,8 @@ XML_GetBuffer(XML_Parser parser, int len) enum XML_Status XMLCALL XML_StopParser(XML_Parser parser, XML_Bool resumable) { + if (parser == NULL) + return XML_STATUS_ERROR; switch (ps_parsing) { case XML_SUSPENDED: if (resumable) { @@ -1840,6 +2074,8 @@ XML_ResumeParser(XML_Parser parser) { enum XML_Status result = XML_STATUS_OK; + if (parser == NULL) + return XML_STATUS_ERROR; if (ps_parsing != XML_SUSPENDED) { errorCode = XML_ERROR_NOT_SUSPENDED; return XML_STATUS_ERROR; @@ -1876,6 +2112,8 @@ XML_ResumeParser(XML_Parser parser) void XMLCALL XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status) { + if (parser == NULL) + return; assert(status != NULL); *status = parser->m_parsingStatus; } @@ -1883,20 +2121,26 @@ XML_GetParsingStatus(XML_Parser parser, XML_ParsingStatus *status) enum XML_Error XMLCALL XML_GetErrorCode(XML_Parser parser) { + if (parser == NULL) + return XML_ERROR_INVALID_ARGUMENT; return errorCode; } XML_Index XMLCALL XML_GetCurrentByteIndex(XML_Parser parser) { + if (parser == NULL) + return -1; if (eventPtr) - return parseEndByteIndex - (parseEndPtr - eventPtr); + return (XML_Index)(parseEndByteIndex - (parseEndPtr - eventPtr)); return -1; } int XMLCALL XML_GetCurrentByteCount(XML_Parser parser) { + if (parser == NULL) + return 0; if (eventEndPtr && eventPtr) return (int)(eventEndPtr - eventPtr); return 0; @@ -1906,11 +2150,19 @@ const char * XMLCALL XML_GetInputContext(XML_Parser parser, int *offset, int *size) { #ifdef XML_CONTEXT_BYTES + if (parser == NULL) + return NULL; if (eventPtr && buffer) { - *offset = (int)(eventPtr - buffer); - *size = (int)(bufferEnd - buffer); + if (offset != NULL) + *offset = (int)(eventPtr - buffer); + if (size != NULL) + *size = (int)(bufferEnd - buffer); return buffer; } +#else + (void)parser; + (void)offset; + (void)size; #endif /* defined XML_CONTEXT_BYTES */ return (char *) 0; } @@ -1918,6 +2170,8 @@ XML_GetInputContext(XML_Parser parser, int *offset, int *size) XML_Size XMLCALL XML_GetCurrentLineNumber(XML_Parser parser) { + if (parser == NULL) + return 0; if (eventPtr && eventPtr >= positionPtr) { XmlUpdatePosition(encoding, positionPtr, eventPtr, &position); positionPtr = eventPtr; @@ -1928,6 +2182,8 @@ XML_GetCurrentLineNumber(XML_Parser parser) XML_Size XMLCALL XML_GetCurrentColumnNumber(XML_Parser parser) { + if (parser == NULL) + return 0; if (eventPtr && eventPtr >= positionPtr) { XmlUpdatePosition(encoding, positionPtr, eventPtr, &position); positionPtr = eventPtr; @@ -1938,30 +2194,38 @@ XML_GetCurrentColumnNumber(XML_Parser parser) void XMLCALL XML_FreeContentModel(XML_Parser parser, XML_Content *model) { - FREE(model); + if (parser != NULL) + FREE(model); } void * XMLCALL XML_MemMalloc(XML_Parser parser, size_t size) { + if (parser == NULL) + return NULL; return MALLOC(size); } void * XMLCALL XML_MemRealloc(XML_Parser parser, void *ptr, size_t size) { + if (parser == NULL) + return NULL; return REALLOC(ptr, size); } void XMLCALL XML_MemFree(XML_Parser parser, void *ptr) { - FREE(ptr); + if (parser != NULL) + FREE(ptr); } void XMLCALL XML_DefaultCurrent(XML_Parser parser) { + if (parser == NULL) + return; if (defaultHandler) { if (openInternalEntities) reportDefault(parser, @@ -2468,7 +2732,7 @@ doContent(XML_Parser parser, &fromPtr, rawNameEnd, (ICHAR **)&toPtr, (ICHAR *)tag->bufEnd - 1); convLen = (int)(toPtr - (XML_Char *)tag->buf); - if ((convert_res == XML_CONVERT_COMPLETED) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) { + if ((fromPtr >= rawNameEnd) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) { tag->name.strLen = convLen; break; } @@ -2511,8 +2775,10 @@ doContent(XML_Parser parser, return XML_ERROR_NO_MEMORY; poolFinish(&tempPool); result = storeAtts(parser, enc, s, &name, &bindings); - if (result) + if (result != XML_ERROR_NONE) { + freeBindings(parser, bindings); return result; + } poolFinish(&tempPool); if (startElementHandler) { startElementHandler(handlerArg, name.str, (const XML_Char **)atts); @@ -2527,15 +2793,7 @@ doContent(XML_Parser parser, if (noElmHandlers && defaultHandler) reportDefault(parser, enc, s, next); poolClear(&tempPool); - while (bindings) { - BINDING *b = bindings; - if (endNamespaceDeclHandler) - endNamespaceDeclHandler(handlerArg, b->prefix->name); - bindings = bindings->nextTagBinding; - b->nextTagBinding = freeBindingList; - freeBindingList = b; - b->prefix->binding = b->prevPrefixBinding; - } + freeBindings(parser, bindings); } if (tagLevel == 0) return epilogProcessor(parser, next, end, nextPtr); @@ -2733,6 +2991,29 @@ doContent(XML_Parser parser, /* not reached */ } +/* This function does not call free() on the allocated memory, merely + * moving it to the parser's freeBindingList where it can be freed or + * reused as appropriate. + */ +static void +freeBindings(XML_Parser parser, BINDING *bindings) +{ + while (bindings) { + BINDING *b = bindings; + + /* startNamespaceDeclHandler will have been called for this + * binding in addBindings(), so call the end handler now. + */ + if (endNamespaceDeclHandler) + endNamespaceDeclHandler(handlerArg, b->prefix->name); + + bindings = bindings->nextTagBinding; + b->nextTagBinding = freeBindingList; + freeBindingList = b; + b->prefix->binding = b->prevPrefixBinding; + } +} + /* Precondition: all arguments must be non-NULL; Purpose: - normalize attributes @@ -2957,7 +3238,13 @@ storeAtts(XML_Parser parser, const ENCODING *enc, if (s[-1] == 2) { /* prefixed */ ATTRIBUTE_ID *id; const BINDING *b; - unsigned long uriHash = hash_secret_salt; + unsigned long uriHash; + struct siphash sip_state; + struct sipkey sip_key; + + copy_salt_to_sipkey(parser, &sip_key); + sip24_init(&sip_state, &sip_key); + ((XML_Char *)s)[-1] = 0; /* clear flag */ id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, s, 0); if (!id || !id->prefix) @@ -2966,22 +3253,26 @@ storeAtts(XML_Parser parser, const ENCODING *enc, if (!b) return XML_ERROR_UNBOUND_PREFIX; - /* as we expand the name we also calculate its hash value */ for (j = 0; j < b->uriLen; j++) { const XML_Char c = b->uri[j]; if (!poolAppendChar(&tempPool, c)) return XML_ERROR_NO_MEMORY; - uriHash = CHAR_HASH(uriHash, c); } + + sip24_update(&sip_state, b->uri, b->uriLen * sizeof(XML_Char)); + while (*s++ != XML_T(ASCII_COLON)) ; + + sip24_update(&sip_state, s, keylen(s) * sizeof(XML_Char)); + do { /* copies null terminator */ - const XML_Char c = *s; if (!poolAppendChar(&tempPool, *s)) return XML_ERROR_NO_MEMORY; - uriHash = CHAR_HASH(uriHash, c); } while (*s++); + uriHash = (unsigned long)sip24_final(&sip_state); + { /* Check hash table for duplicate of expanded name (uriName). Derived from code in lookup(parser, HASH_TABLE *table, ...). */ @@ -3695,6 +3986,14 @@ entityValueInitProcessor(XML_Parser parser, *nextPtr = next; return XML_ERROR_NONE; } + /* If we get this token, we have the start of what might be a + normal tag, but not a declaration (i.e. it doesn't begin with + "internalEventEndPtr = NULL; textStart = (char *)entity->textPtr; textEnd = (char *)(entity->textPtr + entity->textLen); + /* Set a safe default value in case 'next' does not get set */ + next = textStart; #ifdef XML_DTD if (entity->is_param) { @@ -4916,6 +5217,8 @@ internalEntityProcessor(XML_Parser parser, entity = openEntity->entity; textStart = ((char *)entity->textPtr) + entity->processed; textEnd = (char *)(entity->textPtr + entity->textLen); + /* Set a safe default value in case 'next' does not get set */ + next = textStart; #ifdef XML_DTD if (entity->is_param) { @@ -5876,7 +6179,6 @@ dtdCopy(XML_Parser oldParser, DTD *newDtd, const DTD *oldDtd, const XML_Memory_H newE->defaultAtts = (DEFAULT_ATTRIBUTE *) ms->malloc_fcn(oldE->nDefaultAtts * sizeof(DEFAULT_ATTRIBUTE)); if (!newE->defaultAtts) { - ms->free_fcn(newE); return 0; } } @@ -6011,13 +6313,32 @@ keyeq(KEY s1, KEY s2) return XML_FALSE; } +static size_t +keylen(KEY s) +{ + size_t len = 0; + for (; *s; s++, len++); + return len; +} + +static void +copy_salt_to_sipkey(XML_Parser parser, struct sipkey * key) +{ + key->k[0] = 0; + key->k[1] = get_hash_secret_salt(parser); +} + static unsigned long FASTCALL hash(XML_Parser parser, KEY s) { - unsigned long h = hash_secret_salt; - while (*s) - h = CHAR_HASH(h, *s++); - return h; + struct siphash state; + struct sipkey key; + (void)sip_tobin; + (void)sip24_valid; + copy_salt_to_sipkey(parser, &key); + sip24_init(&state, &key); + sip24_update(&state, s, keylen(s) * sizeof(XML_Char)); + return (unsigned long)sip24_final(&state); } static NAMED * @@ -6260,6 +6581,35 @@ poolStoreString(STRING_POOL *pool, const ENCODING *enc, return pool->start; } +static size_t +poolBytesToAllocateFor(int blockSize) +{ + /* Unprotected math would be: + ** return offsetof(BLOCK, s) + blockSize * sizeof(XML_Char); + ** + ** Detect overflow, avoiding _signed_ overflow undefined behavior + ** For a + b * c we check b * c in isolation first, so that addition of a + ** on top has no chance of making us accept a small non-negative number + */ + const size_t stretch = sizeof(XML_Char); /* can be 4 bytes */ + + if (blockSize <= 0) + return 0; + + if (blockSize > (int)(INT_MAX / stretch)) + return 0; + + { + const int stretchedBlockSize = blockSize * (int)stretch; + const int bytesToAllocate = (int)( + offsetof(BLOCK, s) + (unsigned)stretchedBlockSize); + if (bytesToAllocate < 0) + return 0; + + return (size_t)bytesToAllocate; + } +} + static XML_Bool FASTCALL poolGrow(STRING_POOL *pool) { @@ -6289,14 +6639,17 @@ poolGrow(STRING_POOL *pool) if (pool->blocks && pool->start == pool->blocks->s) { BLOCK *temp; int blockSize = (int)((unsigned)(pool->end - pool->start)*2U); + size_t bytesToAllocate; if (blockSize < 0) return XML_FALSE; + bytesToAllocate = poolBytesToAllocateFor(blockSize); + if (bytesToAllocate == 0) + return XML_FALSE; + temp = (BLOCK *) - pool->mem->realloc_fcn(pool->blocks, - (offsetof(BLOCK, s) - + blockSize * sizeof(XML_Char))); + pool->mem->realloc_fcn(pool->blocks, (unsigned)bytesToAllocate); if (temp == NULL) return XML_FALSE; pool->blocks = temp; @@ -6308,16 +6661,26 @@ poolGrow(STRING_POOL *pool) else { BLOCK *tem; int blockSize = (int)(pool->end - pool->start); + size_t bytesToAllocate; if (blockSize < 0) return XML_FALSE; if (blockSize < INIT_BLOCK_SIZE) blockSize = INIT_BLOCK_SIZE; - else + else { + /* Detect overflow, avoiding _signed_ overflow undefined behavior */ + if ((int)((unsigned)blockSize * 2U) < 0) { + return XML_FALSE; + } blockSize *= 2; - tem = (BLOCK *)pool->mem->malloc_fcn(offsetof(BLOCK, s) - + blockSize * sizeof(XML_Char)); + } + + bytesToAllocate = poolBytesToAllocateFor(blockSize); + if (bytesToAllocate == 0) + return XML_FALSE; + + tem = (BLOCK *)pool->mem->malloc_fcn(bytesToAllocate); if (!tem) return XML_FALSE; tem->size = blockSize; diff --git a/lib/xmlrole.c b/lib/xmlrole.c index 4e79ffd..a7c5630 100644 --- a/lib/xmlrole.c +++ b/lib/xmlrole.c @@ -4,19 +4,13 @@ #include -#ifdef COMPILING_FOR_WINDOWS +#ifdef _WIN32 #include "winconfig.h" -#elif defined(MACOS_CLASSIC) -#include "macconfig.h" -#elif defined(__amigaos__) -#include "amigaconfig.h" -#elif defined(__WATCOMC__) -#include "watcomconfig.h" #else #ifdef HAVE_EXPAT_CONFIG_H #include #endif -#endif /* ndef COMPILING_FOR_WINDOWS */ +#endif /* ndef _WIN32 */ #include "expat_external.h" #include "internal.h" diff --git a/lib/xmltok.c b/lib/xmltok.c index 4195279..cdf0720 100644 --- a/lib/xmltok.c +++ b/lib/xmltok.c @@ -4,19 +4,13 @@ #include -#ifdef COMPILING_FOR_WINDOWS +#ifdef _WIN32 #include "winconfig.h" -#elif defined(MACOS_CLASSIC) -#include "macconfig.h" -#elif defined(__amigaos__) -#include "amigaconfig.h" -#elif defined(__WATCOMC__) -#include "watcomconfig.h" #else #ifdef HAVE_EXPAT_CONFIG_H #include #endif -#endif /* ndef COMPILING_FOR_WINDOWS */ +#endif /* ndef _WIN32 */ #include "expat_external.h" #include "internal.h" @@ -369,24 +363,24 @@ utf8_toUtf8(const ENCODING *UNUSED_P(enc), const char **fromP, const char *fromLim, char **toP, const char *toLim) { - enum XML_Convert_Result res = XML_CONVERT_COMPLETED; char *to; const char *from; - if (fromLim - *fromP > toLim - *toP) { - /* Avoid copying partial characters. */ - res = XML_CONVERT_OUTPUT_EXHAUSTED; - fromLim = *fromP + (toLim - *toP); - align_limit_to_full_utf8_characters(*fromP, &fromLim); - } + const char *fromLimInitial = fromLim; + + /* Avoid copying partial characters. */ + align_limit_to_full_utf8_characters(*fromP, &fromLim); + for (to = *toP, from = *fromP; (from < fromLim) && (to < toLim); from++, to++) *to = *from; *fromP = from; *toP = to; - if ((to == toLim) && (from < fromLim)) + if (fromLim < fromLimInitial) + return XML_CONVERT_INPUT_INCOMPLETE; + else if ((to == toLim) && (from < fromLim)) return XML_CONVERT_OUTPUT_EXHAUSTED; else - return res; + return XML_CONVERT_COMPLETED; } static enum XML_Convert_Result PTRCALL @@ -402,7 +396,7 @@ utf8_toUtf16(const ENCODING *enc, case BT_LEAD2: if (fromLim - from < 2) { res = XML_CONVERT_INPUT_INCOMPLETE; - break; + goto after; } *to++ = (unsigned short)(((from[0] & 0x1f) << 6) | (from[1] & 0x3f)); from += 2; @@ -410,7 +404,7 @@ utf8_toUtf16(const ENCODING *enc, case BT_LEAD3: if (fromLim - from < 3) { res = XML_CONVERT_INPUT_INCOMPLETE; - break; + goto after; } *to++ = (unsigned short)(((from[0] & 0xf) << 12) | ((from[1] & 0x3f) << 6) | (from[2] & 0x3f)); @@ -441,6 +435,8 @@ utf8_toUtf16(const ENCODING *enc, break; } } + if (from < fromLim) + res = XML_CONVERT_OUTPUT_EXHAUSTED; after: *fromP = from; *toP = to; diff --git a/lib/xmltok_impl.c b/lib/xmltok_impl.c index fd0ee22..5f779c0 100644 --- a/lib/xmltok_impl.c +++ b/lib/xmltok_impl.c @@ -1198,6 +1198,8 @@ PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr, const char *start; if (ptr >= end) return XML_TOK_NONE; + else if (! HAS_CHAR(enc, ptr, end)) + return XML_TOK_PARTIAL; start = ptr; while (HAS_CHAR(enc, ptr, end)) { switch (BYTE_TYPE(enc, ptr)) { @@ -1256,6 +1258,8 @@ PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr, const char *start; if (ptr >= end) return XML_TOK_NONE; + else if (! HAS_CHAR(enc, ptr, end)) + return XML_TOK_PARTIAL; start = ptr; while (HAS_CHAR(enc, ptr, end)) { switch (BYTE_TYPE(enc, ptr)) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d9d191a19f4a383e6e5a56d016526323476ce001 commit d9d191a19f4a383e6e5a56d016526323476ce001 Author: Brad King AuthorDate: Mon Jun 19 15:10:05 2017 -0400 Commit: Brad King CommitDate: Mon Jun 19 15:25:35 2017 -0400 expat: Update script to get Expat 2.2.1 diff --git a/Utilities/Scripts/update-expat.bash b/Utilities/Scripts/update-expat.bash index 8a2a5fe..4cc8646 100755 --- a/Utilities/Scripts/update-expat.bash +++ b/Utilities/Scripts/update-expat.bash @@ -7,8 +7,8 @@ shopt -s dotglob readonly name="expat" readonly ownership="Expat Upstream " readonly subtree="Utilities/cmexpat" -readonly repo="http://git.code.sf.net/p/expat/code_git" -readonly tag="master" +readonly repo="https://github.com/libexpat/libexpat.git" +readonly tag="R_2_2_1" readonly shortlog=false readonly paths=" expat/lib/asciitab.h @@ -22,6 +22,7 @@ readonly paths=" expat/lib/utf8tab.h expat/lib/nametab.h expat/lib/ascii.h + expat/lib/siphash.h expat/lib/xmltok_impl.h expat/lib/xmltok_ns.c expat/lib/winconfig.h ----------------------------------------------------------------------- Summary of changes: Help/release/3.9.rst | 2 + Modules/CheckTypeSize.c.in | 6 + Source/cmQtAutoGenerators.cxx | 6 +- Tests/QtAutogen/CMakeLists.txt | 24 +- Tests/QtAutogen/mocOnlySource/StyleA.cpp | 5 + Tests/QtAutogen/mocOnlySource/StyleA.hpp | 15 + Tests/QtAutogen/mocOnlySource/StyleB.cpp | 5 + Tests/QtAutogen/mocOnlySource/StyleB.hpp | 16 + .../{mocPlugin => mocOnlySource}/main.cpp | 3 + Utilities/Scripts/update-expat.bash | 5 +- Utilities/cmexpat/COPYING | 5 +- Utilities/cmexpat/README | 4 +- Utilities/cmexpat/lib/expat.h | 30 +- Utilities/cmexpat/lib/expat_external.h | 5 +- Utilities/cmexpat/lib/siphash.h | 354 ++++++++++++ Utilities/cmexpat/lib/winconfig.h | 19 +- Utilities/cmexpat/lib/xmlparse.c | 611 ++++++++++++++++---- Utilities/cmexpat/lib/xmlrole.c | 10 +- Utilities/cmexpat/lib/xmltok.c | 34 +- Utilities/cmexpat/lib/xmltok_impl.c | 4 + 20 files changed, 981 insertions(+), 182 deletions(-) create mode 100644 Tests/QtAutogen/mocOnlySource/StyleA.cpp create mode 100644 Tests/QtAutogen/mocOnlySource/StyleA.hpp create mode 100644 Tests/QtAutogen/mocOnlySource/StyleB.cpp create mode 100644 Tests/QtAutogen/mocOnlySource/StyleB.hpp copy Tests/QtAutogen/{mocPlugin => mocOnlySource}/main.cpp (55%) create mode 100644 Utilities/cmexpat/lib/siphash.h hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 21 08:55:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 21 Jun 2017 08:55:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-149-gad4a68c Message-ID: <20170621125503.4D630FA020@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via ad4a68cca00af3a20caaafbb96be67a1cc53a027 (commit) via ab4c3270ae7062a8f3296055b9f6443b80f3aef2 (commit) via 5222289f1e828a6b8969f751edfcecb3a3f2c434 (commit) from d7c694b2e7ba43f634e920800efe138987d3b248 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ad4a68cca00af3a20caaafbb96be67a1cc53a027 commit ad4a68cca00af3a20caaafbb96be67a1cc53a027 Merge: d7c694b ab4c327 Author: Brad King AuthorDate: Wed Jun 21 08:44:56 2017 -0400 Commit: Brad King CommitDate: Wed Jun 21 08:44:56 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 21 08:55:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 21 Jun 2017 08:55:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc3-22-gab4c327 Message-ID: <20170621125503.DCFEAFA0E9@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via ab4c3270ae7062a8f3296055b9f6443b80f3aef2 (commit) via f94213a1ee3824b790d8087fabf06f3a46a16347 (commit) via 5222289f1e828a6b8969f751edfcecb3a3f2c434 (commit) via d5afb178f1829fc5fd9332f70986b95ab62aedcc (commit) via 0a40c668f5bd60e68cde3fc7803aec2611f6c1c3 (commit) via 4b8a8c226fd7fe19d9445664c4cb9ff084b44281 (commit) via d9d191a19f4a383e6e5a56d016526323476ce001 (commit) from b7799f07d1bcf2708976b41aa07047c04e5ee3d0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Help/release/3.9.rst | 2 + Utilities/Scripts/update-expat.bash | 5 +- Utilities/cmexpat/COPYING | 5 +- Utilities/cmexpat/README | 4 +- Utilities/cmexpat/lib/expat.h | 30 +- Utilities/cmexpat/lib/expat_external.h | 5 +- Utilities/cmexpat/lib/siphash.h | 354 ++++++++++++++++++ Utilities/cmexpat/lib/winconfig.h | 19 +- Utilities/cmexpat/lib/xmlparse.c | 611 +++++++++++++++++++++++++------- Utilities/cmexpat/lib/xmlrole.c | 10 +- Utilities/cmexpat/lib/xmltok.c | 34 +- Utilities/cmexpat/lib/xmltok_impl.c | 4 + 12 files changed, 912 insertions(+), 171 deletions(-) create mode 100644 Utilities/cmexpat/lib/siphash.h hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 22 00:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 22 Jun 2017 00:05:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-150-g1218731 Message-ID: <20170622040505.82252FA978@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 1218731a2a1f018f562808d7cd5ea857403dbad3 (commit) from ad4a68cca00af3a20caaafbb96be67a1cc53a027 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1218731a2a1f018f562808d7cd5ea857403dbad3 commit 1218731a2a1f018f562808d7cd5ea857403dbad3 Author: Kitware Robot AuthorDate: Thu Jun 22 00:01:06 2017 -0400 Commit: Kitware Robot CommitDate: Thu Jun 22 00:01:06 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 52efadf..cb378c6 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 9) -set(CMake_VERSION_PATCH 20170621) +set(CMake_VERSION_PATCH 20170622) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 22 10:05:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 22 Jun 2017 10:05:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-159-g396b618 Message-ID: <20170622140508.F155EFA9E5@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 396b618c523d042df1c96cb08be1163e5c72d150 (commit) via 416e7919ec92d2899e27949132fce59a1926aeab (commit) via a66f9bc0c4e3507b5478f8254585aa262f023171 (commit) via 9f3bf3cb9d014c3acce0709af7cce82554bc7a89 (commit) via 3b75421515835b2fc6713be3015cc3f7324bb5a8 (commit) via f2059585e6302446707560b123c7b785df5f5859 (commit) via fff782f6a64a64538254b23891dc00b18ecec4fe (commit) via 0db4c7a021437c1b2e0ec788bdda249417501490 (commit) via 51865fc67ecd61d9cbf984be0310f2e9fb8ff455 (commit) from 1218731a2a1f018f562808d7cd5ea857403dbad3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=396b618c523d042df1c96cb08be1163e5c72d150 commit 396b618c523d042df1c96cb08be1163e5c72d150 Merge: 416e791 3b75421 Author: Brad King AuthorDate: Thu Jun 22 14:04:34 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 22 10:04:37 2017 -0400 Merge topic 'vs-cuda-fix-flags' 3b754215 VS: Improve workaround for CUDA -Xcompiler placement bug f2059585 VS: Fix target_compile_options for CUDA Acked-by: Kitware Robot Merge-request: !996 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=416e7919ec92d2899e27949132fce59a1926aeab commit 416e7919ec92d2899e27949132fce59a1926aeab Merge: a66f9bc fff782f Author: Brad King AuthorDate: Thu Jun 22 14:02:51 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 22 10:03:02 2017 -0400 Merge topic 'cuda-macos-rpath-in-tests' fff782f6 Tests: Simplify CUDA rpath on macOS Acked-by: Kitware Robot Merge-request: !995 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a66f9bc0c4e3507b5478f8254585aa262f023171 commit a66f9bc0c4e3507b5478f8254585aa262f023171 Merge: 9f3bf3c 0db4c7a Author: Brad King AuthorDate: Thu Jun 22 14:02:40 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 22 10:02:43 2017 -0400 Merge topic 'vs_fix_configuration_error' 0db4c7a0 Tests: Verify registry value is not "/registry" before using Acked-by: Kitware Robot Merge-request: !994 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9f3bf3cb9d014c3acce0709af7cce82554bc7a89 commit 9f3bf3cb9d014c3acce0709af7cce82554bc7a89 Merge: 1218731 51865fc Author: Brad King AuthorDate: Thu Jun 22 13:58:23 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 22 09:58:28 2017 -0400 Merge topic 'vs_csharp_link_to_managed_cxx' 51865fc6 Vs: allow CSharp targets to be linked to CXX targets Acked-by: Kitware Robot Merge-request: !993 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b75421515835b2fc6713be3015cc3f7324bb5a8 commit 3b75421515835b2fc6713be3015cc3f7324bb5a8 Author: Brad King AuthorDate: Wed Jun 21 14:15:23 2017 -0400 Commit: Brad King CommitDate: Wed Jun 21 14:24:11 2017 -0400 VS: Improve workaround for CUDA -Xcompiler placement bug In commit v3.9.0-rc1~431^2~6 (VS: Place CUDA host compiler options in proper project file fields, 2017-03-07) we worked around a bug in the CUDA VS integration by dropping `AdditionalCompilerOptions`. However, this silently drops `-Xcompiler=` options given by the user that don't map to one of CudaCompile's dedicated settings. Improve the workaround to instead put the remaining `AdditionalCompilerOptions` into the `AdditionalOptions` field behind `-Xcompiler=` ourselves. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 2a7d96b..32ece3f 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2523,9 +2523,16 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions( cudaOptions.AddTable(gg->GetCudaHostFlagTable()); cudaOptions.Reparse("AdditionalCompilerOptions"); - // `CUDA 8.0.targets` places these before nvcc! Just drop whatever - // did not parse and hope it works. - cudaOptions.RemoveFlag("AdditionalCompilerOptions"); + // `CUDA 8.0.targets` places AdditionalCompilerOptions before nvcc! + // Pass them through -Xcompiler in AdditionalOptions instead. + if (const char* acoPtr = cudaOptions.GetFlag("AdditionalCompilerOptions")) { + std::string aco = acoPtr; + cudaOptions.RemoveFlag("AdditionalCompilerOptions"); + if (!aco.empty()) { + aco = this->LocalGenerator->EscapeForShell(aco, false); + cudaOptions.AppendFlag("AdditionalOptions", "-Xcompiler=" + aco); + } + } cudaOptions.FixCudaCodeGeneration(); diff --git a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt index 0a2542a..f42324e 100644 --- a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt +++ b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt @@ -15,6 +15,10 @@ set(CMAKE_CUDA_STANDARD 11) add_library(CUDASeparateLibA STATIC file1.cu file2.cu file3.cu) +if(CMAKE_CUDA_SIMULATE_ID STREQUAL "MSVC") + target_compile_options(CUDASeparateLibA PRIVATE -Xcompiler=-bigobj) +endif() + #Having file4/file5 in a shared library causes serious problems #with the nvcc linker and it will generate bad entries that will #cause a segv when trying to run the executable https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f2059585e6302446707560b123c7b785df5f5859 commit f2059585e6302446707560b123c7b785df5f5859 Author: Brad King AuthorDate: Wed Jun 21 13:44:43 2017 -0400 Commit: Brad King CommitDate: Wed Jun 21 14:23:46 2017 -0400 VS: Fix target_compile_options for CUDA Fix the VS generator to honor `COMPILE_OPTIONS` for CUDA. The exclusion added by commit v3.9.0-rc1~431^2~7 (VS: Do not pass CUDA compile options to C compiler, 2017-03-07) was correct but we need additional logic to pass the CUDA compile options to the CUDA compiler. Also we should still pass the CXX or C options to MSVC (ClCompile) when those languages are enabled even if the link language is CUDA. diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 238c9e8..2a7d96b 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2,6 +2,7 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmVisualStudio10TargetGenerator.h" +#include "cmAlgorithms.h" #include "cmComputeLinkInformation.h" #include "cmCustomCommandGenerator.h" #include "cmGeneratedFileStream.h" @@ -2227,10 +2228,27 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( this->Name.c_str()); return false; } - if (linkLanguage == "C" || linkLanguage == "CXX" || - linkLanguage == "Fortran" || linkLanguage == "CSharp") { + + // Choose a language whose flags to use for ClCompile. + static const char* clLangs[] = { "CXX", "C", "Fortran", "CSharp" }; + std::string langForClCompile; + if (std::find(cmArrayBegin(clLangs), cmArrayEnd(clLangs), linkLanguage) != + cmArrayEnd(clLangs)) { + langForClCompile = linkLanguage; + } else { + std::set languages; + this->GeneratorTarget->GetLanguages(languages, configName); + for (const char* const* l = cmArrayBegin(clLangs); + l != cmArrayEnd(clLangs); ++l) { + if (languages.find(*l) != languages.end()) { + langForClCompile = *l; + break; + } + } + } + if (!langForClCompile.empty()) { std::string baseFlagVar = "CMAKE_"; - baseFlagVar += linkLanguage; + baseFlagVar += langForClCompile; baseFlagVar += "_FLAGS"; flags = this->GeneratorTarget->Target->GetMakefile()->GetRequiredDefinition( @@ -2241,6 +2259,8 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( flags += this->GeneratorTarget->Target->GetMakefile()->GetRequiredDefinition( flagVar.c_str()); + this->LocalGenerator->AddCompileOptions(flags, this->GeneratorTarget, + langForClCompile, configName); } // set the correct language if (linkLanguage == "C") { @@ -2249,10 +2269,6 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( if (linkLanguage == "CXX") { clOptions.AddFlag("CompileAs", "CompileAsCpp"); } - if (linkLanguage != "CUDA") { - this->LocalGenerator->AddCompileOptions(flags, this->GeneratorTarget, - linkLanguage, configName.c_str()); - } // Check IPO related warning/error. this->GeneratorTarget->IsIPOEnabled(linkLanguage, configName); @@ -2480,6 +2496,8 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions( std::string(this->Makefile->GetSafeDefinition("CMAKE_CUDA_FLAGS")) + std::string(" ") + std::string(this->Makefile->GetSafeDefinition(configFlagsVar)); + this->LocalGenerator->AddCompileOptions(flags, this->GeneratorTarget, "CUDA", + configName); // Get preprocessor definitions for this directory. std::string defineFlags = diff --git a/Tests/CudaOnly/WithDefs/CMakeLists.txt b/Tests/CudaOnly/WithDefs/CMakeLists.txt index 38f2a44..e25f141 100644 --- a/Tests/CudaOnly/WithDefs/CMakeLists.txt +++ b/Tests/CudaOnly/WithDefs/CMakeLists.txt @@ -28,6 +28,7 @@ add_executable(CudaOnlyWithDefs ${main}) target_compile_options(CudaOnlyWithDefs PRIVATE + -Xcompiler=-DHOST_DEFINE $<$:$> ) diff --git a/Tests/CudaOnly/WithDefs/main.notcu b/Tests/CudaOnly/WithDefs/main.notcu index 80ed3a5..d2eff3f 100644 --- a/Tests/CudaOnly/WithDefs/main.notcu +++ b/Tests/CudaOnly/WithDefs/main.notcu @@ -2,6 +2,10 @@ #include #include +#ifndef HOST_DEFINE +#error "HOST_DEFINE not defined!" +#endif + #ifndef PACKED_DEFINE #error "PACKED_DEFINE not defined!" #endif https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fff782f6a64a64538254b23891dc00b18ecec4fe commit fff782f6a64a64538254b23891dc00b18ecec4fe Author: Brad King AuthorDate: Wed Jun 21 09:35:16 2017 -0400 Commit: Brad King CommitDate: Wed Jun 21 10:41:49 2017 -0400 Tests: Simplify CUDA rpath on macOS Use the `BUILD_RPATH` property and reference the CMake-computed location of the runtime libraries. diff --git a/Tests/Cuda/Complex/CMakeLists.txt b/Tests/Cuda/Complex/CMakeLists.txt index 450ef48..a7137e3 100644 --- a/Tests/Cuda/Complex/CMakeLists.txt +++ b/Tests/Cuda/Complex/CMakeLists.txt @@ -42,7 +42,6 @@ add_executable(CudaComplex main.cpp) target_link_libraries(CudaComplex PUBLIC CudaComplexMixedLib) if(APPLE) - # We need to add the default path to the driver (libcuda.dylib) as an rpath, so that - # the static cuda runtime can find it at runtime. - target_link_libraries(CudaComplex PRIVATE -Wl,-rpath,/usr/local/cuda/lib) + # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime. + set_property(TARGET CudaComplex PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}) endif() diff --git a/Tests/Cuda/ObjectLibrary/CMakeLists.txt b/Tests/Cuda/ObjectLibrary/CMakeLists.txt index 1d93be7..276dc92 100644 --- a/Tests/Cuda/ObjectLibrary/CMakeLists.txt +++ b/Tests/Cuda/ObjectLibrary/CMakeLists.txt @@ -10,8 +10,8 @@ add_library(CudaMixedObjectLib OBJECT static.cu static.cpp) add_executable(CudaObjectLibrary main.cpp $) + if(APPLE) - # We need to add the default path to the driver (libcuda.dylib) as an rpath, so that - # the static cuda runtime can find it at runtime. - target_link_libraries(CudaObjectLibrary PRIVATE -Wl,-rpath,/usr/local/cuda/lib) + # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime. + set_property(TARGET CudaObjectLibrary PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}) endif() diff --git a/Tests/Cuda/WithC/CMakeLists.txt b/Tests/Cuda/WithC/CMakeLists.txt index 1f25ab4..831ce12 100644 --- a/Tests/Cuda/WithC/CMakeLists.txt +++ b/Tests/Cuda/WithC/CMakeLists.txt @@ -6,7 +6,6 @@ string(APPEND CMAKE_CUDA_FLAGS " -gencode arch=compute_30,code=compute_30") add_executable(CudaWithC main.c cuda.cu) if(APPLE) - # We need to add the default path to the driver (libcuda.dylib) as an rpath, so that - # the static cuda runtime can find it at runtime. - target_link_libraries(CudaWithC PRIVATE -Wl,-rpath,/usr/local/cuda/lib) + # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime. + set_property(TARGET CudaWithC PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}) endif() diff --git a/Tests/CudaOnly/ExportPTX/CMakeLists.txt b/Tests/CudaOnly/ExportPTX/CMakeLists.txt index 10249c6..65d5243 100644 --- a/Tests/CudaOnly/ExportPTX/CMakeLists.txt +++ b/Tests/CudaOnly/ExportPTX/CMakeLists.txt @@ -67,9 +67,8 @@ target_compile_definitions(CudaOnlyExportPTX PRIVATE "CONFIG_TYPE=gen_$>") if(APPLE) - # We need to add the default path to the driver (libcuda.dylib) as an rpath, so that - # the static cuda runtime can find it at runtime. - target_link_libraries(CudaOnlyExportPTX PRIVATE -Wl,-rpath,/usr/local/cuda/lib) + # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime. + set_property(TARGET CudaOnlyExportPTX PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}) endif() #Verify that we can install object targets properly diff --git a/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt b/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt index b96bb98..8d6551b 100644 --- a/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt +++ b/Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt @@ -46,7 +46,6 @@ add_executable(CudaOnlyResolveDeviceSymbols main.cu) target_link_libraries(CudaOnlyResolveDeviceSymbols PRIVATE CUDAResolveDeviceLib) if(APPLE) - # We need to add the default path to the driver (libcuda.dylib) as an rpath, so that - # the static cuda runtime can find it at runtime. - target_link_libraries(CudaOnlyResolveDeviceSymbols PRIVATE -Wl,-rpath,/usr/local/cuda/lib) + # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime. + set_property(TARGET CudaOnlyResolveDeviceSymbols PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}) endif() diff --git a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt index 0a2542a..55fd79f 100644 --- a/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt +++ b/Tests/CudaOnly/SeparateCompilation/CMakeLists.txt @@ -39,8 +39,7 @@ if (CMAKE_GENERATOR MATCHES "^Visual Studio") PROPERTIES CUDA_SEPARABLE_COMPILATION ON) endif() -if (APPLE) - # We need to add the default path to the driver (libcuda.dylib) as an rpath, so that - # the static cuda runtime can find it at runtime. - target_link_libraries(CudaOnlySeparateCompilation PRIVATE -Wl,-rpath,/usr/local/cuda/lib) +if(APPLE) + # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime. + set_property(TARGET CudaOnlySeparateCompilation PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}) endif() diff --git a/Tests/CudaOnly/WithDefs/CMakeLists.txt b/Tests/CudaOnly/WithDefs/CMakeLists.txt index 38f2a44..fe0ccc6 100644 --- a/Tests/CudaOnly/WithDefs/CMakeLists.txt +++ b/Tests/CudaOnly/WithDefs/CMakeLists.txt @@ -36,8 +36,7 @@ target_compile_definitions(CudaOnlyWithDefs $<$:$> ) -#we need to add an rpath for the cuda library so that everything -#loads properly on the mac -if(CMAKE_SYSTEM_NAME MATCHES "Darwin") - set_target_properties(CudaOnlyWithDefs PROPERTIES LINK_FLAGS "-Wl,-rpath,${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}") +if(APPLE) + # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime. + set_property(TARGET CudaOnlyWithDefs PROPERTY BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES}) endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0db4c7a021437c1b2e0ec788bdda249417501490 commit 0db4c7a021437c1b2e0ec788bdda249417501490 Author: Michael St?rmer AuthorDate: Wed Jun 21 10:44:54 2017 +0200 Commit: Brad King CommitDate: Wed Jun 21 08:49:42 2017 -0400 Tests: Verify registry value is not "/registry" before using Fixes: #17002 diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index d138f58..4bc7839 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2081,7 +2081,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release set(reg_nasm "[HKEY_CURRENT_USER\\SOFTWARE\\nasm]") foreach(reg vs10 vs11 vs12 vs14 ws80 ws81 ws10_0 wp80 wp81 wince tegra nasm) get_filename_component(r "${reg_${reg}}" ABSOLUTE) - if(IS_DIRECTORY "${r}") + if(IS_DIRECTORY "${r}" AND NOT "${r}" STREQUAL "/registry") set(${reg} 1) else() set(${reg} 0) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=51865fc67ecd61d9cbf984be0310f2e9fb8ff455 commit 51865fc67ecd61d9cbf984be0310f2e9fb8ff455 Author: Michael St?rmer AuthorDate: Tue Jun 20 16:14:45 2017 +0200 Commit: Michael St?rmer CommitDate: Wed Jun 21 08:37:15 2017 +0200 Vs: allow CSharp targets to be linked to CXX targets Fixes: #16755 diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 238c9e8..f8534df 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3475,10 +3475,6 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences() ->TargetIsFortranOnly(dt)) { continue; } - if (csproj == this->ProjectType && - !this->GlobalGenerator->TargetIsCSharpOnly(dt)) { - continue; - } this->WriteString("GetLocalGenerator(); std::string name = dt->GetName(); diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index d138f58..d16df1c 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -331,6 +331,7 @@ if(BUILD_TESTING) if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^89]|[89][0-9])") ADD_TEST_MACRO(CSharpOnly CSharpOnly) + ADD_TEST_MACRO(CSharpLinkToCxx CSharpLinkToCxx) endif() ADD_TEST_MACRO(COnly COnly) diff --git a/Tests/CSharpLinkToCxx/CMakeLists.txt b/Tests/CSharpLinkToCxx/CMakeLists.txt new file mode 100644 index 0000000..c4269e0 --- /dev/null +++ b/Tests/CSharpLinkToCxx/CMakeLists.txt @@ -0,0 +1,17 @@ +# test if CSharp application correctly links +# to managed C++ binary +cmake_minimum_required(VERSION 3.9) +project (CSharpLinkToCxx CXX CSharp) + +# we have to change the default flags for the +# managed C++ project to build +string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) +string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) + +add_library(CLIApp SHARED cli.hpp cli.cpp) + +target_compile_options(CLIApp PRIVATE "/clr") + +add_executable(CSharpLinkToCxx csharp.cs) + +target_link_libraries(CSharpLinkToCxx CLIApp) diff --git a/Tests/CSharpLinkToCxx/cli.cpp b/Tests/CSharpLinkToCxx/cli.cpp new file mode 100644 index 0000000..97ac724 --- /dev/null +++ b/Tests/CSharpLinkToCxx/cli.cpp @@ -0,0 +1,10 @@ +#include "cli.hpp" + +using namespace System; + +namespace CLIApp { +void MyCli::testMyCli() +{ + Console::WriteLine("#message from CLIApp"); +} +} diff --git a/Tests/CSharpLinkToCxx/cli.hpp b/Tests/CSharpLinkToCxx/cli.hpp new file mode 100644 index 0000000..a8c116d --- /dev/null +++ b/Tests/CSharpLinkToCxx/cli.hpp @@ -0,0 +1,10 @@ +#pragma once + +namespace CLIApp { +public +ref class MyCli +{ +public: + void testMyCli(); +}; +} diff --git a/Tests/CSharpLinkToCxx/csharp.cs b/Tests/CSharpLinkToCxx/csharp.cs new file mode 100644 index 0000000..35c5cc3 --- /dev/null +++ b/Tests/CSharpLinkToCxx/csharp.cs @@ -0,0 +1,16 @@ +using System; +using CLIApp; + +namespace CSharpLinkToCxx +{ + internal class CSharpLinkToCxx + { + public static void Main(string[] args) + { + Console.WriteLine("#message from CSharpLinkToCxx"); + + var app = new MyCli(); + app.testMyCli(); + } + } +} ----------------------------------------------------------------------- Summary of changes: Source/cmVisualStudio10TargetGenerator.cxx | 49 ++++++++++++++------ Tests/CMakeLists.txt | 3 +- Tests/CSharpLinkToCxx/CMakeLists.txt | 17 +++++++ Tests/CSharpLinkToCxx/cli.cpp | 10 ++++ Tests/CSharpLinkToCxx/cli.hpp | 10 ++++ Tests/CSharpLinkToCxx/csharp.cs | 16 +++++++ Tests/Cuda/Complex/CMakeLists.txt | 5 +- Tests/Cuda/ObjectLibrary/CMakeLists.txt | 6 +-- Tests/Cuda/WithC/CMakeLists.txt | 5 +- Tests/CudaOnly/ExportPTX/CMakeLists.txt | 5 +- Tests/CudaOnly/ResolveDeviceSymbols/CMakeLists.txt | 5 +- Tests/CudaOnly/SeparateCompilation/CMakeLists.txt | 11 +++-- Tests/CudaOnly/WithDefs/CMakeLists.txt | 8 ++-- Tests/CudaOnly/WithDefs/main.notcu | 4 ++ 14 files changed, 116 insertions(+), 38 deletions(-) create mode 100644 Tests/CSharpLinkToCxx/CMakeLists.txt create mode 100644 Tests/CSharpLinkToCxx/cli.cpp create mode 100644 Tests/CSharpLinkToCxx/cli.hpp create mode 100644 Tests/CSharpLinkToCxx/csharp.cs hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 22 10:15:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 22 Jun 2017 10:15:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc3-168-g2982726 Message-ID: <20170622141506.27F50F5D55@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 298272681c8291282aaf9e2a42c1dc1c8a128537 (commit) via 426c83cf8fc0fded780f2430224a77e57046264b (commit) via 751f0e0adca2c99c1bff5b911d78f861c32c228f (commit) via c8ee5dbc0c9745ee6dadc1c18483a127bebd7962 (commit) via 5ba09a75a25f0876596af39fa32eff69cc44e1d6 (commit) via 974f43338b09e6ae4342015e2cc088d751943cb0 (commit) via 5d317930230daf61c72c2fa4bdd7b74dbcd7b190 (commit) via 3d9924447702df5a85977041f301aaab3fbe7215 (commit) via fff7d8c666e436d9a1a33865d87668e9cf6ff0da (commit) from 396b618c523d042df1c96cb08be1163e5c72d150 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=298272681c8291282aaf9e2a42c1dc1c8a128537 commit 298272681c8291282aaf9e2a42c1dc1c8a128537 Merge: 426c83c c8ee5db Author: Brad King AuthorDate: Thu Jun 22 10:14:17 2017 -0400 Commit: Brad King CommitDate: Thu Jun 22 10:14:17 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=426c83cf8fc0fded780f2430224a77e57046264b commit 426c83cf8fc0fded780f2430224a77e57046264b Merge: 751f0e0 974f433 Author: Brad King AuthorDate: Thu Jun 22 14:13:37 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 22 10:13:39 2017 -0400 Merge topic 'vs-rc-flags' 974f4333 VS: Fix support for rc /nologo flag in per-source COMPILE_FLAGS Acked-by: Kitware Robot Merge-request: !998 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=751f0e0adca2c99c1bff5b911d78f861c32c228f commit 751f0e0adca2c99c1bff5b911d78f861c32c228f Merge: 396b618 5d31793 Author: Brad King AuthorDate: Thu Jun 22 14:12:55 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 22 10:12:59 2017 -0400 Merge topic 'android-unified-headers' 5d317930 Android: Fix include path for unified headers Acked-by: Kitware Robot Merge-request: !997 ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android-Common.cmake | 8 ++++++-- Source/cmVS10RCFlagTable.h | 1 + Source/cmVS11RCFlagTable.h | 1 + Source/cmVS12RCFlagTable.h | 1 + Source/cmVS14RCFlagTable.h | 1 + Tests/VSResource/CMakeLists.txt | 4 ++++ 6 files changed, 14 insertions(+), 2 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 22 10:15:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 22 Jun 2017 10:15:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc3-31-gc8ee5db Message-ID: <20170622141506.AD14FF5D84@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via c8ee5dbc0c9745ee6dadc1c18483a127bebd7962 (commit) via 5ba09a75a25f0876596af39fa32eff69cc44e1d6 (commit) via 974f43338b09e6ae4342015e2cc088d751943cb0 (commit) via 5d317930230daf61c72c2fa4bdd7b74dbcd7b190 (commit) via 3d9924447702df5a85977041f301aaab3fbe7215 (commit) via 3b75421515835b2fc6713be3015cc3f7324bb5a8 (commit) via f2059585e6302446707560b123c7b785df5f5859 (commit) via fff7d8c666e436d9a1a33865d87668e9cf6ff0da (commit) via 51865fc67ecd61d9cbf984be0310f2e9fb8ff455 (commit) from ab4c3270ae7062a8f3296055b9f6443b80f3aef2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Modules/Platform/Android-Common.cmake | 8 +++- Source/cmVS10RCFlagTable.h | 1 + Source/cmVS11RCFlagTable.h | 1 + Source/cmVS12RCFlagTable.h | 1 + Source/cmVS14RCFlagTable.h | 1 + Source/cmVisualStudio10TargetGenerator.cxx | 49 +++++++++++++++------ Tests/CMakeLists.txt | 1 + Tests/CSharpLinkToCxx/CMakeLists.txt | 17 +++++++ Tests/CSharpLinkToCxx/cli.cpp | 10 +++++ Tests/CSharpLinkToCxx/cli.hpp | 10 +++++ Tests/CSharpLinkToCxx/csharp.cs | 16 +++++++ Tests/CudaOnly/SeparateCompilation/CMakeLists.txt | 4 ++ Tests/CudaOnly/WithDefs/CMakeLists.txt | 1 + Tests/CudaOnly/WithDefs/main.notcu | 4 ++ Tests/VSResource/CMakeLists.txt | 4 ++ 15 files changed, 112 insertions(+), 16 deletions(-) create mode 100644 Tests/CSharpLinkToCxx/CMakeLists.txt create mode 100644 Tests/CSharpLinkToCxx/cli.cpp create mode 100644 Tests/CSharpLinkToCxx/cli.hpp create mode 100644 Tests/CSharpLinkToCxx/csharp.cs hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 22 11:25:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 22 Jun 2017 11:25:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc4-138-g8b2ab97 Message-ID: <20170622152503.7B15AF9610@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 8b2ab977098bbbf49dae85b45adf46a84cb0428c (commit) via 8fe54172fcb37e39e0f7e506e575bdd8c7171e8d (commit) from 298272681c8291282aaf9e2a42c1dc1c8a128537 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b2ab977098bbbf49dae85b45adf46a84cb0428c commit 8b2ab977098bbbf49dae85b45adf46a84cb0428c Merge: 2982726 8fe5417 Author: Brad King AuthorDate: Thu Jun 22 11:23:32 2017 -0400 Commit: Brad King CommitDate: Thu Jun 22 11:23:32 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 22 11:25:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 22 Jun 2017 11:25:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc4 Message-ID: <20170622152503.8CC82F964E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via 8fe54172fcb37e39e0f7e506e575bdd8c7171e8d (commit) from c8ee5dbc0c9745ee6dadc1c18483a127bebd7962 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 22 11:25:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 22 Jun 2017 11:25:03 -0400 (EDT) Subject: [Cmake-commits] CMake annotated tag, v3.9.0-rc4, created. v3.9.0-rc4 Message-ID: <20170622152503.B5FF7F964E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The annotated tag, v3.9.0-rc4 has been created at d5effb9805991b15098bec3a3a05c6894c72d073 (tag) tagging 8fe54172fcb37e39e0f7e506e575bdd8c7171e8d (commit) replaces v3.9.0-rc3 tagged by Brad King on Thu Jun 22 11:23:55 2017 -0400 - Log ----------------------------------------------------------------- CMake 3.9.0-rc4 -----BEGIN PGP SIGNATURE----- iQJKBAABCAA0FiEExsJlMku+vcNQtRPQLSzvEDSSFoQFAllL4QsWHGJyYWQua2lu Z0BraXR3YXJlLmNvbQAKCRAtLO8QNJIWhCxrEACiFP8LrpELRq9jE8fD3Kx5fNOz 9nCWks05JYgfh6hfL4NvADLgm45rcJ6CcAoxFZQlCD7KD6ELbujRTH+L9ALX9AEn E6+RPj2jQ+z310TvOHgErBQPwYfbBm71RU2/PJjopjZGLvrlIRs6I34Iwd+9K/k6 mH9aE/5kcDHQkpWHYpTCp6UyrkWo/1M8ElIuVYa7q0ZgUFAGHoNvAOHCj84pze8d aVJN+A9jIJcVgplftxzIs8ZfFp6SLLPuffVTm2nbFlMZN4euxfertBTANY0jwvEa G1/Ff2XtECHOXLTg5dTvKM9Khy/6PgWwDeaHkbWyoC4RkNXXbm2HNUEhPxu0lbIP r++9B1SMiAZ9r1Vpl8TTenRwcCx2YrIirWRkSKA+QjskmHKkJcE6sNpMNHKYtvWj hILblZ9zNuaPZ2wOu20SFQw08iL3hl3trFlTj1p3Rf2TN+IpBBCgMcK6MglyI6GQ LzG6I00cuf/E606vh13whlC0LWZouPwg0gfWPPDD0LwA5wvWjVUfeDaLavN9tWbS kSNpmnjiMfpFgWx4fz1AS3OGqGmpySsv4XMp0L5w6aIbfgb8cVGVna8eiSr9gZUc o+gZ6R+BIxLtHWMp9Z8AzJuVigEusS5UHA5M5IQ+nhv6SkdXH7rXtD+OjfMsatlD reEM+yPPiNga0H7l0g== =udA7 -----END PGP SIGNATURE----- Brad King (28): README: Update list of supported platforms Merge branch 'readme-supported-platforms' into release-3.9 IPO: Consider support for each language separately curl: Update script to get curl 7.54.1 Merge branch 'upstream-curl' into update-curl cmake: Fix default file translate mode when using libuv Merge branch 'add-missing-compiler-release-notes' into release-3.9 Merge branch 'libuv-restore-fmode' into release-3.9 Merge branch 'update-curl' into release-3.9 Merge branch 'ipo-per-lang' into release-3.9 Help: Fix typo in Cray/PGI/XL compile features docs Help: Document that VS 2017 compile features are recorded Merge branch 'doc-compile-features' into release-3.9 expat: Update script to get Expat 2.2.1 Merge branch 'upstream-expat' into update-expat expat: Fix compilation on systems without stdint.h Merge branch 'update-expat' into release-3.9 Help: Update 3.9 release notes with recommended CUDA version for VS Merge branch 'cuda-version-for-vs' into release-3.9 Merge branch 'vs_csharp_link_to_managed_cxx' into release-3.9 VS: Fix target_compile_options for CUDA VS: Improve workaround for CUDA -Xcompiler placement bug Merge branch 'vs-cuda-fix-flags' into release-3.9 Android: Fix include path for unified headers VS: Fix support for rc /nologo flag in per-source COMPILE_FLAGS Merge branch 'android-unified-headers' into release-3.9 Merge branch 'vs-rc-flags' into release-3.9 CMake 3.9.0-rc4 Chuck Atkins (1): Help: Add docs for new compilers supporting language standards. Curl Upstream (1): curl 2017-06-14 (54b636f1) Expat Upstream (1): expat 2017-06-17 (c4446687) Michael St?rmer (1): Vs: allow CSharp targets to be linked to CXX targets ----------------------------------------------------------------------- hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 22 12:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 22 Jun 2017 12:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc4-140-g4d9ac96 Message-ID: <20170622160504.5C495FA953@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 4d9ac96f2801affa715a84b0c231c938cef98d22 (commit) via 420e48442b77315ac99aabaeeec4f03a4ddb8800 (commit) from 8b2ab977098bbbf49dae85b45adf46a84cb0428c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d9ac96f2801affa715a84b0c231c938cef98d22 commit 4d9ac96f2801affa715a84b0c231c938cef98d22 Merge: 8b2ab97 420e484 Author: Brad King AuthorDate: Thu Jun 22 15:57:28 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 22 11:57:32 2017 -0400 Merge topic 'doc-dev-maint' 420e4844 Help/dev: Update maintainer guide with note about docs and tests Acked-by: Kitware Robot Merge-request: !1000 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=420e48442b77315ac99aabaeeec4f03a4ddb8800 commit 420e48442b77315ac99aabaeeec4f03a4ddb8800 Author: Brad King AuthorDate: Thu Jun 22 11:02:05 2017 -0400 Commit: Brad King CommitDate: Thu Jun 22 11:02:05 2017 -0400 Help/dev: Update maintainer guide with note about docs and tests diff --git a/Help/dev/maint.rst b/Help/dev/maint.rst index c448445..889e4e3 100644 --- a/Help/dev/maint.rst +++ b/Help/dev/maint.rst @@ -29,6 +29,8 @@ command to integrate a merge request. Please check at least the following: * If a commit fixes a tracked issue, its commit message should have a trailing line such as ``Fixes: #00000``. +* Ensure that the MR adds sufficient documentation and test cases. + * Ensure that the MR has been tested sufficiently. Typically it should be staged for nightly testing with ``Do: stage``. Then manually review the `CMake CDash Page`_ to verify that no regressions were ----------------------------------------------------------------------- Summary of changes: Help/dev/maint.rst | 2 ++ 1 file changed, 2 insertions(+) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 23 00:05:09 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 23 Jun 2017 00:05:09 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc4-141-g4c7caf1 Message-ID: <20170623040511.531F3FA786@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 4c7caf15e4feef244f7e1772c1c932cc790e2cab (commit) from 4d9ac96f2801affa715a84b0c231c938cef98d22 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c7caf15e4feef244f7e1772c1c932cc790e2cab commit 4c7caf15e4feef244f7e1772c1c932cc790e2cab Author: Kitware Robot AuthorDate: Fri Jun 23 00:01:06 2017 -0400 Commit: Kitware Robot CommitDate: Fri Jun 23 00:01:06 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index cb378c6..b2244b4 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 9) -set(CMake_VERSION_PATCH 20170622) +set(CMake_VERSION_PATCH 20170623) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sat Jun 24 00:05:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sat, 24 Jun 2017 00:05:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc4-142-g2731edf Message-ID: <20170624040503.BF47CFAA4D@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 2731edf9784ced51b1610f160c75a341838857b3 (commit) from 4c7caf15e4feef244f7e1772c1c932cc790e2cab (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2731edf9784ced51b1610f160c75a341838857b3 commit 2731edf9784ced51b1610f160c75a341838857b3 Author: Kitware Robot AuthorDate: Sat Jun 24 00:01:04 2017 -0400 Commit: Kitware Robot CommitDate: Sat Jun 24 00:01:04 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index b2244b4..38945bf 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 9) -set(CMake_VERSION_PATCH 20170623) +set(CMake_VERSION_PATCH 20170624) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Sun Jun 25 00:05:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Sun, 25 Jun 2017 00:05:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc4-143-g78f879f Message-ID: <20170625040503.AA0A8FABD8@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 78f879f418eb0486e1b320fda8097d7788f8a2fc (commit) from 2731edf9784ced51b1610f160c75a341838857b3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=78f879f418eb0486e1b320fda8097d7788f8a2fc commit 78f879f418eb0486e1b320fda8097d7788f8a2fc Author: Kitware Robot AuthorDate: Sun Jun 25 00:01:04 2017 -0400 Commit: Kitware Robot CommitDate: Sun Jun 25 00:01:04 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 38945bf..e1732e8 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 9) -set(CMake_VERSION_PATCH 20170624) +set(CMake_VERSION_PATCH 20170625) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 26 00:05:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 26 Jun 2017 00:05:06 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc4-144-g581fda5 Message-ID: <20170626040506.39996FA8AD@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 581fda598cc4132519c5abdcd566cab42269ad1f (commit) from 78f879f418eb0486e1b320fda8097d7788f8a2fc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=581fda598cc4132519c5abdcd566cab42269ad1f commit 581fda598cc4132519c5abdcd566cab42269ad1f Author: Kitware Robot AuthorDate: Mon Jun 26 00:01:04 2017 -0400 Commit: Kitware Robot CommitDate: Mon Jun 26 00:01:04 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index e1732e8..8d4eeb6 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 9) -set(CMake_VERSION_PATCH 20170625) +set(CMake_VERSION_PATCH 20170626) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 26 10:45:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 26 Jun 2017 10:45:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc4-148-ga52ecd9 Message-ID: <20170626144505.9D6F8FA0BA@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via a52ecd983ff612becff90bba65e30ddf98d28c7f (commit) via b93a69e6d1d6f192fd106ae2aafa96c29533e2a8 (commit) via 23451a66acc9762f27ab93cb4fe2192b2fb3fbfc (commit) via 04b2fc08b44f7db5fe591b0ee244c5dfe9134d68 (commit) from 581fda598cc4132519c5abdcd566cab42269ad1f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a52ecd983ff612becff90bba65e30ddf98d28c7f commit a52ecd983ff612becff90bba65e30ddf98d28c7f Merge: b93a69e 04b2fc0 Author: Brad King AuthorDate: Mon Jun 26 14:42:33 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 26 10:42:36 2017 -0400 Merge topic 'toolchain-binutils-advanced' 04b2fc08 GCC,Clang: Mark CMAKE__COMPILER_{AR,RANLIB} as advanced Acked-by: Kitware Robot Merge-request: !1001 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b93a69e6d1d6f192fd106ae2aafa96c29533e2a8 commit b93a69e6d1d6f192fd106ae2aafa96c29533e2a8 Merge: 581fda5 23451a6 Author: Brad King AuthorDate: Mon Jun 26 14:42:06 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 26 10:42:10 2017 -0400 Merge topic 'GetPrerequisites-ucrt-no-warn' 23451a66 GetPrerequisites: Do not warn about non-absolute UCRT system libraries Acked-by: Kitware Robot Merge-request: !999 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23451a66acc9762f27ab93cb4fe2192b2fb3fbfc commit 23451a66acc9762f27ab93cb4fe2192b2fb3fbfc Author: Brad King AuthorDate: Thu Jun 22 10:58:24 2017 -0400 Commit: Brad King CommitDate: Mon Jun 26 10:33:16 2017 -0400 GetPrerequisites: Do not warn about non-absolute UCRT system libraries Issue: #17007 diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake index 0090cdc..4e52cb3 100644 --- a/Modules/GetPrerequisites.cmake +++ b/Modules/GetPrerequisites.cmake @@ -609,7 +609,7 @@ function(gp_resolved_file_type original_file file exepath dirs type_var) if(NOT is_embedded) if(NOT IS_ABSOLUTE "${resolved_file}") - if(lower MATCHES "^msvc[^/]+dll" AND is_system) + if(lower MATCHES "^(msvc|api-ms-win-)[^/]+dll" AND is_system) message(STATUS "info: non-absolute msvc file '${file}' returning type '${type}'") else() message(STATUS "warning: gp_resolved_file_type non-absolute file '${file}' returning type '${type}' -- possibly incorrect") https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=04b2fc08b44f7db5fe591b0ee244c5dfe9134d68 commit 04b2fc08b44f7db5fe591b0ee244c5dfe9134d68 Author: Brad King AuthorDate: Thu Jun 22 11:10:19 2017 -0400 Commit: Brad King CommitDate: Thu Jun 22 11:33:54 2017 -0400 GCC,Clang: Mark CMAKE__COMPILER_{AR,RANLIB} as advanced diff --git a/Modules/Compiler/Clang-FindBinUtils.cmake b/Modules/Compiler/Clang-FindBinUtils.cmake index c81e77a..e2822a1 100644 --- a/Modules/Compiler/Clang-FindBinUtils.cmake +++ b/Modules/Compiler/Clang-FindBinUtils.cmake @@ -16,6 +16,7 @@ find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR NAMES HINTS ${__clang_hints} DOC "LLVM archiver" ) +mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR) # http://manpages.ubuntu.com/manpages/precise/en/man1/llvm-ranlib.1.html find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES @@ -23,3 +24,4 @@ find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES HINTS ${__clang_hints} DOC "Generate index for LLVM archive" ) +mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB) diff --git a/Modules/Compiler/GNU-FindBinUtils.cmake b/Modules/Compiler/GNU-FindBinUtils.cmake index 142636c..16b7bbd 100644 --- a/Modules/Compiler/GNU-FindBinUtils.cmake +++ b/Modules/Compiler/GNU-FindBinUtils.cmake @@ -22,6 +22,7 @@ find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR NAMES HINTS ${__gcc_hints} DOC "A wrapper around 'ar' adding the appropriate '--plugin' option for the GCC compiler" ) +mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_AR) # http://manpages.ubuntu.com/manpages/wily/en/man1/gcc-ranlib.1.html find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES @@ -31,3 +32,4 @@ find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB NAMES HINTS ${__gcc_hints} DOC "A wrapper around 'ranlib' adding the appropriate '--plugin' option for the GCC compiler" ) +mark_as_advanced(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_RANLIB) ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/Clang-FindBinUtils.cmake | 2 ++ Modules/Compiler/GNU-FindBinUtils.cmake | 2 ++ Modules/GetPrerequisites.cmake | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 26 10:55:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 26 Jun 2017 10:55:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc4-154-g6c363f5 Message-ID: <20170626145502.AF8F7FA99A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 6c363f5cafe2bfeecd07887d9151e91042810e3f (commit) via 4d0155e780de44c2a815a453062aae2668ada27b (commit) via c24e66561356af461245a59dda8f5161399d48a6 (commit) via 319bd92589bdd884fd507a525cb131cb7b0aaab5 (commit) via 54d42ce7287290b1742c5b7326039ee46dd22cfb (commit) via d5f7bf9b2e943bf9fe0487d3343d13ccf9375edd (commit) from a52ecd983ff612becff90bba65e30ddf98d28c7f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6c363f5cafe2bfeecd07887d9151e91042810e3f commit 6c363f5cafe2bfeecd07887d9151e91042810e3f Merge: 4d0155e c24e665 Author: Brad King AuthorDate: Mon Jun 26 10:52:35 2017 -0400 Commit: Brad King CommitDate: Mon Jun 26 10:52:35 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d0155e780de44c2a815a453062aae2668ada27b commit 4d0155e780de44c2a815a453062aae2668ada27b Merge: a52ecd9 54d42ce Author: Brad King AuthorDate: Mon Jun 26 14:45:07 2017 +0000 Commit: Kitware Robot CommitDate: Mon Jun 26 10:45:11 2017 -0400 Merge topic 'vs_projecttype_comparison' 54d42ce7 Vs: disable unnecessary for CSharp targets d5f7bf9b Vs: change comparison to use .ProjectType member always as first comparator Acked-by: Kitware Robot Merge-request: !988 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=54d42ce7287290b1742c5b7326039ee46dd22cfb commit 54d42ce7287290b1742c5b7326039ee46dd22cfb Author: Michael St?rmer AuthorDate: Thu Jun 22 16:51:44 2017 +0200 Commit: Michael St?rmer CommitDate: Thu Jun 22 16:51:44 2017 +0200 Vs: disable unnecessary for CSharp targets diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index cfe05b8..6d796be 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3392,6 +3392,9 @@ void cmVisualStudio10TargetGenerator::WriteMidlOptions( void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups() { + if (this->ProjectType == csproj) { + return; + } for (std::vector::const_iterator i = this->Configurations.begin(); i != this->Configurations.end(); ++i) { https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d5f7bf9b2e943bf9fe0487d3343d13ccf9375edd commit d5f7bf9b2e943bf9fe0487d3343d13ccf9375edd Author: Michael St?rmer AuthorDate: Tue Jun 20 07:23:11 2017 +0200 Commit: Michael St?rmer CommitDate: Thu Jun 22 16:49:24 2017 +0200 Vs: change comparison to use .ProjectType member always as first comparator diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index d932245..cfe05b8 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -146,7 +146,7 @@ void cmVisualStudio10TargetGenerator::WritePlatformConfigTag( (*stream) << config << "|" << this->Platform; (*stream) << "'"; // handle special case for 32 bit C# targets - if (csproj == this->ProjectType && this->Platform == "Win32") { + if (this->ProjectType == csproj && this->Platform == "Win32") { (*stream) << " Or "; (*stream) << "'$(Configuration)|$(Platform)'=='"; (*stream) << config << "|x86"; @@ -294,7 +294,7 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString("\n", 1); } - if (csproj != this->ProjectType) { + if (this->ProjectType != csproj) { this->WriteProjectConfigurations(); } this->WriteString("\n", 1); @@ -311,7 +311,7 @@ void cmVisualStudio10TargetGenerator::Generate() this->GeneratorTarget->GetProperty("VS_GLOBAL_PROJECT_TYPES"); if (vsProjectTypes) { std::string tagName = "ProjectTypes"; - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { tagName = "ProjectTypeGuids"; } this->WriteString("", 2); @@ -465,7 +465,7 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteProjectConfigurationValues(); - if (vcxproj == this->ProjectType) { + if (this->ProjectType == vcxproj) { this->WriteString("\n", 1); } this->WriteString("\n", 1); @@ -568,7 +568,7 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString(import.c_str(), 2); } this->WriteString("\n", 1); - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { for (std::vector::const_iterator i = this->Configurations.begin(); i != this->Configurations.end(); ++i) { @@ -707,7 +707,7 @@ void cmVisualStudio10TargetGenerator::WriteEmbeddedResourceGroup() this->WriteString("ConvertToWindowsSlash(obj); bool useRelativePath = false; - if (csproj == this->ProjectType && this->InSourceBuild) { + if (this->ProjectType == csproj && this->InSourceBuild) { // If we do an in-source build and the resource file is in a // subdirectory // of the .csproj file, we have to use relative pathnames, otherwise @@ -720,7 +720,7 @@ void cmVisualStudio10TargetGenerator::WriteEmbeddedResourceGroup() } (*this->BuildFileStream) << obj << "\">\n"; - if (csproj != this->ProjectType) { + if (this->ProjectType != csproj) { this->WriteString("", 3); std::string hFileName = obj.substr(0, obj.find_last_of(".")) + ".h"; (*this->BuildFileStream) << hFileName << "\n"; @@ -830,7 +830,7 @@ void cmVisualStudio10TargetGenerator::WriteXamlFilesGroup() } this->WriteSource(xamlType, *oi, ">\n"); - if (csproj == this->ProjectType && !this->InSourceBuild) { + if (this->ProjectType == csproj && !this->InSourceBuild) { // add tag to written XAML source if necessary const std::string srcDir = this->Makefile->GetCurrentSourceDirectory(); const std::string binDir = this->Makefile->GetCurrentBinaryDirectory(); @@ -949,7 +949,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues() this->WritePlatformConfigTag("PropertyGroup", i->c_str(), 1, " Label=\"Configuration\"", "\n"); - if (csproj != this->ProjectType) { + if (this->ProjectType != csproj) { std::string configType = ""; if (const char* vsConfigurationType = this->GeneratorTarget->GetProperty("VS_CONFIGURATION_TYPE")) { @@ -1275,7 +1275,7 @@ void cmVisualStudio10TargetGenerator::ConvertToWindowsSlash(std::string& s) } void cmVisualStudio10TargetGenerator::WriteGroups() { - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { return; } @@ -1517,7 +1517,7 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) std::string copyToOutDir; std::string includeInVsix; std::string ext = cmSystemTools::LowerCase(sf->GetExtension()); - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { // EVERY extra source file must have a , otherwise it might not // be visible in Visual Studio at all. The path relative to current // source- or binary-dir is used within the link, if the file is @@ -2039,7 +2039,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( std::string xamlFileName = fileName.substr(0, fileName.find_last_of(".")); (*this->BuildFileStream) << xamlFileName << "\n"; } - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { std::string f = source->GetFullPath(); typedef std::map CsPropMap; CsPropMap sourceFileTags; @@ -2085,7 +2085,7 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions() if (ttype > cmStateEnums::GLOBAL_TARGET) { return; } - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { return; } @@ -2162,7 +2162,7 @@ void cmVisualStudio10TargetGenerator::OutputLinkIncremental( if (!this->MSTools) { return; } - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { return; } // static libraries and things greater than modules do not need @@ -2291,7 +2291,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( std::string defineFlags = this->GeneratorTarget->Target->GetMakefile()->GetDefineFlags(); if (this->MSTools) { - if (vcxproj == this->ProjectType) { + if (this->ProjectType == vcxproj) { clOptions.FixExceptionHandlingDefault(); clOptions.AddFlag("PrecompiledHeader", "NotUsing"); std::string asmLocation = configName + "/"; @@ -2348,7 +2348,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( } } - if (csproj != this->ProjectType && clOptions.IsManaged()) { + if (this->ProjectType != csproj && clOptions.IsManaged()) { this->Managed = true; std::string managedType = clOptions.GetFlag("CompileAsManaged"); if (managedType == "Safe") { @@ -2356,7 +2356,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( clOptions.AddFlag("CallingConvention", ""); } } - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { // /nowin32manifest overrides /win32manifest: parameter if (clOptions.HasFlag("NoWin32Manifest")) { clOptions.RemoveFlag("ApplicationManifest"); @@ -3280,7 +3280,7 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions( this->GeneratorTarget->GetType() > cmStateEnums::MODULE_LIBRARY) { return; } - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { return; } Options& linkOptions = *(this->LinkOptions[config]); @@ -3350,7 +3350,7 @@ void cmVisualStudio10TargetGenerator::WriteMidlOptions( if (!this->MSTools) { return; } - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { return; } @@ -3416,7 +3416,7 @@ void cmVisualStudio10TargetGenerator::WriteItemDefinitionGroups() // output midl flags this->WriteMidlOptions(*i, includes); // write events - if (csproj != this->ProjectType) { + if (this->ProjectType != csproj) { this->WriteEvents(*i); } // output link flags @@ -3482,7 +3482,7 @@ void cmVisualStudio10TargetGenerator::WriteEvent( script += cmVS10EscapeXML(lg->ConstructScript(ccg)); } comment = cmVS10EscapeComment(comment); - if (csproj != this->ProjectType) { + if (this->ProjectType != csproj) { this->WriteString("", 3); (*this->BuildFileStream) << cmVS10EscapeXML(comment) << "\n"; this->WriteString("", 3); @@ -3492,7 +3492,7 @@ void cmVisualStudio10TargetGenerator::WriteEvent( } } (*this->BuildFileStream) << script; - if (csproj != this->ProjectType) { + if (this->ProjectType != csproj) { (*this->BuildFileStream) << ""; } (*this->BuildFileStream) << "\n"; @@ -4332,7 +4332,7 @@ bool cmVisualStudio10TargetGenerator::ForceOld(const std::string& source) const void cmVisualStudio10TargetGenerator::GetCSharpSourceProperties( cmSourceFile const* sf, std::map& tags) { - if (csproj == this->ProjectType) { + if (this->ProjectType == csproj) { const cmPropertyMap& props = sf->GetProperties(); for (cmPropertyMap::const_iterator p = props.begin(); p != props.end(); ++p) { ----------------------------------------------------------------------- Summary of changes: Source/cmVisualStudio10TargetGenerator.cxx | 49 +++++++++++++++------------- 1 file changed, 26 insertions(+), 23 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Mon Jun 26 10:55:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Mon, 26 Jun 2017 10:55:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc4-4-gc24e665 Message-ID: <20170626145502.CA659FA9A0@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via c24e66561356af461245a59dda8f5161399d48a6 (commit) via 23451a66acc9762f27ab93cb4fe2192b2fb3fbfc (commit) via 319bd92589bdd884fd507a525cb131cb7b0aaab5 (commit) via 04b2fc08b44f7db5fe591b0ee244c5dfe9134d68 (commit) from 8fe54172fcb37e39e0f7e506e575bdd8c7171e8d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/Clang-FindBinUtils.cmake | 2 ++ Modules/Compiler/GNU-FindBinUtils.cmake | 2 ++ Modules/GetPrerequisites.cmake | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 27 00:05:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 27 Jun 2017 00:05:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc4-155-gb8858bd Message-ID: <20170627040508.E47DBFAD52@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via b8858bd4046958b94b11e794e2a9aab9124414a4 (commit) from 6c363f5cafe2bfeecd07887d9151e91042810e3f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8858bd4046958b94b11e794e2a9aab9124414a4 commit b8858bd4046958b94b11e794e2a9aab9124414a4 Author: Kitware Robot AuthorDate: Tue Jun 27 00:01:07 2017 -0400 Commit: Kitware Robot CommitDate: Tue Jun 27 00:01:07 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 8d4eeb6..b441e9a 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 9) -set(CMake_VERSION_PATCH 20170626) +set(CMake_VERSION_PATCH 20170627) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 27 09:25:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 27 Jun 2017 09:25:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc4-171-gb43d0fd Message-ID: <20170627132505.33050FAAE5@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via b43d0fd04b635a5de56d104d7dc1ab908b739c00 (commit) via 126effbb9c345ccea9823f81c5323e7de1a6402c (commit) via 4fd6507a528ab1a9858eee2914e8d5a2b92bffdb (commit) via 33d6145f873029577e3498b843b6ef5646c594b8 (commit) via 43c3afa74538fd7b78bcf534bfb3fa93c3c1f191 (commit) via dc11a20d7b308f15cc0080f6c14ea06d96dbc2c7 (commit) via fd771df773224560a60850647b898280a0ec84fa (commit) via 1d86103846d4e8557c3cc77d3c1f2dce9231663d (commit) via bbc1f3642cb86ce59908ee33eeb409d7921f73f8 (commit) via a3e442bbfc8374c90aec9836ee40aa35a43c1bc2 (commit) via e03a1b3b6185e36a5905db3d2551c9575fb074aa (commit) via 869904271ba0e8b855043894360b5dc7fe1e3b56 (commit) via 46d25e782ebd9b6c50771b6f30433c58fae03a51 (commit) via ec409a116fd58a541a7700df12dfdfc045f0df17 (commit) via dcdab5cf23b3777761d6c6dcaf0dfcefdd821792 (commit) via 0a8f469af921d64431ed237022a02d39cac3ebb5 (commit) from b8858bd4046958b94b11e794e2a9aab9124414a4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b43d0fd04b635a5de56d104d7dc1ab908b739c00 commit b43d0fd04b635a5de56d104d7dc1ab908b739c00 Merge: 126effb fd771df Author: Brad King AuthorDate: Tue Jun 27 09:23:18 2017 -0400 Commit: Brad King CommitDate: Tue Jun 27 09:23:18 2017 -0400 Merge branch 'release-3.9' https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=126effbb9c345ccea9823f81c5323e7de1a6402c commit 126effbb9c345ccea9823f81c5323e7de1a6402c Merge: 4fd6507 ec409a1 Author: Brad King AuthorDate: Tue Jun 27 13:21:17 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jun 27 09:21:38 2017 -0400 Merge topic 'vs_csharp_custom_command' ec409a11 Vs: fix CSharp custom command by introducing inline MSBuild s dcdab5cf Vs: factor out computation of tag for CSharp source files 0a8f469a Vs: refactor WriteCustomRule for preparation of CSharp support Acked-by: Kitware Robot Merge-request: !970 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4fd6507a528ab1a9858eee2914e8d5a2b92bffdb commit 4fd6507a528ab1a9858eee2914e8d5a2b92bffdb Merge: 33d6145 a3e442b Author: Brad King AuthorDate: Tue Jun 27 13:21:02 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jun 27 09:21:15 2017 -0400 Merge topic 'FindCUDA-no-empty-genex' a3e442bb FindCUDA: Fix CUDA_NVCC_FLAGS_ for separable compilation Acked-by: Kitware Robot Merge-request: !1008 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=33d6145f873029577e3498b843b6ef5646c594b8 commit 33d6145f873029577e3498b843b6ef5646c594b8 Merge: 43c3afa 46d25e7 Author: Brad King AuthorDate: Tue Jun 27 13:20:42 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jun 27 09:20:51 2017 -0400 Merge topic 'FindCUDA-no-find_host_program' 46d25e78 FindCUDA: Use find_program if find_host_program is not available Acked-by: Kitware Robot Merge-request: !1009 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=43c3afa74538fd7b78bcf534bfb3fa93c3c1f191 commit 43c3afa74538fd7b78bcf534bfb3fa93c3c1f191 Merge: dc11a20 e03a1b3 Author: Brad King AuthorDate: Tue Jun 27 13:20:28 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jun 27 09:20:32 2017 -0400 Merge topic 'fix-crash-on-non-enabled-language-features' e03a1b3b target_compile_features: Do not crash on non-enabled language 86990427 Tests: Enable languages explicitly in RunCMake.target_compile_features Acked-by: Kitware Robot Merge-request: !1010 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dc11a20d7b308f15cc0080f6c14ea06d96dbc2c7 commit dc11a20d7b308f15cc0080f6c14ea06d96dbc2c7 Merge: b8858bd bbc1f36 Author: Brad King AuthorDate: Tue Jun 27 13:18:26 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jun 27 09:18:34 2017 -0400 Merge topic 'vs-cuda-fix-flags' bbc1f364 VS: Fix support for nvcc flags not in our flag table Acked-by: Kitware Robot Merge-request: !1007 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a3e442bbfc8374c90aec9836ee40aa35a43c1bc2 commit a3e442bbfc8374c90aec9836ee40aa35a43c1bc2 Author: Robert Maynard AuthorDate: Mon Jun 26 10:41:03 2017 -0400 Commit: Brad King CommitDate: Mon Jun 26 14:59:05 2017 -0400 FindCUDA: Fix CUDA_NVCC_FLAGS_ for separable compilation Since commit v3.0.0-rc6~3^2 (FindCUDA: Use CUDA_NVCC_FLAGS* for separable compilation, 2014-05-18), using the feature for one configuration results in empty-string ("") arguments on the command line for other configurations. This is because the generator expression for a non-matching configuration evaluates to an empty string but does not remove the argument. Use `COMMAND_EXPAND_LISTS` to remove the empty arguments from the custom command after genex evaluation. Fixes: #16411 diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index a4dca54..7f1ff57 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -1698,6 +1698,7 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} -dlink ${object_files} -o ${output_file} ${flags} COMMENT "Building NVCC intermediate link file ${output_file_relative_path}" + COMMAND_EXPAND_LISTS ${_verbatim} ) else() @@ -1708,6 +1709,7 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options COMMAND ${CMAKE_COMMAND} -E echo "Building NVCC intermediate link file ${output_file_relative_path}" COMMAND ${CMAKE_COMMAND} -E make_directory "${output_file_dir}" COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} ${flags} -dlink ${object_files} -o "${output_file}" + COMMAND_EXPAND_LISTS ${_verbatim} ) endif() https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=46d25e782ebd9b6c50771b6f30433c58fae03a51 commit 46d25e782ebd9b6c50771b6f30433c58fae03a51 Author: Maxime Roussin-B?langer AuthorDate: Mon Jun 26 11:30:07 2017 -0400 Commit: Brad King CommitDate: Mon Jun 26 13:10:54 2017 -0400 FindCUDA: Use find_program if find_host_program is not available CMake does not define the `find_host_program` command we've been using in the cross-compiling code path. It was provided by a widely used Android toolchain file. For compatibility, continue to use `find_host_program` if available, but otherwise use just `find_program`. Fixes: #16509 diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index a4dca54..77ca351 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -679,7 +679,11 @@ if(CMAKE_CROSSCOMPILING) # add known CUDA targetr root path to the set of directories we search for programs, libraries and headers set( CMAKE_FIND_ROOT_PATH "${CUDA_TOOLKIT_TARGET_DIR};${CMAKE_FIND_ROOT_PATH}") macro( cuda_find_host_program ) - find_host_program( ${ARGN} ) + if (COMMAND find_host_program) + find_host_program( ${ARGN} ) + else() + find_program( ${ARGN} ) + endif() endmacro() else() # for non-cross-compile, find_host_program == find_program and CUDA_TOOLKIT_TARGET_DIR == CUDA_TOOLKIT_ROOT_DIR https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ec409a116fd58a541a7700df12dfdfc045f0df17 commit ec409a116fd58a541a7700df12dfdfc045f0df17 Author: Michael St?rmer AuthorDate: Thu Jun 22 21:40:48 2017 +0200 Commit: Michael St?rmer CommitDate: Thu Jun 22 21:40:48 2017 +0200 Vs: fix CSharp custom command by introducing inline MSBuild s The custom command implementation is based on the Microsoft support article: https://docs.microsoft.com/en-us/visualstudio/msbuild/how-to-extend-the-visual-studio-build-process Fixes: #16960 diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 9612c90..dbd4571 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -27,6 +27,12 @@ static std::string cmVS10EscapeXML(std::string arg) return arg; } +static std::string cmVS10EscapeQuotes(std::string arg) +{ + cmSystemTools::ReplaceString(arg, "\"", """); + return arg; +} + static std::string cmVS10EscapeComment(std::string comment) { // MSBuild takes the CDATA of a element and just @@ -578,6 +584,18 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteEvents(*i); this->WriteString("\n", 1); } + // make sure custom commands are executed before build (if necessary) + this->WriteString("\n", 1); + this->WriteString("\n", 2); + for (std::set::const_iterator i = + this->CSharpCustomCommandNames.begin(); + i != this->CSharpCustomCommandNames.end(); ++i) { + this->WriteString(i->c_str(), 3); + (*this->BuildFileStream) << ";\n"; + } + this->WriteString("$(BuildDependsOn)\n", 3); + this->WriteString("\n", 2); + this->WriteString("\n", 1); } this->WriteString("", 0); // The groups are stored in a separate file for VS 10 @@ -1151,6 +1169,7 @@ void cmVisualStudio10TargetGenerator::WriteNsightTegraConfigurationValues( void cmVisualStudio10TargetGenerator::WriteCustomCommands() { this->SourcesVisited.clear(); + this->CSharpCustomCommandNames.clear(); std::vector customCommands; this->GeneratorTarget->GetCustomCommands(customCommands, ""); for (std::vector::const_iterator si = @@ -1172,9 +1191,14 @@ void cmVisualStudio10TargetGenerator::WriteCustomCommand( } } if (cmCustomCommand const* command = sf->GetCustomCommand()) { - this->WriteString("\n", 1); + // C# projects write their within WriteCustomRule() + if (this->ProjectType != csproj) { + this->WriteString("\n", 1); + } this->WriteCustomRule(sf, *command); - this->WriteString("\n", 1); + if (this->ProjectType != csproj) { + this->WriteString("\n", 1); + } } } } @@ -1209,8 +1233,20 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule( } cmLocalVisualStudio7Generator* lg = this->LocalGenerator; - this->WriteSource("CustomBuild", source, ">\n"); - + if (this->ProjectType != csproj) { + this->WriteSource("CustomBuild", source, ">\n"); + } else { + this->WriteString("\n", 1); + std::string link; + this->GetCSharpSourceLink(source, link); + this->WriteSource("None", source, ">\n"); + if (!link.empty()) { + this->WriteString("", 3); + (*this->BuildFileStream) << link << "\n"; + } + this->WriteString("\n", 2); + this->WriteString("\n", 1); + } for (std::vector::const_iterator i = this->Configurations.begin(); i != this->Configurations.end(); ++i) { @@ -1240,9 +1276,25 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule( outputs << sep << cmVS10EscapeXML(out); sep = ";"; } - this->WriteCustomRuleCpp(*i, script, inputs.str(), outputs.str(), comment); + if (this->ProjectType == csproj) { + std::string name = "CustomCommand_" + *i + "_" + + cmSystemTools::ComputeStringMD5(sourcePath); + std::string inputs_s = inputs.str(); + std::string outputs_s = outputs.str(); + comment = cmVS10EscapeQuotes(comment); + script = cmVS10EscapeQuotes(script); + inputs_s = cmVS10EscapeQuotes(inputs_s); + outputs_s = cmVS10EscapeQuotes(outputs_s); + this->WriteCustomRuleCSharp(*i, name, script, inputs_s, outputs_s, + comment); + } else { + this->WriteCustomRuleCpp(*i, script, inputs.str(), outputs.str(), + comment); + } + } + if (this->ProjectType != csproj) { + this->WriteString("\n", 2); } - this->WriteString("\n", 2); } void cmVisualStudio10TargetGenerator::WriteCustomRuleCpp( @@ -1267,6 +1319,28 @@ void cmVisualStudio10TargetGenerator::WriteCustomRuleCpp( } } +void cmVisualStudio10TargetGenerator::WriteCustomRuleCSharp( + std::string const& config, std::string const& name, + std::string const& script, std::string const& inputs, + std::string const& outputs, std::string const& comment) +{ + this->CSharpCustomCommandNames.insert(name); + std::stringstream attributes; + attributes << "\n Name=\"" << name << "\""; + attributes << "\n Inputs=\"" << inputs << "\""; + attributes << "\n Outputs=\"" << outputs << "\""; + this->WritePlatformConfigTag("Target", config, 1, attributes.str().c_str(), + "\n"); + if (!comment.empty()) { + this->WriteString("BuildFileStream) << "echo " << cmVS10EscapeXML(comment) + << "\" />\n"; + } + this->WriteString("BuildFileStream) << script << "\" />\n"; + this->WriteString("\n", 1); +} + std::string cmVisualStudio10TargetGenerator::ConvertPath( std::string const& path, bool forceRelative) { diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 2518d5e..2d98994 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -131,6 +131,12 @@ private: std::string const& inputs, std::string const& outputs, std::string const& comment); + void WriteCustomRuleCSharp(std::string const& config, + std::string const& commandName, + std::string const& script, + std::string const& inputs, + std::string const& outputs, + std::string const& comment); void WriteCustomCommands(); void WriteCustomCommand(cmSourceFile const* sf); void WriteGroups(); @@ -198,6 +204,7 @@ private: cmGeneratedFileStream* BuildFileStream; cmLocalVisualStudio7Generator* LocalGenerator; std::set SourcesVisited; + std::set CSharpCustomCommandNames; bool IsMissingFiles; std::vector AddedFiles; std::string DefaultArtifactDir; diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 0369fa4..702ca17 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -376,3 +376,7 @@ if(CMake_TEST_ANDROID_NDK OR CMake_TEST_ANDROID_STANDALONE_TOOLCHAIN) endif() set_property(TEST RunCMake.Android PROPERTY TIMEOUT ${CMake_TEST_ANDROID_TIMEOUT}) endif() + +if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^89]|[89][0-9])") + add_RunCMake_test(CSharpCustomCommand) +endif() diff --git a/Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt b/Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt new file mode 100644 index 0000000..74b3ff8 --- /dev/null +++ b/Tests/RunCMake/CSharpCustomCommand/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.3) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CSharpCustomCommand/CommandWithOutput-check.cmake b/Tests/RunCMake/CSharpCustomCommand/CommandWithOutput-check.cmake new file mode 100644 index 0000000..60d77eb --- /dev/null +++ b/Tests/RunCMake/CSharpCustomCommand/CommandWithOutput-check.cmake @@ -0,0 +1,21 @@ +if(checkLevel EQUAL 0) + message("checking generation (${srcName} does not exist)") + if(EXISTS "${generatedFileName}") + set(RunCMake_TEST_FAILED "file \"${generatedFileName}\" should not exist") + endif() +elseif(checkLevel EQUAL 1) + message("checking build 1 (generate ${srcName})") + if(NOT "${actual_stdout}" MATCHES "${commandComment}") + set(RunCMake_TEST_FAILED "command not executed") + endif() +elseif(checkLevel EQUAL 2) + message("checking build 2 (no change in ${srcName}.in)") + if("${actual_stdout}" MATCHES "${commandComment}") + set(RunCMake_TEST_FAILED "command executed") + endif() +elseif(checkLevel EQUAL 3) + message("checking build 3 (update ${srcName})") + if(NOT "${actual_stdout}" MATCHES "${commandComment}") + set(RunCMake_TEST_FAILED "command not executed") + endif() +endif() diff --git a/Tests/RunCMake/CSharpCustomCommand/CommandWithOutput.cmake b/Tests/RunCMake/CSharpCustomCommand/CommandWithOutput.cmake new file mode 100644 index 0000000..68341fa --- /dev/null +++ b/Tests/RunCMake/CSharpCustomCommand/CommandWithOutput.cmake @@ -0,0 +1,13 @@ +enable_language(CSharp) + +add_executable(CSharpCustomCommand dummy.cs) + +add_custom_command(OUTPUT ${generatedFileName} + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${inputFileName} ${generatedFileName} + MAIN_DEPENDENCY ${inputFileName} + COMMENT "${commandComment}") + +target_sources(CSharpCustomCommand PRIVATE + ${inputFileName} + ${generatedFileName}) diff --git a/Tests/RunCMake/CSharpCustomCommand/RunCMakeTest.cmake b/Tests/RunCMake/CSharpCustomCommand/RunCMakeTest.cmake new file mode 100644 index 0000000..fa5618a --- /dev/null +++ b/Tests/RunCMake/CSharpCustomCommand/RunCMakeTest.cmake @@ -0,0 +1,34 @@ +include(RunCMake) + +# Use a single build tree for a few tests without cleaning. +set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CommandWithOutput-build) +set(RunCMake_TEST_NO_CLEAN 1) +file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") +file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") +set(RunCMake-check-file CommandWithOutput-check.cmake) + +set(srcName "test.cs") +set(srcFileName "${CMAKE_CURRENT_LIST_DIR}/${srcName}.in") +set(inputFileName "${RunCMake_TEST_BINARY_DIR}/${srcName}.in") +set(generatedFileName "${RunCMake_TEST_BINARY_DIR}/${srcName}") +set(commandComment "Generating ${srcName}") + +# copy the input file to build dir to avoid changing files in cmake +# source tree. +file(COPY "${srcFileName}" DESTINATION "${RunCMake_TEST_BINARY_DIR}") + +set(RunCMake_TEST_OPTIONS ${RunCMake_TEST_OPTIONS} + "-DinputFileName=${inputFileName}" + "-DgeneratedFileName=${generatedFileName}" + "-DcommandComment=${commandComment}") + +set(checkLevel 0) +run_cmake(CommandWithOutput) +set(checkLevel 1) +run_cmake_command(CommandWithOutput-build1 ${CMAKE_COMMAND} --build . --config Debug) +set(checkLevel 2) +run_cmake_command(CommandWithOutput-build2 ${CMAKE_COMMAND} --build . --config Debug) +# change file content to trigger custom command with next build +file(APPEND ${inputFileName} "\n") +set(checkLevel 3) +run_cmake_command(CommandWithOutput-build3 ${CMAKE_COMMAND} --build . --config Debug) diff --git a/Tests/RunCMake/CSharpCustomCommand/dummy.cs b/Tests/RunCMake/CSharpCustomCommand/dummy.cs new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/CSharpCustomCommand/test.cs.in b/Tests/RunCMake/CSharpCustomCommand/test.cs.in new file mode 100644 index 0000000..05a7531 --- /dev/null +++ b/Tests/RunCMake/CSharpCustomCommand/test.cs.in @@ -0,0 +1,8 @@ +class TestCs +{ + public static int Main(string[] args) + { + System.Console.WriteLine("Test C#"); + return 0; + } +} https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dcdab5cf23b3777761d6c6dcaf0dfcefdd821792 commit dcdab5cf23b3777761d6c6dcaf0dfcefdd821792 Author: Michael St?rmer AuthorDate: Sat Jun 17 09:32:19 2017 +0200 Commit: Michael St?rmer CommitDate: Thu Jun 22 21:39:37 2017 +0200 Vs: factor out computation of tag for CSharp source files diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index d163ddb..9612c90 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2056,14 +2056,10 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( typedef std::map CsPropMap; CsPropMap sourceFileTags; // set tag if necessary - if (!this->InSourceBuild) { - const std::string stripFromPath = - this->Makefile->GetCurrentSourceDirectory(); - if (f.find(stripFromPath) != std::string::npos) { - std::string link = f.substr(stripFromPath.length() + 1); - this->ConvertToWindowsSlash(link); - sourceFileTags["Link"] = link; - } + std::string link; + this->GetCSharpSourceLink(source, link); + if (!link.empty()) { + sourceFileTags["Link"] = link; } this->GetCSharpSourceProperties(&sf, sourceFileTags); // write source file specific tags @@ -4380,6 +4376,23 @@ void cmVisualStudio10TargetGenerator::WriteCSharpSourceProperties( } } +void cmVisualStudio10TargetGenerator::GetCSharpSourceLink( + cmSourceFile const* sf, std::string& link) +{ + std::string f = sf->GetFullPath(); + if (!this->InSourceBuild) { + const std::string stripFromPath = + this->Makefile->GetCurrentSourceDirectory(); + if (f.find(stripFromPath) != std::string::npos) { + link = f.substr(stripFromPath.length() + 1); + if (const char* l = sf->GetProperty("VS_CSHARP_Link")) { + link = l; + } + this->ConvertToWindowsSlash(link); + } + } +} + std::string cmVisualStudio10TargetGenerator::GetCMakeFilePath( const char* relativeFilePath) const { diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 007c6fa..2518d5e 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -162,6 +162,7 @@ private: std::map& tags); void WriteCSharpSourceProperties( const std::map& tags); + void GetCSharpSourceLink(cmSourceFile const* sf, std::string& link); private: typedef cmVisualStudioGeneratorOptions Options; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a8f469af921d64431ed237022a02d39cac3ebb5 commit 0a8f469af921d64431ed237022a02d39cac3ebb5 Author: Michael St?rmer AuthorDate: Thu Jun 15 14:30:29 2017 +0200 Commit: Michael St?rmer CommitDate: Thu Jun 22 16:52:37 2017 +0200 Vs: refactor WriteCustomRule for preparation of CSharp support diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 6d796be..d163ddb 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1218,43 +1218,55 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule( std::string comment = lg->ConstructComment(ccg); comment = cmVS10EscapeComment(comment); std::string script = cmVS10EscapeXML(lg->ConstructScript(ccg)); - this->WritePlatformConfigTag("Message", i->c_str(), 3); - (*this->BuildFileStream) << cmVS10EscapeXML(comment) << "\n"; - this->WritePlatformConfigTag("Command", i->c_str(), 3); - (*this->BuildFileStream) << script << "\n"; - this->WritePlatformConfigTag("AdditionalInputs", i->c_str(), 3); - - (*this->BuildFileStream) << cmVS10EscapeXML(source->GetFullPath()); + // input files for custom command + std::stringstream inputs; + inputs << cmVS10EscapeXML(source->GetFullPath()); for (std::vector::const_iterator d = ccg.GetDepends().begin(); d != ccg.GetDepends().end(); ++d) { std::string dep; if (this->LocalGenerator->GetRealDependency(d->c_str(), i->c_str(), dep)) { this->ConvertToWindowsSlash(dep); - (*this->BuildFileStream) << ";" << cmVS10EscapeXML(dep); + inputs << ";" << cmVS10EscapeXML(dep); } } - (*this->BuildFileStream) << ";%(AdditionalInputs)\n"; - this->WritePlatformConfigTag("Outputs", i->c_str(), 3); + // output files for custom command + std::stringstream outputs; const char* sep = ""; for (std::vector::const_iterator o = ccg.GetOutputs().begin(); o != ccg.GetOutputs().end(); ++o) { std::string out = *o; this->ConvertToWindowsSlash(out); - (*this->BuildFileStream) << sep << cmVS10EscapeXML(out); + outputs << sep << cmVS10EscapeXML(out); sep = ";"; } - (*this->BuildFileStream) << "\n"; - if (this->LocalGenerator->GetVersion() > - cmGlobalVisualStudioGenerator::VS10) { - // VS >= 11 let us turn off linking of custom command outputs. - this->WritePlatformConfigTag("LinkObjects", i->c_str(), 3); - (*this->BuildFileStream) << "false\n"; - } + this->WriteCustomRuleCpp(*i, script, inputs.str(), outputs.str(), comment); } this->WriteString("\n", 2); } +void cmVisualStudio10TargetGenerator::WriteCustomRuleCpp( + std::string const& config, std::string const& script, + std::string const& inputs, std::string const& outputs, + std::string const& comment) +{ + this->WritePlatformConfigTag("Message", config, 3); + (*this->BuildFileStream) << cmVS10EscapeXML(comment) << "\n"; + this->WritePlatformConfigTag("Command", config, 3); + (*this->BuildFileStream) << script << "\n"; + this->WritePlatformConfigTag("AdditionalInputs", config, 3); + (*this->BuildFileStream) << inputs; + (*this->BuildFileStream) << ";%(AdditionalInputs)\n"; + this->WritePlatformConfigTag("Outputs", config, 3); + (*this->BuildFileStream) << outputs << "\n"; + if (this->LocalGenerator->GetVersion() > + cmGlobalVisualStudioGenerator::VS10) { + // VS >= 11 let us turn off linking of custom command outputs. + this->WritePlatformConfigTag("LinkObjects", config, 3); + (*this->BuildFileStream) << "false\n"; + } +} + std::string cmVisualStudio10TargetGenerator::ConvertPath( std::string const& path, bool forceRelative) { diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 0852459..007c6fa 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -127,6 +127,10 @@ private: void OutputLinkIncremental(std::string const& configName); void WriteCustomRule(cmSourceFile const* source, cmCustomCommand const& command); + void WriteCustomRuleCpp(std::string const& config, std::string const& script, + std::string const& inputs, + std::string const& outputs, + std::string const& comment); void WriteCustomCommands(); void WriteCustomCommand(cmSourceFile const* sf); void WriteGroups(); ----------------------------------------------------------------------- Summary of changes: Modules/FindCUDA.cmake | 8 +- Source/cmMakefile.cxx | 21 ++- Source/cmVisualStudio10TargetGenerator.cxx | 165 ++++++++++++++++---- Source/cmVisualStudio10TargetGenerator.h | 12 ++ Tests/CudaOnly/SeparateCompilation/CMakeLists.txt | 5 + Tests/RunCMake/CMakeLists.txt | 4 + .../CMakeLists.txt | 0 .../CommandWithOutput-check.cmake | 21 +++ .../CSharpCustomCommand/CommandWithOutput.cmake | 13 ++ .../CSharpCustomCommand/RunCMakeTest.cmake | 34 ++++ .../RunCMake/CSharpCustomCommand/dummy.cs | 0 Tests/RunCMake/CSharpCustomCommand/test.cs.in | 8 + .../target_compile_features/CMakeLists.txt | 2 +- .../target_compile_features/RunCMakeTest.cmake | 1 + .../alias_target-stderr.txt | 2 +- .../target_compile_features/alias_target.cmake | 1 + .../cxx_not_enabled-result.txt} | 0 .../cxx_not_enabled-stderr.txt | 4 + .../target_compile_features/cxx_not_enabled.cmake | 2 + .../imported_target-stderr.txt | 2 +- .../target_compile_features/imported_target.cmake | 1 + .../invalid_args-stderr.txt | 2 +- .../target_compile_features/invalid_args.cmake | 1 + .../invalid_args_on_interface-stderr.txt | 2 +- .../invalid_args_on_interface.cmake | 1 + .../no_matching_c_feature-stderr.txt | 2 +- .../no_matching_c_feature.cmake | 1 + .../no_matching_cxx_feature-stderr.txt | 2 +- .../no_matching_cxx_feature.cmake | 1 + .../target_compile_features/no_target-stderr.txt | 2 +- .../target_compile_features/no_target.cmake | 1 + .../not_a_c_feature-stderr.txt | 2 +- .../target_compile_features/not_a_c_feature.cmake | 1 + .../not_a_cxx_feature-stderr.txt | 2 +- .../not_a_cxx_feature.cmake | 1 + .../not_enough_args-stderr.txt | 2 +- .../target_compile_features/not_enough_args.cmake | 1 + .../utility_target-stderr.txt | 2 +- 38 files changed, 284 insertions(+), 48 deletions(-) copy Tests/RunCMake/{BuildDepends => CSharpCustomCommand}/CMakeLists.txt (100%) create mode 100644 Tests/RunCMake/CSharpCustomCommand/CommandWithOutput-check.cmake create mode 100644 Tests/RunCMake/CSharpCustomCommand/CommandWithOutput.cmake create mode 100644 Tests/RunCMake/CSharpCustomCommand/RunCMakeTest.cmake copy Modules/IntelVSImplicitPath/hello.f => Tests/RunCMake/CSharpCustomCommand/dummy.cs (100%) create mode 100644 Tests/RunCMake/CSharpCustomCommand/test.cs.in copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => target_compile_features/cxx_not_enabled-result.txt} (100%) create mode 100644 Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt create mode 100644 Tests/RunCMake/target_compile_features/cxx_not_enabled.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 27 09:25:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 27 Jun 2017 09:25:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc4-9-gfd771df Message-ID: <20170627132505.94A97FAAED@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via fd771df773224560a60850647b898280a0ec84fa (commit) via 1d86103846d4e8557c3cc77d3c1f2dce9231663d (commit) via bbc1f3642cb86ce59908ee33eeb409d7921f73f8 (commit) via e03a1b3b6185e36a5905db3d2551c9575fb074aa (commit) via 869904271ba0e8b855043894360b5dc7fe1e3b56 (commit) from c24e66561356af461245a59dda8f5161399d48a6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/cmMakefile.cxx | 21 ++++++++++++++++++-- Source/cmVisualStudio10TargetGenerator.cxx | 6 +++--- Tests/CudaOnly/SeparateCompilation/CMakeLists.txt | 5 +++++ .../target_compile_features/CMakeLists.txt | 2 +- .../target_compile_features/RunCMakeTest.cmake | 1 + .../alias_target-stderr.txt | 2 +- .../target_compile_features/alias_target.cmake | 1 + .../cxx_not_enabled-result.txt} | 0 .../cxx_not_enabled-stderr.txt | 4 ++++ .../target_compile_features/cxx_not_enabled.cmake | 2 ++ .../imported_target-stderr.txt | 2 +- .../target_compile_features/imported_target.cmake | 1 + .../invalid_args-stderr.txt | 2 +- .../target_compile_features/invalid_args.cmake | 1 + .../invalid_args_on_interface-stderr.txt | 2 +- .../invalid_args_on_interface.cmake | 1 + .../no_matching_c_feature-stderr.txt | 2 +- .../no_matching_c_feature.cmake | 1 + .../no_matching_cxx_feature-stderr.txt | 2 +- .../no_matching_cxx_feature.cmake | 1 + .../target_compile_features/no_target-stderr.txt | 2 +- .../target_compile_features/no_target.cmake | 1 + .../not_a_c_feature-stderr.txt | 2 +- .../target_compile_features/not_a_c_feature.cmake | 1 + .../not_a_cxx_feature-stderr.txt | 2 +- .../not_a_cxx_feature.cmake | 1 + .../not_enough_args-stderr.txt | 2 +- .../target_compile_features/not_enough_args.cmake | 1 + .../utility_target-stderr.txt | 2 +- 29 files changed, 56 insertions(+), 17 deletions(-) copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => target_compile_features/cxx_not_enabled-result.txt} (100%) create mode 100644 Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt create mode 100644 Tests/RunCMake/target_compile_features/cxx_not_enabled.cmake hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 27 10:55:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 27 Jun 2017 10:55:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc4-173-gf7cc2cc Message-ID: <20170627145504.AA1EDFAA96@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via f7cc2cc2b693061c39ea6452935c67396da4b9e4 (commit) via d194bd915be3d99fda2d9e504655a78ee983f984 (commit) from b43d0fd04b635a5de56d104d7dc1ab908b739c00 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f7cc2cc2b693061c39ea6452935c67396da4b9e4 commit f7cc2cc2b693061c39ea6452935c67396da4b9e4 Merge: b43d0fd d194bd9 Author: Brad King AuthorDate: Tue Jun 27 14:54:16 2017 +0000 Commit: Kitware Robot CommitDate: Tue Jun 27 10:54:25 2017 -0400 Merge topic 'FindDoxygen-internal-var' d194bd91 FindDoxygen: Add private prefix to internal variables Acked-by: Kitware Robot Merge-request: !1012 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d194bd915be3d99fda2d9e504655a78ee983f984 commit d194bd915be3d99fda2d9e504655a78ee983f984 Author: Brad King AuthorDate: Tue Jun 27 08:38:15 2017 -0600 Commit: Brad King CommitDate: Tue Jun 27 10:45:45 2017 -0400 FindDoxygen: Add private prefix to internal variables Since commit v3.9.0-rc1~55^2 (Improve Doxygen support, 2017-04-10) we accidentally leave a non-prefixed internal `result` variable set. This may interfere with project code. Add a prefix to avoid this. diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake index 0d9e161..26d44b9 100644 --- a/Modules/FindDoxygen.cmake +++ b/Modules/FindDoxygen.cmake @@ -389,10 +389,10 @@ macro(_Doxygen_find_doxygen) COMMAND "${DOXYGEN_EXECUTABLE}" --version OUTPUT_VARIABLE DOXYGEN_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE - RESULT_VARIABLE result + RESULT_VARIABLE _Doxygen_version_result ) - if(result) - message(WARNING "Unable to determine doxygen version: ${result}") + if(_Doxygen_version_result) + message(WARNING "Unable to determine doxygen version: ${_Doxygen_version_result}") endif() # Create an imported target for Doxygen @@ -623,11 +623,11 @@ if(TARGET Doxygen::doxygen) execute_process( COMMAND "${DOXYGEN_EXECUTABLE}" -s -g "${_Doxygen_tpl}" OUTPUT_QUIET - RESULT_VARIABLE result + RESULT_VARIABLE _Doxygen_tpl_result ) - if(result) + if(_Doxygen_tpl_result) message(FATAL_ERROR - "Unable to generate Doxyfile template: ${result}") + "Unable to generate Doxyfile template: ${_Doxygen_tpl_result}") elseif(NOT EXISTS "${_Doxygen_tpl}") message(FATAL_ERROR "Doxygen has failed to generate a Doxyfile template") ----------------------------------------------------------------------- Summary of changes: Modules/FindDoxygen.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 27 11:05:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 27 Jun 2017 11:05:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc4-175-g4d62386 Message-ID: <20170627150510.550C0FACD7@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 4d623861c566a490a05245ef8ed88a761ac030cc (commit) via 7f1fd07b19fc43ab9bd1c41b9c518069a4da3b7d (commit) from f7cc2cc2b693061c39ea6452935c67396da4b9e4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d623861c566a490a05245ef8ed88a761ac030cc commit 4d623861c566a490a05245ef8ed88a761ac030cc Merge: f7cc2cc 7f1fd07 Author: Brad King AuthorDate: Tue Jun 27 10:59:03 2017 -0400 Commit: Brad King CommitDate: Tue Jun 27 10:59:03 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 27 11:05:10 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 27 Jun 2017 11:05:10 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc4-11-g7f1fd07 Message-ID: <20170627150510.6CCC2FAD29@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via 7f1fd07b19fc43ab9bd1c41b9c518069a4da3b7d (commit) via d194bd915be3d99fda2d9e504655a78ee983f984 (commit) from fd771df773224560a60850647b898280a0ec84fa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Modules/FindDoxygen.cmake | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 27 12:05:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 27 Jun 2017 12:05:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-165-g1e34b42 Message-ID: <20170627160505.5BD1FFAC02@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 1e34b42e7163b1f210b8a536b721af31fb059787 (commit) via 372de3f8039f69b3a2edcf7120083ec4097f8bd3 (commit) from 4d623861c566a490a05245ef8ed88a761ac030cc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1e34b42e7163b1f210b8a536b721af31fb059787 commit 1e34b42e7163b1f210b8a536b721af31fb059787 Merge: 4d62386 372de3f Author: Brad King AuthorDate: Tue Jun 27 11:57:54 2017 -0400 Commit: Brad King CommitDate: Tue Jun 27 11:57:54 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 27 12:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 27 Jun 2017 12:05:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc5 Message-ID: <20170627160505.F02D2FABEC@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via 372de3f8039f69b3a2edcf7120083ec4097f8bd3 (commit) from 7f1fd07b19fc43ab9bd1c41b9c518069a4da3b7d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Tue Jun 27 12:05:06 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Tue, 27 Jun 2017 12:05:06 -0400 (EDT) Subject: [Cmake-commits] CMake annotated tag, v3.9.0-rc5, created. v3.9.0-rc5 Message-ID: <20170627160506.E78B1FAC1B@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The annotated tag, v3.9.0-rc5 has been created at 1b4e85bc5475db2dfab9188f363042843d07974d (tag) tagging 372de3f8039f69b3a2edcf7120083ec4097f8bd3 (commit) replaces v3.9.0-rc4 tagged by Brad King on Tue Jun 27 11:56:08 2017 -0400 - Log ----------------------------------------------------------------- CMake 3.9.0-rc5 -----BEGIN PGP SIGNATURE----- iQJKBAABCAA0FiEExsJlMku+vcNQtRPQLSzvEDSSFoQFAllSgBgWHGJyYWQua2lu Z0BraXR3YXJlLmNvbQAKCRAtLO8QNJIWhLU8D/9L48kO10K76sZ6OW/IFBCDy5We cJ+FoL1g8HeFQms2XRQqOn4Js6DRsM5kUfKxvP7lJBNfqVlQYgXp4NvuAL714e1k Lvgy4wIY5mOz45Z+8/FGPzTZS102T7wq3g3AdHbJ1kxkgcq9569gyJhrQ6WRb9gE srD6FvMPppko/h/l/ozsHV0wcyRRqtTUUyLelEn94JRyxSpEz/NS3DytwxjUH0Hp fzdU77wwRoUitooIZg4noYS65ehpNWnD/degbuVo5l0/BDzTaTulKjTt/R+APhtn 4/jzQv698TYz0gBjca2G7CqGvV3AM9TCQUUjMiwiR+tdF61/daGg3gWY+twf3CTh qPJUxiduCCXUmq0REsf55yr94V20sYvaiGF/921SYxWrfPzW1yxV9K8coD71Kni9 aWeIloeyB7yKmtZZ9ajfGDHBqe1+M2F02SEd6eyMUSLEw26EQ0cmwlrjR19qNzyz ZLcGGeulbOLlgH98jNKwof2SXTrWRMTNZk4VM66JDbIwnaOrsNwwY+Eg1jf66/ZN LtpBnTKLClnP6ECn6Q3UMDIhHZpTMGMhoQ0z33wb9WYOKW/TTaN4aHgkzYBWVTMt JnQ0OIuLiEp2rpdfyHWp4Uf0kXVE0HoDeUrPnYNH0pWFgLvmBp8p0yfLgm7pSp6A h0d9aa8FUlTrRAxtWg== =33A3 -----END PGP SIGNATURE----- Brad King (12): GCC,Clang: Mark CMAKE__COMPILER_{AR,RANLIB} as advanced Merge branch 'toolchain-binutils-advanced' into release-3.9 GetPrerequisites: Do not warn about non-absolute UCRT system libraries Merge branch 'GetPrerequisites-ucrt-no-warn' into release-3.9 Tests: Enable languages explicitly in RunCMake.target_compile_features target_compile_features: Do not crash on non-enabled language VS: Fix support for nvcc flags not in our flag table Merge branch 'vs-cuda-fix-flags' into release-3.9 Merge branch 'fix-crash-on-non-enabled-language-features' into release-3.9 FindDoxygen: Add private prefix to internal variables Merge branch 'FindDoxygen-internal-var' into release-3.9 CMake 3.9.0-rc5 ----------------------------------------------------------------------- hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 28 00:05:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 28 Jun 2017 00:05:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-166-g9ab399b Message-ID: <20170628040503.A97F8FABC8@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 9ab399ba8226f167fa9af761c610f2390461adab (commit) from 1e34b42e7163b1f210b8a536b721af31fb059787 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9ab399ba8226f167fa9af761c610f2390461adab commit 9ab399ba8226f167fa9af761c610f2390461adab Author: Kitware Robot AuthorDate: Wed Jun 28 00:01:06 2017 -0400 Commit: Kitware Robot CommitDate: Wed Jun 28 00:01:06 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index b441e9a..4b2411d 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 9) -set(CMake_VERSION_PATCH 20170627) +set(CMake_VERSION_PATCH 20170628) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 28 08:45:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 28 Jun 2017 08:45:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-170-ga5ce7df Message-ID: <20170628124504.878B1F96D9@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via a5ce7df589b43f0f6cdea73f98dac26f753c9e53 (commit) via 132539af36b9e57444a45a107206ba6685042d16 (commit) via adbd1468cb2ede72c32ad96b7583f3a1f04b6926 (commit) via 63fc3bff4d60f9b0af974823ea4e057bf6e4c946 (commit) from 9ab399ba8226f167fa9af761c610f2390461adab (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a5ce7df589b43f0f6cdea73f98dac26f753c9e53 commit a5ce7df589b43f0f6cdea73f98dac26f753c9e53 Merge: 132539a 63fc3bf Author: Brad King AuthorDate: Wed Jun 28 12:40:33 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 28 08:40:37 2017 -0400 Merge topic 'docs_CheckXXXSourceYYY' 63fc3bff Check*Source{Compiles,Runs}: Rewrite docs for these modules Acked-by: Kitware Robot Merge-request: !1005 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=132539af36b9e57444a45a107206ba6685042d16 commit 132539af36b9e57444a45a107206ba6685042d16 Merge: 9ab399b adbd146 Author: Brad King AuthorDate: Wed Jun 28 12:39:28 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 28 08:39:37 2017 -0400 Merge topic 'document_CMAKE_MSVCIDE_RUN_PATH' adbd1468 Help: Document the CMAKE_MSVCIDE_RUN_PATH variable. Acked-by: Kitware Robot Merge-request: !1011 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=adbd1468cb2ede72c32ad96b7583f3a1f04b6926 commit adbd1468cb2ede72c32ad96b7583f3a1f04b6926 Author: Robert Maynard AuthorDate: Mon Jun 26 15:54:16 2017 -0400 Commit: Robert Maynard CommitDate: Tue Jun 27 13:52:11 2017 -0400 Help: Document the CMAKE_MSVCIDE_RUN_PATH variable. diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 1a2726d..ec8fedf 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -319,6 +319,7 @@ Variables that Control the Build /variable/CMAKE_MODULE_LINKER_FLAGS_CONFIG /variable/CMAKE_MODULE_LINKER_FLAGS_CONFIG_INIT /variable/CMAKE_MODULE_LINKER_FLAGS_INIT + /variable/CMAKE_MSVCIDE_RUN_PATH /variable/CMAKE_NINJA_OUTPUT_PATH_PREFIX /variable/CMAKE_NO_BUILTIN_CHRPATH /variable/CMAKE_NO_SYSTEM_FROM_IMPORTED diff --git a/Help/variable/CMAKE_MSVCIDE_RUN_PATH.rst b/Help/variable/CMAKE_MSVCIDE_RUN_PATH.rst new file mode 100644 index 0000000..22e727f --- /dev/null +++ b/Help/variable/CMAKE_MSVCIDE_RUN_PATH.rst @@ -0,0 +1,10 @@ +CMAKE_MSVCIDE_RUN_PATH +---------------------- + +Extra PATH locations that should be used when executing +:command:`add_custom_command` or :command:`add_custom_target` when using the +:generator:`Visual Studio 9 2008` (or above) generator. This allows +for running commands and using dll's that the IDE environment is not aware of. + +If not set explicitly the value is initialized by the ``CMAKE_MSVCIDE_RUN_PATH`` +environment variable, if set, and otherwise left empty. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=63fc3bff4d60f9b0af974823ea4e057bf6e4c946 commit 63fc3bff4d60f9b0af974823ea4e057bf6e4c946 Author: Craig Scott AuthorDate: Mon Jun 19 20:50:24 2017 +1000 Commit: Craig Scott CommitDate: Sat Jun 24 20:09:16 2017 +1000 Check*Source{Compiles,Runs}: Rewrite docs for these modules diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake index ac2c6c5..56e68d5 100644 --- a/Modules/CheckCSourceCompiles.cmake +++ b/Modules/CheckCSourceCompiles.cmake @@ -1,31 +1,65 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -#.rst: -# CheckCSourceCompiles -# -------------------- -# -# Check if given C source compiles and links into an executable -# -# CHECK_C_SOURCE_COMPILES( [FAIL_REGEX ]) -# -# :: -# -# - source code to try to compile, must define 'main' -# - variable to store whether the source code compiled -# Will be created as an internal cache variable. -# - fail if test output matches this regex -# -# The following variables may be set before calling this macro to modify -# the way the check is run: -# -# :: -# -# CMAKE_REQUIRED_FLAGS = string of compile command line flags -# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) -# CMAKE_REQUIRED_INCLUDES = list of include directories -# CMAKE_REQUIRED_LIBRARIES = list of libraries to link -# CMAKE_REQUIRED_QUIET = execute quietly without messages +#[=======================================================================[.rst: +CheckCSourceCompiles +-------------------- + +Check if given C source compiles and links into an executable. + +.. command:: check_c_source_compiles + + :: + + check_c_source_compiles(code resultVar [FAIL_REGEX regex1 [regex2...]]) + + Check that the source supplied in ``code`` can be compiled as a C source + file and linked as an executable (so it must contain at least a ``main()`` + function). The result will be stored in the internal cache variable specified + by ``resultVar``, with a boolean true value for success and boolean false for + failure. If ``FAIL_REGEX`` is provided, then failure is determined by + checking if anything in the output matches any of the specified regular + expressions. + + The underlying check is performed by the :command:`try_compile` command. The + compile and link commands can be influenced by setting any of the following + variables prior to calling ``check_c_source_compiles()``: + + ``CMAKE_REQUIRED_FLAGS`` + Additional flags to pass to the compiler. Note that the contents of + :variable:`CMAKE_C_FLAGS _FLAGS>` and its associated + configuration-specific variable are automatically added to the compiler + command before the contents of ``CMAKE_REQUIRED_FLAGS``. + + ``CMAKE_REQUIRED_DEFINITIONS`` + A :ref:`;-list ` of compiler definitions of the form + ``-DFOO`` or ``-DFOO=bar``. A definition for the name specified by + ``resultVar`` will also be added automatically. + + ``CMAKE_REQUIRED_INCLUDES`` + A :ref:`;-list ` of header search paths to pass to + the compiler. These will be the only header search paths used by + ``try_compile()``, i.e. the contents of the :prop_dir:`INCLUDE_DIRECTORIES` + directory property will be ignored. + + ``CMAKE_REQUIRED_LIBRARIES`` + A :ref:`;-list ` of libraries to add to the link + command. These can be the name of system libraries or they can be + :ref:`Imported Targets ` (see :command:`try_compile` for + further details). + + ``CMAKE_REQUIRED_QUIET`` + If this variable evaluates to a boolean true value, all status messages + associated with the check will be suppressed. + + The check is only performed once, with the result cached in the variable + named by ``resultVar``. Every subsequent CMake run will re-use this cached + value rather than performing the check again, even if the ``code`` changes. + In order to force the check to be re-evaluated, the variable named by + ``resultVar`` must be manually removed from the cache. + +#]=======================================================================] + macro(CHECK_C_SOURCE_COMPILES SOURCE VAR) if(NOT DEFINED "${VAR}") diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake index 70aa9fd..8da9f1e 100644 --- a/Modules/CheckCSourceRuns.cmake +++ b/Modules/CheckCSourceRuns.cmake @@ -1,31 +1,64 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -#.rst: -# CheckCSourceRuns -# ---------------- -# -# Check if the given C source code compiles and runs. -# -# CHECK_C_SOURCE_RUNS( ) -# -# :: -# -# - source code to try to compile -# - variable to store the result -# (1 for success, empty for failure) -# Will be created as an internal cache variable. -# -# The following variables may be set before calling this macro to modify -# the way the check is run: -# -# :: -# -# CMAKE_REQUIRED_FLAGS = string of compile command line flags -# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) -# CMAKE_REQUIRED_INCLUDES = list of include directories -# CMAKE_REQUIRED_LIBRARIES = list of libraries to link -# CMAKE_REQUIRED_QUIET = execute quietly without messages +#[=======================================================================[.rst: +CheckCSourceRuns +---------------- + +Check if given C source compiles and links into an executable and can +subsequently be run. + +.. command:: check_c_source_runs + + :: + + check_c_source_runs(code resultVar) + + Check that the source supplied in ``code`` can be compiled as a C source + file, linked as an executable and then run. The ``code`` must contain at + least a ``main()`` function. If the code could be built and run successfully, + the internal cache variable specified by ``resultVar`` will be set to 1, + otherwise it will be set to an value that evaluates to boolean false (e.g. + an empty string or an error message). + + The underlying check is performed by the :command:`try_run` command. The + compile and link commands can be influenced by setting any of the following + variables prior to calling ``check_c_source_runs()``: + + ``CMAKE_REQUIRED_FLAGS`` + Additional flags to pass to the compiler. Note that the contents of + :variable:`CMAKE_C_FLAGS _FLAGS>` and its associated + configuration-specific variable are automatically added to the compiler + command before the contents of ``CMAKE_REQUIRED_FLAGS``. + + ``CMAKE_REQUIRED_DEFINITIONS`` + A :ref:`;-list ` of compiler definitions of the form + ``-DFOO`` or ``-DFOO=bar``. A definition for the name specified by + ``resultVar`` will also be added automatically. + + ``CMAKE_REQUIRED_INCLUDES`` + A :ref:`;-list ` of header search paths to pass to + the compiler. These will be the only header search paths used by + ``try_run()``, i.e. the contents of the :prop_dir:`INCLUDE_DIRECTORIES` + directory property will be ignored. + + ``CMAKE_REQUIRED_LIBRARIES`` + A :ref:`;-list ` of libraries to add to the link + command. These can be the name of system libraries or they can be + :ref:`Imported Targets ` (see :command:`try_run` for + further details). + + ``CMAKE_REQUIRED_QUIET`` + If this variable evaluates to a boolean true value, all status messages + associated with the check will be suppressed. + + The check is only performed once, with the result cached in the variable + named by ``resultVar``. Every subsequent CMake run will re-use this cached + value rather than performing the check again, even if the ``code`` changes. + In order to force the check to be re-evaluated, the variable named by + ``resultVar`` must be manually removed from the cache. + +#]=======================================================================] macro(CHECK_C_SOURCE_RUNS SOURCE VAR) if(NOT DEFINED "${VAR}") diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake index e54d09e..4634a7b 100644 --- a/Modules/CheckCXXSourceCompiles.cmake +++ b/Modules/CheckCXXSourceCompiles.cmake @@ -1,31 +1,64 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -#.rst: -# CheckCXXSourceCompiles -# ---------------------- -# -# Check if given C++ source compiles and links into an executable -# -# CHECK_CXX_SOURCE_COMPILES( [FAIL_REGEX ]) -# -# :: -# -# - source code to try to compile, must define 'main' -# - variable to store whether the source code compiled -# Will be created as an internal cache variable. -# - fail if test output matches this regex -# -# The following variables may be set before calling this macro to modify -# the way the check is run: -# -# :: -# -# CMAKE_REQUIRED_FLAGS = string of compile command line flags -# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) -# CMAKE_REQUIRED_INCLUDES = list of include directories -# CMAKE_REQUIRED_LIBRARIES = list of libraries to link -# CMAKE_REQUIRED_QUIET = execute quietly without messages +#[=======================================================================[.rst: +CheckCXXSourceCompiles +---------------------- + +Check if given C++ source compiles and links into an executable. + +.. command:: check_cxx_source_compiles + + :: + + check_cxx_source_compiles(code resultVar [FAIL_REGEX regex1 [regex2...]]) + + Check that the source supplied in ``code`` can be compiled as a C++ source + file and linked as an executable (so it must contain at least a ``main()`` + function). The result will be stored in the internal cache variable specified + by ``resultVar``, with a boolean true value for success and boolean false for + failure. If ``FAIL_REGEX`` is provided, then failure is determined by + checking if anything in the output matches any of the specified regular + expressions. + + The underlying check is performed by the :command:`try_compile` command. The + compile and link commands can be influenced by setting any of the following + variables prior to calling ``check_cxx_source_compiles()``: + + ``CMAKE_REQUIRED_FLAGS`` + Additional flags to pass to the compiler. Note that the contents of + :variable:`CMAKE_CXX_FLAGS _FLAGS>` and its associated + configuration-specific variable are automatically added to the compiler + command before the contents of ``CMAKE_REQUIRED_FLAGS``. + + ``CMAKE_REQUIRED_DEFINITIONS`` + A :ref:`;-list ` of compiler definitions of the form + ``-DFOO`` or ``-DFOO=bar``. A definition for the name specified by + ``resultVar`` will also be added automatically. + + ``CMAKE_REQUIRED_INCLUDES`` + A :ref:`;-list ` of header search paths to pass to + the compiler. These will be the only header search paths used by + ``try_compile()``, i.e. the contents of the :prop_dir:`INCLUDE_DIRECTORIES` + directory property will be ignored. + + ``CMAKE_REQUIRED_LIBRARIES`` + A :ref:`;-list ` of libraries to add to the link + command. These can be the name of system libraries or they can be + :ref:`Imported Targets ` (see :command:`try_compile` for + further details). + + ``CMAKE_REQUIRED_QUIET`` + If this variable evaluates to a boolean true value, all status messages + associated with the check will be suppressed. + + The check is only performed once, with the result cached in the variable + named by ``resultVar``. Every subsequent CMake run will re-use this cached + value rather than performing the check again, even if the ``code`` changes. + In order to force the check to be re-evaluated, the variable named by + ``resultVar`` must be manually removed from the cache. + +#]=======================================================================] macro(CHECK_CXX_SOURCE_COMPILES SOURCE VAR) if(NOT DEFINED "${VAR}") diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake index e083659..558708c 100644 --- a/Modules/CheckCXXSourceRuns.cmake +++ b/Modules/CheckCXXSourceRuns.cmake @@ -1,31 +1,64 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -#.rst: -# CheckCXXSourceRuns -# ------------------ -# -# Check if the given C++ source code compiles and runs. -# -# CHECK_CXX_SOURCE_RUNS( ) -# -# :: -# -# - source code to try to compile -# - variable to store the result -# (1 for success, empty for failure) -# Will be created as an internal cache variable. -# -# The following variables may be set before calling this macro to modify -# the way the check is run: -# -# :: -# -# CMAKE_REQUIRED_FLAGS = string of compile command line flags -# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) -# CMAKE_REQUIRED_INCLUDES = list of include directories -# CMAKE_REQUIRED_LIBRARIES = list of libraries to link -# CMAKE_REQUIRED_QUIET = execute quietly without messages +#[=======================================================================[.rst: +CheckCXXSourceRuns +------------------ + +Check if given C++ source compiles and links into an executable and can +subsequently be run. + +.. command:: check_cxx_source_runs + + :: + + check_cxx_source_runs(code resultVar) + + Check that the source supplied in ``code`` can be compiled as a C++ source + file, linked as an executable and then run. The ``code`` must contain at + least a ``main()`` function. If the code could be built and run successfully, + the internal cache variable specified by ``resultVar`` will be set to 1, + otherwise it will be set to an value that evaluates to boolean false (e.g. + an empty string or an error message). + + The underlying check is performed by the :command:`try_run` command. The + compile and link commands can be influenced by setting any of the following + variables prior to calling ``check_cxx_source_runs()``: + + ``CMAKE_REQUIRED_FLAGS`` + Additional flags to pass to the compiler. Note that the contents of + :variable:`CMAKE_CXX_FLAGS _FLAGS>` and its associated + configuration-specific variable are automatically added to the compiler + command before the contents of ``CMAKE_REQUIRED_FLAGS``. + + ``CMAKE_REQUIRED_DEFINITIONS`` + A :ref:`;-list ` of compiler definitions of the form + ``-DFOO`` or ``-DFOO=bar``. A definition for the name specified by + ``resultVar`` will also be added automatically. + + ``CMAKE_REQUIRED_INCLUDES`` + A :ref:`;-list ` of header search paths to pass to + the compiler. These will be the only header search paths used by + ``try_run()``, i.e. the contents of the :prop_dir:`INCLUDE_DIRECTORIES` + directory property will be ignored. + + ``CMAKE_REQUIRED_LIBRARIES`` + A :ref:`;-list ` of libraries to add to the link + command. These can be the name of system libraries or they can be + :ref:`Imported Targets ` (see :command:`try_run` for + further details). + + ``CMAKE_REQUIRED_QUIET`` + If this variable evaluates to a boolean true value, all status messages + associated with the check will be suppressed. + + The check is only performed once, with the result cached in the variable + named by ``resultVar``. Every subsequent CMake run will re-use this cached + value rather than performing the check again, even if the ``code`` changes. + In order to force the check to be re-evaluated, the variable named by + ``resultVar`` must be manually removed from the cache. + +#]=======================================================================] macro(CHECK_CXX_SOURCE_RUNS SOURCE VAR) if(NOT DEFINED "${VAR}") diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake index c42254c..4df17e3 100644 --- a/Modules/CheckFortranSourceCompiles.cmake +++ b/Modules/CheckFortranSourceCompiles.cmake @@ -1,35 +1,71 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -#.rst: -# CheckFortranSourceCompiles -# -------------------------- -# -# Check if given Fortran source compiles and links into an executable:: -# -# CHECK_Fortran_SOURCE_COMPILES( [FAIL_REGEX ] -# [SRC_EXT ]) -# -# The arguments are: -# -# ```` -# Source code to try to compile. It must define a PROGRAM entry point. -# ```` -# Variable to store whether the source code compiled. -# Will be created as an internal cache variable. -# ``FAIL_REGEX `` -# Fail if test output matches this regex. -# ``SRC_EXT `` -# Use source extension ``.`` instead of the default ``.F``. -# -# The following variables may be set before calling this macro to modify -# the way the check is run:: -# -# CMAKE_REQUIRED_FLAGS = string of compile command line flags -# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) -# CMAKE_REQUIRED_INCLUDES = list of include directories -# CMAKE_REQUIRED_LIBRARIES = list of libraries to link -# CMAKE_REQUIRED_QUIET = execute quietly without messages +#[=======================================================================[.rst: +CheckFortranSourceCompiles +-------------------------- + +Check if given Fortran source compiles and links into an executable. + +.. command:: check_fortran_source_compiles + + :: + + check_fortran_source_compiles(code resultVar + [FAIL_REGEX regex1 [regex2...]] + [SRC_EXT ext] + ) + + Check that the source supplied in ``code`` can be compiled as a Fortran + source file and linked as an executable (so it must contain at least a + ``PROGRAM`` entry point). The result will be stored in the internal cache + variable specified by ``resultVar``, with a boolean true value for success + and boolean false for failure. If ``FAIL_REGEX`` is provided, then failure is + determined by checking if anything in the output matches any of the specified + regular expressions. + + By default, the test source file will be given a ``.F`` file extension. The + ``SRC_EXT`` option can be used to override this with ``.ext`` instead. + + The underlying check is performed by the :command:`try_compile` command. The + compile and link commands can be influenced by setting any of the following + variables prior to calling ``check_fortran_source_compiles()``: + + ``CMAKE_REQUIRED_FLAGS`` + Additional flags to pass to the compiler. Note that the contents of + :variable:`CMAKE_Fortran_FLAGS _FLAGS>` and its associated + configuration-specific variable are automatically added to the compiler + command before the contents of ``CMAKE_REQUIRED_FLAGS``. + + ``CMAKE_REQUIRED_DEFINITIONS`` + A :ref:`;-list ` of compiler definitions of the form + ``-DFOO`` or ``-DFOO=bar``. A definition for the name specified by + ``resultVar`` will also be added automatically. + + ``CMAKE_REQUIRED_INCLUDES`` + A :ref:`;-list ` of header search paths to pass to + the compiler. These will be the only header search paths used by + ``try_compile()``, i.e. the contents of the :prop_dir:`INCLUDE_DIRECTORIES` + directory property will be ignored. + + ``CMAKE_REQUIRED_LIBRARIES`` + A :ref:`;-list ` of libraries to add to the link + command. These can be the name of system libraries or they can be + :ref:`Imported Targets ` (see :command:`try_compile` for + further details). + + ``CMAKE_REQUIRED_QUIET`` + If this variable evaluates to a boolean true value, all status messages + associated with the check will be suppressed. + + The check is only performed once, with the result cached in the variable + named by ``resultVar``. Every subsequent CMake run will re-use this cached + value rather than performing the check again, even if the ``code`` changes. + In order to force the check to be re-evaluated, the variable named by + ``resultVar`` must be manually removed from the cache. + +#]=======================================================================] + macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR) if(NOT DEFINED "${VAR}") ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-variables.7.rst | 1 + Help/variable/CMAKE_MSVCIDE_RUN_PATH.rst | 10 ++++ Modules/CheckCSourceCompiles.cmake | 84 ++++++++++++++++++-------- Modules/CheckCSourceRuns.cmake | 83 ++++++++++++++++++-------- Modules/CheckCXXSourceCompiles.cmake | 83 ++++++++++++++++++-------- Modules/CheckCXXSourceRuns.cmake | 83 ++++++++++++++++++-------- Modules/CheckFortranSourceCompiles.cmake | 94 +++++++++++++++++++++--------- 7 files changed, 309 insertions(+), 129 deletions(-) create mode 100644 Help/variable/CMAKE_MSVCIDE_RUN_PATH.rst hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 28 08:55:08 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 28 Jun 2017 08:55:08 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-179-g0552747 Message-ID: <20170628125508.5FF86FA78F@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 0552747b58799afd6cb23db1cc5296a605cfde18 (commit) via 45ca0403ac11a78550997a38d9d55a06439220c9 (commit) via b425ef07ff271948c5862eeed0746c45385e45a4 (commit) via e7936751ee8e0ade7810df97434c985552cf8a7c (commit) via 5801751709974f873bc668d06b4020e92efe8cec (commit) via c96f43b7dd1d41379fe63b4e8b508b2b034520b6 (commit) via 80f1221f5088bb7ea7864a819c36d03e96f21155 (commit) via 85b52a04bd225d04f54cabccc4cbd10f788c1bf0 (commit) via d44bd1c25f3a1cba977eee5a6b2f5bd14c46c73d (commit) from a5ce7df589b43f0f6cdea73f98dac26f753c9e53 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0552747b58799afd6cb23db1cc5296a605cfde18 commit 0552747b58799afd6cb23db1cc5296a605cfde18 Merge: 45ca040 c96f43b Author: Brad King AuthorDate: Wed Jun 28 12:53:21 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 28 08:53:30 2017 -0400 Merge topic 'feature/include_guard' c96f43b7 include_guard: add tests for the feature 80f1221f include_guard: add doc pages and a release note 85b52a04 include_guard: add vim syntax highlighting rules d44bd1c2 include_guard: implement new command Acked-by: Kitware Robot Reviewed-by: Craig Scott Merge-request: !928 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=45ca0403ac11a78550997a38d9d55a06439220c9 commit 45ca0403ac11a78550997a38d9d55a06439220c9 Merge: b425ef0 5801751 Author: Brad King AuthorDate: Wed Jun 28 12:46:00 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 28 08:46:07 2017 -0400 Merge topic 'fix-windows-ninja-solink' 58017517 Ninja: Fix generated command lines for cmake_symlink_* on Windows Acked-by: Kitware Robot Merge-request: !1003 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b425ef07ff271948c5862eeed0746c45385e45a4 commit b425ef07ff271948c5862eeed0746c45385e45a4 Merge: a5ce7df e793675 Author: Brad King AuthorDate: Wed Jun 28 12:45:05 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 28 08:45:08 2017 -0400 Merge topic 'curl-haiku' e7936751 curl: Fix build on Haiku Acked-by: Kitware Robot Merge-request: !1006 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7936751ee8e0ade7810df97434c985552cf8a7c commit e7936751ee8e0ade7810df97434c985552cf8a7c Author: J?r?me Duval AuthorDate: Mon Jun 26 07:26:03 2017 -0400 Commit: Brad King CommitDate: Wed Jun 28 08:41:49 2017 -0400 curl: Fix build on Haiku On Haiku the network functions are in libnetwork, so use it when it exists. diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt index 45ae3de..d85f366 100644 --- a/Utilities/cmcurl/CMakeLists.txt +++ b/Utilities/cmcurl/CMakeLists.txt @@ -929,6 +929,8 @@ if(HAVE_LIBWS2_32) set(CMAKE_REQUIRED_LIBRARIES ws2_32) elseif(HAVE_LIBSOCKET) set(CMAKE_REQUIRED_LIBRARIES socket) +elseif(HAVE_LIBNETWORK) + set(CMAKE_REQUIRED_LIBRARIES network) endif() check_symbol_exists(basename "${CURL_INCLUDES}" HAVE_BASENAME) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5801751709974f873bc668d06b4020e92efe8cec commit 5801751709974f873bc668d06b4020e92efe8cec Author: Nils Gladitz AuthorDate: Fri Jun 23 10:58:39 2017 +0200 Commit: Nils Gladitz CommitDate: Fri Jun 23 10:58:39 2017 +0200 Ninja: Fix generated command lines for cmake_symlink_* on Windows CMake generates multiple commands cojoined with &&. On Windows this only works when executing the commands through the Windows shell. diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index 14a4ef8..1e0bf8d 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -409,10 +409,14 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) this->GetLocalGenerator()->ConvertToOutputFormat( cmSystemTools::GetCMakeCommand(), cmOutputConverter::SHELL); if (targetType == cmStateEnums::EXECUTABLE) { + std::vector commandLines; + commandLines.push_back(cmakeCommand + + " -E cmake_symlink_executable $in $out"); + commandLines.push_back("$POST_BUILD"); + this->GetGlobalGenerator()->AddRule( "CMAKE_SYMLINK_EXECUTABLE", - cmakeCommand + " -E cmake_symlink_executable" - " $in $out && $POST_BUILD", + this->GetLocalGenerator()->BuildCommandLine(commandLines), "Creating executable symlink $out", "Rule for creating " "executable symlink.", /*depfile*/ "", @@ -422,10 +426,14 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile) /*restat*/ "", /*generator*/ false); } else { + std::vector commandLines; + commandLines.push_back(cmakeCommand + + " -E cmake_symlink_library $in $SONAME $out"); + commandLines.push_back("$POST_BUILD"); + this->GetGlobalGenerator()->AddRule( "CMAKE_SYMLINK_LIBRARY", - cmakeCommand + " -E cmake_symlink_library" - " $in $SONAME $out && $POST_BUILD", + this->GetLocalGenerator()->BuildCommandLine(commandLines), "Creating library symlink $out", "Rule for creating " "library symlink.", /*depfile*/ "", https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c96f43b7dd1d41379fe63b4e8b508b2b034520b6 commit c96f43b7dd1d41379fe63b4e8b508b2b034520b6 Author: Pavel Solodovnikov AuthorDate: Thu Jun 22 11:13:26 2017 +0300 Commit: Pavel Solodovnikov CommitDate: Thu Jun 22 11:13:26 2017 +0300 include_guard: add tests for the feature diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 0369fa4..978e553 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -215,6 +215,7 @@ add_RunCMake_test(get_property) add_RunCMake_test(if) add_RunCMake_test(include) add_RunCMake_test(include_directories) +add_RunCMake_test(include_guard) add_RunCMake_test(list) add_RunCMake_test(message) add_RunCMake_test(project -DCMake_TEST_RESOURCES=${CMake_TEST_RESOURCES}) diff --git a/Tests/RunCMake/include_guard/CMakeLists.txt b/Tests/RunCMake/include_guard/CMakeLists.txt new file mode 100644 index 0000000..d3137f6 --- /dev/null +++ b/Tests/RunCMake/include_guard/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.9) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/include_guard/DirectoryScope.cmake b/Tests/RunCMake/include_guard/DirectoryScope.cmake new file mode 100644 index 0000000..d6c5a3c --- /dev/null +++ b/Tests/RunCMake/include_guard/DirectoryScope.cmake @@ -0,0 +1,19 @@ +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/Scripts") + +# Test include_guard with DIRECTORY scope + +# Add subdirectory which includes DirScript three times: +# 1. Include at inner function scope +# 2. At directory scope +# 3. At another subdirectory to check that the guard is checked +# against parent directories +add_subdirectory(sub_dir_script1) +# Add another directory which includes DirScript +add_subdirectory(sub_dir_script2) + +# check inclusions count +get_property(dir_count GLOBAL PROPERTY DIR_SCRIPT_COUNT) +if(NOT dir_count EQUAL 2) + message(FATAL_ERROR + "Wrong DIR_SCRIPT_COUNT value: ${dir_count}, expected: 2") +endif() diff --git a/Tests/RunCMake/include_guard/GlobalScope.cmake b/Tests/RunCMake/include_guard/GlobalScope.cmake new file mode 100644 index 0000000..02137fa --- /dev/null +++ b/Tests/RunCMake/include_guard/GlobalScope.cmake @@ -0,0 +1,11 @@ +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/Scripts") + +# Test GLOBAL include guard +add_subdirectory(global_script_dir) +include(GlobScript) + +get_property(glob_count GLOBAL PROPERTY GLOB_SCRIPT_COUNT) +if(NOT glob_count EQUAL 1) + message(FATAL_ERROR + "Wrong GLOB_SCRIPT_COUNT value: ${glob_count}, expected: 1") +endif() diff --git a/Tests/RunCMake/include_guard/InvalidArgumentsNumber-result.txt b/Tests/RunCMake/include_guard/InvalidArgumentsNumber-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/include_guard/InvalidArgumentsNumber-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/include_guard/InvalidArgumentsNumber-stderr.txt b/Tests/RunCMake/include_guard/InvalidArgumentsNumber-stderr.txt new file mode 100644 index 0000000..cdd33ac --- /dev/null +++ b/Tests/RunCMake/include_guard/InvalidArgumentsNumber-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at InvalidArgumentsNumber.cmake:1 \(include_guard\): + include_guard given an invalid number of arguments. The command takes at + most 1 argument. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/include_guard/InvalidArgumentsNumber.cmake b/Tests/RunCMake/include_guard/InvalidArgumentsNumber.cmake new file mode 100644 index 0000000..a63a395 --- /dev/null +++ b/Tests/RunCMake/include_guard/InvalidArgumentsNumber.cmake @@ -0,0 +1 @@ +include_guard(ARG1 ARG2) diff --git a/Tests/RunCMake/include_guard/InvalidScope-result.txt b/Tests/RunCMake/include_guard/InvalidScope-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/include_guard/InvalidScope-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/include_guard/InvalidScope-stderr.txt b/Tests/RunCMake/include_guard/InvalidScope-stderr.txt new file mode 100644 index 0000000..456709d --- /dev/null +++ b/Tests/RunCMake/include_guard/InvalidScope-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at InvalidScope.cmake:1 \(include_guard\): + include_guard given an invalid scope: INVALID +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/include_guard/InvalidScope.cmake b/Tests/RunCMake/include_guard/InvalidScope.cmake new file mode 100644 index 0000000..f69f9fd --- /dev/null +++ b/Tests/RunCMake/include_guard/InvalidScope.cmake @@ -0,0 +1 @@ +include_guard(INVALID) diff --git a/Tests/RunCMake/include_guard/RunCMakeTest.cmake b/Tests/RunCMake/include_guard/RunCMakeTest.cmake new file mode 100644 index 0000000..e87bddd --- /dev/null +++ b/Tests/RunCMake/include_guard/RunCMakeTest.cmake @@ -0,0 +1,7 @@ +include(RunCMake) + +run_cmake(VariableScope) +run_cmake(DirectoryScope) +run_cmake(GlobalScope) +run_cmake(InvalidScope) +run_cmake(InvalidArgumentsNumber) diff --git a/Tests/RunCMake/include_guard/Scripts/DirScript.cmake b/Tests/RunCMake/include_guard/Scripts/DirScript.cmake new file mode 100644 index 0000000..e61d180 --- /dev/null +++ b/Tests/RunCMake/include_guard/Scripts/DirScript.cmake @@ -0,0 +1,12 @@ +include_guard(DIRECTORY) + +set(prop_name DIR_SCRIPT_COUNT) +get_property(count_is_set GLOBAL PROPERTY ${prop_name} SET) + +if(NOT count_is_set) + set_property(GLOBAL PROPERTY ${prop_name} 1) +else() + get_property(count GLOBAL PROPERTY ${prop_name}) + math(EXPR count "${count} + 1") + set_property(GLOBAL PROPERTY ${prop_name} ${count}) +endif() diff --git a/Tests/RunCMake/include_guard/Scripts/GlobScript.cmake b/Tests/RunCMake/include_guard/Scripts/GlobScript.cmake new file mode 100644 index 0000000..c26bf40 --- /dev/null +++ b/Tests/RunCMake/include_guard/Scripts/GlobScript.cmake @@ -0,0 +1,12 @@ +include_guard(GLOBAL) + +set(prop_name GLOB_SCRIPT_COUNT) +get_property(count_is_set GLOBAL PROPERTY ${prop_name} SET) + +if(NOT count_is_set) + set_property(GLOBAL PROPERTY ${prop_name} 1) +else() + get_property(count GLOBAL PROPERTY ${prop_name}) + math(EXPR count "${count} + 1") + set_property(GLOBAL PROPERTY ${prop_name} ${count}) +endif() diff --git a/Tests/RunCMake/include_guard/Scripts/VarScript.cmake b/Tests/RunCMake/include_guard/Scripts/VarScript.cmake new file mode 100644 index 0000000..3080377 --- /dev/null +++ b/Tests/RunCMake/include_guard/Scripts/VarScript.cmake @@ -0,0 +1,12 @@ +include_guard() + +set(prop_name VAR_SCRIPT_COUNT) +get_property(count_is_set GLOBAL PROPERTY ${prop_name} SET) + +if(NOT count_is_set) + set_property(GLOBAL PROPERTY ${prop_name} 1) +else() + get_property(count GLOBAL PROPERTY ${prop_name}) + math(EXPR count "${count} + 1") + set_property(GLOBAL PROPERTY ${prop_name} ${count}) +endif() diff --git a/Tests/RunCMake/include_guard/VariableScope.cmake b/Tests/RunCMake/include_guard/VariableScope.cmake new file mode 100644 index 0000000..7f8477d --- /dev/null +++ b/Tests/RunCMake/include_guard/VariableScope.cmake @@ -0,0 +1,24 @@ +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/Scripts") + +# Test include_guard with VARIABLE scope +function(var_include_func) + # Include twice in the same scope + include(VarScript) + include(VarScript) + get_property(var_count GLOBAL PROPERTY VAR_SCRIPT_COUNT) + if(NOT var_count EQUAL 1) + message(FATAL_ERROR + "Wrong VAR_SCRIPT_COUNT value: ${var_count}, expected: 1") + endif() +endfunction() + +var_include_func() + +# Check again that include_guard has been reset +include(VarScript) + +get_property(var_count GLOBAL PROPERTY VAR_SCRIPT_COUNT) +if(NOT var_count EQUAL 2) + message(FATAL_ERROR + "Wrong VAR_SCRIPT_COUNT value: ${var_count}, expected: 2") +endif() diff --git a/Tests/RunCMake/include_guard/global_script_dir/CMakeLists.txt b/Tests/RunCMake/include_guard/global_script_dir/CMakeLists.txt new file mode 100644 index 0000000..ee7ea2e --- /dev/null +++ b/Tests/RunCMake/include_guard/global_script_dir/CMakeLists.txt @@ -0,0 +1 @@ +include(GlobScript) diff --git a/Tests/RunCMake/include_guard/sub_dir_script1/CMakeLists.txt b/Tests/RunCMake/include_guard/sub_dir_script1/CMakeLists.txt new file mode 100644 index 0000000..d3626e5 --- /dev/null +++ b/Tests/RunCMake/include_guard/sub_dir_script1/CMakeLists.txt @@ -0,0 +1,9 @@ +function(dir_check) + include(DirScript) +endfunction() + +dir_check() + +include(DirScript) + +add_subdirectory(sub_dir_script3) diff --git a/Tests/RunCMake/include_guard/sub_dir_script1/sub_dir_script3/CMakeLists.txt b/Tests/RunCMake/include_guard/sub_dir_script1/sub_dir_script3/CMakeLists.txt new file mode 100644 index 0000000..1c3b1b2 --- /dev/null +++ b/Tests/RunCMake/include_guard/sub_dir_script1/sub_dir_script3/CMakeLists.txt @@ -0,0 +1 @@ +include(DirScript) diff --git a/Tests/RunCMake/include_guard/sub_dir_script2/CMakeLists.txt b/Tests/RunCMake/include_guard/sub_dir_script2/CMakeLists.txt new file mode 100644 index 0000000..1c3b1b2 --- /dev/null +++ b/Tests/RunCMake/include_guard/sub_dir_script2/CMakeLists.txt @@ -0,0 +1 @@ +include(DirScript) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=80f1221f5088bb7ea7864a819c36d03e96f21155 commit 80f1221f5088bb7ea7864a819c36d03e96f21155 Author: Pavel Solodovnikov AuthorDate: Thu Jun 22 11:13:15 2017 +0300 Commit: Pavel Solodovnikov CommitDate: Thu Jun 22 11:13:15 2017 +0300 include_guard: add doc pages and a release note diff --git a/Help/command/include_guard.rst b/Help/command/include_guard.rst new file mode 100644 index 0000000..62cce22 --- /dev/null +++ b/Help/command/include_guard.rst @@ -0,0 +1,46 @@ +include_guard +------------- + +Provides an include guard for the file currently being processed by CMake. + +:: + + include_guard([DIRECTORY|GLOBAL]) + +Sets up an include guard for the current CMake file (see the +:variable:`CMAKE_CURRENT_LIST_FILE` variable documentation). + +CMake will end its processing of the current file at the location of the +:command:`include_guard` command if the current file has already been +processed for the applicable scope (see below). This provides functionality +similar to the include guards commonly used in source headers or to the +``#pragma once`` directive. If the current file has been processed previously +for the applicable scope, the effect is as though :command:`return` had been +called. Do not call this command from inside a function being defined within +the current file. + +An optional argument specifying the scope of the guard may be provided. +Possible values for the option are: + +``DIRECTORY`` + The include guard applies within the current directory and below. The file + will only be included once within this directory scope, but may be included + again by other files outside of this directory (i.e. a parent directory or + another directory not pulled in by :command:`add_subdirectory` or + :command:`include` from the current file or its children). + +``GLOBAL`` + The include guard applies globally to the whole build. The current file + will only be included once regardless of the scope. + +If no arguments given, ``include_guard`` has the same scope as a variable, +meaning that the include guard effect is isolated by the most recent +function scope or current directory if no inner function scopes exist. +In this case the command behavior is the same as: + +.. code-block:: cmake + + if(__CURRENT_FILE_VAR__) + return() + endif() + set(__CURRENT_FILE_VAR__ TRUE) diff --git a/Help/manual/cmake-commands.7.rst b/Help/manual/cmake-commands.7.rst index 611c989..f8bfb32 100644 --- a/Help/manual/cmake-commands.7.rst +++ b/Help/manual/cmake-commands.7.rst @@ -44,6 +44,7 @@ These commands are always available. /command/get_property /command/if /command/include + /command/include_guard /command/list /command/macro /command/mark_as_advanced diff --git a/Help/release/dev/include-guard.rst b/Help/release/dev/include-guard.rst new file mode 100644 index 0000000..9b0c64c --- /dev/null +++ b/Help/release/dev/include-guard.rst @@ -0,0 +1,8 @@ +include_guard +------------- + +* The :command:`include_guard` command was introduced to allow guarding + CMake scripts from being included more than once. The command supports + ``DIRECTORY`` and ``GLOBAL`` options to adjust the corresponding include guard + scope. If no options given, include guard is similar to basic variable-based + check. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=85b52a04bd225d04f54cabccc4cbd10f788c1bf0 commit 85b52a04bd225d04f54cabccc4cbd10f788c1bf0 Author: Pavel Solodovnikov AuthorDate: Thu Jun 22 10:54:01 2017 +0300 Commit: Pavel Solodovnikov CommitDate: Thu Jun 22 10:54:01 2017 +0300 include_guard: add vim syntax highlighting rules diff --git a/Auxiliary/vim/syntax/cmake.vim b/Auxiliary/vim/syntax/cmake.vim index 4517603..d7542b5 100644 --- a/Auxiliary/vim/syntax/cmake.vim +++ b/Auxiliary/vim/syntax/cmake.vim @@ -203,6 +203,9 @@ syn keyword cmakeKWinclude_directories contained syn keyword cmakeKWinclude_external_msproject contained \ GUID MAP_IMPORTED_CONFIG_ PLATFORM TYPE WIX +syn keyword cmakeKWinclude_guard contained + \ DIRECTORY GLOBAL + syn keyword cmakeKWinstall contained \ ARCHIVE BUNDLE CODE COMPONENT CONFIGURATIONS CVS DESTDIR DESTINATION DIRECTORY DIRECTORY_PERMISSIONS DLL EXCLUDE_FROM_ALL EXPORT EXPORT_ANDROID_MK EXPORT_LINK_INTERFACE_LIBRARIES FILES FILES_MATCHING FILE_PERMISSIONS FRAMEWORK GROUP_EXECUTE GROUP_READ GROUP_WRITE IMPORTED_ INCLUDES INSTALL_PREFIX INTERFACE_INCLUDE_DIRECTORIES LIBRARY MACOSX_BUNDLE MESSAGE_NEVER NAMELINK_ONLY NAMELINK_SKIP NAMESPACE NDK OBJECTS OPTIONAL OWNER_EXECUTE OWNER_READ OWNER_WRITE PATTERN PERMISSIONS POST_INSTALL_SCRIPT PRE_INSTALL_SCRIPT PRIVATE_HEADER PROGRAMS PUBLIC_HEADER REGEX RENAME RESOURCE RUNTIME SCRIPT SETGID SETUID SOVERSION TARGETS TRUE USE_SOURCE_PERMISSIONS VERSION WORLD_EXECUTE WORLD_READ WORLD_WRITE @@ -327,7 +330,7 @@ syn keyword cmakeGeneratorExpressions contained syn case ignore syn keyword cmakeCommand - \ add_compile_options add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_host_system_information cmake_minimum_required cmake_parse_arguments cmake_policy configure_file continue create_test_sourcelist ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ctest_test ctest_update ctest_upload define_property enable_language enable_testing endfunction endmacro execute_process export file find_file find_library find_package find_path find_program fltk_wrap_ui function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property include include_directories include_external_msproject include_regular_expression install link_directories list load_cache load_command macro mark_as_advanced math message option project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_compile_definitions target_compile_features target_compile_options target_include_directories target_link_libraries target_sources try_compile try_run unset variable_watch + \ add_compile_options add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_host_system_information cmake_minimum_required cmake_parse_arguments cmake_policy configure_file continue create_test_sourcelist ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ctest_test ctest_update ctest_upload define_property enable_language enable_testing endfunction endmacro execute_process export file find_file find_library find_package find_path find_program fltk_wrap_ui function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property include include_directories include_external_msproject include_guard include_regular_expression install link_directories list load_cache load_command macro mark_as_advanced math message option project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_compile_definitions target_compile_features target_compile_options target_include_directories target_link_libraries target_sources try_compile try_run unset variable_watch \ nextgroup=cmakeArguments syn keyword cmakeCommandConditional @@ -420,6 +423,7 @@ hi def link cmakeKWif ModeMsg hi def link cmakeKWinclude ModeMsg hi def link cmakeKWinclude_directories ModeMsg hi def link cmakeKWinclude_external_msproject ModeMsg +hi def link cmakeKWinclude_guard ModeMsg hi def link cmakeKWinstall ModeMsg hi def link cmakeKWinstall_files ModeMsg hi def link cmakeKWinstall_programs ModeMsg https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d44bd1c25f3a1cba977eee5a6b2f5bd14c46c73d commit d44bd1c25f3a1cba977eee5a6b2f5bd14c46c73d Author: Pavel Solodovnikov AuthorDate: Thu Jun 22 10:53:42 2017 +0300 Commit: Pavel Solodovnikov CommitDate: Thu Jun 22 10:53:42 2017 +0300 include_guard: implement new command diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 1878b8a..660d632 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -469,6 +469,8 @@ set(SRCS cmIncludeDirectoryCommand.h cmIncludeExternalMSProjectCommand.cxx cmIncludeExternalMSProjectCommand.h + cmIncludeGuardCommand.cxx + cmIncludeGuardCommand.h cmIncludeRegularExpressionCommand.cxx cmIncludeRegularExpressionCommand.h cmInstallCommand.cxx diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx index e1d8ef1..485dd50 100644 --- a/Source/cmCommands.cxx +++ b/Source/cmCommands.cxx @@ -42,6 +42,7 @@ #include "cmIfCommand.h" #include "cmIncludeCommand.h" #include "cmIncludeDirectoryCommand.h" +#include "cmIncludeGuardCommand.h" #include "cmIncludeRegularExpressionCommand.h" #include "cmInstallCommand.h" #include "cmInstallFilesCommand.h" @@ -132,6 +133,7 @@ void GetScriptingCommands(cmState* state) state->AddBuiltinCommand("get_property", new cmGetPropertyCommand); state->AddBuiltinCommand("if", new cmIfCommand); state->AddBuiltinCommand("include", new cmIncludeCommand); + state->AddBuiltinCommand("include_guard", new cmIncludeGuardCommand); state->AddBuiltinCommand("list", new cmListCommand); state->AddBuiltinCommand("macro", new cmMacroCommand); state->AddBuiltinCommand("make_directory", new cmMakeDirectoryCommand); diff --git a/Source/cmIncludeGuardCommand.cxx b/Source/cmIncludeGuardCommand.cxx new file mode 100644 index 0000000..505b07c --- /dev/null +++ b/Source/cmIncludeGuardCommand.cxx @@ -0,0 +1,108 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmIncludeGuardCommand.h" + +#include "cmExecutionStatus.h" +#include "cmMakefile.h" +#include "cmStateDirectory.h" +#include "cmStateSnapshot.h" +#include "cmSystemTools.h" +#include "cmake.h" + +namespace { + +enum IncludeGuardScope +{ + VARIABLE, + DIRECTORY, + GLOBAL +}; + +std::string GetIncludeGuardVariableName(std::string const& filePath) +{ + std::string result = "__INCGUARD_"; +#ifdef CMAKE_BUILD_WITH_CMAKE + result += cmSystemTools::ComputeStringMD5(filePath); +#else + result += cmSystemTools::MakeCidentifier(filePath); +#endif + result += "__"; + return result; +} + +bool CheckIncludeGuardIsSet(cmMakefile* mf, std::string const& includeGuardVar) +{ + if (mf->GetProperty(includeGuardVar)) { + return true; + } + cmStateSnapshot dirSnapshot = + mf->GetStateSnapshot().GetBuildsystemDirectoryParent(); + while (dirSnapshot.GetState()) { + cmStateDirectory stateDir = dirSnapshot.GetDirectory(); + if (stateDir.GetProperty(includeGuardVar)) { + return true; + } + dirSnapshot = dirSnapshot.GetBuildsystemDirectoryParent(); + } + return false; +} + +} // anonymous namespace + +// cmIncludeGuardCommand +bool cmIncludeGuardCommand::InitialPass(std::vector const& args, + cmExecutionStatus& status) +{ + if (args.size() > 1) { + this->SetError( + "given an invalid number of arguments. The command takes at " + "most 1 argument."); + return false; + } + + IncludeGuardScope scope = VARIABLE; + + if (!args.empty()) { + std::string const& arg = args[0]; + if (arg == "DIRECTORY") { + scope = DIRECTORY; + } else if (arg == "GLOBAL") { + scope = GLOBAL; + } else { + this->SetError("given an invalid scope: " + arg); + return false; + } + } + + std::string includeGuardVar = GetIncludeGuardVariableName( + this->Makefile->GetDefinition("CMAKE_CURRENT_LIST_FILE")); + + cmMakefile* const mf = this->Makefile; + + switch (scope) { + case VARIABLE: + if (mf->IsDefinitionSet(includeGuardVar)) { + status.SetReturnInvoked(); + return true; + } + mf->AddDefinition(includeGuardVar, true); + break; + case DIRECTORY: + if (CheckIncludeGuardIsSet(mf, includeGuardVar)) { + status.SetReturnInvoked(); + return true; + } + mf->SetProperty(includeGuardVar, "TRUE"); + break; + case GLOBAL: + cmake* const cm = mf->GetCMakeInstance(); + if (cm->GetProperty(includeGuardVar)) { + status.SetReturnInvoked(); + return true; + } + cm->SetProperty(includeGuardVar, "TRUE"); + break; + } + + return true; +} diff --git a/Source/cmIncludeGuardCommand.h b/Source/cmIncludeGuardCommand.h new file mode 100644 index 0000000..140c04f --- /dev/null +++ b/Source/cmIncludeGuardCommand.h @@ -0,0 +1,37 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#ifndef cmIncludeGuardCommand_h +#define cmIncludeGuardCommand_h + +#include "cmConfigure.h" + +#include +#include + +#include "cmCommand.h" + +class cmExecutionStatus; + +/** \class cmIncludeGuardCommand + * \brief cmIncludeGuardCommand identical to C++ #pragma_once command + * Can work in 3 modes: GLOBAL (works on global properties), + * DIRECTORY(use directory property), VARIABLE(unnamed overload without + * arguments) define an ordinary variable to be used as include guard checker + */ +class cmIncludeGuardCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + cmCommand* Clone() CM_OVERRIDE { return new cmIncludeGuardCommand; } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + bool InitialPass(std::vector const& args, + cmExecutionStatus& status) CM_OVERRIDE; +}; + +#endif diff --git a/bootstrap b/bootstrap index ba2a5f3..83e67c5 100755 --- a/bootstrap +++ b/bootstrap @@ -330,6 +330,7 @@ CMAKE_CXX_SOURCES="\ cmHexFileConverter \ cmIfCommand \ cmIncludeCommand \ + cmIncludeGuardCommand \ cmIncludeDirectoryCommand \ cmIncludeRegularExpressionCommand \ cmInstallCommand \ ----------------------------------------------------------------------- Summary of changes: Auxiliary/vim/syntax/cmake.vim | 6 +- Help/command/include_guard.rst | 46 +++++++++ Help/manual/cmake-commands.7.rst | 1 + Help/release/dev/include-guard.rst | 8 ++ Source/CMakeLists.txt | 2 + Source/cmCommands.cxx | 2 + Source/cmIncludeGuardCommand.cxx | 108 ++++++++++++++++++++ Source/cmIncludeGuardCommand.h | 37 +++++++ Source/cmNinjaNormalTargetGenerator.cxx | 16 ++- Tests/RunCMake/CMakeLists.txt | 1 + Tests/RunCMake/include_guard/CMakeLists.txt | 3 + Tests/RunCMake/include_guard/DirectoryScope.cmake | 19 ++++ Tests/RunCMake/include_guard/GlobalScope.cmake | 11 ++ .../InvalidArgumentsNumber-result.txt} | 0 .../InvalidArgumentsNumber-stderr.txt | 5 + .../include_guard/InvalidArgumentsNumber.cmake | 1 + .../InvalidScope-result.txt} | 0 .../RunCMake/include_guard/InvalidScope-stderr.txt | 4 + Tests/RunCMake/include_guard/InvalidScope.cmake | 1 + Tests/RunCMake/include_guard/RunCMakeTest.cmake | 7 ++ .../RunCMake/include_guard/Scripts/DirScript.cmake | 12 +++ .../include_guard/Scripts/GlobScript.cmake | 12 +++ .../RunCMake/include_guard/Scripts/VarScript.cmake | 12 +++ Tests/RunCMake/include_guard/VariableScope.cmake | 24 +++++ .../include_guard/global_script_dir/CMakeLists.txt | 1 + .../include_guard/sub_dir_script1/CMakeLists.txt | 9 ++ .../sub_dir_script1/sub_dir_script3/CMakeLists.txt | 1 + .../include_guard/sub_dir_script2/CMakeLists.txt | 1 + Utilities/cmcurl/CMakeLists.txt | 2 + bootstrap | 1 + 30 files changed, 348 insertions(+), 5 deletions(-) create mode 100644 Help/command/include_guard.rst create mode 100644 Help/release/dev/include-guard.rst create mode 100644 Source/cmIncludeGuardCommand.cxx create mode 100644 Source/cmIncludeGuardCommand.h create mode 100644 Tests/RunCMake/include_guard/CMakeLists.txt create mode 100644 Tests/RunCMake/include_guard/DirectoryScope.cmake create mode 100644 Tests/RunCMake/include_guard/GlobalScope.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => include_guard/InvalidArgumentsNumber-result.txt} (100%) create mode 100644 Tests/RunCMake/include_guard/InvalidArgumentsNumber-stderr.txt create mode 100644 Tests/RunCMake/include_guard/InvalidArgumentsNumber.cmake copy Tests/RunCMake/{Android/BadSYSROOT-result.txt => include_guard/InvalidScope-result.txt} (100%) create mode 100644 Tests/RunCMake/include_guard/InvalidScope-stderr.txt create mode 100644 Tests/RunCMake/include_guard/InvalidScope.cmake create mode 100644 Tests/RunCMake/include_guard/RunCMakeTest.cmake create mode 100644 Tests/RunCMake/include_guard/Scripts/DirScript.cmake create mode 100644 Tests/RunCMake/include_guard/Scripts/GlobScript.cmake create mode 100644 Tests/RunCMake/include_guard/Scripts/VarScript.cmake create mode 100644 Tests/RunCMake/include_guard/VariableScope.cmake create mode 100644 Tests/RunCMake/include_guard/global_script_dir/CMakeLists.txt create mode 100644 Tests/RunCMake/include_guard/sub_dir_script1/CMakeLists.txt create mode 100644 Tests/RunCMake/include_guard/sub_dir_script1/sub_dir_script3/CMakeLists.txt create mode 100644 Tests/RunCMake/include_guard/sub_dir_script2/CMakeLists.txt hooks/post-receive -- CMake From kwrobot at kitware.com Wed Jun 28 09:05:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Wed, 28 Jun 2017 09:05:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-181-ge40e8f5 Message-ID: <20170628130502.29924FAA87@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via e40e8f5c4216ac1e176342887d1af95965528344 (commit) via c67bb5bae386b323746c6d471a25272e9e497792 (commit) from 0552747b58799afd6cb23db1cc5296a605cfde18 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e40e8f5c4216ac1e176342887d1af95965528344 commit e40e8f5c4216ac1e176342887d1af95965528344 Merge: 0552747 c67bb5b Author: Brad King AuthorDate: Wed Jun 28 12:55:08 2017 +0000 Commit: Kitware Robot CommitDate: Wed Jun 28 08:55:12 2017 -0400 Merge topic 'clang-cl-no-std' c67bb5ba Clang: Do not add '-std=' options when simulating MSVC Acked-by: Kitware Robot Merge-request: !982 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c67bb5bae386b323746c6d471a25272e9e497792 commit c67bb5bae386b323746c6d471a25272e9e497792 Author: Ruben Van Boxem AuthorDate: Sun Jun 18 00:39:09 2017 +0200 Commit: Brad King CommitDate: Tue Jun 27 13:04:41 2017 -0400 Clang: Do not add '-std=' options when simulating MSVC The `cl.exe` style command line does not accept the `-std=` options. Instead behave like MSVC where we don't define standard levels. Fixes: #16266 diff --git a/Modules/Compiler/Clang-C.cmake b/Modules/Compiler/Clang-C.cmake index b881e2b..a5f9d84 100644 --- a/Modules/Compiler/Clang-C.cmake +++ b/Modules/Compiler/Clang-C.cmake @@ -7,14 +7,30 @@ if(WIN32 OR (APPLE AND NOT appleClangPolicy STREQUAL NEW)) endif() if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4) - set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90") - set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90") + if(NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC") + set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90") + set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90") - set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") - set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") + set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") + set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99") - set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") - set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") + set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") + set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11") + else() + # clang-cl doesn't have any of these + set(CMAKE_C90_STANDARD_COMPILE_OPTION "") + set(CMAKE_C90_EXTENSION_COMPILE_OPTION "") + + set(CMAKE_C99_STANDARD_COMPILE_OPTION "") + set(CMAKE_C99_EXTENSION_COMPILE_OPTION "") + + set(CMAKE_C11_STANDARD_COMPILE_OPTION "") + set(CMAKE_C11_EXTENSION_COMPILE_OPTION "") + endif() endif() -__compiler_check_default_language_standard(C 3.4 99 3.6 11) +if(NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC") + __compiler_check_default_language_standard(C 3.4 99 3.6 11) +else() + set(CMAKE_C_STANDARD_DEFAULT "") +endif() diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake index d3707ee..efc68b3 100644 --- a/Modules/Compiler/Clang-CXX.cmake +++ b/Modules/Compiler/Clang-CXX.cmake @@ -10,30 +10,46 @@ if(APPLE AND NOT appleClangPolicy STREQUAL NEW) return() endif() -if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2.1) - set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98") - set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98") -endif() +if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") + if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2.1) + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98") + set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98") + endif() -if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1) - set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") - set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11") -elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2.1) - set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++0x") - set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++0x") -endif() + if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1) + set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11") + set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11") + elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2.1) + set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++0x") + set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++0x") + endif() -if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5) - set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14") - set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14") -elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4) - set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++1y") - set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y") -endif() + if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5) + set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14") + set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14") + elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4) + set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++1y") + set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y") + endif() -if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5) - set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++1z") - set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++1z") + if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5) + set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++1z") + set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++1z") + endif() +else() + # clang-cl does not know these options because it behaves like cl.exe + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "") + set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "") + set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "") + set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "") endif() -__compiler_check_default_language_standard(CXX 2.1 98) +if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") + __compiler_check_default_language_standard(CXX 2.1 98) +else() + set(CMAKE_CXX_STANDARD_DEFAULT "") +endif() ----------------------------------------------------------------------- Summary of changes: Modules/Compiler/Clang-C.cmake | 30 ++++++++++++++----- Modules/Compiler/Clang-CXX.cmake | 60 ++++++++++++++++++++++++-------------- 2 files changed, 61 insertions(+), 29 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 29 00:05:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 29 Jun 2017 00:05:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-182-gaaa545f Message-ID: <20170629040507.AF914FAA9B@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via aaa545f867a69d959305c1be455b4a92d0922b1c (commit) from e40e8f5c4216ac1e176342887d1af95965528344 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aaa545f867a69d959305c1be455b4a92d0922b1c commit aaa545f867a69d959305c1be455b4a92d0922b1c Author: Kitware Robot AuthorDate: Thu Jun 29 00:01:06 2017 -0400 Commit: Kitware Robot CommitDate: Thu Jun 29 00:01:06 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 4b2411d..b1fcf31 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 9) -set(CMake_VERSION_PATCH 20170628) +set(CMake_VERSION_PATCH 20170629) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 29 09:55:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 29 Jun 2017 09:55:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-194-g55465be Message-ID: <20170629135505.CC6C1FA88A@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 55465be8404d37713c4bece1cc20acb3a7165492 (commit) via 1ac89a4e06f73a5e460f21866b3b28c2f8af31d9 (commit) via a9b88ffdfccebcbf4c565378722812b19c847bbb (commit) via fe34a5c82b68bbaec8f4aa5604d9cefa4aca2d33 (commit) via 690cf2c1b200e0fa3de92ceb0b19c5130569ff81 (commit) via ff3498e76b73cd69fb851ff3acfb4f235dd197de (commit) via 610d2fcec04333761e036bfb57f99058102f6362 (commit) via 5299141320c7be96e9357ebd457c9a279308248a (commit) via 7ba27e364fcf6a941590600d7fb1d304bd462e05 (commit) via ae44496e2b2be3838af193c2ecfc7f3efaf1663a (commit) via 27bef1609b8e5aa7a5a8124d8bf3b5f652a163af (commit) via 17a397c22a7c7f14aa001f85f64c36428c71414a (commit) from aaa545f867a69d959305c1be455b4a92d0922b1c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=55465be8404d37713c4bece1cc20acb3a7165492 commit 55465be8404d37713c4bece1cc20acb3a7165492 Merge: 1ac89a4 fe34a5c Author: Brad King AuthorDate: Thu Jun 29 13:50:21 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 29 09:50:29 2017 -0400 Merge topic '16961-xctest-scheme' fe34a5c8 Xcode: Add XCTest support to schema generator 690cf2c1 Xcode: Prepare schema generator for XCTest ff3498e7 XCTest: Speed up test by only enabling C language 610d2fce XCTest: Use bundle specific generator expressions Acked-by: Kitware Robot Merge-request: !1013 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ac89a4e06f73a5e460f21866b3b28c2f8af31d9 commit 1ac89a4e06f73a5e460f21866b3b28c2f8af31d9 Merge: a9b88ff 5299141 Author: Brad King AuthorDate: Thu Jun 29 13:49:20 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 29 09:49:29 2017 -0400 Merge topic 'deb-on-windows' 52991413 CPackDeb: Enable the DEB generator on Windows Acked-by: Kitware Robot Merge-request: !979 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a9b88ffdfccebcbf4c565378722812b19c847bbb commit a9b88ffdfccebcbf4c565378722812b19c847bbb Merge: aaa545f 7ba27e3 Author: Brad King AuthorDate: Thu Jun 29 13:48:52 2017 +0000 Commit: Kitware Robot CommitDate: Thu Jun 29 09:49:01 2017 -0400 Merge topic 'vs-link-debug-flags' 7ba27e36 VS: Add v140 and v141 flag table entries for /DEBUG:NONE and /DEBUG:FULL ae44496e VS: Fix GenerateDebugInformation values for v140 and v141 toolsets 27bef160 VS: Fix GenerateDebugInformation flag map text for v141 toolsets 17a397c2 VS: Split link flag table between v140 and v141 toolsets Acked-by: Kitware Robot Merge-request: !1002 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe34a5c82b68bbaec8f4aa5604d9cefa4aca2d33 commit fe34a5c82b68bbaec8f4aa5604d9cefa4aca2d33 Author: Gregor Jasny AuthorDate: Wed Jun 28 22:21:01 2017 +0200 Commit: Gregor Jasny CommitDate: Wed Jun 28 22:21:52 2017 +0200 Xcode: Add XCTest support to schema generator Closes: #16961 diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 45c1764..44fc7f4 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3298,6 +3298,31 @@ void cmGlobalXCodeGenerator::OutputXCodeProject( void cmGlobalXCodeGenerator::OutputXCodeSharedSchemes( const std::string& xcProjDir) { + // collect all tests for the targets + std::map testables; + + for (std::vector::const_iterator i = + this->XCodeObjects.begin(); + i != this->XCodeObjects.end(); ++i) { + cmXCodeObject* obj = *i; + if (obj->GetType() != cmXCodeObject::OBJECT || + obj->GetIsA() != cmXCodeObject::PBXNativeTarget) { + continue; + } + + if (!obj->GetTarget()->IsXCTestOnApple()) { + continue; + } + + const char* testee = obj->GetTarget()->GetProperty("XCTEST_TESTEE"); + if (!testee) { + continue; + } + + testables[testee].push_back(obj); + } + + // generate scheme for (std::vector::const_iterator i = this->XCodeObjects.begin(); i != this->XCodeObjects.end(); ++i) { @@ -3305,8 +3330,9 @@ void cmGlobalXCodeGenerator::OutputXCodeSharedSchemes( if (obj->GetType() == cmXCodeObject::OBJECT && (obj->GetIsA() == cmXCodeObject::PBXNativeTarget || obj->GetIsA() == cmXCodeObject::PBXAggregateTarget)) { - cmXCodeScheme schm(obj, this->CurrentConfigurationTypes, - this->XcodeVersion); + const std::string& targetName = obj->GetTarget()->GetName(); + cmXCodeScheme schm(obj, testables[targetName], + this->CurrentConfigurationTypes, this->XcodeVersion); schm.WriteXCodeSharedScheme(xcProjDir, this->RelativeToSource(xcProjDir.c_str())); } diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx index d6f8e01..bca39af 100644 --- a/Source/cmXCodeScheme.cxx +++ b/Source/cmXCodeScheme.cxx @@ -10,10 +10,11 @@ #include "cmGeneratorTarget.h" #include "cmXMLSafe.h" -cmXCodeScheme::cmXCodeScheme(cmXCodeObject* xcObj, +cmXCodeScheme::cmXCodeScheme(cmXCodeObject* xcObj, const TestObjects& tests, const std::vector& configList, unsigned int xcVersion) : Target(xcObj) + , Tests(tests) , TargetName(xcObj->GetTarget()->GetName()) , ConfigList(configList) , XcodeVersion(xcVersion) @@ -56,7 +57,7 @@ void cmXCodeScheme::WriteXCodeXCScheme(std::ostream& fout, xout.Attribute("version", "1.3"); WriteBuildAction(xout, container); - WriteTestAction(xout, FindConfiguration("Debug")); + WriteTestAction(xout, FindConfiguration("Debug"), container); WriteLaunchAction(xout, FindConfiguration("Debug"), container); WriteProfileAction(xout, FindConfiguration("Release")); WriteAnalyzeAction(xout, FindConfiguration("Debug")); @@ -90,7 +91,8 @@ void cmXCodeScheme::WriteBuildAction(cmXMLWriter& xout, } void cmXCodeScheme::WriteTestAction(cmXMLWriter& xout, - std::string configuration) + std::string configuration, + const std::string& container) { xout.StartElement("TestAction"); xout.BreakAttributes(); @@ -102,8 +104,22 @@ void cmXCodeScheme::WriteTestAction(cmXMLWriter& xout, xout.Attribute("shouldUseLaunchSchemeArgsEnv", "YES"); xout.StartElement("Testables"); + for (TestObjects::const_iterator it = this->Tests.begin(); + it != this->Tests.end(); ++it) { + xout.StartElement("TestableReference"); + xout.BreakAttributes(); + xout.Attribute("skipped", "NO"); + WriteBuildableReference(xout, *it, container); + xout.EndElement(); // TestableReference + } xout.EndElement(); + if (IsTestable()) { + xout.StartElement("MacroExpansion"); + WriteBuildableReference(xout, this->Target, container); + xout.EndElement(); // MacroExpansion + } + xout.StartElement("AdditionalOptions"); xout.EndElement(); @@ -213,6 +229,11 @@ std::string cmXCodeScheme::FindConfiguration(const std::string& name) return name; } +bool cmXCodeScheme::IsTestable() const +{ + return !this->Tests.empty() || IsExecutable(this->Target); +} + bool cmXCodeScheme::IsExecutable(const cmXCodeObject* target) { cmGeneratorTarget* gt = target->GetTarget(); diff --git a/Source/cmXCodeScheme.h b/Source/cmXCodeScheme.h index d59f35b..def75b1 100644 --- a/Source/cmXCodeScheme.h +++ b/Source/cmXCodeScheme.h @@ -5,6 +5,8 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include + #include "cmGlobalXCodeGenerator.h" #include "cmSystemTools.h" #include "cmXCodeObject.h" @@ -16,7 +18,9 @@ class cmXCodeScheme { public: - cmXCodeScheme(cmXCodeObject* xcObj, + typedef std::vector TestObjects; + + cmXCodeScheme(cmXCodeObject* xcObj, const TestObjects& tests, const std::vector& configList, unsigned int xcVersion); @@ -25,6 +29,7 @@ public: private: const cmXCodeObject* const Target; + const TestObjects Tests; const std::string& TargetName; const std::vector& ConfigList; const unsigned int XcodeVersion; @@ -32,7 +37,8 @@ private: void WriteXCodeXCScheme(std::ostream& fout, const std::string& container); void WriteBuildAction(cmXMLWriter& xout, const std::string& container); - void WriteTestAction(cmXMLWriter& xout, std::string configuration); + void WriteTestAction(cmXMLWriter& xout, std::string configuration, + const std::string& container); void WriteLaunchAction(cmXMLWriter& xout, std::string configuration, const std::string& container); void WriteProfileAction(cmXMLWriter& xout, std::string configuration); @@ -45,6 +51,8 @@ private: std::string WriteVersionString(); std::string FindConfiguration(const std::string& name); + bool IsTestable() const; + static bool IsExecutable(const cmXCodeObject* target); }; https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=690cf2c1b200e0fa3de92ceb0b19c5130569ff81 commit 690cf2c1b200e0fa3de92ceb0b19c5130569ff81 Author: Gregor Jasny AuthorDate: Wed Jun 28 22:04:31 2017 +0200 Commit: Gregor Jasny CommitDate: Wed Jun 28 22:06:49 2017 +0200 Xcode: Prepare schema generator for XCTest Issue: #16961 diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx index 5c22531..d6f8e01 100644 --- a/Source/cmXCodeScheme.cxx +++ b/Source/cmXCodeScheme.cxx @@ -15,8 +15,6 @@ cmXCodeScheme::cmXCodeScheme(cmXCodeObject* xcObj, unsigned int xcVersion) : Target(xcObj) , TargetName(xcObj->GetTarget()->GetName()) - , BuildableName(xcObj->GetTarget()->GetFullName()) - , TargetId(xcObj->GetId()) , ConfigList(configList) , XcodeVersion(xcVersion) { @@ -84,14 +82,7 @@ void cmXCodeScheme::WriteBuildAction(cmXMLWriter& xout, xout.Attribute("buildForArchiving", "YES"); xout.Attribute("buildForAnalyzing", "YES"); - xout.StartElement("BuildableReference"); - xout.BreakAttributes(); - xout.Attribute("BuildableIdentifier", "primary"); - xout.Attribute("BlueprintIdentifier", this->TargetId); - xout.Attribute("BuildableName", this->BuildableName); - xout.Attribute("BlueprintName", this->TargetName); - xout.Attribute("ReferencedContainer", "container:" + container); - xout.EndElement(); + WriteBuildableReference(xout, this->Target, container); xout.EndElement(); // BuildActionEntry xout.EndElement(); // BuildActionEntries @@ -146,14 +137,7 @@ void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout, xout.StartElement("MacroExpansion"); } - xout.StartElement("BuildableReference"); - xout.BreakAttributes(); - xout.Attribute("BuildableIdentifier", "primary"); - xout.Attribute("BlueprintIdentifier", this->TargetId); - xout.Attribute("BuildableName", this->BuildableName); - xout.Attribute("BlueprintName", this->TargetName); - xout.Attribute("ReferencedContainer", "container:" + container); - xout.EndElement(); + WriteBuildableReference(xout, this->Target, container); xout.EndElement(); // MacroExpansion @@ -195,6 +179,20 @@ void cmXCodeScheme::WriteArchiveAction(cmXMLWriter& xout, xout.EndElement(); } +void cmXCodeScheme::WriteBuildableReference(cmXMLWriter& xout, + const cmXCodeObject* xcObj, + const std::string& container) +{ + xout.StartElement("BuildableReference"); + xout.BreakAttributes(); + xout.Attribute("BuildableIdentifier", "primary"); + xout.Attribute("BlueprintIdentifier", xcObj->GetId()); + xout.Attribute("BuildableName", xcObj->GetTarget()->GetFullName()); + xout.Attribute("BlueprintName", xcObj->GetTarget()->GetName()); + xout.Attribute("ReferencedContainer", "container:" + container); + xout.EndElement(); +} + std::string cmXCodeScheme::WriteVersionString() { std::ostringstream v; diff --git a/Source/cmXCodeScheme.h b/Source/cmXCodeScheme.h index 379afed..d59f35b 100644 --- a/Source/cmXCodeScheme.h +++ b/Source/cmXCodeScheme.h @@ -26,8 +26,6 @@ public: private: const cmXCodeObject* const Target; const std::string& TargetName; - const std::string BuildableName; - const std::string& TargetId; const std::vector& ConfigList; const unsigned int XcodeVersion; @@ -41,6 +39,9 @@ private: void WriteAnalyzeAction(cmXMLWriter& xout, std::string configuration); void WriteArchiveAction(cmXMLWriter& xout, std::string configuration); + void WriteBuildableReference(cmXMLWriter& xout, const cmXCodeObject* xcObj, + const std::string& container); + std::string WriteVersionString(); std::string FindConfiguration(const std::string& name); https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff3498e76b73cd69fb851ff3acfb4f235dd197de commit ff3498e76b73cd69fb851ff3acfb4f235dd197de Author: Gregor Jasny AuthorDate: Wed Jun 28 22:00:36 2017 +0200 Commit: Gregor Jasny CommitDate: Wed Jun 28 22:00:36 2017 +0200 XCTest: Speed up test by only enabling C language diff --git a/Tests/XCTest/CMakeLists.txt b/Tests/XCTest/CMakeLists.txt index d40c40e..d0b07ea 100644 --- a/Tests/XCTest/CMakeLists.txt +++ b/Tests/XCTest/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.1) -project(XCTest) +project(XCTest C) enable_testing() find_package(XCTest REQUIRED) https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=610d2fcec04333761e036bfb57f99058102f6362 commit 610d2fcec04333761e036bfb57f99058102f6362 Author: Gregor Jasny AuthorDate: Wed Jun 28 21:59:48 2017 +0200 Commit: Gregor Jasny CommitDate: Wed Jun 28 21:59:48 2017 +0200 XCTest: Use bundle specific generator expressions diff --git a/Modules/FindXCTest.cmake b/Modules/FindXCTest.cmake index ffdf677..8497336 100644 --- a/Modules/FindXCTest.cmake +++ b/Modules/FindXCTest.cmake @@ -136,7 +136,7 @@ function(xctest_add_bundle target testee) XCODE_ATTRIBUTE_TEST_HOST "$") if(NOT XCODE_VERSION VERSION_LESS 7.3) set_target_properties(${target} PROPERTIES - LIBRARY_OUTPUT_DIRECTORY "$/../PlugIns") + LIBRARY_OUTPUT_DIRECTORY "$/PlugIns") endif() else(XCODE) target_link_libraries(${target} @@ -183,7 +183,7 @@ function(xctest_add_test name bundle) add_test( NAME ${name} - COMMAND ${XCTest_EXECUTABLE} $/../..) + COMMAND ${XCTest_EXECUTABLE} $) # point loader to testee in case rpath is disabled https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5299141320c7be96e9357ebd457c9a279308248a commit 5299141320c7be96e9357ebd457c9a279308248a Author: Nils Gladitz AuthorDate: Sat Jun 17 18:49:33 2017 +0200 Commit: Nils Gladitz CommitDate: Wed Jun 28 19:55:12 2017 +0200 CPackDeb: Enable the DEB generator on Windows While some features require external Unix tools the generator is mostly portable. By enabling it on Windows it can be used for cross platform packaging. diff --git a/Help/release/dev/deb-on-windows.rst b/Help/release/dev/deb-on-windows.rst new file mode 100644 index 0000000..b307720 --- /dev/null +++ b/Help/release/dev/deb-on-windows.rst @@ -0,0 +1,7 @@ +deb-on-windows +-------------- + +* The CPack ``DEB`` generator, configured by the :module:`CPackDeb` module, + was enabled on Windows. While not fully featured (due to the lack of + external UNIX tools) this will allow building basic cross-platform Debian + packages. diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index ddf8b23..daba7d5 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -497,6 +497,16 @@ # # This value is not interpreted. It is possible to pass an optional # revision number of the referenced source package as well. +# +# Building Debian packages on Windows +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# To communicate UNIX file permissions from the install stage +# to the CPack DEB generator the "cmake_mode_t" NTFS +# alternate data stream (ADT) is used. +# +# When a filesystem without ADT support is used only owner read/write +# permissions can be preserved. # CPack script for creating Debian package # Author: Mathieu Malaterre @@ -507,10 +517,6 @@ if(CMAKE_BINARY_DIR) message(FATAL_ERROR "CPackDeb.cmake may only be used by CPack internally.") endif() -if(NOT UNIX) - message(FATAL_ERROR "CPackDeb.cmake may only be used under UNIX.") -endif() - function(cpack_deb_variable_fallback OUTPUT_VAR_NAME) set(FALLBACK_VAR_NAMES ${ARGN}) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 1878b8a..2156e3f 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -874,6 +874,7 @@ set(CPACK_SRCS CPack/cmCPackTarCompressGenerator.cxx CPack/cmCPackZIPGenerator.cxx CPack/cmCPack7zGenerator.cxx + CPack/cmCPackDebGenerator.cxx ) # CPack IFW generator set(CPACK_SRCS ${CPACK_SRCS} @@ -900,7 +901,6 @@ option(CPACK_ENABLE_FREEBSD_PKG "Add FreeBSD pkg(8) generator to CPack." OFF) if(UNIX) set(CPACK_SRCS ${CPACK_SRCS} - CPack/cmCPackDebGenerator.cxx CPack/cmCPackRPMGenerator.cxx ) diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index af54fce..00d017e 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -479,6 +479,25 @@ int cmCPackDebGenerator::createDeb() cmCPackLogger(cmCPackLog::LOG_DEBUG, "RELATIVEDIR: \"" << relativeDir << "\"" << std::endl); +#ifdef WIN32 + std::string mode_t_adt_filename = *fileIt + ":cmake_mode_t"; + cmsys::ifstream permissionStream(mode_t_adt_filename.c_str()); + + mode_t permissions = 0; + + if (permissionStream) { + permissionStream >> std::oct >> permissions; + } + + if (permissions != 0) { + data_tar.SetPermissions(permissions); + } else if (cmSystemTools::FileIsDirectory(*fileIt)) { + data_tar.SetPermissions(0755); + } else { + data_tar.ClearPermissions(); + } +#endif + // do not recurse because the loop will do it if (!data_tar.Add(*fileIt, topLevelLength, ".", false)) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem adding file to tar:" @@ -553,8 +572,8 @@ int cmCPackDebGenerator::createDeb() and https://lintian.debian.org/tags/control-file-has-bad-permissions.html */ - const mode_t permission644 = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH; - const mode_t permissionExecute = S_IXUSR | S_IXGRP | S_IXOTH; + const mode_t permission644 = 0644; + const mode_t permissionExecute = 0111; const mode_t permission755 = permission644 | permissionExecute; // for md5sum and control (that we have generated here), we use 644 @@ -831,7 +850,7 @@ static int copy_ar(CF* cfp, off_t size) ? static_cast(sz) : sizeof(buf), from)) > 0) { - sz -= nr; + sz -= static_cast(nr); for (size_t off = 0; off < nr; nr -= off, off += nw) { if ((nw = fwrite(buf + off, 1, nr, to)) < nr) { return -1; @@ -854,7 +873,6 @@ static int copy_ar(CF* cfp, off_t size) static int put_arobj(CF* cfp, struct stat* sb) { int result = 0; - struct ar_hdr* hdr; /* If passed an sb structure, reading a file from disk. Get stat(2) * information, build a name and construct a header. (Files are named @@ -873,7 +891,7 @@ static int put_arobj(CF* cfp, struct stat* sb) if (gid > USHRT_MAX) { gid = USHRT_MAX; } - if (lname > sizeof(hdr->ar_name) || strchr(name, ' ')) { + if (lname > sizeof(ar_hdr().ar_name) || strchr(name, ' ')) { (void)sprintf(ar_hb, HDR1, AR_EFMT1, (int)lname, (long int)sb->st_mtime, (unsigned)uid, (unsigned)gid, (unsigned)sb->st_mode, (long long)sb->st_size + lname, ARFMAG); diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx index f135059..834913d 100644 --- a/Source/CPack/cmCPackGeneratorFactory.cxx +++ b/Source/CPack/cmCPackGeneratorFactory.cxx @@ -12,6 +12,7 @@ #ifdef HAVE_FREEBSD_PKG #include "cmCPackFreeBSDGenerator.h" #endif +#include "cmCPackDebGenerator.h" #include "cmCPackGenerator.h" #include "cmCPackLog.h" #include "cmCPackNSISGenerator.h" @@ -37,7 +38,6 @@ #if !defined(_WIN32) && !defined(__QNXNTO__) && !defined(__BEOS__) && \ !defined(__HAIKU__) -#include "cmCPackDebGenerator.h" #include "cmCPackRPMGenerator.h" #endif @@ -102,6 +102,10 @@ cmCPackGeneratorFactory::cmCPackGeneratorFactory() this->RegisterGenerator("TZ", "Tar Compress compression", cmCPackTarCompressGenerator::CreateGenerator); } + if (cmCPackDebGenerator::CanGenerate()) { + this->RegisterGenerator("DEB", "Debian packages", + cmCPackDebGenerator::CreateGenerator); + } #ifdef __APPLE__ if (cmCPackDragNDropGenerator::CanGenerate()) { this->RegisterGenerator("DragNDrop", "Mac OSX Drag And Drop", @@ -126,10 +130,6 @@ cmCPackGeneratorFactory::cmCPackGeneratorFactory() #endif #if !defined(_WIN32) && !defined(__QNXNTO__) && !defined(__BEOS__) && \ !defined(__HAIKU__) - if (cmCPackDebGenerator::CanGenerate()) { - this->RegisterGenerator("DEB", "Debian packages", - cmCPackDebGenerator::CreateGenerator); - } if (cmCPackRPMGenerator::CanGenerate()) { this->RegisterGenerator("RPM", "RPM packages", cmCPackRPMGenerator::CreateGenerator); diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 5777fb2..b769a56 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -55,14 +55,14 @@ class cmSystemToolsFileTime; static mode_t mode_owner_read = S_IREAD; static mode_t mode_owner_write = S_IWRITE; static mode_t mode_owner_execute = S_IEXEC; -static mode_t mode_group_read = 0; -static mode_t mode_group_write = 0; -static mode_t mode_group_execute = 0; -static mode_t mode_world_read = 0; -static mode_t mode_world_write = 0; -static mode_t mode_world_execute = 0; -static mode_t mode_setuid = 0; -static mode_t mode_setgid = 0; +static mode_t mode_group_read = 040; +static mode_t mode_group_write = 020; +static mode_t mode_group_execute = 010; +static mode_t mode_world_read = 04; +static mode_t mode_world_write = 02; +static mode_t mode_world_execute = 01; +static mode_t mode_setuid = 04000; +static mode_t mode_setgid = 02000; #else static mode_t mode_owner_read = S_IRUSR; static mode_t mode_owner_write = S_IWUSR; @@ -1076,11 +1076,26 @@ protected: bool SetPermissions(const char* toFile, mode_t permissions) { - if (permissions && !cmSystemTools::SetPermissions(toFile, permissions)) { - std::ostringstream e; - e << this->Name << " cannot set permissions on \"" << toFile << "\""; - this->FileCommand->SetError(e.str()); - return false; + if (permissions) { +#ifdef WIN32 + if (Makefile->IsOn("CMAKE_CROSSCOMPILING")) { + std::string mode_t_adt_filename = + std::string(toFile) + ":cmake_mode_t"; + + cmsys::ofstream permissionStream(mode_t_adt_filename.c_str()); + + if (permissionStream) { + permissionStream << std::oct << permissions << std::endl; + } + } +#endif + + if (!cmSystemTools::SetPermissions(toFile, permissions)) { + std::ostringstream e; + e << this->Name << " cannot set permissions on \"" << toFile << "\""; + this->FileCommand->SetError(e.str()); + return false; + } } return true; } diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 8e00303..9049a42 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -451,6 +451,19 @@ void cmLocalGenerator::GenerateInstallRules() /* clang-format on */ } + // Copy cmake cross compile state to install code. + if (const char* crosscompiling = + this->Makefile->GetDefinition("CMAKE_CROSSCOMPILING")) { + /* clang-format off */ + fout << + "# Is this installation the result of a crosscompile?\n" + "if(NOT DEFINED CMAKE_CROSSCOMPILING)\n" + " set(CMAKE_CROSSCOMPILING \"" << crosscompiling << "\")\n" + "endif()\n" + "\n"; + /* clang-format on */ + } + // Ask each install generator to write its code. std::vector const& installers = this->Makefile->GetInstallGenerators(); diff --git a/Source/cm_sys_stat.h b/Source/cm_sys_stat.h index 26e4baa..796f027 100644 --- a/Source/cm_sys_stat.h +++ b/Source/cm_sys_stat.h @@ -7,6 +7,11 @@ typedef unsigned short mode_t; #endif +#if defined(WIN32) +typedef unsigned short uid_t; +typedef unsigned short gid_t; +#endif + #include // include sys/stat.h after sys/types.h #include https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ba27e364fcf6a941590600d7fb1d304bd462e05 commit 7ba27e364fcf6a941590600d7fb1d304bd462e05 Author: Ian Hojnicki AuthorDate: Thu Jun 22 16:37:05 2017 -0500 Commit: Brad King CommitDate: Wed Jun 28 08:55:40 2017 -0400 VS: Add v140 and v141 flag table entries for /DEBUG:NONE and /DEBUG:FULL diff --git a/Source/cmVS140LinkFlagTable.h b/Source/cmVS140LinkFlagTable.h index 613541c..ceb1d78 100644 --- a/Source/cmVS140LinkFlagTable.h +++ b/Source/cmVS140LinkFlagTable.h @@ -38,6 +38,11 @@ static cmVS7FlagTable cmVS140LinkFlagTable[] = { { "GenerateDebugInformation", "DEBUG:FASTLINK", "Optimize for faster linking", "DebugFastLink", cmVS7FlagTable::CaseInsensitive }, + { "GenerateDebugInformation", "DEBUG:FULL", "Optimize for debugging", "true", + cmVS7FlagTable::CaseInsensitive }, + { "GenerateDebugInformation", "DEBUG:NONE", + "Produces no debugging information", "false", + cmVS7FlagTable::CaseInsensitive }, { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "true", cmVS7FlagTable::CaseInsensitive }, diff --git a/Source/cmVS141LinkFlagTable.h b/Source/cmVS141LinkFlagTable.h index ff0c1da..d7faf81 100644 --- a/Source/cmVS141LinkFlagTable.h +++ b/Source/cmVS141LinkFlagTable.h @@ -38,6 +38,12 @@ static cmVS7FlagTable cmVS141LinkFlagTable[] = { { "GenerateDebugInformation", "DEBUG:FASTLINK", "Generate Debug Information optimized for faster links", "DebugFastLink", cmVS7FlagTable::CaseInsensitive }, + { "GenerateDebugInformation", "DEBUG:FULL", + "Generate Debug Information optimized for sharing and publishing", + "DebugFull", cmVS7FlagTable::CaseInsensitive }, + { "GenerateDebugInformation", "DEBUG:NONE", + "Produces no debugging information", "false", + cmVS7FlagTable::CaseInsensitive }, { "GenerateDebugInformation", "DEBUG", "Generate Debug Information", "true", cmVS7FlagTable::CaseInsensitive }, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae44496e2b2be3838af193c2ecfc7f3efaf1663a commit ae44496e2b2be3838af193c2ecfc7f3efaf1663a Author: Brad King AuthorDate: Tue Jun 27 15:58:39 2017 -0400 Commit: Brad King CommitDate: Wed Jun 28 08:55:40 2017 -0400 VS: Fix GenerateDebugInformation values for v140 and v141 toolsets When VS 2015 was first released, its new v140 toolset came with a `link.xml` file that changed the `GenerateDebugInformation` boolean (`false` and `true`) value from earlier toolsets to an enumeration consisting of the possible values `No`, `Debug`, and `DebugFastLink`. We first adapted to this in commit v3.4.2~2^2 (VS: Fix VS 2015 .vcxproj file value for GenerateDebugInformation, 2016-01-08), but that broke older toolsets that still expected the boolean. Then commit v3.6.0-rc1~295^2~1 (VS: Fix VS 2015 .vcxproj debug setting for older toolsets, 2016-02-24) added a hack to fix up the value based on the toolset in use. Several follow-up commits fixed this for more older toolsets because our flag table was at the time based on the generator in use rather than the toolset in use. Since commit v3.8.0-rc1~396^2 (VS: Choose flag map based on the toolset name, 2016-10-17) we use a flag table based on the toolset, so the fixup hack should not be needed. We had to keep it around only due to our default value for GenerateDebugInformation (`false` or `No`) still being based on the generator instead of the toolset. A VS 2015 update was released that changed the v140 toolset `link.xml` file back to using `false` and `true` for the `GenerateDebugInformation` enumeration variants previously known as `No` and `Debug`. In order to know which pair to use, we need to parse the `link.xml` file for the current toolset. Switch back to using `false` and `true` unconditionally in our `GenerateDebugInformation` flag table entries and default value. With that plus the toolset-based flag table, we now get incorrect values for `GenerateDebugInformation` only when using a v140 toolset from an older VS 2015 installation. Detect this case by parsing `link.xml` and add special logic to convert `false` and `true` to `No` and `Debug` to satisfy the older toolset specification. Inspired-by: Ian Hojnicki Fixes: #17020 diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 0e02b0a..e3835ff 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -130,6 +130,7 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator( this->DefaultNasmFlagTable = cmVS10NASMFlagTable; this->DefaultRcFlagTable = cmVS10RCFlagTable; this->Version = VS10; + this->PlatformToolsetNeedsDebugEnum = false; } bool cmGlobalVisualStudio10Generator::MatchesGeneratorName( @@ -195,6 +196,24 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset( return false; } + if (cmHasLiteralPrefix(this->GetPlatformToolsetString(), "v140")) { + // The GenerateDebugInformation link setting for the v140 toolset + // in VS 2015 was originally an enum with "No" and "Debug" values, + // differing from the "false" and "true" values used in older toolsets. + // A VS 2015 update changed it back. Parse the "link.xml" file to + // discover which one we need. + std::string const link_xml = this->VCTargetsPath + "/1033/link.xml"; + cmsys::ifstream fin(link_xml.c_str()); + std::string line; + while (fin && cmSystemTools::GetLineFromStream(fin, line)) { + if (line.find(" Switch=\"DEBUG\" ") != std::string::npos) { + this->PlatformToolsetNeedsDebugEnum = + line.find(" Name=\"Debug\" ") != std::string::npos; + break; + } + } + } + if (this->GeneratorToolsetCuda.empty()) { // Find the highest available version of the CUDA tools. std::vector cudaTools; diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 20f992a..4a5c245 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -59,6 +59,13 @@ public: const char* GetPlatformToolsetCuda() const; std::string const& GetPlatformToolsetCudaString() const; + /** Return whether we need to use No/Debug instead of false/true + for GenerateDebugInformation. */ + bool GetPlatformToolsetNeedsDebugEnum() const + { + return this->PlatformToolsetNeedsDebugEnum; + } + /** Return the CMAKE_SYSTEM_NAME. */ std::string const& GetSystemName() const { return this->SystemName; } @@ -169,6 +176,8 @@ private: virtual std::string FindDevEnvCommand(); virtual std::string GetVSMakeProgram() { return this->GetMSBuildCommand(); } + bool PlatformToolsetNeedsDebugEnum; + bool ParseGeneratorToolset(std::string const& ts, cmMakefile* mf); std::string VCTargetsPath; diff --git a/Source/cmVS140LinkFlagTable.h b/Source/cmVS140LinkFlagTable.h index 618087a..613541c 100644 --- a/Source/cmVS140LinkFlagTable.h +++ b/Source/cmVS140LinkFlagTable.h @@ -38,7 +38,7 @@ static cmVS7FlagTable cmVS140LinkFlagTable[] = { { "GenerateDebugInformation", "DEBUG:FASTLINK", "Optimize for faster linking", "DebugFastLink", cmVS7FlagTable::CaseInsensitive }, - { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "Debug", + { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "true", cmVS7FlagTable::CaseInsensitive }, { "SubSystem", "", "Not Set", "NotSet", 0 }, diff --git a/Source/cmVS141LinkFlagTable.h b/Source/cmVS141LinkFlagTable.h index e707b90..ff0c1da 100644 --- a/Source/cmVS141LinkFlagTable.h +++ b/Source/cmVS141LinkFlagTable.h @@ -38,7 +38,7 @@ static cmVS7FlagTable cmVS141LinkFlagTable[] = { { "GenerateDebugInformation", "DEBUG:FASTLINK", "Generate Debug Information optimized for faster links", "DebugFastLink", cmVS7FlagTable::CaseInsensitive }, - { "GenerateDebugInformation", "DEBUG", "Generate Debug Information", "Debug", + { "GenerateDebugInformation", "DEBUG", "Generate Debug Information", "true", cmVS7FlagTable::CaseInsensitive }, { "SubSystem", "", "Not Set", "NotSet", 0 }, diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index de1f5b0..88fa19c 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -17,8 +17,6 @@ #include "cm_auto_ptr.hxx" -static std::string const kWINDOWS_7_1_SDK = "Windows7.1SDK"; - static std::string cmVS10EscapeXML(std::string arg) { cmSystemTools::ReplaceString(arg, "&", "&"); @@ -3130,12 +3128,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( linkOptions.AddFlag("StackReserveSize", stackVal); } - if (this->LocalGenerator->GetVersion() >= - cmGlobalVisualStudioGenerator::VS14) { - linkOptions.AddFlag("GenerateDebugInformation", "No"); - } else { - linkOptions.AddFlag("GenerateDebugInformation", "false"); - } + linkOptions.AddFlag("GenerateDebugInformation", "false"); std::string pdb = this->GeneratorTarget->GetPDBDirectory(config.c_str()); pdb += "/"; @@ -3182,26 +3175,14 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions( "%(IgnoreSpecificDefaultLibraries)"); } - // Hack to fix flag version selection in a common use case. - // FIXME: Select flag table based on toolset instead of VS version. - if (this->LocalGenerator->GetVersion() >= - cmGlobalVisualStudioGenerator::VS14) { - const char* toolset = gg->GetPlatformToolset(); - if (toolset && - (toolset == kWINDOWS_7_1_SDK || /* clang-format please break here */ - cmHasLiteralPrefix(toolset, "v80") || - cmHasLiteralPrefix(toolset, "v90") || - cmHasLiteralPrefix(toolset, "v100") || - cmHasLiteralPrefix(toolset, "v110") || - cmHasLiteralPrefix(toolset, "v120"))) { - if (const char* debug = - linkOptions.GetFlag("GenerateDebugInformation")) { - // Convert value from enumeration back to boolean for older toolsets. - if (strcmp(debug, "No") == 0) { - linkOptions.AddFlag("GenerateDebugInformation", "false"); - } else if (strcmp(debug, "Debug") == 0) { - linkOptions.AddFlag("GenerateDebugInformation", "true"); - } + // VS 2015 without all updates has a v140 toolset whose + // GenerateDebugInformation expects No/Debug instead of false/true. + if (gg->GetPlatformToolsetNeedsDebugEnum()) { + if (const char* debug = linkOptions.GetFlag("GenerateDebugInformation")) { + if (strcmp(debug, "false") == 0) { + linkOptions.AddFlag("GenerateDebugInformation", "No"); + } else if (strcmp(debug, "true") == 0) { + linkOptions.AddFlag("GenerateDebugInformation", "Debug"); } } } https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27bef1609b8e5aa7a5a8124d8bf3b5f652a163af commit 27bef1609b8e5aa7a5a8124d8bf3b5f652a163af Author: Ian Hojnicki AuthorDate: Thu Jun 22 16:37:05 2017 -0500 Commit: Brad King CommitDate: Wed Jun 28 08:55:40 2017 -0400 VS: Fix GenerateDebugInformation flag map text for v141 toolsets Update the help text to match that from v141's link.xml file. diff --git a/Source/cmVS141LinkFlagTable.h b/Source/cmVS141LinkFlagTable.h index ec5dc2a..e707b90 100644 --- a/Source/cmVS141LinkFlagTable.h +++ b/Source/cmVS141LinkFlagTable.h @@ -36,9 +36,9 @@ static cmVS7FlagTable cmVS141LinkFlagTable[] = { "requireAdministrator", "RequireAdministrator", 0 }, { "GenerateDebugInformation", "DEBUG:FASTLINK", - "Optimize for faster linking", "DebugFastLink", + "Generate Debug Information optimized for faster links", "DebugFastLink", cmVS7FlagTable::CaseInsensitive }, - { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "Debug", + { "GenerateDebugInformation", "DEBUG", "Generate Debug Information", "Debug", cmVS7FlagTable::CaseInsensitive }, { "SubSystem", "", "Not Set", "NotSet", 0 }, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=17a397c22a7c7f14aa001f85f64c36428c71414a commit 17a397c22a7c7f14aa001f85f64c36428c71414a Author: Ian Hojnicki AuthorDate: Thu Jun 22 16:37:05 2017 -0500 Commit: Brad King CommitDate: Wed Jun 28 08:55:40 2017 -0400 VS: Split link flag table between v140 and v141 toolsets diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index df086d3..c8cf02c 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -8,8 +8,8 @@ #include "cmMakefile.h" #include "cmVS140CLFlagTable.h" #include "cmVS140CSharpFlagTable.h" +#include "cmVS140LinkFlagTable.h" #include "cmVS14LibFlagTable.h" -#include "cmVS14LinkFlagTable.h" #include "cmVS14MASMFlagTable.h" #include "cmVS14RCFlagTable.h" @@ -93,7 +93,7 @@ cmGlobalVisualStudio14Generator::cmGlobalVisualStudio14Generator( this->DefaultClFlagTable = cmVS140CLFlagTable; this->DefaultCSharpFlagTable = cmVS140CSharpFlagTable; this->DefaultLibFlagTable = cmVS14LibFlagTable; - this->DefaultLinkFlagTable = cmVS14LinkFlagTable; + this->DefaultLinkFlagTable = cmVS140LinkFlagTable; this->DefaultMasmFlagTable = cmVS14MASMFlagTable; this->DefaultRcFlagTable = cmVS14RCFlagTable; this->Version = VS14; diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx index da2bf8c..ce1ba00 100644 --- a/Source/cmGlobalVisualStudio15Generator.cxx +++ b/Source/cmGlobalVisualStudio15Generator.cxx @@ -8,6 +8,7 @@ #include "cmMakefile.h" #include "cmVS141CLFlagTable.h" #include "cmVS141CSharpFlagTable.h" +#include "cmVS141LinkFlagTable.h" #include "cmVSSetupHelper.h" static const char vs15generatorName[] = "Visual Studio 15 2017"; @@ -85,6 +86,7 @@ cmGlobalVisualStudio15Generator::cmGlobalVisualStudio15Generator( this->DefaultPlatformToolset = "v141"; this->DefaultClFlagTable = cmVS141CLFlagTable; this->DefaultCSharpFlagTable = cmVS141CSharpFlagTable; + this->DefaultLinkFlagTable = cmVS141LinkFlagTable; this->Version = VS15; } diff --git a/Source/cmVS14LinkFlagTable.h b/Source/cmVS140LinkFlagTable.h similarity index 99% copy from Source/cmVS14LinkFlagTable.h copy to Source/cmVS140LinkFlagTable.h index 596f880..618087a 100644 --- a/Source/cmVS14LinkFlagTable.h +++ b/Source/cmVS140LinkFlagTable.h @@ -1,4 +1,4 @@ -static cmVS7FlagTable cmVS14LinkFlagTable[] = { +static cmVS7FlagTable cmVS140LinkFlagTable[] = { // Enum Properties { "ShowProgress", "", "Not Set", "NotSet", 0 }, diff --git a/Source/cmVS14LinkFlagTable.h b/Source/cmVS141LinkFlagTable.h similarity index 99% rename from Source/cmVS14LinkFlagTable.h rename to Source/cmVS141LinkFlagTable.h index 596f880..ec5dc2a 100644 --- a/Source/cmVS14LinkFlagTable.h +++ b/Source/cmVS141LinkFlagTable.h @@ -1,4 +1,4 @@ -static cmVS7FlagTable cmVS14LinkFlagTable[] = { +static cmVS7FlagTable cmVS141LinkFlagTable[] = { // Enum Properties { "ShowProgress", "", "Not Set", "NotSet", 0 }, diff --git a/Source/cmVisualStudio10ToolsetOptions.cxx b/Source/cmVisualStudio10ToolsetOptions.cxx index afca216..9a1d950 100644 --- a/Source/cmVisualStudio10ToolsetOptions.cxx +++ b/Source/cmVisualStudio10ToolsetOptions.cxx @@ -26,10 +26,11 @@ #include "cmVS12RCFlagTable.h" #include "cmVS140CLFlagTable.h" #include "cmVS140CSharpFlagTable.h" +#include "cmVS140LinkFlagTable.h" #include "cmVS141CLFlagTable.h" #include "cmVS141CSharpFlagTable.h" +#include "cmVS141LinkFlagTable.h" #include "cmVS14LibFlagTable.h" -#include "cmVS14LinkFlagTable.h" #include "cmVS14MASMFlagTable.h" #include "cmVS14RCFlagTable.h" @@ -114,8 +115,10 @@ cmIDEFlagTable const* cmVisualStudio10ToolsetOptions::GetLinkFlagTable( { std::string const useToolset = this->GetToolsetName(name, toolset); - if ((useToolset == "v140") || (useToolset == "v141")) { - return cmVS14LinkFlagTable; + if (useToolset == "v141") { + return cmVS141LinkFlagTable; + } else if (useToolset == "v140") { + return cmVS140LinkFlagTable; } else if (useToolset == "v120") { return cmVS12LinkFlagTable; } else if (useToolset == "v110") { ----------------------------------------------------------------------- Summary of changes: Help/release/dev/deb-on-windows.rst | 7 +++ Modules/CPackDeb.cmake | 14 +++-- Modules/FindXCTest.cmake | 4 +- Source/CMakeLists.txt | 2 +- Source/CPack/cmCPackDebGenerator.cxx | 28 +++++++-- Source/CPack/cmCPackGeneratorFactory.cxx | 10 ++-- Source/cmFileCommand.cxx | 41 ++++++++----- Source/cmGlobalVisualStudio10Generator.cxx | 19 ++++++ Source/cmGlobalVisualStudio10Generator.h | 9 +++ Source/cmGlobalVisualStudio14Generator.cxx | 4 +- Source/cmGlobalVisualStudio15Generator.cxx | 2 + Source/cmGlobalXCodeGenerator.cxx | 30 +++++++++- Source/cmLocalGenerator.cxx | 13 +++++ ...mVS14LinkFlagTable.h => cmVS140LinkFlagTable.h} | 9 ++- ...mVS14LinkFlagTable.h => cmVS141LinkFlagTable.h} | 12 +++- Source/cmVisualStudio10TargetGenerator.cxx | 37 +++--------- Source/cmVisualStudio10ToolsetOptions.cxx | 9 ++- Source/cmXCodeScheme.cxx | 61 +++++++++++++------- Source/cmXCodeScheme.h | 17 ++++-- Source/cm_sys_stat.h | 5 ++ Tests/XCTest/CMakeLists.txt | 2 +- 21 files changed, 239 insertions(+), 96 deletions(-) create mode 100644 Help/release/dev/deb-on-windows.rst copy Source/{cmVS14LinkFlagTable.h => cmVS140LinkFlagTable.h} (97%) rename Source/{cmVS14LinkFlagTable.h => cmVS141LinkFlagTable.h} (96%) hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 29 10:35:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 29 Jun 2017 10:35:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-197-ga9ab7d5 Message-ID: <20170629143507.2D018FAD2B@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via a9ab7d5f1b98b230262fd798c57cc81c802a9061 (commit) via 594b0f80a8e943f9c2a0920b56f3c69b0553b92a (commit) via 9807a0ced71cb7f8b6f5d5ee3ca6a03526fa252d (commit) from 55465be8404d37713c4bece1cc20acb3a7165492 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a9ab7d5f1b98b230262fd798c57cc81c802a9061 commit a9ab7d5f1b98b230262fd798c57cc81c802a9061 Merge: 55465be 594b0f8 Author: Brad King AuthorDate: Thu Jun 29 10:26:19 2017 -0400 Commit: Brad King CommitDate: Thu Jun 29 10:26:19 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Thu Jun 29 10:35:07 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Thu, 29 Jun 2017 10:35:07 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc5-7-g594b0f8 Message-ID: <20170629143507.D34E0FAD2C@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via 594b0f80a8e943f9c2a0920b56f3c69b0553b92a (commit) via 7ba27e364fcf6a941590600d7fb1d304bd462e05 (commit) via ae44496e2b2be3838af193c2ecfc7f3efaf1663a (commit) via 27bef1609b8e5aa7a5a8124d8bf3b5f652a163af (commit) via 17a397c22a7c7f14aa001f85f64c36428c71414a (commit) via 9807a0ced71cb7f8b6f5d5ee3ca6a03526fa252d (commit) via e7936751ee8e0ade7810df97434c985552cf8a7c (commit) from 372de3f8039f69b3a2edcf7120083ec4097f8bd3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio10Generator.cxx | 19 ++++++++++ Source/cmGlobalVisualStudio10Generator.h | 9 +++++ Source/cmGlobalVisualStudio14Generator.cxx | 4 +-- Source/cmGlobalVisualStudio15Generator.cxx | 2 ++ ...mVS14LinkFlagTable.h => cmVS140LinkFlagTable.h} | 9 +++-- ...mVS14LinkFlagTable.h => cmVS141LinkFlagTable.h} | 12 +++++-- Source/cmVisualStudio10TargetGenerator.cxx | 37 +++++--------------- Source/cmVisualStudio10ToolsetOptions.cxx | 9 +++-- Utilities/cmcurl/CMakeLists.txt | 2 ++ 9 files changed, 65 insertions(+), 38 deletions(-) copy Source/{cmVS14LinkFlagTable.h => cmVS140LinkFlagTable.h} (97%) rename Source/{cmVS14LinkFlagTable.h => cmVS141LinkFlagTable.h} (96%) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 30 00:05:05 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 30 Jun 2017 00:05:05 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-198-gdb96eba Message-ID: <20170630040506.15037FAD4E@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via db96ebaa7bc5366aa5790307b682aa8548c2bba2 (commit) from a9ab7d5f1b98b230262fd798c57cc81c802a9061 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=db96ebaa7bc5366aa5790307b682aa8548c2bba2 commit db96ebaa7bc5366aa5790307b682aa8548c2bba2 Author: Kitware Robot AuthorDate: Fri Jun 30 00:01:06 2017 -0400 Commit: Kitware Robot CommitDate: Fri Jun 30 00:01:06 2017 -0400 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index b1fcf31..182bc31 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 9) -set(CMake_VERSION_PATCH 20170629) +set(CMake_VERSION_PATCH 20170630) #set(CMake_VERSION_RC 1) ----------------------------------------------------------------------- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 30 10:25:04 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 30 Jun 2017 10:25:04 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-200-gbcca01d Message-ID: <20170630142504.75EDDFA7F8@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via bcca01d8adea0441fde4bd3f243ce43b70bb9cf6 (commit) via 97a9a35607e653ebd5184facc191125e03173ca4 (commit) from db96ebaa7bc5366aa5790307b682aa8548c2bba2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bcca01d8adea0441fde4bd3f243ce43b70bb9cf6 commit bcca01d8adea0441fde4bd3f243ce43b70bb9cf6 Merge: db96eba 97a9a35 Author: Brad King AuthorDate: Fri Jun 30 14:17:11 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 30 10:17:29 2017 -0400 Merge topic 'FindDoxygen-project-in-subdir' 97a9a356 FindDoxygen: Use a stable reference to the location of global resources Acked-by: Kitware Robot Merge-request: !1014 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=97a9a35607e653ebd5184facc191125e03173ca4 commit 97a9a35607e653ebd5184facc191125e03173ca4 Author: Robert Dailey AuthorDate: Wed Jun 28 16:02:57 2017 -0500 Commit: Robert Dailey CommitDate: Thu Jun 29 13:39:26 2017 -0500 FindDoxygen: Use a stable reference to the location of global resources FindDoxygen generates some files based on the version of Doxygen whose content will not vary across a project and are therefore a global resource that can be shared by all calls to `find_package(Doxygen)` and to `doxygen_add_docs`. We currently use `${PROJECT_BINARY_DIR}` to reference their location, but this is not stable because `project()` calls in a subdirectory can change it. Use `${CMAKE_BINARY_DIR}` instead. Reviewed-by: Craig Scott Fixes: #17022 diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake index 26d44b9..fb16f20 100644 --- a/Modules/FindDoxygen.cmake +++ b/Modules/FindDoxygen.cmake @@ -619,7 +619,7 @@ if(TARGET Doxygen::doxygen) # If doxygen was found, use it to generate a minimal default Doxyfile. # We will delete this file after we have finished using it below to # generate the other files that doxygen_add_docs() will use. - set(_Doxygen_tpl "${PROJECT_BINARY_DIR}/CMakeDoxyfile.tpl") + set(_Doxygen_tpl "${CMAKE_BINARY_DIR}/CMakeDoxyfile.tpl") execute_process( COMMAND "${DOXYGEN_EXECUTABLE}" -s -g "${_Doxygen_tpl}" OUTPUT_QUIET @@ -646,8 +646,8 @@ if(TARGET Doxygen::doxygen) # content is only dependent on the version of Doxygen being used. Therefore # we always put them at the top of the build tree so that they are in a # predictable location. - set(_doxyfile_in "${PROJECT_BINARY_DIR}/CMakeDoxyfile.in") - set(_doxyfile_defaults "${PROJECT_BINARY_DIR}/CMakeDoxygenDefaults.cmake") + set(_doxyfile_in "${CMAKE_BINARY_DIR}/CMakeDoxyfile.in") + set(_doxyfile_defaults "${CMAKE_BINARY_DIR}/CMakeDoxygenDefaults.cmake") file(WRITE "${_doxyfile_in}" ${_Doxygen_dne_header}) file(WRITE "${_doxyfile_defaults}" ${_Doxygen_dne_header}) @@ -896,7 +896,7 @@ doxygen_add_docs() for target ${targetName}") # Now bring in Doxgen's defaults for those things the project has not # already set and we have not provided above - include("${PROJECT_BINARY_DIR}/CMakeDoxygenDefaults.cmake" OPTIONAL) + include("${CMAKE_BINARY_DIR}/CMakeDoxygenDefaults.cmake" OPTIONAL) # Cleanup built HTMLs on "make clean" # TODO Any other dirs? @@ -1025,7 +1025,7 @@ doxygen_add_docs() for target ${targetName}") endforeach() # Prepare doxygen configuration file - set(_doxyfile_template "${PROJECT_BINARY_DIR}/CMakeDoxyfile.in") + set(_doxyfile_template "${CMAKE_BINARY_DIR}/CMakeDoxyfile.in") set(_target_doxyfile "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.${targetName}") configure_file("${_doxyfile_template}" "${_target_doxyfile}") ----------------------------------------------------------------------- Summary of changes: Modules/FindDoxygen.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 30 10:35:03 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 30 Jun 2017 10:35:03 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-204-gb6cbbbe Message-ID: <20170630143503.4911DFAC6C@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via b6cbbbe129fdbbbb12e7ac39e1589e448fd86031 (commit) via 15c5d9a0dd6961f908ffd30bc32471905a3d2bda (commit) via ab533e4851b1a9ac862af353e5013650f35360bf (commit) via c2a6df94ed639de2192c8baf2350efb2a4fd9c50 (commit) from bcca01d8adea0441fde4bd3f243ce43b70bb9cf6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b6cbbbe129fdbbbb12e7ac39e1589e448fd86031 commit b6cbbbe129fdbbbb12e7ac39e1589e448fd86031 Merge: 15c5d9a ab533e4 Author: Brad King AuthorDate: Fri Jun 30 14:32:18 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 30 10:32:22 2017 -0400 Merge topic 'server-mode-protocol-version-docs' ab533e48 Help: Document server-mode protocol versions more clearly Acked-by: Kitware Robot Merge-request: !1015 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=15c5d9a0dd6961f908ffd30bc32471905a3d2bda commit 15c5d9a0dd6961f908ffd30bc32471905a3d2bda Merge: bcca01d c2a6df9 Author: Brad King AuthorDate: Fri Jun 30 14:31:51 2017 +0000 Commit: Kitware Robot CommitDate: Fri Jun 30 10:32:02 2017 -0400 Merge topic 'xcode-cross-sdk-object-libraries' c2a6df94 Xcode: Use correct Object Library paths for cross-SDK builds Acked-by: Kitware Robot Merge-request: !1016 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ab533e4851b1a9ac862af353e5013650f35360bf commit ab533e4851b1a9ac862af353e5013650f35360bf Author: Tobias Hunger AuthorDate: Thu Jun 29 10:29:19 2017 +0200 Commit: Brad King CommitDate: Thu Jun 29 09:58:49 2017 -0400 Help: Document server-mode protocol versions more clearly diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst index 9520cc1..6a68a1c 100644 --- a/Help/manual/cmake-server.7.rst +++ b/Help/manual/cmake-server.7.rst @@ -254,6 +254,11 @@ versions supported by the cmake server. These are JSON objects with "major" and as experimental. These will contain the "isExperimental" key set to true. Enabling these requires a special command line argument when starting the cmake server mode. +Within a "major" version all "minor" versions are fully backwards compatible. +New "minor" versions may introduce functionality in such a way that existing +clients of the same "major" version will continue to work, provided they +ignore keys in the output that they do not know about. + Example:: [== "CMake Server" ==[ @@ -268,6 +273,9 @@ The first request that the client may send to the server is of type "handshake". This request needs to pass one of the "supportedProtocolVersions" of the "hello" type response received earlier back to the server in the "protocolVersion" field. +Giving the "major" version of the requested protocol version will make the server +use the latest minor version of that protocol. Use this if you do not explicitly +need to depend on a specific minor version. Each protocol version may request additional attributes to be present. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c2a6df94ed639de2192c8baf2350efb2a4fd9c50 commit c2a6df94ed639de2192c8baf2350efb2a4fd9c50 Author: Gregor Jasny AuthorDate: Thu Jun 29 14:19:23 2017 +0200 Commit: Brad King CommitDate: Thu Jun 29 09:52:44 2017 -0400 Xcode: Use correct Object Library paths for cross-SDK builds When calculating Object Library paths take a look at the `XCODE_EMIT_EFFECTIVE_PLATFORM_NAME` property to enable builds with different SDKs. Otherwise a hard-coded architecture could be chosen. Fixes: #16040 diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 45c1764..9037961 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -147,7 +147,7 @@ cmGlobalXCodeGenerator::cmGlobalXCodeGenerator( this->XcodeBuildCommandInitialized = false; this->ObjectDirArchDefault = "$(CURRENT_ARCH)"; - this->ComputeObjectDirArch(); + this->ObjectDirArch = this->ObjectDirArchDefault; cm->GetState()->SetIsGeneratorMultiConfig(true); } @@ -3087,12 +3087,12 @@ void cmGlobalXCodeGenerator::ComputeArchitectures(cmMakefile* mf) } } - this->ComputeObjectDirArch(); + this->ComputeObjectDirArch(mf); } -void cmGlobalXCodeGenerator::ComputeObjectDirArch() +void cmGlobalXCodeGenerator::ComputeObjectDirArch(cmMakefile* mf) { - if (this->Architectures.size() > 1) { + if (this->Architectures.size() > 1 || this->UseEffectivePlatformName(mf)) { this->ObjectDirArch = "$(CURRENT_ARCH)"; } else if (!this->Architectures.empty()) { this->ObjectDirArch = this->Architectures[0]; diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index f38fa3c..e69793b 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -247,7 +247,7 @@ private: const cmGeneratorTarget* t) const; void ComputeArchitectures(cmMakefile* mf); - void ComputeObjectDirArch(); + void ComputeObjectDirArch(cmMakefile* mf); void addObject(cmXCodeObject* obj); std::string PostBuildMakeTarget(std::string const& tName, ----------------------------------------------------------------------- Summary of changes: Help/manual/cmake-server.7.rst | 8 ++++++++ Source/cmGlobalXCodeGenerator.cxx | 8 ++++---- Source/cmGlobalXCodeGenerator.h | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 30 10:55:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 30 Jun 2017 10:55:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-207-gc705f0a Message-ID: <20170630145502.9DA1CFAAA1@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via c705f0af63e2e438d0c6de2400cd90a005576125 (commit) via d3234a8a48bbb24eff6bb1a0b1750d18c3417792 (commit) via bc92960b63614c4ef9e09a1c063843047190c113 (commit) from b6cbbbe129fdbbbb12e7ac39e1589e448fd86031 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c705f0af63e2e438d0c6de2400cd90a005576125 commit c705f0af63e2e438d0c6de2400cd90a005576125 Merge: b6cbbbe d3234a8 Author: Brad King AuthorDate: Fri Jun 30 10:51:16 2017 -0400 Commit: Brad King CommitDate: Fri Jun 30 10:51:16 2017 -0400 Merge branch 'release-3.9' ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake From kwrobot at kitware.com Fri Jun 30 10:55:02 2017 From: kwrobot at kitware.com (Kitware Robot) Date: Fri, 30 Jun 2017 10:55:02 -0400 (EDT) Subject: [Cmake-commits] CMake branch, release, updated. v3.9.0-rc5-11-gd3234a8 Message-ID: <20170630145502.B6C11FAAAE@public.kitware.com> This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, release has been updated via d3234a8a48bbb24eff6bb1a0b1750d18c3417792 (commit) via bc92960b63614c4ef9e09a1c063843047190c113 (commit) via 97a9a35607e653ebd5184facc191125e03173ca4 (commit) via c2a6df94ed639de2192c8baf2350efb2a4fd9c50 (commit) from 594b0f80a8e943f9c2a0920b56f3c69b0553b92a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: Modules/FindDoxygen.cmake | 10 +++++----- Source/cmGlobalXCodeGenerator.cxx | 8 ++++---- Source/cmGlobalXCodeGenerator.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) hooks/post-receive -- CMake