Merge pull request #2566 from bceverly/OpenBSD-2015-04-22
Further cleanup on the OpenBSD build
This commit is contained in:
commit
e61620bd8e
@ -111,6 +111,17 @@ if(NOT DEFINED EXPORT_ALL_SYMBOLS)
|
||||
set(EXPORT_ALL_SYMBOLS TRUE)
|
||||
endif()
|
||||
|
||||
# BSD
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
|
||||
set(BSD TRUE)
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
set(FREEBSD TRUE)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
set(OPENBSD TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Configure MSVC Runtime
|
||||
if(MSVC)
|
||||
include(MSVCRuntime)
|
||||
@ -179,14 +190,17 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
if(Wimplicit-function-declaration)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wimplicit-function-declaration")
|
||||
endif()
|
||||
|
||||
if (NOT OPENBSD)
|
||||
CHECK_C_COMPILER_FLAG (-Wredundant-decls Wredundant-decls)
|
||||
if(Wredundant-decls)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wredundant-decls")
|
||||
endif()
|
||||
endif()
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG")
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
if(NOT OPENBSD)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
|
||||
endif()
|
||||
@ -360,17 +374,6 @@ if(APPLE)
|
||||
endif()
|
||||
endif(APPLE)
|
||||
|
||||
# BSD
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
|
||||
set(BSD TRUE)
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
||||
set(FREEBSD TRUE)
|
||||
endif()
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
set(OPENBSD TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# OpenBSD
|
||||
if(OPENBSD)
|
||||
set(WITH_ALSA "OFF")
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <malloc/malloc.h>
|
||||
#elif __FreeBSD__
|
||||
#elif __FreeBSD__ || __OpenBSD__
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <malloc.h>
|
||||
|
Loading…
Reference in New Issue
Block a user