Skip to content

Commit

Permalink
CMakeLists.txt: make C++11 standard required (not optional).
Browse files Browse the repository at this point in the history
This fixes #455 "Test for C++11
compiler at configure time".
  • Loading branch information
skvadrik committed Jul 21, 2023
1 parent 59c5604 commit 96104a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ endif()
# -std=gnu++11, not -std=c++11. Extensions are needed to enable POSIX functions on
# Cygwin and NetBSD.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON) # fail if the C++ compiler does not support this standard
set(CMAKE_POSITION_INDEPENDENT_CODE ON) # make sure object libraries work with shared libraries

# needed for POSIX file API
Expand Down

0 comments on commit 96104a6

Please sign in to comment.