Skip to content

Commit

Permalink
cmake/configure_macosx.gnu.cmake: turn OpenMP off for clang compilers…
Browse files Browse the repository at this point in the history
…, fix netCDF rpath issue (#54)
  • Loading branch information
climbfuji authored Feb 11, 2020
1 parent 4a1e67e commit 29d2c4d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmake/configure_macosx.gnu.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ option(DEBUG "Enable DEBUG mode" OFF)
option(REPRO "Enable REPRO mode" OFF)
option(VERBOSE "Enable VERBOSE mode" OFF)
option(32BIT "Enable 32BIT (single precision arithmetic in dycore)" OFF)
option(OPENMP "Enable OpenMP threading" ON)
# OpenMP broken for clang compiler
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang*")
option(OPENMP "Enable OpenMP threading" OFF)
else()
option(OPENMP "Enable OpenMP threading" ON)
endif()
option(AVX2 "Enable AVX2 instruction set" OFF)

option(INLINE_POST "Enable inline post" OFF)
Expand All @@ -36,4 +41,7 @@ set(MKL_DIR $ENV{MKL_DIR})
set(MKL_INC $ENV{MKL_INC})
set(MKL_LIB $ENV{MKL_LIB})

# Workaround for rpath in netCDF
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath ${NETCDF_LIBDIR}")

message("")

0 comments on commit 29d2c4d

Please sign in to comment.