Set CMAKE_{C,CXX}_STANDARD_REQUIRED ON

This commit is contained in:
Andrew Noyes 2020-05-18 16:14:43 +00:00
parent 9c6a8a6386
commit 747243e9cb
1 changed files with 2 additions and 0 deletions

View File

@ -85,7 +85,9 @@ include(CheckFunctionExists)
set(CMAKE_REQUIRED_INCLUDES stdlib.h malloc.h)
set(CMAKE_REQUIRED_LIBRARIES c)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
if(WIN32)
# see: https://docs.microsoft.com/en-us/windows/desktop/WinProg/using-the-windows-headers