Skip to content

Commit

Permalink
#1602: CMake: mark added compilation flags as private
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs committed Nov 19, 2021
1 parent 142d754 commit fe05d96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmake-modules/SetCXXCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ if (vt_ubsan_enabled)
endif()

message(DEBUG "Target ${vt_target} compile options: ${TARGET_CXX_FLAGS}")
target_compile_options(${vt_target} PUBLIC ${TARGET_CXX_FLAGS})
target_compile_options(${vt_target} PRIVATE ${TARGET_CXX_FLAGS})

endmacro()
2 changes: 1 addition & 1 deletion cmake/turn_on_warnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include(CheckCXXCompilerFlag)
function(enable_cxx_compiler_flag_if_supported flag)
check_cxx_compiler_flag("${flag}" flag_supported)
if(flag_supported)
target_compile_options(${vt_target} PUBLIC ${flag})
target_compile_options(${vt_target} PRIVATE ${flag})
endif()
unset(flag_supported CACHE)
endfunction()
Expand Down

0 comments on commit fe05d96

Please sign in to comment.