mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 13:06:13 +01:00
Ensure CMake options include CSFML_ prefix
This commit is contained in:
1 parent
34febc214f
commit
cc1b6f0c45
2 files changed
+4
-4
No files matched your search
+1
-1
@@ -11,7 +11,7 @@
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||
"CSFML_BUILD_EXAMPLES": "ON",
|
||||
"CSFML_BUILD_TEST_SUITE": "ON",
|
||||
"WARNINGS_AS_ERRORS": "ON"
|
||||
"CSFML_WARNINGS_AS_ERRORS": "ON"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
# Helper function to enable compiler warnings for a specific target
|
||||
function(set_target_warnings target)
|
||||
option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" FALSE)
|
||||
option(CSFML_WARNINGS_AS_ERRORS "Treat compiler warnings as errors" FALSE)
|
||||
|
||||
set(MSVC_WARNINGS
|
||||
/W4 # Baseline reasonable warnings
|
||||
@@ -55,10 +55,10 @@ function(set_target_warnings target)
|
||||
|
||||
# Disable warnings as errors when using Clang on Windows to work around deprecation warnings in Windows APIs
|
||||
if(SFML_OS_WINDOWS AND (SFML_COMPILER_CLANG OR SFML_COMPILER_CLANG_CL))
|
||||
set(WARNINGS_AS_ERRORS FALSE)
|
||||
set(CSFML_WARNINGS_AS_ERRORS FALSE)
|
||||
endif()
|
||||
|
||||
if(WARNINGS_AS_ERRORS)
|
||||
if(CSFML_WARNINGS_AS_ERRORS)
|
||||
list(APPEND CLANG_AND_GCC_WARNINGS -Werror)
|
||||
list(APPEND MSVC_WARNINGS /WX)
|
||||
endif()
|
||||
|
||||
Reference in new issue
Block a user