mirror of
https://github.com/mikeoliphant/neural-amp-modeler-lv2.git
synced 2026-05-10 04:30:14 +02:00
Enable architecture-specific optimization by default. Added option to turn it off.
This commit is contained in:
+11
-2
@@ -24,9 +24,18 @@ source_group(NAM ${CMAKE_CURRENT_SOURCE_DIR} FILES ${NAM_SOURCES})
|
|||||||
|
|
||||||
option(DISABLE_DENORMALS "Disable floating point denormals" ON)
|
option(DISABLE_DENORMALS "Disable floating point denormals" ON)
|
||||||
|
|
||||||
if(DISABLE_DENORMALS)
|
if (DISABLE_DENORMALS)
|
||||||
add_definitions(-DDISABLE_DENORMALS)
|
add_definitions(-DDISABLE_DENORMALS)
|
||||||
endif(DISABLE_DENORMALS)
|
endif (DISABLE_DENORMALS)
|
||||||
|
|
||||||
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(amd64)|(AMD64)")
|
||||||
|
option(USE_NATIVE_ARCH "Enable architecture-specific optimizations" ON)
|
||||||
|
|
||||||
|
if (USE_NATIVE_ARCH)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64-v3")
|
||||||
|
message("Enabling -march=x86-64-v3")
|
||||||
|
endif (USE_NATIVE_ARCH)
|
||||||
|
endif ()
|
||||||
|
|
||||||
target_compile_features(neural_amp_modeler PUBLIC cxx_std_17)
|
target_compile_features(neural_amp_modeler PUBLIC cxx_std_17)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user