cmake: Add -restrict for Intel compilers for some packages

Some packages (USER-OMP, OPT, and USER-INTEL) require the -restrict
flag when using the Intel compiler.
This commit is contained in:
James Barnett 2017-10-03 11:15:44 -04:00
parent f2c1172741
commit 197f082784
1 changed files with 5 additions and 0 deletions

View File

@ -150,6 +150,11 @@ if(ENABLE_USER-OMP OR ENABLE_KOKKOS OR ENABLE_USER-INTEL)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
if((ENABLE_USER-OMP OR ENABLE_OPT OR ENABLE_USER-INTEL) AND
(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel"))
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -restrict")
endif()
if(ENABLE_KSPACE)
set(FFT "KISSFFT" CACHE STRING "FFT library for KSPACE package")
set_property(CACHE FFT PROPERTY STRINGS KISSFFT FFTW3 MKL FFTW2)