mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 04:02:15 +02:00
CMake: Refine CXX_STANDARD setting
- Set CXX_STANDARD_REQUIRED ON so that we error out early if CMake thinks that the compiler does not support the used standard. - Set CXX_EXTENSIONS OFF so that we get less compiler specific behavior. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
This commit is contained in:
parent
268bf42b9e
commit
9b8797fe5e
@ -21,6 +21,8 @@ set(CMAKE_LINKER_FLAGS_ASAN
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake
|
||||
${CMAKE_MODULE_PATH})
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
|
||||
include(CTest)
|
||||
|
@ -1,12 +1,11 @@
|
||||
cmake_minimum_required(VERSION 3.13...3.28)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
#cmake_policy(SET CMP0079 NEW)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
set(CORE_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
|
||||
|
||||
|
||||
set(DEP_DIR ${CORE_DIR}/../deps CACHE PATH "Dependencies")
|
||||
option(USE_MBEDTLS "Use mbed TLS instead of OpenSSL")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user