mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-02 11:59:58 +00:00
Re-organize some compiler flags
This commit is contained in:
parent
3187992a20
commit
12578321d6
@ -1,5 +1,5 @@
|
||||
# Aseprite
|
||||
# Copyright (C) 2001-2017 David Capello
|
||||
# Copyright (C) 2001-2018 David Capello
|
||||
#
|
||||
# Parts of this file come from the Allegro 4.4 CMakeLists.txt
|
||||
|
||||
@ -180,12 +180,15 @@ else()
|
||||
add_definitions(-DNDEBUG)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32 AND NOT APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu89")
|
||||
endif()
|
||||
|
||||
if(APPLE AND USE_SKIA_BACKEND)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
if(APPLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
elseif(UNIX)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu89")
|
||||
endif()
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
|
||||
endif()
|
||||
|
||||
if(NOT USE_SHARED_CURL)
|
||||
|
@ -4,6 +4,11 @@
|
||||
######################################################################
|
||||
# Compiler-specific flags
|
||||
|
||||
if(UNIX)
|
||||
# All warnings except for switch cases with missing enum items
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-switch")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# As Skia is compiled with /GL flag (whole program optimization),
|
||||
# the linker prefer a /LTCG parameter to improve link times.
|
||||
@ -33,17 +38,6 @@ if(USE_ALLEG4_BACKEND AND NOT USE_SHARED_ALLEGRO4)
|
||||
add_subdirectory(allegro)
|
||||
endif()
|
||||
|
||||
######################################################################
|
||||
# Add C++11 support only for our code (avoid Allegro)
|
||||
|
||||
if(UNIX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-switch")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
|
||||
endif()
|
||||
|
||||
######################################################################
|
||||
# pthread
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user