mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
cmake: set -std=gnu99 when the compiler default is C90
Fixes compilation on the Pocket C.H.I.P
This commit is contained in:
parent
5b8df3c180
commit
8c228aa9e0
1 changed files with 4 additions and 5 deletions
|
@ -47,9 +47,9 @@ if (NOT LIBSUPERDERPY_CONFIG_INCLUDED)
|
|||
endif (LIBSUPERDERPY_IMGUI)
|
||||
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED true)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_STANDARD 98)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED true)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# TODO: add -fvisibility=hidden, but only to libsuperderpy target
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -ffast-math")
|
||||
|
@ -65,10 +65,9 @@ if (NOT LIBSUPERDERPY_CONFIG_INCLUDED)
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type-c-linkage")
|
||||
endif()
|
||||
|
||||
if(MAEMO5)
|
||||
if(CMAKE_C_STANDARD_COMPUTED_DEFAULT EQUAL 90)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++98")
|
||||
endif(MAEMO5)
|
||||
endif(CMAKE_C_STANDARD_COMPUTED_DEFAULT EQUAL 90)
|
||||
|
||||
if(WIN32)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mwindows -municode")
|
||||
|
|
Loading…
Reference in a new issue