This commit is contained in:
tqcq 2023-12-03 12:33:49 +08:00
parent daa3e0d059
commit 9dc27ee9bc
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.10)
project(crpc)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_program(Java_JAVA_EXECUTABLE NAMES java)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
@ -15,8 +17,6 @@ antlr4cpp_process_grammar(proto
${CMAKE_CURRENT_SOURCE_DIR}/src/grammar/ProtoParser.g4
)
set(CMAKE_CXX_STANDARD 17)
FILE(GLOB_RECURSE SRC_LIST ${PROJECT_SOURCE_DIR}/src/*.cpp)
add_executable(crpc
${SRC_LIST}

View File

@ -119,7 +119,7 @@ else()
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DWITH_STATIC_CRT:BOOL=${ANTLR4_WITH_STATIC_CRT}
-DDISABLE_WARNINGS:BOOL=ON
# -DCMAKE_CXX_STANDARD:STRING=17 # if desired, compile the runtime with a different C++ standard
-DCMAKE_CXX_STANDARD:STRING=17 # if desired, compile the runtime with a different C++ standard
# -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD} # alternatively, compile the runtime with the same C++ standard as the outer project
INSTALL_COMMAND ""
EXCLUDE_FROM_ALL 1)