Skip to content

Commit 387c4a7

Browse files
authored
Compile googletest as static libraries (#187)
Additional changes: fix gcc version on daint to 5.3
1 parent 372204c commit 387c4a7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/install" CACHE PATH "CMake install prefix")
1515

1616
cmake_policy(SET CMP0048 NEW)
17-
project(Serialbox LANGUAGES C CXX VERSION 2.5.0)
17+
project(Serialbox LANGUAGES C CXX VERSION 2.5.1)
1818
cmake_minimum_required(VERSION 3.9.0)
1919

2020
set(CMAKE_CXX_EXTENSIONS OFF)
@@ -183,7 +183,10 @@ include(IDESupport)
183183

184184
#---------------------------------------- GTest ----------------------------------------------------
185185
if(SERIALBOX_TESTING)
186+
set(tmp_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
187+
set(BUILD_SHARED_LIBS OFF)
186188
add_subdirectory(external/googletest)
189+
set(BUILD_SHARED_LIBS ${tmp_BUILD_SHARED_LIBS})
187190

188191
if(SERIALBOX_ENABLE_C)
189192
set(SERIALBOX_HAS_C 1)

tools/cscs-scripts/env_daint.sh

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ elif [ "$FC_COMPILER" = "pgfortran18.10" ]; then
9595
FC_COMPILER="pgfortran"
9696
else
9797
module swap PrgEnv-cray PrgEnv-gnu
98+
module swap gcc gcc/5.3.0
9899
# module load cray-netcdf
99100
# module load cray-hdf5
100101
# export NETCDF_ROOT=${NETCDF_DIR}

0 commit comments

Comments
 (0)