summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRye Cogtail <rye@lindenlab.com>2024-09-30 23:39:49 -0400
committerRye Cogtail <rye@lindenlab.com>2024-10-01 00:10:22 -0400
commit37c4e82a99a8f850a8c1d0a114938d50f8be169e (patch)
treed4fc797a6c702f9b8d3b7029bde2a976be10cdec /indra
parenta7f7415b031513275cf14f8df5245c7fce1110f3 (diff)
Clean up and fix warning flags not applying correctly on linux
Diffstat (limited to 'indra')
-rw-r--r--indra/cmake/00-Common.cmake44
-rw-r--r--indra/media_plugins/cef/volume_catcher.h2
2 files changed, 15 insertions, 31 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 5cb25368d2..be38574041 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -155,30 +155,11 @@ if (LINUX)
-fvisibility=hidden
)
- set(GCC_CLANG_COMPATIBLE_WARNINGS
- -Wno-parentheses
- -Wno-deprecated
- -Wno-c++20-compat
- -Wno-pessimizing-move
- )
-
- set(CLANG_WARNINGS
- ${GCC_CLANG_COMPATIBLE_WARNINGS}
- # Put clang specific warning configuration here
- )
-
- set(GCC_WARNINGS
- ${GCC_CLANG_COMPATIBLE_WARNINGS}
- )
-
add_link_options(
-Wl,--no-keep-memory
-Wl,--build-id
-Wl,--no-undefined
)
- if (NOT GCC_DISABLE_FATAL_WARNINGS)
- add_compile_options( -Werror )
- endif (NOT GCC_DISABLE_FATAL_WARNINGS)
# this stops us requiring a really recent glibc at runtime
add_compile_options(-fno-stack-protector)
@@ -189,9 +170,6 @@ if (LINUX)
-lstdc++
-lm
)
- add_compile_options(${CLANG_WARNINGS})
- else()
- add_compile_options(${GCC_WARNINGS})
endif()
endif (LINUX)
@@ -209,22 +187,26 @@ if (DARWIN)
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.
-## Really?? On developer machines too?
-##set(ENABLE_SIGNING TRUE)
-##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
+ ## Really?? On developer machines too?
+ ##set(ENABLE_SIGNING TRUE)
+ ##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
# 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)
- set(GCC_WARNINGS -Wall -Wno-sign-compare -Wno-trigraphs)
-
- list(APPEND GCC_WARNINGS -Wno-reorder -Wno-non-virtual-dtor )
+if(LINUX OR DARWIN)
+ add_compile_options(-Wall -Wno-sign-compare -Wno-trigraphs -Wno-reorder -Wno-unused-but-set-variable -Wno-unused-variable)
- if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13)
- list(APPEND GCC_WARNINGS -Wno-unused-but-set-variable -Wno-unused-variable )
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ add_compile_options(-Wno-stringop-truncation -Wno-parentheses -Wno-c++20-compat)
endif()
+ if (NOT GCC_DISABLE_FATAL_WARNINGS)
+ add_compile_options(-Werror)
+ endif ()
+
add_compile_options(${GCC_WARNINGS})
add_compile_options(-m${ADDRESS_SIZE})
-endif ()
+endif (LINUX OR DARWIN)
diff --git a/indra/media_plugins/cef/volume_catcher.h b/indra/media_plugins/cef/volume_catcher.h
index 6933854e8e..ead0511149 100644
--- a/indra/media_plugins/cef/volume_catcher.h
+++ b/indra/media_plugins/cef/volume_catcher.h
@@ -49,7 +49,9 @@ public:
#endif
private:
+#if LL_LINUX || LL_WINDOWS
VolumeCatcherImpl *pimpl;
+#endif
};
#endif // VOLUME_CATCHER_H