From 2b493d80c2d36ddd09947216b6f8b856dbc1dd78 Mon Sep 17 00:00:00 2001 From: DaanDeMeyer Date: Mon, 26 Mar 2018 17:30:33 +0200 Subject: [PATCH] Enable gcc extensions on cygwin only --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c1e3fc7f..a9ed816b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,10 @@ add_executable(cquery "") # Enable C++14 (Required) set_property(TARGET cquery PROPERTY CXX_STANDARD 14) set_property(TARGET cquery PROPERTY CXX_STANDARD_REQUIRED ON) +# Disable gnu extensions except for Cygwin which needs them to build properly +if(NOT CYGWIN) + set_property(TARGET cquery PROPERTY CXX_EXTENSIONS OFF) +endif() if(${CMAKE_SYSTEM_NAME} STREQUAL Windows) # Common MSVC/Clang(Windows) options