Skip to content

Commit

Permalink
Merge pull request #403 from drowe67/ms-cmake-win32
Browse files Browse the repository at this point in the history
Remove GNU99 check for Win32 builds
  • Loading branch information
drowe67 authored Jun 14, 2023
2 parents f68a2fe + 82e061d commit 4c2117f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ add_custom_target(dist
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-strict-overflow")

# Check for what C standard is supported.
if(NOT WIN32)
include(CheckCCompilerFlag)
CHECK_C_COMPILER_FLAG("-std=gnu11" COMPILER_SUPPORTS_GNU11)
CHECK_C_COMPILER_FLAG("-std=gnu99" COMPILER_SUPPORTS_GNU99)
Expand All @@ -94,6 +95,7 @@ elseif(COMPILER_SUPPORTS_GNU99)
else()
message(SEND_ERROR "Compiler doesn't seem to support at least gnu99, might cause problems" )
endif()
endif(NOT WIN32)

# -fPIC is implied on MinGW...
if((NOT WIN32) AND (NOT MICROCONTROLLER_BUILD))
Expand Down

0 comments on commit 4c2117f

Please sign in to comment.