File tree 5 files changed +36
-26
lines changed
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)
199
199
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${CBMC_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY} )
200
200
endfunction ()
201
201
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" ))
203
205
set (WITH_MEMORY_ANALYZER_DEFAULT ON )
204
206
else ()
205
207
set (WITH_MEMORY_ANALYZER_DEFAULT OFF )
Original file line number Diff line number Diff line change @@ -66,16 +66,17 @@ DIRS = cbmc-shadow-memory \
66
66
book-examples \
67
67
# Empty last line
68
68
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
72
73
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
79
80
endif
80
81
endif
81
82
Original file line number Diff line number Diff line change @@ -122,6 +122,6 @@ add_subdirectory(symtab2gb)
122
122
add_subdirectory (libcprover-cpp)
123
123
add_subdirectory (goto-bmc)
124
124
125
- if (( NOT WIN32 AND NOT APPLE ) OR WITH_MEMORY_ANALYZER)
125
+ if (WITH_MEMORY_ANALYZER)
126
126
add_subdirectory (memory-analyzer)
127
127
endif ()
Original file line number Diff line number Diff line change @@ -46,16 +46,22 @@ all: cbmc.dir \
46
46
symtab2gb.dir \
47
47
# Empty last line
48
48
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
53
61
endif
54
62
55
63
ifeq ($(WITH_MEMORY_ANALYZER ) ,1)
56
64
all : memory-analyzer.dir
57
- else ifneq ($(filter-out Windows Darwin,$(detected_OS)),)
58
- all : memory-analyzer.dir
59
65
endif
60
66
61
67
# ##############################################################################
Original file line number Diff line number Diff line change @@ -201,16 +201,17 @@ SRC += analyses/ai/ai.cpp \
201
201
util/xml.cpp \
202
202
# Empty last line
203
203
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
207
208
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
214
215
endif
215
216
endif
216
217
You can’t perform that action at this time.
0 commit comments