File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.2 )
2
2
3
+ # Build a Release version by default (default build flags for each build type
4
+ # are configured below).
5
+ if (NOT EXISTS ${CMAKE_BINARY_DIR} /CMakeCache.txt )
6
+ if (NOT CMAKE_BUILD_TYPE )
7
+ set (CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE )
8
+ endif ()
9
+ endif ()
3
10
4
11
# Grab the current CBMC version from config.inc
5
12
# We do this so we have a matching cbmc version between the Makefile build and
Original file line number Diff line number Diff line change @@ -266,7 +266,8 @@ require manual modification of build files.
266
266
Generally it is not necessary to manually specify individual compiler or
267
267
linker flags, as CMake defines a number of "build modes" including Debug and
268
268
Release modes. To build in a particular mode, add the flag
269
- `-DCMAKE_BUILD_TYPE=Debug` (or `Release`) to the initial invocation.
269
+ `-DCMAKE_BUILD_TYPE=Debug` (or `RelWithDebInfo`) to the initial invocation.
270
+ The default is to perform an optimized build via the `Release` configuration.
270
271
271
272
If you *do* need to manually add flags, use `-DCMAKE_CXX_FLAGS=...` and
272
273
`-DCMAKE_EXE_LINKER_FLAGS=...`. This is useful for enabling clang's
You can’t perform that action at this time.
0 commit comments