Commit 9412ec39 authored by Tom Finegan's avatar Tom Finegan
Browse files

Enable use of the Xcode IDE via cmake.

Xcode needs special handling when an executable target contains
no C++ sources, but links C++ dependencies.


Change-Id: Ifd4f6208c8f96386194691d45279df1e70a8fc17
parent 81279803
...@@ -900,3 +900,22 @@ if (CONFIG_UNIT_TESTS) ...@@ -900,3 +900,22 @@ if (CONFIG_UNIT_TESTS)
endif () endif ()
endif () endif ()
if (XCODE)
# The Xcode generator does not obey LINKER_LANGUAGE. Because of the issue
# what looks like a C++ file needs to be in any target that Xcode will link
# when the target contains a C++ dependency.
# Without this Xcode will try to link with the C linker, which always ends
# badly when a dependency actually includes C++.
# Note: LINKER_LANGUAGE is explicitly set to C++ for all targets touched
# here, it really is the Xcode generator's fault, or just a deficiency in
# Xcode itself.
"// Xcode needs a C++ file to link, ignore this file.")
foreach (aom_app ${AOM_APP_TARGETS})
target_sources(${aom_app} PUBLIC "${XCODE_DUMMY_CXX_FILE}")
endforeach ()
endif ()
endif ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment