diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d3842e8b89401c66e3046629f8996aa7a19e847c..a8fdca618024ff635345500a499e2b881d211dc4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,10 +22,10 @@ cta_srpm: retry: 1 image: gitlab-registry.cern.ch/linuxsupport/cc7-base script: - - yum install -y gcc-c++ cmake make rpm-build + - yum install -y gcc-c++ cmake cmake3 make rpm-build - mkdir build_srpm - cd build_srpm - - cmake -DPackageOnly:Bool=true -DVCS_VERSION=${CTA_BUILD_ID} .. + - cmake3 -DPackageOnly:Bool=true -DVCS_VERSION=${CTA_BUILD_ID} .. - make cta_srpm artifacts: @@ -44,7 +44,7 @@ cta_rpm: image: gitlab-registry.cern.ch/linuxsupport/cc7-base script: - cp -f continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/*.repo /etc/yum.repos.d/ - - yum install -y gcc-c++ cmake make rpm-build + - yum install -y gcc-c++ cmake cmake3 make rpm-build - yum -y install yum-plugin-priorities yum-plugin-versionlock - yum install -y git - git submodule update --init --recursive @@ -53,7 +53,7 @@ cta_rpm: - yum-builddep --nogpgcheck -y build_srpm/RPM/SRPMS/* - mkdir build_rpm - cd build_rpm - - cmake -DVCS_VERSION=${CTA_BUILD_ID} .. + - cmake3 -DVCS_VERSION=${CTA_BUILD_ID} .. - make cta_rpm artifacts: @@ -74,7 +74,7 @@ cta_tagged_rpm: - if [ -z "${CI_COMMIT_TAG}" ]; then echo "This is not a tagged commit, exiting"; exit 0; fi - echo "Building package for tag ${CI_COMMIT_TAG}. CTA_VERSION=${TAG_VERSION} - CTA_RELEASE=${TAG_RELEASE}" - cp -f continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/*.repo /etc/yum.repos.d/ - - yum install -y gcc-c++ cmake make rpm-build + - yum install -y gcc-c++ cmake cmake3 make rpm-build - yum -y install yum-plugin-priorities yum-plugin-versionlock - yum install -y git - git submodule update --init --recursive @@ -83,7 +83,7 @@ cta_tagged_rpm: - yum-builddep --nogpgcheck -y build_srpm/RPM/SRPMS/* - mkdir build_tagged_rpm - cd build_tagged_rpm - - CTA_VERSION=${TAG_VERSION} cmake -DVCS_VERSION=${TAG_RELEASE} .. + - CTA_VERSION=${TAG_VERSION} cmake3 -DVCS_VERSION=${TAG_RELEASE} .. - make cta_rpm artifacts: diff --git a/CMakeLists.txt b/CMakeLists.txt index 969f897f4f034259bfb04ef7f43c99de8c6e98a4..8c9acc5c0c33da7378417691eebdd9f79b1cd540 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) project(cta) @@ -43,17 +43,29 @@ execute_process( OUTPUT_VARIABLE GCC_VERSION) if (CMAKE_COMPILER_IS_GNUCC) - if (GCC_VERSION VERSION_EQUAL 4.4.7) - message(STATUS "Detected gcc = 4.4.7 - build cmdline only with c++0x") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") - set (BUILD_CMDLINE_ONLY TRUE) - endif (GCC_VERSION VERSION_EQUAL 4.4.7) - if (GCC_VERSION VERSION_GREATER 4.4.7) - message(STATUS "Detected gcc > 4.4.7 - switching on support for c++1y") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y") - endif (GCC_VERSION VERSION_GREATER 4.4.7) + message(STATUS "GCC VERSION ${GCC_VERSION}") + if (GCC_VERSION VERSION_GREATER_EQUAL 7.0) + message(STATUS "Detected gcc > 7.0 - switching on support for c++17") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") + else (GCC_VERSION VERSION_LESS 7.0) + if (GCC_VERSION VERSION_EQUAL 4.4.7) + message(STATUS "Detected gcc = 4.4.7 - build cmdline only with c++0x") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") + set (BUILD_CMDLINE_ONLY TRUE) + endif (GCC_VERSION VERSION_EQUAL 4.4.7) + if (GCC_VERSION VERSION_GREATER 4.4.7) + message(STATUS "Detected gcc > 4.4.7 - switching on support for c++1y") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y") + endif (GCC_VERSION VERSION_GREATER 4.4.7) + endif (GCC_VERSION VERSION_GREATER 11.0) endif (CMAKE_COMPILER_IS_GNUCC) +# CTA continue using the old ABI, so we should force it. This command only works on cmake3, +# so we should update the requeriments of CMakeLists +# see: https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html +# https://docs.ceph.com/en/latest/dev/cxx/ +add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0) + set (GCC_VERSION_GE_4_8_0 FALSE) if (CMAKE_COMPILER_IS_GNUCC AND ((GCC_VERSION VERSION_GREATER 4.8.0) OR (GCC_VERSION VERSION_EQUAL 4.8.0))) set (GCC_VERSION_GE_4_8_0 TRUE) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index bfc08ab7ea7bb9d605c759d0118dfffc7e2f894c..d4068fa42b70eeeda51ba540e10b82542f929af4 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -12,6 +12,7 @@ - cta/CTA#1057 - Remove support for MySQL - cta/CTA#1074 - Improve error reporting when retrieving archive - cta/CTA#1026 - Add activity Mount Policy resolution to CTA +- cta/CTA#1086 - Build cta with gcc 7.x(C++17) and fix deprecated code ### Bug fixes - cta/CTA#1059 - Clean up warnings reported by static analysis diff --git a/catalogue/CMakeLists.txt b/catalogue/CMakeLists.txt index d57af1e81cbc787de63519746139621509fbc978..27532aea439c17013ff3865e8a97a85499a45cd6 100644 --- a/catalogue/CMakeLists.txt +++ b/catalogue/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) find_package(Protobuf3 REQUIRED) diff --git a/cmdline/CMakeLists.txt b/cmdline/CMakeLists.txt index 9ce60b7e60c84daa3c3e4b23be2f734fa30fca92..f49321ae9231693a7f218f49de19e9c104c9122a 100644 --- a/cmdline/CMakeLists.txt +++ b/cmdline/CMakeLists.txt @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) add_subdirectory (restore_files) diff --git a/cmdline/restore_files/CMakeLists.txt b/cmdline/restore_files/CMakeLists.txt index 5fcfc8587b1b469682484592f0aa553f1fb93740..a0fcef99f836bb430f93a30aa9f2cb82b63075a5 100644 --- a/cmdline/restore_files/CMakeLists.txt +++ b/cmdline/restore_files/CMakeLists.txt @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) find_package(xrootdclient REQUIRED) find_package(Protobuf3 REQUIRED) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index f917146b8d8a23a6c639e270ce3ee77a05711beb..5cf6177350739b1f94c2bca08c3709c51069d531 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) find_package (binutils REQUIRED) find_package (libattr REQUIRED) diff --git a/common/exception/CMakeLists.txt b/common/exception/CMakeLists.txt index 232855446e404f590a3a64496d271556928900f9..1625fcf02e280203db859948c891f42f53327e1f 100644 --- a/common/exception/CMakeLists.txt +++ b/common/exception/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) include_directories(${PROJECT_SOURCE_DIR}/tapeserver) diff --git a/continuousintegration/orchestration/tests/CMakeLists.txt b/continuousintegration/orchestration/tests/CMakeLists.txt index f4a498cc3cd21598dd3d64e66f271016280dbbaf..1d8266a994f67ad3b9a8b3360f59a79955101207 100644 --- a/continuousintegration/orchestration/tests/CMakeLists.txt +++ b/continuousintegration/orchestration/tests/CMakeLists.txt @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) find_package(xrootd REQUIRED) find_package(xrootdclient REQUIRED) diff --git a/cta-release/CMakeLists.txt b/cta-release/CMakeLists.txt index 9be7b3b3ae3043254135459894a7ab2c0e0e31d6..caf27a197ae616b0d5b0a69f98bef692e6e455a3 100644 --- a/cta-release/CMakeLists.txt +++ b/cta-release/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) # As file(DOWNLOAD) fails silently function(safedl SOURCEURL DESTFILE) diff --git a/cta.spec.in b/cta.spec.in index 0edff7d9883843556ca4ab1acaa73a0ac7241a02..b60fa4d025494c64633fdb73f97c2e253a641782 100644 --- a/cta.spec.in +++ b/cta.spec.in @@ -35,7 +35,7 @@ License: GPLv3+ Group: Application/cta BuildRoot: %{_builddir}/%{name}-%{version}-root -BuildRequires: cmake >= 2.6 redhat-rpm-config +BuildRequires: cmake3 >= 3.17 redhat-rpm-config # The CTA client is the only component of CTA that can be compiled on both SLC6 @@ -77,7 +77,7 @@ The CTA project is the CERN Tape Archive system. mkdir -p build cd build # The cmake step does the selection between client/server compilation or just client -CTA_VERSION=%{ctaVersion} cmake .. -DCOMPILE_PACKAGING:STRING=0 -DVCS_VERSION=%{ctaRelease} +CTA_VERSION=%{ctaVersion} cmake3 .. -DCOMPILE_PACKAGING:STRING=0 -DVCS_VERSION=%{ctaRelease} # Workaround for the inability of cmake to handle properly the dependencies to generated code. %{__make} -s %{_smp_mflags} -k || true %{__make} -s %{_smp_mflags} diff --git a/disk/CMakeLists.txt b/disk/CMakeLists.txt index 993988b26d39e998500b5c42d91ec4d270951702..61932186f0f5767e4ea450bd3b22bc8646112495 100644 --- a/disk/CMakeLists.txt +++ b/disk/CMakeLists.txt @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) find_package (xrootd REQUIRED) find_package (xrootdclient REQUIRED) diff --git a/eos_cta/CMakeLists.txt b/eos_cta/CMakeLists.txt index 151f5e34a27c03afede75311e9ddb4f3bbcdd145..1b944cdc82ceeaa4ecc75c27201693b1d129de54 100644 --- a/eos_cta/CMakeLists.txt +++ b/eos_cta/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.17) find_package(Protobuf3 REQUIRED) find_package(GRPC REQUIRED) diff --git a/eos_grpc_client/CMakeLists.txt b/eos_grpc_client/CMakeLists.txt index b838bb000965142e2b013295f150fbeb0ffc384e..d27c8c2a61e5c794b2ec2439ec3aec328d17b7f1 100644 --- a/eos_grpc_client/CMakeLists.txt +++ b/eos_grpc_client/CMakeLists.txt @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) find_package(Protobuf3 REQUIRED) find_package(GRPC REQUIRED) diff --git a/mediachanger/CMakeLists.txt b/mediachanger/CMakeLists.txt index 7790288d6a70ccbe41c3b21df29e6977a434cda0..26c7996b068829594636e6c013f924ceea3f254c 100644 --- a/mediachanger/CMakeLists.txt +++ b/mediachanger/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) add_subdirectory(castorrmc) find_package(openssl REQUIRED) diff --git a/mediachanger/castorrmc/CMakeLists.txt b/mediachanger/castorrmc/CMakeLists.txt index e673ebaa15563ef355595daaa23659aaeef8b259..002ead434a93d5dccdbfc41e6ed0e7926d3e2f1c 100644 --- a/mediachanger/castorrmc/CMakeLists.txt +++ b/mediachanger/castorrmc/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) add_subdirectory(common) add_subdirectory(rmc) diff --git a/mediachanger/castorrmc/common/CMakeLists.txt b/mediachanger/castorrmc/common/CMakeLists.txt index 4861b76f7403a39c254794aedd6a89a360c26f63..e838934f27808b01fa163cc17f2c35ea3c122433 100644 --- a/mediachanger/castorrmc/common/CMakeLists.txt +++ b/mediachanger/castorrmc/common/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) include_directories (${PROJECT_SOURCE_DIR}/mediachanger/castorrmc/h) diff --git a/mediachanger/castorrmc/rmc/CMakeLists.txt b/mediachanger/castorrmc/rmc/CMakeLists.txt index f95cc575dd7f0654061de326056d239fb989f9a1..7ae6a6ad6a62597a510547148762c8a3d01a8011 100644 --- a/mediachanger/castorrmc/rmc/CMakeLists.txt +++ b/mediachanger/castorrmc/rmc/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) include_directories (${PROJECT_SOURCE_DIR}/mediachanger/castorrmc/h) set (RMCD_SRC_FILES diff --git a/objectstore/CMakeLists.txt b/objectstore/CMakeLists.txt index fef6d5d04cc3c38fa291ac4cdcf0cdd0f46ab88c..daaccca16b484a1aab1d37b0bd279fff98f3bc43 100644 --- a/objectstore/CMakeLists.txt +++ b/objectstore/CMakeLists.txt @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../middletier) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index c6ecfb6c800b0df247571069cfc61111a1f2c920..2dbd27425b1a6b5f2bfe1082a6c8fc480979adca 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -12,6 +12,6 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) add_subdirectory(eosfstgcd) diff --git a/python/eosfstgcd/CMakeLists.txt b/python/eosfstgcd/CMakeLists.txt index e287fe609d27f734e2391e7204e8dfecea238520..5ae3120bc503d0738039fbbe3b5a0b40feb943a5 100644 --- a/python/eosfstgcd/CMakeLists.txt +++ b/python/eosfstgcd/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) install (PROGRAMS ctafstgcd.py DESTINATION usr/bin RENAME cta-fst-gcd) install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/cta-fst-gcd.1cta DESTINATION /usr/share/man/man1) diff --git a/rdbms/CMakeLists.txt b/rdbms/CMakeLists.txt index b43037d6bfc12d8dcb4688b29b4b557ef01bfc58..a2320788906090b131e8c97186a260394dfcd487 100644 --- a/rdbms/CMakeLists.txt +++ b/rdbms/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) add_subdirectory (wrapper) diff --git a/rdbms/wrapper/CMakeLists.txt b/rdbms/wrapper/CMakeLists.txt index 84e7b2922c9e0d7149b55f397545a0684225dd41..549761cff575a4cd57d0465a3c91ff0ee2eed47a 100644 --- a/rdbms/wrapper/CMakeLists.txt +++ b/rdbms/wrapper/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow") diff --git a/scheduler/CMakeLists.txt b/scheduler/CMakeLists.txt index 3ea982430c6d8dda169b74fa32e0a04eb2cb42b4..f2055f722105f77f16482b44e7677d1db6c6cf86 100644 --- a/scheduler/CMakeLists.txt +++ b/scheduler/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${XROOTD_INCLUDE_DIR}) diff --git a/scheduler/OStoreDB/OStoreDBInit.hpp b/scheduler/OStoreDB/OStoreDBInit.hpp index c54eceed8800062ae2c332bb321e307939afc215..ab916ec06a91558d3c5f61e72f6f8d5d2b754b00 100644 --- a/scheduler/OStoreDB/OStoreDBInit.hpp +++ b/scheduler/OStoreDB/OStoreDBInit.hpp @@ -35,7 +35,7 @@ public: { // Initialise the ObjectStore Backend m_backend = std::move(objectstore::BackendFactory::createBackend(db_conn_str, log)); - m_backendPopulator = make_unique<objectstore::BackendPopulator>(*m_backend, client_process, log::LogContext(log)); + m_backendPopulator = cta::make_unique<objectstore::BackendPopulator>(*m_backend, client_process, log::LogContext(log)); if(leaveNonEmptyAgentsBehind) { m_backendPopulator->leaveNonEmptyAgentsBehind(); } diff --git a/statistics/CMakeLists.txt b/statistics/CMakeLists.txt index 0e395ea5901c01aca156a6ebabef9db61b969be5..07e63fac1546884bbff7697837dce9a57d55ded7 100644 --- a/statistics/CMakeLists.txt +++ b/statistics/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) find_package(Protobuf3 REQUIRED) diff --git a/tapeserver/CMakeLists.txt b/tapeserver/CMakeLists.txt index 6f492b91cb296421ecb32cf20bbe48f8c123b8bf..f7348318a90890a2c9e9fffa6d9b1323d50dcf4c 100644 --- a/tapeserver/CMakeLists.txt +++ b/tapeserver/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) # Old CASTOR's tapeserverd daemon code add_subdirectory (castor) diff --git a/tapeserver/castor/CMakeLists.txt b/tapeserver/castor/CMakeLists.txt index d92649da8ebdcd14b3692caea91ae57bc639f310..2e7e758bc5db47658a49c7da567d211814449d1a 100644 --- a/tapeserver/castor/CMakeLists.txt +++ b/tapeserver/castor/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) add_subdirectory (legacymsg) add_subdirectory (messages) diff --git a/tapeserver/castor/legacymsg/CMakeLists.txt b/tapeserver/castor/legacymsg/CMakeLists.txt index e4cbfee271eedad70c5c573ac1a2f225f920d6cc..1a109834334fd765535ae301db07d6bc0d4df30f 100644 --- a/tapeserver/castor/legacymsg/CMakeLists.txt +++ b/tapeserver/castor/legacymsg/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) include_directories(${PROJECT_SOURCE_DIR}/tapeserver) include_directories(${PROJECT_SOURCE_DIR}/tapeserver/h) diff --git a/tapeserver/castor/messages/CMakeLists.txt b/tapeserver/castor/messages/CMakeLists.txt index fde2e0c2218760477eb65f03fde6101c1e5113b7..36f9439d262b3d1fdf3d3a39fe0a515064dcffb4 100644 --- a/tapeserver/castor/messages/CMakeLists.txt +++ b/tapeserver/castor/messages/CMakeLists.txt @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) include_directories(/usr/include/shift) include_directories(${PROJECT_SOURCE_DIR}/tapeserver) diff --git a/tapeserver/castor/tape/CMakeLists.txt b/tapeserver/castor/tape/CMakeLists.txt index f87ad7ec2b303cec2871159fcad029f1ce7b7dea..99663c97de1fbdf453644aa0d24942e00048a3a7 100644 --- a/tapeserver/castor/tape/CMakeLists.txt +++ b/tapeserver/castor/tape/CMakeLists.txt @@ -12,6 +12,6 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) add_subdirectory (tapeserver) diff --git a/tapeserver/castor/tape/tapeserver/CMakeLists.txt b/tapeserver/castor/tape/tapeserver/CMakeLists.txt index 2cbe220f0650038e73cc08c5734115cab897c0d0..70d55ea6333b40defcdf9b0d27baf16ce10c56fc 100644 --- a/tapeserver/castor/tape/tapeserver/CMakeLists.txt +++ b/tapeserver/castor/tape/tapeserver/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) ########################################################################### # dependancies diff --git a/tapeserver/castor/tape/tapeserver/RAO/CMakeLists.txt b/tapeserver/castor/tape/tapeserver/RAO/CMakeLists.txt index 1b67533643a75eeec28b2f5e30a9d6b8ea1e70fe..c321063fb2a028fc5b9b003b7639cc11897d4e2d 100644 --- a/tapeserver/castor/tape/tapeserver/RAO/CMakeLists.txt +++ b/tapeserver/castor/tape/tapeserver/RAO/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) include_directories(${PROJECT_SOURCE_DIR}/tapeserver) include_directories(${PROJECT_SOURCE_DIR}/tapeserver/h) diff --git a/tapeserver/castor/tape/tapeserver/RAO/RAOFile.cpp b/tapeserver/castor/tape/tapeserver/RAO/RAOFile.cpp index 9212a3e2f71a36b626dc2c5a1d36955f82af8215..d0384d4b165b67d5aa3dd0bb8d86c46384647391 100644 --- a/tapeserver/castor/tape/tapeserver/RAO/RAOFile.cpp +++ b/tapeserver/castor/tape/tapeserver/RAO/RAOFile.cpp @@ -63,7 +63,7 @@ bool RAOFile::operator <(const RAOFile& other) const { } bool RAOFile::operator ==(const RAOFile& other) const { - return m_index == m_index; + return m_index == other.getIndex(); } RAOFile::~RAOFile() { @@ -83,4 +83,4 @@ double RAOFile::DistanceToFile::getCost() const{ uint64_t RAOFile::DistanceToFile::getDestinationFileIndex() const { return m_destinationFileIndex; } -}}}} \ No newline at end of file +}}}} diff --git a/tapeserver/castor/tape/tapeserver/RAO/RandomRAOAlgorithm.cpp b/tapeserver/castor/tape/tapeserver/RAO/RandomRAOAlgorithm.cpp index 0e8895e567754e326958f0cd09d5c96c353e2d2d..06220172cf8e66c5d4c88bd5ba006129021b82c7 100644 --- a/tapeserver/castor/tape/tapeserver/RAO/RandomRAOAlgorithm.cpp +++ b/tapeserver/castor/tape/tapeserver/RAO/RandomRAOAlgorithm.cpp @@ -15,6 +15,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <numeric> + #include "RandomRAOAlgorithm.hpp" #include "common/Timer.hpp" @@ -39,4 +41,4 @@ std::string RandomRAOAlgorithm::getName() const { return "random"; } -}}}} \ No newline at end of file +}}}} diff --git a/tapeserver/castor/tape/tapeserver/SCSI/CMakeLists.txt b/tapeserver/castor/tape/tapeserver/SCSI/CMakeLists.txt index c1f124fd8288010d6feb18e346db44070aedadd4..08d93d2bc5e96d406b7938982b7da9de2d13eec2 100644 --- a/tapeserver/castor/tape/tapeserver/SCSI/CMakeLists.txt +++ b/tapeserver/castor/tape/tapeserver/SCSI/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) include_directories(${CMAKE_SOURCE_DIR}/tapeserver) diff --git a/tapeserver/castor/tape/tapeserver/daemon/CMakeLists.txt b/tapeserver/castor/tape/tapeserver/daemon/CMakeLists.txt index ff8afec00245d6f4a2323b19d7ac0030578122e9..e20c29511226e9b6d537ca28638d1d1aaa3ab877 100644 --- a/tapeserver/castor/tape/tapeserver/daemon/CMakeLists.txt +++ b/tapeserver/castor/tape/tapeserver/daemon/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) include_directories(/usr/include/shift) include_directories(${CMAKE_SOURCE_DIR}/tapeserver) diff --git a/tapeserver/castor/tape/tapeserver/drive/CMakeLists.txt b/tapeserver/castor/tape/tapeserver/drive/CMakeLists.txt index 457c802f94cca0c61afbfe65a22cc68987ae0eb7..c5a554164dad09dcc2e10a90b545079962dd0471 100644 --- a/tapeserver/castor/tape/tapeserver/drive/CMakeLists.txt +++ b/tapeserver/castor/tape/tapeserver/drive/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) include_directories(${CMAKE_SOURCE_DIR}/tapeserver) diff --git a/tapeserver/castor/tape/tapeserver/file/CMakeLists.txt b/tapeserver/castor/tape/tapeserver/file/CMakeLists.txt index 65fc988ca691fbbdae68ac58314e217e488db661..ac22f8f3d66e802542a9da042c7b0ebc0e116e30 100644 --- a/tapeserver/castor/tape/tapeserver/file/CMakeLists.txt +++ b/tapeserver/castor/tape/tapeserver/file/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) find_package (xrootd REQUIRED) diff --git a/tapeserver/castor/tape/tapeserver/system/CMakeLists.txt b/tapeserver/castor/tape/tapeserver/system/CMakeLists.txt index 43e97377b49a725539d846de787b663b5476e2f7..95018c8c68cb29560d4754ae6f59c10bb7bf98a4 100644 --- a/tapeserver/castor/tape/tapeserver/system/CMakeLists.txt +++ b/tapeserver/castor/tape/tapeserver/system/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) include_directories(${CMAKE_SOURCE_DIR}/tapeserver) diff --git a/tapeserver/daemon/CMakeLists.txt b/tapeserver/daemon/CMakeLists.txt index e000f99cc09c2a5c2f769a196f167ff7693c5c7f..005a422b09d9ce2a7c193ad217477b4e068c73cd 100644 --- a/tapeserver/daemon/CMakeLists.txt +++ b/tapeserver/daemon/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) find_package(Protobuf3 REQUIRED) diff --git a/tapeserver/readtp/CMakeLists.txt b/tapeserver/readtp/CMakeLists.txt index 6607d13cd832fd4f0c136ae5d0ed84bbddae74d4..efcec063345dab8d0b00d4b5956eb90e5affce47 100644 --- a/tapeserver/readtp/CMakeLists.txt +++ b/tapeserver/readtp/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) include_directories(${CMAKE_SOURCE_DIR}/tapeserver) diff --git a/tapeserver/session/CMakeLists.txt b/tapeserver/session/CMakeLists.txt index 10374b878ef05fe9c144b9b7aff9c18f1042ba03..f0bbcfa5be109312b5e1377292738c8af3a23659 100644 --- a/tapeserver/session/CMakeLists.txt +++ b/tapeserver/session/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) add_library(ctatapesession SessionState.cpp diff --git a/tapeserver/tapelabel/CMakeLists.txt b/tapeserver/tapelabel/CMakeLists.txt index 029db1a8e3bff01a9a1ddcfb475f56fc364fee1a..0873befb6663e86fd2626e4b57b20c0161135d8a 100644 --- a/tapeserver/tapelabel/CMakeLists.txt +++ b/tapeserver/tapelabel/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) add_executable(cta-tape-label TapeLabelCmd.cpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index bdeb7e362c495bcfeedc967924bc0e79eb73a219..26a96b1b0f32a7573505ea6581417928498b24c9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) find_package(gmock REQUIRED) find_package(Protobuf3 REQUIRED) diff --git a/xroot_plugins/CMakeLists.txt b/xroot_plugins/CMakeLists.txt index 1719de0cf4460b65fc81fe2cb920d821676ffe9b..0188676b8e14f5e795fba72ad89835eac06f4823 100644 --- a/xroot_plugins/CMakeLists.txt +++ b/xroot_plugins/CMakeLists.txt @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.17) find_package(xrootd REQUIRED) find_package(Protobuf3 REQUIRED) diff --git a/xrootd-ssi-protobuf-interface b/xrootd-ssi-protobuf-interface index a0b27dcf857df8d19fdac6577bb8636257f6757c..8ff426526ce7c9b05559761be6c006fe6bbd2cc4 160000 --- a/xrootd-ssi-protobuf-interface +++ b/xrootd-ssi-protobuf-interface @@ -1 +1 @@ -Subproject commit a0b27dcf857df8d19fdac6577bb8636257f6757c +Subproject commit 8ff426526ce7c9b05559761be6c006fe6bbd2cc4