mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
Silence LocalParameterization deprecation warnings
Suppress warnings in all Ceres targets without leaking suppressions into user code (fixes #750). Change-Id: I3aa1063cb0aae547865a15311ac286ef6d81a955
This commit is contained in:
committed by
Sameer Agarwal
parent
de69e657a6
commit
708a2a7233
@@ -649,6 +649,12 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") # Matches Clang & AppleClang.
|
||||
endif(HAVE_RETURN_TYPE_C_LINKAGE)
|
||||
endif ()
|
||||
|
||||
# Disable warnings about deprecated interfaces while we are
|
||||
# transitioning from LocalParameterization to Manifolds.
|
||||
add_compile_options(
|
||||
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:-Wno-deprecated-declarations>
|
||||
$<$<CXX_COMPILER_ID:MSVC>:/wd4996>)
|
||||
|
||||
# Configure the Ceres config.h compile options header using the current
|
||||
# compile options and put the configured header into the Ceres build
|
||||
# directory. Note that the ceres/internal subdir in <build>/config where
|
||||
|
||||
@@ -262,13 +262,6 @@ set_target_properties(ceres PROPERTIES
|
||||
VERSION ${CERES_VERSION}
|
||||
SOVERSION ${CERES_VERSION_MAJOR})
|
||||
|
||||
# Disable warnings about deprecated interfaces while we are
|
||||
# transitioning from LocalParameterization to Manifolds.
|
||||
target_compile_options(ceres PRIVATE
|
||||
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
|
||||
-Wno-deprecated-declarations>
|
||||
$<$<CXX_COMPILER_ID:MSVC>: /wd4996>)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set_target_properties(ceres PROPERTIES
|
||||
# Set the default symbol visibility to hidden to unify the behavior among
|
||||
@@ -443,13 +436,6 @@ if (BUILD_TESTING AND GFLAGS)
|
||||
${CERES_LIBRARY_PRIVATE_DEPENDENCIES_INCLUDE_DIRS})
|
||||
|
||||
|
||||
# Disable warnings about deprecated interfaces while we are
|
||||
# transitioning from LocalParameterization to Manifolds.
|
||||
target_compile_options(${NAME}_test PRIVATE
|
||||
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
|
||||
-Wno-deprecated-declarations>
|
||||
$<$<CXX_COMPILER_ID:MSVC>: /wd4996>)
|
||||
|
||||
target_link_libraries(${NAME}_test PUBLIC test_util Ceres::ceres gtest)
|
||||
if (BUILD_SHARED_LIBS)
|
||||
# Define gtest-specific shared library flags for linking.
|
||||
|
||||
Reference in New Issue
Block a user