-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CONFIG=apple and add CI test on macOS-11 (#47)
* test on macos * update * update * update * update * update * update * update * update
- Loading branch information
Showing
2 changed files
with
28 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
# for Apple clang compiler | ||
# additional libomp and gfortran installation required | ||
# mac computers are suggested to use this configuration for better performance | ||
|
||
if(NOT $ENV{HOMEBREW_PREFIX}) | ||
message(FATAL "Homebrew is not installed. Please install Homebrew first.") | ||
endif() | ||
|
||
set(CMAKE_C_COMPILER "clang" CACHE STRING "" FORCE) | ||
set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "" FORCE) | ||
set(CMAKE_C_FLAGS_DEBUG "-g -O0 -Wall -Wformat -Werror=format-security") | ||
set(CMAKE_C_FLAGS_RELEASE "-O3 -Wno-unknown-pragmas -Wno-logical-not-parentheses") | ||
set(CMAKE_Fortran_COMPILER "gfortran" CACHE STRING "" FORCE) | ||
# set(CMAKE_Fortran_COMPILER "gfortran" CACHE STRING "" FORCE) | ||
|
||
# OpenMP with libomp | ||
set(CMAKE_EXE_LINKER_FLAGS "-L/usr/local/lib -lomp") | ||
set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp" CACHE STRING "" FORCE) | ||
set(CMAKE_EXE_LINKER_FLAGS "-L$ENV{HOMEBREW_PREFIX}/opt/libomp/lib -lomp") | ||
set(OpenMP_C_FLAGS "-I$ENV{HOMEBREW_PREFIX}/opt/libomp/include -Xpreprocessor -fopenmp" CACHE STRING "" FORCE) | ||
set(OpenMP_C_LIB_NAMES "") | ||
set(CMAKE_OSX_SYSROOT "") | ||
|