Commit 6899cfef authored by sgho's avatar sgho Committed by Mads M. Pedersen
Browse files

Include the O3 optimization flag for Intel compiler (both Linux and Windows)

parent 79002025
......@@ -154,6 +154,7 @@ if(CMAKE_Fortran_COMPILER)
# message ("Using Intel fortran")
target_compile_options(${PROJECT_NAME} PRIVATE
-O3 ; # common optimization flag for both Linux and Windows
# if windows then <windows arg, e.g. ",/MP"> else <linux arg, e.g. "-multiple-processes">
$<IF:$<PLATFORM_ID:Windows>,/MP,-multiple-processes>; #Creates multiple processes that can be used to compile large numbers of source files at the same time. https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-multiple-processes-mp
$<IF:$<PLATFORM_ID:Windows>,/libs:${LIB};,> #Specifies a multi-threaded, static run-time library. https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-libs
......@@ -166,7 +167,7 @@ if(CMAKE_Fortran_COMPILER)
$<IF:$<PLATFORM_ID:Windows>,,-diag-disable=5462>; # Ignore Warning # 5462: Global name too long
$<IF:$<PLATFORM_ID:Windows>,${CODECOV},>
$<IF:$<PLATFORM_ID:Windows>,/Qmkl;,> #Tells the compiler to link using the parallel libraries in the Intel® MKL. https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-mkl-qmkl
$<IF:$<PLATFORM_ID:Windows>,,-fPIC;>
$<IF:$<PLATFORM_ID:Windows>,,-fPIC;> # Needed in order to run as shared object
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment