fix warnings: "cl : Command line warning D9002 : ignoring unknown option"

They were caused by the VS compiler not understanding the "-std=c++11" option.
The old style CMake way of setting C++11 version was replaced with the new one which is crossplatform/compiler and fixes the warning.
This commit is contained in:
N. Pattakos
2022-01-07 23:10:29 +01:00
parent 76b3e85352
commit 2ad7b99766

View File

@@ -3,6 +3,10 @@ cmake_policy(VERSION 3.0)
project (LearnOpenGL)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS ON)
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)
@@ -15,8 +19,6 @@ endif(WIN32)
link_directories(${CMAKE_SOURCE_DIR}/lib)
list(APPEND CMAKE_CXX_FLAGS "-std=c++11")
# find the required packages
find_package(GLM REQUIRED)
message(STATUS "GLM included at ${GLM_INCLUDE_DIR}")