cmake: added -O2 which gives the performance improvement needed.

This commit is contained in:
suter_a 2018-06-05 07:52:47 +02:00
parent 74c1e63570
commit c74644cd57

View File

@ -110,6 +110,10 @@ target_include_directories(
PUserFcnBase BEFORE PRIVATE $<BUILD_INTERFACE:${MUSRFIT_INC}> PUserFcnBase BEFORE PRIVATE $<BUILD_INTERFACE:${MUSRFIT_INC}>
) )
#--- add compile options for optimization -------------------------------------
target_compile_options(PMusr PUBLIC -O2)
target_compile_options(PUserFcnBase PUBLIC -O2)
#--- add OpenMP compile options if needed ------------------------------------- #--- add OpenMP compile options if needed -------------------------------------
if (OpenMP_FOUND) if (OpenMP_FOUND)
target_compile_options(PMusr PUBLIC ${OpenMP_CXX_FLAGS}) target_compile_options(PMusr PUBLIC ${OpenMP_CXX_FLAGS})