cmake: added -O2 which gives the performance improvement needed.
This commit is contained in:
parent
cd82c613aa
commit
57b7c52865
@ -103,6 +103,11 @@ set_target_properties(PUserFcnBase
|
|||||||
target_include_directories(
|
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})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user