mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-03-04 09:11:27 +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")
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
|
|
||||||
find_program(
|
set(USE_CLANG_TIDY "yes" CACHE STRING "Analyze the code with clang-tidy" )
|
||||||
CLANG_TIDY_EXE
|
if(USE_CLANG_TIDY)
|
||||||
NAMES "clang-tidy"
|
find_program(CLANG_TIDY_EXE NAMES "clang-tidy" DOC "Path to clang-tidy executable")
|
||||||
DOC "Path to clang-tidy executable"
|
|
||||||
)
|
|
||||||
if(NOT CLANG_TIDY_EXE)
|
if(NOT CLANG_TIDY_EXE)
|
||||||
message(STATUS "clang-tidy not found.")
|
message(STATUS "clang-tidy not found, analysis disabled")
|
||||||
else()
|
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")
|
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()
|
||||||
|
endif()
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
if(CMAKE_INSTALL_PREFIX MATCHES "/usr/local")
|
if(CMAKE_INSTALL_PREFIX MATCHES "/usr/local")
|
||||||
|
|
|
@ -188,7 +188,9 @@ SYMBOL_INTERNAL void GamestateProgress(struct Game* game) {
|
||||||
}
|
}
|
||||||
#ifdef LIBSUPERDERPY_SINGLE_THREAD
|
#ifdef LIBSUPERDERPY_SINGLE_THREAD
|
||||||
DrawGamestates(game);
|
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);
|
DrawConsole(game);
|
||||||
al_flip_display();
|
al_flip_display();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue