Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit a78233a

Browse files
author
Omar Awile
authored
Set CMAKE_BUILD_TYPE to be a cached var defaulting to RelWithDebInfo (#226)
1 parent eb7315a commit a78233a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ set(CMAKE_CXX_STANDARD 14)
1717
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1818
set(CMAKE_CXX_EXTENSIONS OFF)
1919
set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
20+
set(CMAKE_BUILD_TYPE
21+
RelWithDebInfo
22+
CACHE STRING "Empty or one of Debug, Release, RelWithDebInfo")
2023

2124
# =============================================================================
2225
# Settings to enable project as submodule

extra/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ string(REPLACE ";"
4545
string(TOUPPER "${CMAKE_BUILD_TYPE}" _BUILD_TYPE)
4646
set(BUILD_TYPE_C_FLAGS "${CMAKE_C_FLAGS_${_BUILD_TYPE}}")
4747
set(BUILD_TYPE_CXX_FLAGS "${CMAKE_CXX_FLAGS_${_BUILD_TYPE}}")
48-
message(STATUS "CXX Compile flags from BUILD_TYPE: ${BUILD_TYPE_CXX_FLAGS}")
48+
message(STATUS "CXX Compile flags from BUILD_TYPE (${_BUILD_TYPE}): ${BUILD_TYPE_CXX_FLAGS}")
4949

5050
# nmodl options
5151
if(CORENRN_ENABLE_NMODL)

0 commit comments

Comments
 (0)