CMake: Apple build fixes

This commit is contained in:
tobtoht 2022-05-24 11:55:07 +02:00
parent f4646980c7
commit bc48304364
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C

View file

@ -229,16 +229,11 @@ endif()
list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS}) list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
if(APPLE) if(APPLE)
include_directories(SYSTEM /usr/include/malloc) cmake_policy(SET CMP0042 NEW)
if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64 -fvisibility=default -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default -DGTEST_HAS_TR1_TUPLE=0")
endif() endif()
if (APPLE AND NOT IOS) if (APPLE AND NOT IOS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=x86-64 -fvisibility=default -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=default -std=c++11")
endif() endif()
if(APPLE) if(APPLE)