mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-02 04:37:54 +08:00
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:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user