summaryrefslogtreecommitdiff
path: root/indra/cmake/00-Common.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake/00-Common.cmake')
-rw-r--r--indra/cmake/00-Common.cmake38
1 files changed, 16 insertions, 22 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 419ebebe3b..d46ebc4960 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -105,7 +105,6 @@ if (WINDOWS)
endif()
endif (WINDOWS)
-
if (LINUX)
set( CMAKE_BUILD_WITH_INSTALL_RPATH TRUE )
set( CMAKE_INSTALL_RPATH $ORIGIN $ORIGIN/../lib )
@@ -117,18 +116,14 @@ if (LINUX)
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_EXE} )
endif()
- # EXTERNAL_TOS
- # force this platform to accept TOS via external browser
-
- # LL_IGNORE_SIGCHLD
- # don't catch SIGCHLD in our base application class for the viewer - some of
- # our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The
- # viewer doesn't need to catch SIGCHLD anyway.
+ # LL_IGNORE_SIGCHLD
+ # don't catch SIGCHLD in our base application class for the viewer - some of
+ # our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The
+ # viewer doesn't need to catch SIGCHLD anyway.
add_compile_definitions(
_REENTRANT
_FORTIFY_SOURCE=2
- EXTERNAL_TOS
APPID=secondlife
LL_IGNORE_SIGCHLD
)
@@ -146,22 +141,27 @@ if (LINUX)
-Wno-pessimizing-move
-Wno-stringop-overflow
-Wno-stringop-truncation
+ -Wno-dangling-pointer
-fvisibility=hidden
)
add_link_options(
- -Wl,--no-keep-memory
- -Wl,--build-id
+ -Wl,--no-keep-memory
+ -Wl,--build-id
+ -Wl,--no-undefined
)
+ if (NOT GCC_DISABLE_FATAL_WARNINGS)
+ list(APPEND GCC_WARNINGS -Werror)
+ endif (NOT GCC_DISABLE_FATAL_WARNINGS)
# this stops us requiring a really recent glibc at runtime
add_compile_options(-fno-stack-protector)
- # linking can be very memory-hungry, especially the final viewer link
- set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
- set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")
# ND: clang is a bit more picky than GCC, the latter seems to auto include -lstdc++ and -lm. The former not so and thus fails to link
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -lstdc++ -lm")
+ add_link_options(
+ -lstdc++
+ -lm
+ )
endif()
endif (LINUX)
@@ -186,15 +186,9 @@ if (DARWIN)
# required for clang-15/xcode-15 since our boost package still uses deprecated std::unary_function/binary_function
# see https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#C++-Standard-Library
add_compile_definitions(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
-endif (DARWIN)
-if (LINUX OR DARWIN)
set(GCC_WARNINGS -Wall -Wno-sign-compare -Wno-trigraphs)
- if (NOT GCC_DISABLE_FATAL_WARNINGS)
- list(APPEND GCC_WARNINGS -Werror)
- endif (NOT GCC_DISABLE_FATAL_WARNINGS)
-
list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor )
if(LINUX)
@@ -203,4 +197,4 @@ if (LINUX OR DARWIN)
add_compile_options(${GCC_WARNINGS})
add_compile_options(-m${ADDRESS_SIZE})
-endif (LINUX OR DARWIN)
+endif ()