File tree Expand file tree Collapse file tree 5 files changed +36
-26
lines changed
Expand file tree Collapse file tree 5 files changed +36
-26
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,9 @@ function(cprover_default_properties)
199199 XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${CBMC_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY} )
200200endfunction ()
201201
202- if (CMAKE_SYSTEM_NAME STREQUAL Linux)
202+ if (CMAKE_SYSTEM_NAME STREQUAL Linux AND
203+ (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
204+ CMAKE_SYSTEM_PROCESSOR STREQUAL "i386" ))
203205set (WITH_MEMORY_ANALYZER_DEFAULT ON )
204206else ()
205207set (WITH_MEMORY_ANALYZER_DEFAULT OFF )
Original file line number Diff line number Diff line change @@ -66,16 +66,17 @@ DIRS = cbmc-shadow-memory \
6666 book-examples \
6767 # Empty last line
6868
69- ifeq ($(OS ) ,Windows_NT)
70- detected_OS := Windows
71- else
69+ ifndef WITH_MEMORY_ANALYZER
70+ ifeq ($(OS),Windows_NT)
71+ WITH_MEMORY_ANALYZER = 0
72+ else
7273 detected_OS := $(shell sh -c 'uname 2>/dev/null || echo Unknown')
73- endif
74-
75- ifeq ( $( detected_OS ) ,Linux)
76- ifneq ($(WITH_MEMORY_ANALYZER),0)
77- # only set if it wasn't explicitly unset
78- WITH_MEMORY_ANALYZER =1
74+ detected_ARCH := $( shell sh -c 'uname -m 2>/dev/null || echo Unknown')
75+ ifeq ($(filter-out Linux_x86_64 Linux_i386,$(detected_OS)_$(detected_ARCH)),)
76+ WITH_MEMORY_ANALYZER = 1
77+ else
78+ WITH_MEMORY_ANALYZER = 0
79+ endif
7980 endif
8081endif
8182
Original file line number Diff line number Diff line change @@ -122,6 +122,6 @@ add_subdirectory(symtab2gb)
122122add_subdirectory (libcprover-cpp)
123123add_subdirectory (goto-bmc)
124124
125- if (( NOT WIN32 AND NOT APPLE ) OR WITH_MEMORY_ANALYZER)
125+ if (WITH_MEMORY_ANALYZER)
126126add_subdirectory (memory-analyzer)
127127endif ()
Original file line number Diff line number Diff line change @@ -46,16 +46,22 @@ all: cbmc.dir \
4646 symtab2gb.dir \
4747 # Empty last line
4848
49- ifeq ($(OS ) ,Windows_NT)
50- detected_OS := Windows
51- else
52- detected_OS := $(shell sh -c 'uname 2>/dev/null || echo Unknown')
49+ ifndef WITH_MEMORY_ANALYZER
50+ ifeq ($(OS),Windows_NT)
51+ WITH_MEMORY_ANALYZER = 0
52+ else
53+ detected_OS := $(shell sh -c 'uname 2>/dev/null || echo Unknown')
54+ detected_ARCH := $(shell sh -c 'uname -m 2>/dev/null || echo Unknown')
55+ ifeq ($(filter-out Linux_x86_64 Linux_i386,$(detected_OS)_$(detected_ARCH)),)
56+ WITH_MEMORY_ANALYZER = 1
57+ else
58+ WITH_MEMORY_ANALYZER = 0
59+ endif
60+ endif
5361endif
5462
5563ifeq ($(WITH_MEMORY_ANALYZER ) ,1)
5664 all : memory-analyzer.dir
57- else ifneq ($(filter-out Windows Darwin,$(detected_OS)),)
58- all : memory-analyzer.dir
5965endif
6066
6167# ##############################################################################
Original file line number Diff line number Diff line change @@ -201,16 +201,17 @@ SRC += analyses/ai/ai.cpp \
201201 util/xml.cpp \
202202 # Empty last line
203203
204- ifeq ($(OS ) ,Windows_NT)
205- detected_OS := Windows
206- else
204+ ifndef WITH_MEMORY_ANALYZER
205+ ifeq ($(OS),Windows_NT)
206+ WITH_MEMORY_ANALYZER = 0
207+ else
207208 detected_OS := $(shell sh -c 'uname 2>/dev/null || echo Unknown')
208- endif
209-
210- ifeq ( $( detected_OS ) ,Linux)
211- ifneq ($(WITH_MEMORY_ANALYZER),0)
212- # only set if it wasn't explicitly unset
213- WITH_MEMORY_ANALYZER =1
209+ detected_ARCH := $( shell sh -c 'uname -m 2>/dev/null || echo Unknown')
210+ ifeq ($(filter-out Linux_x86_64 Linux_i386,$(detected_OS)_$(detected_ARCH)),)
211+ WITH_MEMORY_ANALYZER = 1
212+ else
213+ WITH_MEMORY_ANALYZER = 0
214+ endif
214215 endif
215216endif
216217
You can’t perform that action at this time.
0 commit comments