1 # Custom build type "Reference", to be used for creating new
2 # reference values in the Gromacs regression tests.
3 set( CMAKE_CXX_FLAGS_REFERENCE "-O0 -g" CACHE STRING "C++ flags for regressiontests reference runs." FORCE)
4 set( CMAKE_C_FLAGS_REFERENCE "-O0 -g" CACHE STRING "C flags for regressiontests reference runs." FORCE)
5 mark_as_advanced( CMAKE_CXX_FLAGS_REFERENCE CMAKE_C_FLAGS_REFERENCE)
7 # turn off all fancy options for the regressiontests reference build
8 if("${CMAKE_BUILD_TYPE}" STREQUAL "Reference")
9 set(GMX_GPU OFF CACHE BOOL "Disabled for regressiontests reference builds" FORCE)
10 set(GMX_OPENMP OFF CACHE BOOL "Disabled for regressiontests reference builds" FORCE)
11 set(GMX_CPU_ACCELERATION "None" CACHE STRING "Disabled for regressiontests reference builds" FORCE)
12 set(GMX_FFT_LIBRARY "fftpack" CACHE STRING "Use fftpack for regressiontests reference builds" FORCE)
13 set(GMX_SOFTWARE_INVSQRT OFF CACHE BOOL "Disabled for regressiontests reference builds" FORCE)
14 set(GMX_THREAD_MPI OFF CACHE BOOL "Disabled for regressiontests reference builds" FORCE)
16 # C_COMPILER_VERSION is not defined automatically for CMake below 2.8.8,
17 # so we call the GROMACS work-around for that
18 include(gmxGetCompilerInfo)
19 get_compiler_version()
20 if(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR NOT "${C_COMPILER_VERSION}" MATCHES "4.7")
21 message(WARNING "Reference values for regressiontests should use Gromacs compiled with "
22 "gcc 4.7, but your configuration is using ${CMAKE_C_COMPILER_ID}-${C_COMPILER_VERSION}.")