Linux CMake improvements:
* Disable warning output during configuration. * Allow users to turn on warnings for ffmpeg and other internal projects. * Add a new variable for easier ffmpeg version migration if we ever * pursue that.
This commit is contained in:
@@ -31,11 +31,13 @@ function(sm_add_link_flag target flag)
|
||||
endfunction()
|
||||
|
||||
function(disable_project_warnings projectName)
|
||||
if (MSVC)
|
||||
sm_add_compile_flag(${projectName} "/W0")
|
||||
elseif(APPLE)
|
||||
set_target_properties(${projectName} PROPERTIES XCODE_ATTRIBUTE_GCC_WARN_INHIBIT_ALL_WARNINGS "YES")
|
||||
else()
|
||||
set_target_properties(${projectName} PROPERTIES COMPILE_FLAGS "-w")
|
||||
if (NOT WITH_EXTERNAL_WARNINGS)
|
||||
if (MSVC)
|
||||
sm_add_compile_flag(${projectName} "/W0")
|
||||
elseif(APPLE)
|
||||
set_target_properties(${projectName} PROPERTIES XCODE_ATTRIBUTE_GCC_WARN_INHIBIT_ALL_WARNINGS "YES")
|
||||
else()
|
||||
set_target_properties(${projectName} PROPERTIES COMPILE_FLAGS "-w")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
Reference in New Issue
Block a user