mirror of
https://github.com/pevans/erc-c.git
synced 2024-11-27 05:49:24 +00:00
Do static analysis if env variable is set
This commit is contained in:
parent
dfbe0750ae
commit
28cd93d5e9
@ -5,7 +5,9 @@ project(erc)
|
||||
|
||||
include(sources.cmake)
|
||||
|
||||
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --analyze")
|
||||
if(DEFINED ENV{STATIC_ANALYSIS})
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --analyze")
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_FLAGS MATCHES "--analyze")
|
||||
set(CMAKE_C_LINK_EXECUTABLE "echo 'Will not execute binary when running static analysis'")
|
||||
|
@ -4,7 +4,9 @@ project(erc-test)
|
||||
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
|
||||
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --analyze")
|
||||
if(DEFINED ENV{STATIC_ANALYSIS})
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --analyze")
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_FLAGS MATCHES "--analyze")
|
||||
set(CMAKE_C_LINK_EXECUTABLE "echo 'Will not execute binary when running static analysis'")
|
||||
|
Loading…
Reference in New Issue
Block a user