only set -std=gnu99 if we're compiling with a GNU compiler

pull/1213/head
James Crosby 2015-06-26 16:27:23 +01:00
parent 3cf18be9ee
commit ca3e131526
1 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,9 @@ project(mbed-classic)
enable_language(ASM)
# override compilation flags:
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
if(CMAKE_C_COMPILER_ID MATCHES GNU)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
endif()
# the mbed.a library is built from two sets of source files + include
# directories: