mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-03-04 01:01:28 +01:00
make usage of clang-tidy configurable
This commit is contained in:
parent
8cfde8c55f
commit
ca33fd7752
2 changed files with 11 additions and 10 deletions
|
@ -16,16 +16,15 @@ if (NOT LIBSUPERDERPY_CONFIG_INCLUDED)
|
|||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
|
||||
endif(APPLE)
|
||||
|
||||
find_program(
|
||||
CLANG_TIDY_EXE
|
||||
NAMES "clang-tidy"
|
||||
DOC "Path to clang-tidy executable"
|
||||
)
|
||||
set(USE_CLANG_TIDY "yes" CACHE STRING "Analyze the code with clang-tidy" )
|
||||
if(USE_CLANG_TIDY)
|
||||
find_program(CLANG_TIDY_EXE NAMES "clang-tidy" DOC "Path to clang-tidy executable")
|
||||
if(NOT CLANG_TIDY_EXE)
|
||||
message(STATUS "clang-tidy not found.")
|
||||
message(STATUS "clang-tidy not found, analysis disabled")
|
||||
else()
|
||||
set(CMAKE_C_CLANG_TIDY "${CLANG_TIDY_EXE}" "-checks=*,-clang-analyzer-alpha.*,-google-readability-todo,-performance-type-promotion-in-math-fn,-misc-unused-parameters,-cert-msc30-c,-cert-msc50-cpp")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
if(CMAKE_INSTALL_PREFIX MATCHES "/usr/local")
|
||||
|
|
|
@ -188,7 +188,9 @@ SYMBOL_INTERNAL void GamestateProgress(struct Game* game) {
|
|||
}
|
||||
#ifdef LIBSUPERDERPY_SINGLE_THREAD
|
||||
DrawGamestates(game);
|
||||
if (tmp->showLoading) (*game->_priv.loading.gamestate->api->Gamestate_Draw)(game, game->_priv.loading.gamestate->data);
|
||||
if (tmp->showLoading) {
|
||||
(*game->_priv.loading.gamestate->api->Gamestate_Draw)(game, game->_priv.loading.gamestate->data);
|
||||
}
|
||||
DrawConsole(game);
|
||||
al_flip_display();
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue