Add C++ standard to CMake for MSVC
This commit is contained in:
parent
f07596dbb5
commit
d8b55078ba
3 changed files with 18 additions and 1 deletions
|
|
@ -9,6 +9,13 @@ project(c-capnproto LANGUAGES ${languages})
|
|||
|
||||
include(CTest)
|
||||
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_C_EXTENSIONS NO)
|
||||
if(BUILD_TESTING)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_EXTENSIONS NO)
|
||||
endif()
|
||||
|
||||
# Stop noise if CXX compiler is set.
|
||||
set(ignoreAndAvoidCMakeUnusedWarning "${CMAKE_CXX_COMPILER}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue