Skip to content

Commit

Permalink
Set compiler optimization level to O3 and enable warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dstolpmann committed Jan 19, 2022
1 parent 3392b3d commit d3e3ba0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ cmake_minimum_required(VERSION 3.5)

option(MACHINE_LEARNING "Build with machine learning support" OFF)

# Source: https://stackoverflow.com/a/41361741
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

add_subdirectory(src)

0 comments on commit d3e3ba0

Please sign in to comment.