Enable MS language extension on Clang and GCC

This commit is contained in:
Groove 2018-07-13 15:12:39 +02:00
parent 1ad1edf315
commit c432dfaad8

View File

@ -59,7 +59,9 @@ option(GLM_TEST_ENABLE_LANG_EXTENSIONS "Enable language extensions" OFF)
if(GLM_TEST_ENABLE_LANG_EXTENSIONS)
set(CMAKE_CXX_EXTENSIONS ON)
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
if((CMAKE_CXX_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "GNU"))
add_compile_options(-fms-extensions)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
add_compile_options(/Ze)
endif()
message(STATUS "GLM: Build with C++ language extensions")