Skip to content

Commit

Permalink
[CMake] fix CMAKE_CXX_STANDARD passed from github/actions and only [c…
Browse files Browse the repository at this point in the history
…++11, c++14]
  • Loading branch information
yanyiwu committed Jul 27, 2024
1 parent ade0331 commit 9721701
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
cpp_version: [c++03, c++11, c++14, c++17, c++20]
cpp_version: [11, 14]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## Next Version

+ [CMake] fix CMAKE_CXX_STANDARD passed from github/actions and [c++11, c++14] only

## v0.7.0

+ [CI] Added os.macos and cpp_version=[c++98, c++03, c++11, c++14, c++17, c++20]
Expand Down
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ PROJECT(limonp
# cmake config #
################

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL "C++ Standard Requirement")
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "C++ Extensions")
if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)
endif()
message(STATUS "CMAKE_CXX_STANDARD is ${CMAKE_CXX_STANDARD}")

set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)


##############
# dependency #
Expand Down

0 comments on commit 9721701

Please sign in to comment.