diff options
author | Steve Bennetts <steve@lindenlab.com> | 2009-10-23 12:18:46 -0700 |
---|---|---|
committer | Steve Bennetts <steve@lindenlab.com> | 2009-10-23 12:18:46 -0700 |
commit | 4ddaa866dde7a92e56617a32464e0667de3759ef (patch) | |
tree | d28e7e39f8a5f4a1070482154824fbfb2a7b52e8 /indra/cmake/00-Common.cmake | |
parent | a5453d45feaceb713c7cece76d88c2d2b8f825c6 (diff) | |
parent | 80b682d4b4dd1256ee09dd3327d2c51e3adee0b5 (diff) |
merge
Diffstat (limited to 'indra/cmake/00-Common.cmake')
-rw-r--r-- | indra/cmake/00-Common.cmake | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 173e650961..db5495091e 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -182,11 +182,17 @@ endif (LINUX) if (DARWIN) - add_definitions(-DLL_DARWIN=1) + # NOTE (per http://lists.apple.com/archives/darwin-dev/2008/Jan/msg00232.html): + # > Why the bus error? What am I doing wrong? + # This is a known issue where getcontext(3) is writing past the end of the + # ucontext_t struct when _XOPEN_SOURCE is not defined (rdar://problem/5578699 ). + # As a workaround, define _XOPEN_SOURCE before including ucontext.h. + add_definitions(-DLL_DARWIN=1 -D_XOPEN_SOURCE) set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch") + set(DARWIN_extra_cstar_flags "-mlong-branch") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}") # NOTE: it's critical that the optimization flag is put in front. # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered. set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") @@ -195,13 +201,13 @@ endif (DARWIN) if (LINUX OR DARWIN) - set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs -Wno-non-virtual-dtor -Woverloaded-virtual") + set(GCC_WARNINGS "-Wall -Wno-sign-compare -Wno-trigraphs") if (NOT GCC_DISABLE_FATAL_WARNINGS) set(GCC_WARNINGS "${GCC_WARNINGS} -Werror") endif (NOT GCC_DISABLE_FATAL_WARNINGS) - set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder") + set(GCC_CXX_WARNINGS "${GCC_WARNINGS} -Wno-reorder -Wno-non-virtual-dtor -Woverloaded-virtual") set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}") |