Skip to content

Commit

Permalink
Add default CMAKE build type
Browse files Browse the repository at this point in the history
  • Loading branch information
crvs committed May 11, 2024
1 parent 04ca3ad commit 2d44df8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")

if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
message(WARNING "Build type unset using default")
endif()
message(STATUS "Using CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")

set(CMAKE_AR "/usr/bin/gcc-ar")
set(CMAKE_LINKER "/usr/bin/ld")
set(CMAKE_NM "/usr/bin/gcc-nm")
set(CMAKE_OBJDUMP "/usr/bin/objdump")
set(CMAKE_RANLIB "/usr/bin/gcc-ranlib")

set(CMAKE_BUILD_TYPE RELEASE)

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
Expand Down

0 comments on commit 2d44df8

Please sign in to comment.