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.")