Skip to content

Commit ec88b2b

Browse files
Merge pull request #190 from cjee21/cmake
CMake: Prefer C++20 but minimum C++11
2 parents 0675b2e + 83c124d commit ec88b2b

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/ZenLib_Checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
matrix:
6363
include:
6464
- runner: windows-latest
65-
CXXFLAGS: "/std:c++20 /WX /MP"
65+
CXXFLAGS: "/WX"
6666
- runner: ubuntu-latest
6767
CXXFLAGS: "-Werror"
6868
- runner: macos-latest

Project/CMake/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,11 @@ set_target_properties(zen PROPERTIES
166166
VERSION ${ZenLib_VERSION}
167167
SOVERSION ${ZenLib_MAJOR_VERSION}
168168
PUBLIC_HEADER "${ZenLib_HDRS}"
169-
CXX_STANDARD 11
169+
CXX_STANDARD 20
170170
CXX_EXTENSIONS NO
171-
CXX_STANDARD_REQUIRED YES
171+
CXX_STANDARD_REQUIRED NO
172172
)
173+
target_compile_features(zen PRIVATE cxx_std_11)
173174

174175
install(TARGETS zen EXPORT zen-export
175176
PUBLIC_HEADER DESTINATION ${INCLUDE_INSTALL_DIR}/ZenLib

0 commit comments

Comments
 (0)