diff --git a/infra/cmake/modules/ExternalProjectTools.cmake b/infra/cmake/modules/ExternalProjectTools.cmake index afa290c3ea4..42962d3c3ed 100644 --- a/infra/cmake/modules/ExternalProjectTools.cmake +++ b/infra/cmake/modules/ExternalProjectTools.cmake @@ -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)