diff options
author | luigi1111 <luigi1111w@gmail.com> | 2021-09-23 22:22:42 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2021-09-23 22:22:42 -0500 |
commit | 6b824c9ed0e5555d614da9cadbb5bb2dbcd6a724 (patch) | |
tree | cca01cae5612ee9770004b303f00fe42e7c99b12 /contrib | |
parent | Merge pull request #7942 (diff) | |
parent | cmake: set required C/C++ standard to 11 (diff) | |
download | monero-6b824c9ed0e5555d614da9cadbb5bb2dbcd6a724.tar.xz |
Merge pull request #7945
4afd9a7 cmake: set required C/C++ standard to 11 (selsta)
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/epee/src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | contrib/epee/tests/src/CMakeLists.txt | 11 |
2 files changed, 10 insertions, 5 deletions
diff --git a/contrib/epee/src/CMakeLists.txt b/contrib/epee/src/CMakeLists.txt index 07f119ba4..3fa2f7fb4 100644 --- a/contrib/epee/src/CMakeLists.txt +++ b/contrib/epee/src/CMakeLists.txt @@ -47,9 +47,7 @@ if (USE_READLINE AND (GNU_READLINE_FOUND OR (DEPENDS AND NOT MINGW))) monero_add_library(epee_readline readline_buffer.cpp) endif() -if(HAVE_C11) -SET_PROPERTY(SOURCE memwipe.c PROPERTY COMPILE_FLAGS -std=c11) -endif() +set_property(SOURCE memwipe.c PROPERTY C_STANDARD 11) # Build and install libepee if we're building for GUI if (BUILD_GUI_DEPS) diff --git a/contrib/epee/tests/src/CMakeLists.txt b/contrib/epee/tests/src/CMakeLists.txt index 0c42f87ca..e724b53f4 100644 --- a/contrib/epee/tests/src/CMakeLists.txt +++ b/contrib/epee/tests/src/CMakeLists.txt @@ -1,6 +1,13 @@ cmake_minimum_required(VERSION 3.5) +set(CMAKE_C_STANDARD 11) +set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_C_EXTENSIONS OFF) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + set(Boost_USE_MULTITHREADED ON) include_directories(.) @@ -14,8 +21,8 @@ IF (MSVC) include_directories(SYSTEM platform/msvc) ELSE() # set stuff for other systems - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -Wall") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wno-reorder") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-reorder") ENDIF() |