Skip to content

Commit 9f2d209

Browse files
author
Enrico Steffinlongo
committed
Switch cmake build to c++17
Changing the C++ standard to C++ 17 on the cmake-based build-system.
1 parent 9238a38 commit 9f2d209

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

CMakeLists.txt

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
cmake_minimum_required(VERSION 3.8)
22

3+
set(CMAKE_CXX_STANDARD 17)
4+
set(CMAKE_CXX_STANDARD_REQUIRED true)
5+
set(CMAKE_CXX_EXTENSIONS OFF)
6+
37
# Compile with /usr/bin/clang on MacOS
48
# See https://github.com/diffblue/cbmc/issues/4956
59
#
@@ -186,8 +190,9 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
186190
endif()
187191

188192
function(cprover_default_properties)
189-
set(CBMC_CXX_STANDARD 11)
190-
set(CBMC_CXX_STANDARD_REQUIRED true)
193+
set(CBMC_CXX_STANDARD ${CMAKE_CXX_STANDARD})
194+
set(CBMC_CXX_STANDARD_REQUIRED ${CMAKE_CXX_STANDARD_REQUIRED})
195+
set(CBMC_CXX_EXTENSIONS ${CMAKE_CXX_EXTENSIONS})
191196
set(CBMC_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY
192197
"Developer ID Application: Daniel Kroening")
193198

scripts/cadical_CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ target_compile_options(cadical PUBLIC -DNBUILD)
1414
set_target_properties(
1515
cadical
1616
PROPERTIES
17-
CXX_STANDARD 11
17+
CXX_STANDARD 17
1818
CXX_STANDARD_REQUIRED true
19+
CXX_EXTENSIONS OFF
1920
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Developer ID Application: Daniel Kroening"
2021
)
2122

scripts/glucose_CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ add_library(glucose-condensed
99
set_target_properties(
1010
glucose-condensed
1111
PROPERTIES
12-
CXX_STANDARD 11
12+
CXX_STANDARD 17
1313
CXX_STANDARD_REQUIRED true
14+
CXX_EXTENSIONS OFF
1415
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Developer ID Application: Daniel Kroening"
1516
)
1617

scripts/minisat2_CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ add_library(minisat2-condensed
1010
set_target_properties(
1111
minisat2-condensed
1212
PROPERTIES
13-
CXX_STANDARD 11
13+
CXX_STANDARD 17
1414
CXX_STANDARD_REQUIRED true
15+
CXX_EXTENSIONS OFF
1516
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Developer ID Application: Daniel Kroening"
1617
)
1718

src/solvers/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
set(CMAKE_CXX_STANDARD 11)
2-
set(CMAKE_CXX_STANDARD_REQUIRED true)
3-
41
# We may use one of several different solver libraries.
52
# The following files wrap the chosen solver library.
63
# We remove them all from the solver-library sources list, and then add the

0 commit comments

Comments
 (0)