Commit e944431f authored by Jostein Bratlie's avatar Jostein Bratlie

MSVC build update.

* Set CMake policy 0092.
* Added stricter flags; WX and W4.
* Fixed related missing header include-bug.
* Builds with MS VC 142 toolchain.
parent b137a887
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.15)
# minimum required version 3.15: policy CMP0092 MSVC COMPILE FLAGS -- no warings
cmake_policy(SET CMP0092 NEW)
# mimimum required version 3.8: target_compile_features C++ 17
# Project name
......@@ -46,8 +49,7 @@ SET(GCC_COMPILE_OPTIONS
SET(MSVC_COMPILE_OPTIONS
# REQUIRED ON
#/Wall /Za #/WX
/Wall /permissive-
/WX /W4 /permissive-
# REQUIRED ON
)
......
cmake_minimum_required(VERSION 3.8)
### Setup qtclient project
project(engine VERSION 0.1 LANGUAGES CXX)
# engine library (build static on Windows MSVC)
......@@ -11,7 +8,6 @@ else()
endif()
###########################
# Compiler spesific options
......@@ -23,11 +19,6 @@ target_compile_features(${PROJECT_NAME}
PUBLIC $<$<CXX_COMPILER_ID:MSVC>:cxx_std_17>
)
# Compile definitions
target_compile_definitions( ${PROJECT_NAME}
PUBLIC $<$<CXX_COMPILER_ID:MSVC>: _USE_MATH_DEFINES>
)
# Comple options
target_compile_options(${PROJECT_NAME}
PUBLIC $<$<CXX_COMPILER_ID:Clang>: ${CLANG_COMPILE_OPTIONS}>
......
......@@ -10,6 +10,7 @@
#include <utility>
#include <memory>
#include <chrono>
#include <string>
namespace gameengine
......
cmake_minimum_required(VERSION 3.8)
### Setup qtclient project
project(qtclient VERSION 0.1 LANGUAGES CXX)
add_executable(${PROJECT_NAME})
......@@ -14,11 +11,6 @@ target_compile_features(${PROJECT_NAME}
PUBLIC $<$<CXX_COMPILER_ID:MSVC>:cxx_std_17>
)
# Compile definitions
target_compile_definitions( ${PROJECT_NAME}
PUBLIC $<$<CXX_COMPILER_ID:MSVC>: _USE_MATH_DEFINES>
)
# Comple options
target_compile_options(${PROJECT_NAME}
PUBLIC $<$<CXX_COMPILER_ID:Clang>:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment