From 1ca4b9c285550a943fb06474e1caf9f8c7426270 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Tue, 13 Oct 2015 00:15:44 +0200 Subject: [PATCH] Enable NOMINMAX compiler defintions in Windows on default --- modules/base/rendering/renderabletrail.cpp | 6 ++++-- support/cmake/module_definition.cmake | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index 399e678afb..e9bdfa2e25 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -33,6 +33,9 @@ #include #include +#include +#include + /* TODO for this class: * In order to add geometry shader (for pretty-draw), @@ -68,7 +71,7 @@ RenderableTrail::RenderableTrail(const ghoul::Dictionary& dictionary) , _vaoID(0) , _vBufferID(0) , _needsSweep(true) - , _oldTime(std::numeric_limits::max()) + , _oldTime(std::numeric_limits::max()) { _successfullDictionaryFetch &= dictionary.getValue(keyBody, _target); _successfullDictionaryFetch &= dictionary.getValue(keyObserver, _observer); @@ -76,7 +79,6 @@ RenderableTrail::RenderableTrail(const ghoul::Dictionary& dictionary) _successfullDictionaryFetch &= dictionary.getValue(keyTropicalOrbitPeriod, _tropic); _successfullDictionaryFetch &= dictionary.getValue(keyEarthOrbitRatio, _ratio); _successfullDictionaryFetch &= dictionary.getValue(keyDayLength, _day); - // values in modfiles set from here // http://nssdc.gsfc.nasa.gov/planetary/factsheet/marsfact.html diff --git a/support/cmake/module_definition.cmake b/support/cmake/module_definition.cmake index 330eba1992..6b3ae6281a 100644 --- a/support/cmake/module_definition.cmake +++ b/support/cmake/module_definition.cmake @@ -88,6 +88,7 @@ function (set_common_compile_settings target_name) "/wd4505" # Unreferenced function was removed "/W4" # Warning level ) + target_compile_definitions(${library_name} PUBLIC "NOMINMAX") if (OPENSPACE_WARNINGS_AS_ERRORS) target_compile_options(${library_name} PUBLIC "/Wx") endif ()