Merge branch 'ml_flags' into 'main'
Define new build type 'GenericOpt' See merge request mluebke/diffusion!11
This commit is contained in:
commit
fbc4e76e73
@ -11,5 +11,23 @@ find_package(OpenMP)
|
|||||||
## SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -mfma")
|
## SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -mfma")
|
||||||
option(USE_OPENMP "Compile with OpenMP support" ON)
|
option(USE_OPENMP "Compile with OpenMP support" ON)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS_GENERICOPT "-O3 -march=native" CACHE STRING
|
||||||
|
"Flags used by the C++ compiler during opt builds."
|
||||||
|
FORCE)
|
||||||
|
|
||||||
|
set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
|
||||||
|
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel GenericOpt."
|
||||||
|
FORCE)
|
||||||
|
|
||||||
|
option(USE_UNSAFE_MATH_OPT
|
||||||
|
"Use compiler options to break IEEE compliances by
|
||||||
|
oenabling reordering of instructions when adding/multiplying of floating
|
||||||
|
points."
|
||||||
|
OFF)
|
||||||
|
|
||||||
|
if(USE_UNSAFE_MATH_OPT)
|
||||||
|
add_compile_options(-ffast-math)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(app)
|
add_subdirectory(app)
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user