Compile with -rdynamic for better debugging symbols. (#1123)

* Compile with -rdynamic.

* Only use -rdynamic on Linux.

* Add comment.
This commit is contained in:
Robert Nishihara
2017-10-13 21:39:11 -07:00
committed by Philipp Moritz
parent 15486a14a0
commit d6062ef8f6
+5
View File
@@ -5,6 +5,11 @@ include(CMakeParseArguments)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g -Werror -Wall -Wno-error=unused-function -Wno-error=strict-aliasing")
# The rdynamic flag is needed to produce better backtraces on Linux.
if(UNIX AND NOT APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic")
endif()
set(FLATBUFFERS_VERSION "1.7.1")
set(FLATBUFFERS_PREFIX "${CMAKE_BINARY_DIR}/flatbuffers_ep-prefix/src/flatbuffers_ep-install")