Skip to content

Commit

Permalink
Merge pull request #19 from Doy-lee/doyle-private-compiler-warnings
Browse files Browse the repository at this point in the history
Set warnings to private to avoid leaking into other projects
  • Loading branch information
darcys22 authored May 3, 2024
2 parents c056684 + 5f8165c commit 041a878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/CompilerWarnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down

0 comments on commit 041a878

Please sign in to comment.