Now thta the build is split, clean up some of the warnings in the build:
cc1: warning: command line option '-nostdinc++' is valid for C++/ObjC++ but not for C
cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C
Append the C++ specific flags specifically to the C++ sources. Avoids the
spurious warnings due to invalid flags being passed during the compilation of
C++ sources.
llvm-svn: 235797
# Setup flags.
append_if(LIBUNWIND_COMPILE_FLAGS LIBUNWIND_HAS_FPIC_FLAG -fPIC)
-append_if(LIBUNWIND_COMPILE_FLAGS LIBUNWIND_HAS_NO_RTTI_FLAG -fno-rtti)
+append_if(LIBUNWIND_CXX_FLAGS LIBUNWIND_HAS_NO_RTTI_FLAG -fno-rtti)
append_if(LIBUNWIND_LINK_FLAGS LIBUNWIND_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs)
endif ()
string(REPLACE ";" " " LIBUNWIND_COMPILE_FLAGS "${LIBUNWIND_COMPILE_FLAGS}")
+string(REPLACE ";" " " LIBUNWIND_CXX_FLAGS "${LIBUNWIND_CXX_FLAGS}")
string(REPLACE ";" " " LIBUNWIND_LINK_FLAGS "${LIBUNWIND_LINK_FLAGS}")
set_target_properties(unwind
OUTPUT_NAME "unwind"
VERSION "1.0"
SOVERSION "1")
+set_property(SOURCE ${LIBUNWIND_CXX_SOURCES}
+ APPEND_STRING PROPERTY COMPILE_FLAGS "${LIBUNWIND_CXX_FLAGS}")
install(TARGETS unwind
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}