From c432dfaad88e1140acaf30248d11a52a16031033 Mon Sep 17 00:00:00 2001 From: Groove Date: Fri, 13 Jul 2018 15:12:39 +0200 Subject: [PATCH] Enable MS language extension on Clang and GCC --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c809cc33..76f43f13 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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")