CMakeLists: Use list appending to reduce boilerplate

Appending gets rid of the need to respecify the variable name.
This commit is contained in:
Lioncash 2016-03-16 22:54:36 -04:00
parent 55f24e1cf4
commit c6de371eaf

View File

@ -65,12 +65,12 @@ endif()
message(STATUS "Target architecture: ${ARCHITECTURE}") message(STATUS "Target architecture: ${ARCHITECTURE}")
if (NOT MSVC) if (NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-attributes -pthread") list(APPEND CMAKE_CXX_FLAGS "-std=c++11 -Wno-attributes -pthread")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread") list(APPEND CMAKE_C_FLAGS "-pthread")
if (ARCHITECTURE_x86_64) if (ARCHITECTURE_x86_64)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1") list(APPEND CMAKE_CXX_FLAGS "-msse4.1")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.1") list(APPEND CMAKE_C_FLAGS "-msse4.1")
endif() endif()
else() else()
# Silence "deprecation" warnings # Silence "deprecation" warnings
@ -160,8 +160,8 @@ IF (APPLE)
FIND_LIBRARY(COCOA_LIBRARY Cocoa) # Umbrella framework for everything GUI-related FIND_LIBRARY(COCOA_LIBRARY Cocoa) # Umbrella framework for everything GUI-related
set(PLATFORM_LIBRARIES iconv ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY}) set(PLATFORM_LIBRARIES iconv ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") list(APPEND CMAKE_CXX_FLAGS "-stdlib=libc++")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++") list(APPEND CMAKE_EXE_LINKER_FLAGS "-stdlib=libc++")
ELSEIF(MINGW) ELSEIF(MINGW)
# GCC does not support codecvt, so use iconv instead # GCC does not support codecvt, so use iconv instead
# PSAPI is the Process Status API # PSAPI is the Process Status API