Skip to content

Commit

Permalink
[infra/cmake] Introduce DISABLE_EXTERNAL_WARNING option (#14444)
Browse files Browse the repository at this point in the history
This commit introduces DISABLE_EXTERNAL_WARNING option.
It is used to disable warnings from external library build.

ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <[email protected]>
  • Loading branch information
hseok-oh authored Dec 13, 2024
1 parent 8869179 commit 8f873c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions infra/cmake/modules/ExternalProjectTools.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
macro(add_extdirectory DIR TAG)
cmake_parse_arguments(ARG "EXCLUDE_FROM_ALL" "" "" ${ARGN})

# Disable warning messages from external source code
if(DISABLE_EXTERNAL_WARNING)
add_compile_options(-w)
endif(DISABLE_EXTERNAL_WARNING)

if(ARG_EXCLUDE_FROM_ALL)
add_subdirectory(${DIR} "${CMAKE_BINARY_DIR}/externals/${TAG}" EXCLUDE_FROM_ALL)
else(ARG_EXCLUDE_FROM_ALL)
Expand Down

0 comments on commit 8f873c5

Please sign in to comment.