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:
Jason Felds
2015-04-05 14:49:10 -04:00
parent 0954c81846
commit c49d78f5fc
2 changed files with 23 additions and 13 deletions
+8 -6
View File
@@ -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()