From bbe36d8c33fd091a54379845619a49d0b0fe92f7 Mon Sep 17 00:00:00 2001 From: Vicente Adolfo Bolea Sanchez Date: Mon, 8 Feb 2021 17:12:29 +0100 Subject: [PATCH 1/2] cmake: set c++14 as minimum c++ rev Signed-off-by: Vicente Adolfo Bolea Sanchez --- .gitlab-ci.yml | 6 +-- .gitlab/ci/centos7.yml | 14 +++--- .gitlab/ci/docker/centos7/cuda10.2/Dockerfile | 6 +-- .gitlab/ci/ubuntu1604.yml | 45 ------------------- CMake/VTKmCPUVectorization.cmake | 2 +- CMakeLists.txt | 11 +++-- README.md | 4 +- vtkm/Deprecated.h | 2 +- 8 files changed, 25 insertions(+), 65 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 483b6d929..52e16c598 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ # # * .gitlab/ci/docker/centos7/cuda10.2/ # - cuda -# - gcc 4.8.5 +# - gcc 7.3.1 # * .gitlab/ci/docker/centos8/base/ # - gcc 8.3.1 # - clang 8.0.1 @@ -13,7 +13,7 @@ # - cuda # - gcc 8.2.1 # * .gitlab/ci/docker/ubuntu1604/base/ -# - gcc 4.8 +# - gcc 5.4.0 # - clang 3.8 # - clang 5.0 # - tbb @@ -51,7 +51,7 @@ GIT_CLONE_PATH: $CI_BUILDS_DIR/gitlab-kitware-sciviz-ci .centos7: ¢os7 - image: "kitware/vtkm:ci-centos7_cuda10.2-20201016" + image: "kitware/vtkm:ci-centos7_cuda10.2-20210128" extends: - .docker_image diff --git a/.gitlab/ci/centos7.yml b/.gitlab/ci/centos7.yml index cc17b4b9f..f53ad9b3a 100644 --- a/.gitlab/ci/centos7.yml +++ b/.gitlab/ci/centos7.yml @@ -1,7 +1,7 @@ # Build on centos7 with CUDA and test on rhel8 and centos7 -# gcc 4.8 -build:centos7_gcc48: +# gcc 7.3.1 +build:centos7_gcc73: tags: - build - vtkm @@ -18,7 +18,7 @@ build:centos7_gcc48: CMAKE_GENERATOR: "Unix Makefiles" VTKM_SETTINGS: "cuda+turing+32bit_ids+no_rendering" -test:centos7_gcc48: +test:centos7_gcc73: tags: - test - vtkm @@ -31,9 +31,9 @@ test:centos7_gcc48: - .cmake_test_linux - .only-default dependencies: - - build:centos7_gcc48 + - build:centos7_gcc73 needs: - - build:centos7_gcc48 + - build:centos7_gcc73 test:rhel8_test_centos7: tags: @@ -50,6 +50,6 @@ test:rhel8_test_centos7: variables: CTEST_EXCLUSIONS: "built_against_test_install" dependencies: - - build:centos7_gcc48 + - build:centos7_gcc73 needs: - - build:centos7_gcc48 + - build:centos7_gcc73 diff --git a/.gitlab/ci/docker/centos7/cuda10.2/Dockerfile b/.gitlab/ci/docker/centos7/cuda10.2/Dockerfile index 93e3343e3..f71f5ab0c 100644 --- a/.gitlab/ci/docker/centos7/cuda10.2/Dockerfile +++ b/.gitlab/ci/docker/centos7/cuda10.2/Dockerfile @@ -1,9 +1,9 @@ FROM nvidia/cuda:10.2-devel-centos7 LABEL maintainer "Robert Maynard" -RUN yum install make gcc gcc-c++ curl cuda-compat-10-2 -y +RUN yum install make gcc gcc-c++ curl cuda-compat-10-2 centos-release-scl -y RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash -RUN yum install git git-lfs -y +RUN yum install git git-lfs devtoolset-7-gcc-c++ -y # Provide a consistent CMake path across all images # Install CMake 3.13 as it is the minium for cuda builds @@ -20,4 +20,4 @@ RUN mkdir /opt/cmake-latest/ && \ rm cmake-3.17.3-Linux-x86_64.sh && \ ln -s /opt/cmake-latest/bin/ctest /opt/cmake-latest/bin/ctest-latest -ENV PATH "/opt/cmake/bin:/opt/cmake-latest/bin:${PATH}" +ENV PATH "/opt/rh/devtoolset-7/root/bin:/opt/cmake/bin:/opt/cmake-latest/bin:${PATH}" diff --git a/.gitlab/ci/ubuntu1604.yml b/.gitlab/ci/ubuntu1604.yml index 4267ab397..15af71059 100644 --- a/.gitlab/ci/ubuntu1604.yml +++ b/.gitlab/ci/ubuntu1604.yml @@ -75,51 +75,6 @@ test:ubuntu1804_test_ubuntu1604_gcc5_2: needs: - build:ubuntu1604_gcc5_2 -# Build on ubuntu1604 with mpi + tbb and test on ubuntu1604 -# Uses gcc 4.8 -# Uses OpenMPI -build:ubuntu1604_gcc48: - tags: - - build - - vtkm - - docker - - linux - extends: - - .ubuntu1604 - - .cmake_build_linux - - .only-default - variables: - CC: "gcc-4.8" - CXX: "g++-4.8" - CMAKE_BUILD_TYPE: Release - #custom openmpi install location - CMAKE_PREFIX_PATH: "/opt/openmpi/" - VTKM_SETTINGS: "tbb+mpi+shared+no_rendering" - -test:ubuntu1604_gcc48: - tags: - - test - - vtkm - - docker - - linux - - privileged - extends: - - .ubuntu1604 - - .cmake_test_linux - - .only-default - variables: - #env flags to allow openmpi to run as root user - OMPI_ALLOW_RUN_AS_ROOT: 1 - OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 - #mpi location so that `built_against_test_install` tests - #pass - CMAKE_PREFIX_PATH: "/opt/openmpi/" - dependencies: - - build:ubuntu1604_gcc48 - needs: - - build:ubuntu1604_gcc48 - - # Build on ubuntu1604 with tbb and test on ubuntu1604 # Uses clang 5 build:ubuntu1604_clang5: diff --git a/CMake/VTKmCPUVectorization.cmake b/CMake/VTKmCPUVectorization.cmake index 7c9972ff1..87628f7f0 100644 --- a/CMake/VTKmCPUVectorization.cmake +++ b/CMake/VTKmCPUVectorization.cmake @@ -77,7 +77,7 @@ endif() set(vec_levels none native) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - #for now we presume gcc >= 4.8 + #for now we presume gcc >= 5.4 list(APPEND vec_levels avx avx2) #common flags for the avx and avx2 instructions for the gcc compiler diff --git a/CMakeLists.txt b/CMakeLists.txt index 129bf37ec..a06ac2311 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,14 @@ cmake_minimum_required(VERSION 3.12...3.15 FATAL_ERROR) project (VTKm) +# We only allow c++14 +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +# When using C++14 support make sure you use the standard C++ extensions rather +# than compiler-specific versions of the extensions (to preserve portability). +set(CMAKE_CXX_EXTENSIONS OFF) + # Update module path set(VTKm_CMAKE_MODULE_PATH ${VTKm_SOURCE_DIR}/CMake) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${VTKm_CMAKE_MODULE_PATH}) @@ -163,9 +171,6 @@ mark_as_advanced( ) #----------------------------------------------------------------------------- -# When using C++11 support make sure you use the standard C++ extensions rather -# than compiler-specific versions of the extensions (to preserve portability). -set(CMAKE_CXX_EXTENSIONS Off) # Setup default build types include(VTKmBuildType) diff --git a/README.md b/README.md index b1c6de3aa..0fe7f7103 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ effort. VTK-m Requires: + C++11 Compiler. VTK-m has been confirmed to work with the following - + GCC 4.8+ + + GCC 5.4+ + Clang 5.0+ + XCode 5.0+ + MSVC 2015+ @@ -103,7 +103,7 @@ Optional dependencies are: VTK-m has been tested on the following configurations:c + On Linux - + GCC 4.8.5, 5.4, 6.5, 7.4, 8.2, 9.2; Clang 5, 8; Intel 17.0.4; 19.0.0 + + GCC 5.4.0, 5.4, 6.5, 7.4, 8.2, 9.2; Clang 5, 8; Intel 17.0.4; 19.0.0 + CMake 3.12, 3.13, 3.16, 3.17 + CUDA 9.2, 10.2, 11.0, 11.1 + TBB 4.4 U2, 2017 U7 diff --git a/vtkm/Deprecated.h b/vtkm/Deprecated.h index ebe77ef83..656f71e8a 100644 --- a/vtkm/Deprecated.h +++ b/vtkm/Deprecated.h @@ -62,7 +62,7 @@ #if defined(__NVCC__) // Currently nvcc has zero support deprecated attributes -#elif __cplusplus >= 201402L +#elif __cplusplus >= 201402L && !defined(VTKM_GCC) // C++14 and better supports [[deprecated]] // Except in these cases: From 282bf6b8c7d8ece0765cee29ad152641e3719bee Mon Sep 17 00:00:00 2001 From: Lightweight Cell Library Upstream Date: Mon, 8 Feb 2021 15:08:33 +0000 Subject: [PATCH 2/2] lcl 2021-02-08 (6fe1a2d8) Code extracted from: https://gitlab.kitware.com/vtk/lcl.git at commit 6fe1a2d8983bcd00fe59ee6049a32d24fdc797af (master). --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f0032cfaf..5d9f61a26 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ There are many ways to contribute to [LCL]: + C++11 Compiler. Lightweight Cell Library has been confirmed to work with the following - + GCC 4.8+ + + GCC 5.4+ + Clang 3.3+ + XCode 5.0+ + MSVC 2015+