mirror of
https://github.com/encounter/SDL.git
synced 2025-12-08 13:15:10 +00:00
cmake: Prefix all options with "SDL_"
This makes it clear which options came from SDL's CMake project when building SDL as a subdirectory of a parent CMake project. Fixes #4139.
This commit is contained in:
@@ -27,7 +27,7 @@ cd checker-buildbot
|
||||
# The -Wno-liblto is new since our checker-279 upgrade, I think; checker otherwise warns "libLTO.dylib relative to clang installed dir not found"
|
||||
|
||||
# You might want to do this for CMake-backed builds instead...
|
||||
scan-build -o analysis cmake -G Ninja -Wno-dev -DSDL_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_SHARED_LINKER_FLAGS="-Wno-liblto" ..
|
||||
scan-build -o analysis cmake -G Ninja -Wno-dev -DSDL_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DSDL_ASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_SHARED_LINKER_FLAGS="-Wno-liblto" ..
|
||||
|
||||
# ...or run configure without the scan-build wrapper...
|
||||
#CC="$CHECKERDIR/libexec/ccc-analyzer" CFLAGS="-O0 -Wno-deprecated-declarations" LDFLAGS="-Wno-liblto" ../configure --enable-assertions=enabled
|
||||
|
||||
@@ -24,7 +24,7 @@ mkdir codechecker-buildbot
|
||||
cd codechecker-buildbot
|
||||
|
||||
# We turn off deprecated declarations, because we don't care about these warnings during static analysis.
|
||||
cmake -Wno-dev -DSDL_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
|
||||
cmake -Wno-dev -DSDL_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DSDL_ASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
|
||||
|
||||
# CMake on macOS adds "-arch arm64" or whatever is appropriate, but this confuses CodeChecker, so strip it out.
|
||||
perl -w -pi -e 's/\-arch\s+.*?\s+//g;' compile_commands.json
|
||||
|
||||
Reference in New Issue
Block a user