Skip to content

Commit

Permalink
c++ standard to 20
Browse files Browse the repository at this point in the history
  • Loading branch information
lobis committed Dec 6, 2023
1 parent 72e0afa commit aa3358f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
git -C xerces-source checkout tags/v3.2.4
mkdir -p ${{ github.workspace }}/xerces-source/build
cd ${{ github.workspace }}/xerces-source/build
cmake .. -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/xerces -DCMAKE_CXX_STANDARD=23 -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -Dnetwork-accessor=socket -Dtranscoder=iconv -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC
cmake .. -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/xerces -DCMAKE_CXX_STANDARD=20 -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -Dnetwork-accessor=socket -Dtranscoder=iconv -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC
make install -j$(nproc)
- name: Cache Geant4 Installation
Expand All @@ -70,7 +70,7 @@ jobs:
git clone https://github.com/Geant4/geant4.git ${{ github.workspace }}/geant4-source --depth 1 --branch v${{ matrix.geant4-version }}
mkdir -p ${{ github.workspace }}/geant4-source/build
cd ${{ github.workspace }}/geant4-source/build
cmake .. -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/geant4 -DXERCESC_ROOT_DIR=${{ github.workspace }}/xerces -DCMAKE_CXX_STANDARD=23 -DCMAKE_BUILD_TYPE=Release -DGEANT4_USE_GDML=ON -DGEANT4_INSTALL_EXAMPLES=OFF -DGEANT4_INSTALL_DATA=OFF -DGEANT4_BUILD_TLS_MODEL=global-dynamic -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC -DGEANT4_USE_SYSTEM_EXPAT=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF
cmake .. -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/geant4 -DXERCESC_ROOT_DIR=${{ github.workspace }}/xerces -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=Release -DGEANT4_USE_GDML=ON -DGEANT4_INSTALL_EXAMPLES=OFF -DGEANT4_INSTALL_DATA=OFF -DGEANT4_BUILD_TLS_MODEL=global-dynamic -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC -DGEANT4_USE_SYSTEM_EXPAT=OFF -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF
make install -j$(nproc)
install-geant4-datasets:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ project(

set(PYTHON_MODULE_NAME geant4_application)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ RUN apt-get update -qq && apt-get install -q -y --no-install-recommends \
# Install a more recent CMake version
RUN pip install cmake

ARG CMAKE_CXX_STANDARD=23
ARG CMAKE_CXX_STANDARD=20
ARG GEANT4_VERSION=11.1.3
ARG XERCES_VERSION=3.2.4

RUN git clone https://github.com/apache/xerces-c.git /tmp/xerces \
&& git -C /tmp/xerces checkout tags/v${XERCES_VERSION} \
&& cmake -G Ninja -B /tmp/xerces/build -S /tmp/xerces \
-DCMAKE_INSTALL_PREFIX=/opt/xerces \
-DCMAKE_CXX_STANDARD=23 \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-Dnetwork-accessor=socket \
Expand All @@ -30,7 +30,7 @@ RUN git clone https://github.com/Geant4/geant4.git /tmp/geant4 --branch=v${GEANT
&& cmake -G Ninja -B /tmp/geant4/build -S /tmp/geant4 \
-DCMAKE_INSTALL_PREFIX=/opt/geant4 \
-DXERCESC_ROOT_DIR=/opt/xerces \
-DCMAKE_CXX_STANDARD=23 \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_BUILD_TYPE=Release \
-DGEANT4_USE_GDML=ON \
-DGEANT4_INSTALL_EXAMPLES=OFF \
Expand Down

0 comments on commit aa3358f

Please sign in to comment.