1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-12-03 13:49:36 +00:00

Enable static analysis through clang

If you want to, just uncomment the line that adds the --analyze flag to
CMAKE_C_FLAGS.
This commit is contained in:
Peter Evans 2017-12-18 14:26:53 -06:00
parent 4ef9e50792
commit f3966dc010
2 changed files with 12 additions and 0 deletions

View File

@ -5,6 +5,12 @@ project(erc)
include(sources.cmake)
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --analyze")
if(CMAKE_C_FLAGS MATCHES "--analyze")
set(CMAKE_C_LINK_EXECUTABLE "echo 'Will not execute binary when running static analysis'")
endif()
if(APPLE)
set(sdl_library /Library/Frameworks/SDL2.framework)
set(sdl_headers /Library/Frameworks/SDL2.framework/Headers)

View File

@ -4,6 +4,12 @@ project(erc-test)
set(CMAKE_BUILD_TYPE Debug)
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --analyze")
if(CMAKE_C_FLAGS MATCHES "--analyze")
set(CMAKE_C_LINK_EXECUTABLE "echo 'Will not execute binary when running static analysis'")
endif()
if(APPLE)
set(opengl_library /System/Library/Frameworks/OpenGL.framework)
endif()