diff --git a/development/cmake/modules/FindCXX11Compiler.cmake b/development/cmake/modules/FindCXX11Compiler.cmake index 01d5dc1d7a..7d09f8f911 100644 --- a/development/cmake/modules/FindCXX11Compiler.cmake +++ b/development/cmake/modules/FindCXX11Compiler.cmake @@ -37,11 +37,15 @@ INCLUDE(FindPackageHandleStandardArgs) if (CMAKE_CXX_COMPILER_ID MATCHES "^[cC]lang$") set(CXX11_FLAG_CANDIDATES "--std=c++11 -Wno-deprecated-register") else() - set(CXX11_FLAG_CANDIDATES - "--std=c++11" - "--std=gnu++11" - "--std=gnu++0x" - ) + if (CYGWIN) + set(CXX11_FLAG_CANDIDATES "--std=gnu++11") + else() + set(CXX11_FLAG_CANDIDATES + "--std=c++11" + "--std=gnu++11" + "--std=gnu++0x" + ) + endif() endif() # sample openmp source code to test