Enable gcc extensions on cygwin only

This commit is contained in:
DaanDeMeyer 2018-03-26 17:30:33 +02:00 committed by Fangrui Song
parent bbf7feae19
commit 2b493d80c2

View File

@ -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