Disable warnings as errors by default
This is not the best default value because it imposes additional requirements on user builds that are not strictly necessary. This has caused many complaints in the past as people encounter build failures that are merely due to warnings and not hard compiler errors. Changing this default value emakes it more likely that someone trying to use SFML can use it without issue.
This commit is contained in:
parent
332d11be41
commit
0745ea97e0
@ -9,7 +9,8 @@
|
|||||||
"CMAKE_CXX_EXTENSIONS": "OFF",
|
"CMAKE_CXX_EXTENSIONS": "OFF",
|
||||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||||
"SFML_BUILD_EXAMPLES": "ON",
|
"SFML_BUILD_EXAMPLES": "ON",
|
||||||
"SFML_BUILD_TEST_SUITE": "ON"
|
"SFML_BUILD_TEST_SUITE": "ON",
|
||||||
|
"SFML_WARNINGS_AS_ERRORS": "ON"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
# Helper function to enable compiler warnings for a specific target
|
# Helper function to enable compiler warnings for a specific target
|
||||||
function(set_target_warnings target)
|
function(set_target_warnings target)
|
||||||
option(SFML_WARNINGS_AS_ERRORS "Treat compiler warnings as errors" TRUE)
|
option(SFML_WARNINGS_AS_ERRORS "Treat compiler warnings as errors" FALSE)
|
||||||
|
|
||||||
if(SFML_COMPILER_MSVC)
|
if(SFML_COMPILER_MSVC)
|
||||||
target_compile_options(${target} PRIVATE
|
target_compile_options(${target} PRIVATE
|
||||||
|
Loading…
Reference in New Issue
Block a user