diff options
Diffstat (limited to 'Utilities/Scripts')
-rw-r--r-- | Utilities/Scripts/BoostScanDeps.cmake | 39 | ||||
-rwxr-xr-x | Utilities/Scripts/clang-format.bash | 8 | ||||
-rwxr-xr-x | Utilities/Scripts/regenerate-lexers.bash | 33 | ||||
-rwxr-xr-x | Utilities/Scripts/update-curl.bash | 12 | ||||
-rwxr-xr-x | Utilities/Scripts/update-gitsetup.bash | 7 | ||||
-rwxr-xr-x | Utilities/Scripts/update-jsoncpp.bash | 33 | ||||
-rwxr-xr-x | Utilities/Scripts/update-libarchive.bash | 2 |
7 files changed, 121 insertions, 13 deletions
diff --git a/Utilities/Scripts/BoostScanDeps.cmake b/Utilities/Scripts/BoostScanDeps.cmake index 2fd8f86..bd2e6a8 100644 --- a/Utilities/Scripts/BoostScanDeps.cmake +++ b/Utilities/Scripts/BoostScanDeps.cmake @@ -39,29 +39,40 @@ function(_Boost_FIND_COMPONENT_DEPENDENCIES component includedir _ret_libs) # Start by finding all headers for the component; header # dependencies via #include will be solved by future passes + file(GLOB_RECURSE _boost_mpi_python_headers + RELATIVE "${includedir}" + "${includedir}/boost/mpi/python/*") + list(INSERT _boost_mpi_python_headers 0 "boost/mpi/python.hpp") + + file(GLOB_RECURSE _boost_python_numpy_headers + RELATIVE "${includedir}" + "${includedir}/boost/python/numpy/*") + list(INSERT _boost_python_numpy_headers 0 "boost/python/numpy.hpp") # Special-case since it is part of mpi; look only in boost/mpi/python* if(component STREQUAL "mpi_python") set(_boost_DEPS "python") set(library_component TRUE) - file(GLOB_RECURSE _boost_unprocessed_headers - RELATIVE "${includedir}" - "${includedir}/boost/mpi/python/*") - list(INSERT _boost_unprocessed_headers 0 "${includedir}/boost/mpi/python.hpp") + set(_boost_unprocessed_headers ${_boost_mpi_python_headers}) + # Special-case since it is part of python; look only in boost/python/numpy* + elseif(component STREQUAL "numpy") + set(_boost_DEPS "python") + set(library_component TRUE) + set(_boost_unprocessed_headers ${_boost_python_numpy_headers}) # Special-case since it is a serialization variant; look in boost/serialization elseif(component STREQUAL "wserialization") set(library_component TRUE) file(GLOB_RECURSE _boost_unprocessed_headers RELATIVE "${includedir}" "${includedir}/boost/serialization/*") - list(INSERT _boost_unprocessed_headers 0 "${includedir}/boost/serialization.hpp") + list(INSERT _boost_unprocessed_headers 0 "boost/serialization.hpp") # Not really a library in its own right, but treat it as one elseif(component STREQUAL "math") set(library_component TRUE) file(GLOB_RECURSE _boost_unprocessed_headers RELATIVE "${includedir}" "${includedir}/boost/math/*") - list(INSERT _boost_unprocessed_headers 0 "${includedir}/boost/math.hpp") + list(INSERT _boost_unprocessed_headers 0 "boost/math.hpp") # Single test header elseif(component STREQUAL "unit_test_framework") set(library_component TRUE) @@ -79,7 +90,8 @@ function(_Boost_FIND_COMPONENT_DEPENDENCIES component includedir _ret_libs) file(GLOB_RECURSE _boost_unprocessed_headers RELATIVE "${includedir}" "${includedir}/boost/${component}/*") - list(INSERT _boost_unprocessed_headers 0 "${includedir}/boost/${component}.hpp") + list(INSERT _boost_unprocessed_headers 0 "boost/${component}.hpp") + list(REMOVE_ITEM _boost_unprocessed_headers ${_boost_mpi_python_headers} ${_boost_python_numpy_headers}) endif() while(_boost_unprocessed_headers) @@ -102,6 +114,8 @@ function(_Boost_FIND_COMPONENT_DEPENDENCIES component includedir _ret_libs) foreach(line ${_boost_header_deps}) string(REGEX REPLACE "^[ \t]*#[ \t]*define[ \t][ \t]*BOOST_LIB_NAME[ \t][ \t]*boost_([^ \t][^ \t]*).*" "\\1" _boost_component_match "${line}") + string(REPLACE "python3" "python" _boost_component_match "${_boost_component_match}") + string(REPLACE "numpy3" "numpy" _boost_component_match "${_boost_component_match}") list(FIND _boost_DEPS "${_boost_component_match}" _boost_dep_found) if(_boost_component_match STREQUAL "bzip2" OR _boost_component_match STREQUAL "zlib") @@ -119,6 +133,12 @@ function(_Boost_FIND_COMPONENT_DEPENDENCIES component includedir _ret_libs) # hard dependency (handle as special-case for mpi_python). continue() endif() + if(component STREQUAL "python" AND + boost_component_match STREQUAL "numpy") + # Optional python dependency; skip to avoid making it a + # hard dependency (handle as special-case for numpy). + continue() + endif() if (_boost_dep_found EQUAL -1 AND NOT "${_boost_component_match}" STREQUAL "${component}") list(APPEND _boost_DEPS "${_boost_component_match}") @@ -168,6 +188,11 @@ if(IS_DIRECTORY "${BOOST_DIR}/boost/mpi" AND IS_DIRECTORY "${BOOST_DIR}/boost/python") list(APPEND boost_components "mpi_python") endif() +# Special-case numpy, since it's a part of python +if(IS_DIRECTORY "${BOOST_DIR}/boost/python" AND + IS_DIRECTORY "${BOOST_DIR}/boost/python/numpy") + list(APPEND boost_components "numpy") +endif() # Special-case wserialization, which is a variant of serialization if(IS_DIRECTORY "${BOOST_DIR}/boost/serialization") list(APPEND boost_components "wserialization") diff --git a/Utilities/Scripts/clang-format.bash b/Utilities/Scripts/clang-format.bash index edcda77..3b331a1 100755 --- a/Utilities/Scripts/clang-format.bash +++ b/Utilities/Scripts/clang-format.bash @@ -92,7 +92,7 @@ fi # Verify that we have a tool. if ! type -p "$clang_format" >/dev/null; then - echo "Unable to locate '$clang_format'" + echo "Unable to locate a 'clang-format' tool." exit 1 fi @@ -111,7 +111,9 @@ $git_ls | # Select sources with our attribute. git check-attr --stdin format.clang-format | - sed -n '/: format\.clang-format: set$/ {s/:[^:]*:[^:]*$//p}' | + grep -e ': format\.clang-format: set$' | + sed -n 's/:[^:]*:[^:]*$//p' | # Update sources in-place. - xargs -d '\n' "$clang_format" -i + tr '\n' '\0' | + xargs -0 "$clang_format" -i diff --git a/Utilities/Scripts/regenerate-lexers.bash b/Utilities/Scripts/regenerate-lexers.bash new file mode 100755 index 0000000..22b681f --- /dev/null +++ b/Utilities/Scripts/regenerate-lexers.bash @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +set -e + +pushd "${BASH_SOURCE%/*}/../../Source/LexerParser" > /dev/null + +for lexer in \ + CommandArgument \ + DependsJava \ + Expr \ + Fortran +do + echo "Generating Lexer ${lexer}" + flex --nounistd -DFLEXINT_H --noline --header-file=cm${lexer}Lexer.h -ocm${lexer}Lexer.cxx cm${lexer}Lexer.in.l + sed -i 's/\s*$//' cm${lexer}Lexer.h cm${lexer}Lexer.cxx # remove trailing whitespaces + sed -i '${/^$/d;}' cm${lexer}Lexer.h cm${lexer}Lexer.cxx # remove blank line at the end + sed -i '1i#include "cmStandardLexer.h"' cm${lexer}Lexer.cxx # add cmStandardLexer.h include +done + + +# these lexers (at the moment only the ListFileLexer) are compiled as C and do not generate a header +for lexer in ListFile +do + + echo "Generating Lexer ${lexer}" + flex --nounistd -DFLEXINT_H --noline -ocm${lexer}Lexer.c cm${lexer}Lexer.in.l + sed -i 's/\s*$//' cm${lexer}Lexer.c # remove trailing whitespaces + sed -i '${/^$/d;}' cm${lexer}Lexer.c # remove blank line at the end + sed -i '1i#include "cmStandardLexer.h"' cm${lexer}Lexer.c # add cmStandardLexer.h include + +done + +popd > /dev/null diff --git a/Utilities/Scripts/update-curl.bash b/Utilities/Scripts/update-curl.bash index 465841a..b244827 100755 --- a/Utilities/Scripts/update-curl.bash +++ b/Utilities/Scripts/update-curl.bash @@ -8,14 +8,13 @@ readonly name="curl" readonly ownership="Curl Upstream <curl-library@cool.haxx.se>" readonly subtree="Utilities/cmcurl" readonly repo="https://github.com/curl/curl.git" -readonly tag="curl-7_54_1" +readonly tag="curl-7_56_0" readonly shortlog=false readonly paths=" CMake/* CMakeLists.txt COPYING include/curl/*.h - include/curl/curlbuild.h.cmake lib/*.c lib/*.h lib/CMakeLists.txt @@ -32,6 +31,15 @@ extract_source () { git_archive pushd "${extractdir}/${name}-reduced" rm lib/config-*.h + chmod a-x lib/connect.c + for f in \ + lib/cookie.c \ + lib/krb5.c \ + lib/security.c \ + ; do + iconv -f LATIN1 -t UTF8 $f -o $f.utf-8 + mv $f.utf-8 $f + done echo "* -whitespace" > .gitattributes popd } diff --git a/Utilities/Scripts/update-gitsetup.bash b/Utilities/Scripts/update-gitsetup.bash index 8f0da76..70fb165 100755 --- a/Utilities/Scripts/update-gitsetup.bash +++ b/Utilities/Scripts/update-gitsetup.bash @@ -11,6 +11,13 @@ readonly repo="https://gitlab.kitware.com/utils/gitsetup.git" readonly tag="setup" readonly shortlog=false readonly paths=" + .gitattributes + LICENSE + NOTICE + README + setup-hooks + setup-user + tips " extract_source () { diff --git a/Utilities/Scripts/update-jsoncpp.bash b/Utilities/Scripts/update-jsoncpp.bash new file mode 100755 index 0000000..f8fe544 --- /dev/null +++ b/Utilities/Scripts/update-jsoncpp.bash @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +set -e +set -x +shopt -s dotglob + +readonly name="jsoncpp" +readonly ownership="JsonCpp Upstream <kwrobot@kitware.com>" +readonly subtree="Utilities/cmjsoncpp" +readonly repo="https://github.com/open-source-parsers/jsoncpp.git" +readonly tag="1.8.2" +readonly shortlog=false +readonly paths=" + LICENSE + include/json + src/lib_json +" +readonly remove=" + include/json/autolink.h + src/lib_json/CMakeLists.txt + src/lib_json/sconscript + src/lib_json/version.h.in +" + +extract_source () { + git_archive + pushd "${extractdir}/${name}-reduced" + rm $remove + echo "* -whitespace" > .gitattributes + popd +} + +. "${BASH_SOURCE%/*}/update-third-party.bash" diff --git a/Utilities/Scripts/update-libarchive.bash b/Utilities/Scripts/update-libarchive.bash index 41c6a66..7534f94 100755 --- a/Utilities/Scripts/update-libarchive.bash +++ b/Utilities/Scripts/update-libarchive.bash @@ -8,7 +8,7 @@ readonly name="LibArchive" readonly ownership="LibArchive Upstream <libarchive-discuss@googlegroups.com>" readonly subtree="Utilities/cmlibarchive" readonly repo="https://github.com/libarchive/libarchive.git" -readonly tag="v3.3.1" +readonly tag="v3.3.2" readonly shortlog=false readonly paths=" CMakeLists.txt |