Skip to content

Commit e98ce44

Browse files
committed
Added warning messages when using GLM_FORCE_CXX** but the compiler is known to not fully support the requested C++ version #555
1 parent e1b88a0 commit e98ce44

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

glm/detail/setup.hpp

+14-6
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,24 @@
142142
#define GLM_LANG_CXXGNU GLM_LANG_CXXGNU_FLAG
143143

144144
#if defined(GLM_FORCE_CXX14)
145-
# undef GLM_FORCE_CXX11
146-
# undef GLM_FORCE_CXX03
147-
# undef GLM_FORCE_CXX98
145+
# if((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER <= GLM_COMPILER_GCC50)) || ((GLM_COMPILER & GLM_COMPILER_CLANG) && (GLM_COMPILER <= GLM_COMPILER_CLANG34))
146+
# pragma message("GLM: Using GLM_FORCE_CXX14 with a compiler that doesn't fully support C++14")
147+
# elif GLM_COMPILER & GLM_COMPILER_VC
148+
# pragma message("GLM: Using GLM_FORCE_CXX14 but there is no known version of Visual C++ compiler that fully supports C++14")
149+
# elif GLM_COMPILER & GLM_COMPILER_INTEL
150+
# pragma message("GLM: Using GLM_FORCE_CXX14 but there is no known version of ICC compiler that fully supports C++14")
151+
# endif
148152
# define GLM_LANG GLM_LANG_CXX14
149153
#elif defined(GLM_FORCE_CXX11)
150-
# undef GLM_FORCE_CXX03
151-
# undef GLM_FORCE_CXX98
154+
# if((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER <= GLM_COMPILER_GCC48)) || ((GLM_COMPILER & GLM_COMPILER_CLANG) && (GLM_COMPILER <= GLM_COMPILER_CLANG33))
155+
# pragma message("GLM: Using GLM_FORCE_CXX11 with a compiler that doesn't fully support C++11")
156+
# elif GLM_COMPILER & GLM_COMPILER_VC
157+
# pragma message("GLM: Using GLM_FORCE_CXX11 but there is no known version of Visual C++ compiler that fully supports C++11")
158+
# elif GLM_COMPILER & GLM_COMPILER_INTEL
159+
# pragma message("GLM: Using GLM_FORCE_CXX11 but there is no known version of ICC compiler that fully supports C++11")
160+
# endif
152161
# define GLM_LANG GLM_LANG_CXX11
153162
#elif defined(GLM_FORCE_CXX03)
154-
# undef GLM_FORCE_CXX98
155163
# define GLM_LANG GLM_LANG_CXX03
156164
#elif defined(GLM_FORCE_CXX98)
157165
# define GLM_LANG GLM_LANG_CXX98

readme.md

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
5555
##### Improvements:
5656
- Added Visual C++ 15 detection
5757
- Added Clang 4.0 detection
58+
- Added warning messages when using GLM_FORCE_CXX** but the compiler
59+
is known to not fully support the requested C++ version #555
5860
- Refactored GLM_COMPILER_VC values
5961
6062
##### Fixes:

0 commit comments

Comments
 (0)