mirror of
https://github.com/pevans/erc-c.git
synced 2024-12-30 06:29:48 +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:
parent
4ef9e50792
commit
f3966dc010
@ -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)
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user