From 5f8165c470129ea671a508da142f2020a96deb5d Mon Sep 17 00:00:00 2001 From: doylet Date: Fri, 3 May 2024 11:35:45 +1000 Subject: [PATCH] Set warnings to private to avoid leaking into other projects --- cmake/CompilerWarnings.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CompilerWarnings.cmake b/cmake/CompilerWarnings.cmake index b64bffd..2bac701 100644 --- a/cmake/CompilerWarnings.cmake +++ b/cmake/CompilerWarnings.cmake @@ -86,7 +86,7 @@ function(set_project_warnings project_name) message(AUTHOR_WARNING "No compiler warnings set for '${CMAKE_CXX_COMPILER_ID}' compiler.") endif() - target_compile_options(${project_name} PUBLIC ${PROJECT_WARNINGS}) + target_compile_options(${project_name} PRIVATE ${PROJECT_WARNINGS}) if(NOT TARGET ${project_name}) message(AUTHOR_WARNING "${project_name} is not a target, thus no compiler warning were added.")