Don't force compile everything as Objective-C++ on macOS

This commit is contained in:
Michael Maltese
2016-09-18 17:22:39 -07:00
parent 4c004b6dc9
commit cd19c9fa22
13 changed files with 89 additions and 133 deletions

View File

@ -984,15 +984,6 @@ add_definitions(-std=c++1y)
# but some dependencies require them (LLVM, libav).
add_definitions(-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS)
# Do this at the last minute because try_compile ignores linker flags. Yay...
if(APPLE)
# Some of our code contains Objective C constructs.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -x objective-c -stdlib=libc++")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -x objective-c++ -stdlib=libc++")
# Avoid mistaking an object file for a source file on the link command line.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -x none")
endif()
add_subdirectory(Source)