[ci,coverity] define COVERITY_BUILD
By defining this symbol the build will enable coverity related pragma definitions
This commit is contained in:
parent
8883ccc503
commit
9b3f5cd86e
1
.github/workflows/coverity.yml
vendored
1
.github/workflows/coverity.yml
vendored
@ -79,6 +79,7 @@ jobs:
|
||||
-GNinja \
|
||||
-C ci/cmake-preloads/config-coverity.txt \
|
||||
-DALLOW_IN_SOURCE_BUILD=true \
|
||||
-DCOVERITY_BUILD=ON \
|
||||
-B. \
|
||||
-S.
|
||||
cov-build --dir cov-int cmake --build .
|
||||
|
@ -56,6 +56,11 @@ if (NOT WIN32 AND NOT ANDROID)
|
||||
option(WITH_X11 "build X11 client/server" ${OPT_DEFAULT_VAL})
|
||||
endif()
|
||||
|
||||
# Enable coverity related pragma definitions
|
||||
if (COVERITY_BUILD)
|
||||
add_compile_definitions(COVERITY_BUILD)
|
||||
endif()
|
||||
|
||||
# Include our extra modules
|
||||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/)
|
||||
|
||||
|
@ -33,6 +33,11 @@ if (NOT FREERDP_UNIFIED_BUILD)
|
||||
include(CommonConfigOptions)
|
||||
include(ConfigOptions)
|
||||
|
||||
# Enable coverity related pragma definitions
|
||||
if (COVERITY_BUILD)
|
||||
add_compile_definitions(COVERITY_BUILD)
|
||||
endif()
|
||||
|
||||
# Default to build shared libs
|
||||
option(EXPORT_ALL_SYMBOLS "Export all symbols form library" OFF)
|
||||
|
||||
|
@ -32,7 +32,8 @@
|
||||
#define WINPR_DO_PRAGMA(x) __pragma(#x)
|
||||
#endif
|
||||
|
||||
#if !defined(__COVERITY__)
|
||||
/* COVERITY_BUILD must be defined by build system */
|
||||
#if !defined(COVERITY_BUILD)
|
||||
#define WINPR_DO_COVERITY_PRAGMA(x)
|
||||
#else
|
||||
#define WINPR_DO_COVERITY_PRAGMA(x) WINPR_DO_PRAGMA(x)
|
||||
|
Loading…
Reference in New Issue
Block a user