Commit 096b1949 authored by Lukas Riedel's avatar Lukas Riedel

CMake now handles compiler flags based on CMAKE_BUILD_TYPE variable #1

For a Debug build, compiler warnings are enabled. For all other builds, optimization flags are invoked.
parent ff8f324c
......@@ -37,3 +37,9 @@ add_subdirectory("cmake/modules")
# finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Build Type: Default")
else()
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
endif()
\ No newline at end of file
add_executable("dorie" dorie.cc)
target_link_dune_default_libraries("dorie")
target_compile_options("dorie" PRIVATE $<$<CONFIG:Debug>:-Wall>)
target_compile_options("dorie" PRIVATE $<$<NOT:$<CONFIG:Debug>>:-O3 -g0 -ftree-vectorize>)
\ No newline at end of file
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