Unverified Commit b0c6641f authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

tweak compiler flags for Intel and GNU

parent 1642bf5a
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -52,7 +52,13 @@ include(CheckCCompilerFlag)
include(CheckIncludeFileCXX)

if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict -std=c++11")
  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict")
endif()

if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
  if(NOT (${CMAKE_BUILD_TYPE} STREQUAL "Debug"))
    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math -ftree-vectorize -fexpensive-optimizations")
  endif()
endif()

option(DISABLE_CXX11_REQUIREMENT "Disable check that requires C++11 for compiling LAMMPS" OFF)