suppress warnings only for 3rd party code for Release builds
parent
10a131fc36
commit
1fadf1e7ef
|
@ -106,11 +106,6 @@ add_library(gtsam ${gtsam_srcs})
|
|||
target_link_libraries(gtsam PUBLIC ${GTSAM_BOOST_LIBRARIES})
|
||||
target_link_libraries(gtsam PUBLIC ${GTSAM_ADDITIONAL_LIBRARIES})
|
||||
|
||||
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||
# Suppress warnings if Release build
|
||||
target_compile_options(gtsam PRIVATE -w)
|
||||
endif()
|
||||
|
||||
# Apply build flags:
|
||||
gtsam_apply_build_flags(gtsam)
|
||||
|
||||
|
@ -191,12 +186,18 @@ install(
|
|||
list(APPEND GTSAM_EXPORTED_TARGETS gtsam)
|
||||
set(GTSAM_EXPORTED_TARGETS "${GTSAM_EXPORTED_TARGETS}" PARENT_SCOPE)
|
||||
|
||||
# make sure that ccolamd compiles even in face of warnings
|
||||
# Make sure that ccolamd compiles even in face of warnings
|
||||
# and suppress all warnings from 3rd party code if Release build
|
||||
if(WIN32)
|
||||
set_source_files_properties(${3rdparty_srcs} PROPERTIES COMPILE_FLAGS "-w")
|
||||
else()
|
||||
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
||||
# Suppress all warnings from 3rd party sources.
|
||||
set_source_files_properties(${3rdparty_srcs} PROPERTIES COMPILE_FLAGS "-w")
|
||||
else()
|
||||
set_source_files_properties(${3rdparty_srcs} PROPERTIES COMPILE_FLAGS "-Wno-error")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Create the matlab toolbox for the gtsam library
|
||||
if (GTSAM_INSTALL_MATLAB_TOOLBOX)
|
||||
|
|
Loading…
Reference in New Issue