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) cmake_minimum_required(VERSION 3.10)
project(crpc) project(crpc)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_program(Java_JAVA_EXECUTABLE NAMES java) find_program(Java_JAVA_EXECUTABLE NAMES java)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) 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 ${CMAKE_CURRENT_SOURCE_DIR}/src/grammar/ProtoParser.g4
) )
set(CMAKE_CXX_STANDARD 17)
FILE(GLOB_RECURSE SRC_LIST ${PROJECT_SOURCE_DIR}/src/*.cpp) FILE(GLOB_RECURSE SRC_LIST ${PROJECT_SOURCE_DIR}/src/*.cpp)
add_executable(crpc add_executable(crpc
${SRC_LIST} ${SRC_LIST}

View File

@ -119,7 +119,7 @@ else()
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DWITH_STATIC_CRT:BOOL=${ANTLR4_WITH_STATIC_CRT} -DWITH_STATIC_CRT:BOOL=${ANTLR4_WITH_STATIC_CRT}
-DDISABLE_WARNINGS:BOOL=ON -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 # -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD} # alternatively, compile the runtime with the same C++ standard as the outer project
INSTALL_COMMAND "" INSTALL_COMMAND ""
EXCLUDE_FROM_ALL 1) EXCLUDE_FROM_ALL 1)