Skip to content

Commit ff7c065

Browse files
committed
build: supress warnings for stb (3rd party lib)
1 parent 959f0a9 commit ff7c065

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ if(VISP_DEV OR VISP_CI)
7070
set(VISP_WARNINGS -Wall -Wextra -Wpedantic -Werror)
7171
endif()
7272
endif()
73+
# Suppress warnings for external libraries
74+
if(MSVC)
75+
set(VISP_NO_WARNINGS /W0)
76+
else()
77+
set(VISP_NO_WARNINGS -w)
78+
endif()
7379

7480
# Dependencies
7581

depend/stb/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ FetchContent_MakeAvailable(stb)
99

1010
add_library(stb STATIC stb.cpp)
1111
target_include_directories(stb PUBLIC ${stb_SOURCE_DIR})
12+
target_compile_options(stb PRIVATE ${VISP_NO_WARNINGS})
1213
set_target_properties(stb PROPERTIES POSITION_INDEPENDENT_CODE ON)

0 commit comments

Comments
 (0)