Skip to content

Commit d2aeeba

Browse files
committed
Fix CMake syntax to enable memory analyzer tests
"option" requires the help text as second, not as third argument. This resulted in memory analyzer tests being disabled no matter what the OS being built on.
1 parent fde85b8 commit d2aeeba

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

.github/workflows/pull-request-checks.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
DEBIAN_FRONTEND: noninteractive
133133
run: |
134134
sudo apt-get update
135-
sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc g++ maven flex bison libxml2-utils dpkg-dev ccache doxygen z3
135+
sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc gdb g++ maven flex bison libxml2-utils dpkg-dev ccache doxygen z3
136136
- name: Confirm z3 solver is available and log the version installed
137137
run: z3 --version
138138
- name: Prepare ccache
@@ -448,7 +448,7 @@ jobs:
448448
- name: Fetch dependencies
449449
run: |
450450
sudo apt-get update
451-
sudo apt-get install --no-install-recommends -y g++ flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache z3
451+
sudo apt-get install --no-install-recommends -y g++ gdb flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache z3
452452
# remove libgcc-s1, which isn't normally available in Ubuntu 18.04
453453
target=$(dpkg-query -W --showformat='${Version}\n' gcc-8-base | head -n 1)
454454
# libgcc1 uses an epoch, thus the extra 1:
@@ -536,7 +536,7 @@ jobs:
536536
DEBIAN_FRONTEND: noninteractive
537537
run: |
538538
sudo apt-get update
539-
sudo apt-get install --no-install-recommends -y g++ gcc binutils flex bison cmake maven jq libxml2-utils openjdk-11-jdk-headless lcov ccache z3
539+
sudo apt-get install --no-install-recommends -y g++ gcc gdb binutils flex bison cmake maven jq libxml2-utils openjdk-11-jdk-headless lcov ccache z3
540540
- name: Confirm z3 solver is available and log the version installed
541541
run: z3 --version
542542
- name: Prepare ccache

.github/workflows/release-packages.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
with:
1414
submodules: recursive
1515
- name: Fetch dependencies
16-
run: sudo apt-get install --no-install-recommends -y g++ flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache
16+
run: sudo apt-get install --no-install-recommends -y g++ gdb flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache
1717
- name: Prepare ccache
1818
uses: actions/cache@v2
1919
with:
@@ -70,7 +70,7 @@ jobs:
7070
submodules: recursive
7171
- name: Fetch dependencies
7272
run: |
73-
sudo apt-get install --no-install-recommends -y g++ flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache
73+
sudo apt-get install --no-install-recommends -y g++ gdb flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache
7474
# remove libgcc-s1, which isn't normally available in Ubuntu 18.04
7575
target=$(dpkg-query -W --showformat='${Version}\n' gcc-8-base | head -n 1)
7676
# libgcc1 uses an epoch, thus the extra 1:

CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,17 +182,14 @@ function(cprover_default_properties)
182182
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY ${CBMC_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY})
183183
endfunction()
184184

185-
option(WITH_MEMORY_ANALYZER OFF
186-
"build the memory analyzer")
187-
188185
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
189186
set(WITH_MEMORY_ANALYZER_DEFAULT ON)
190187
else()
191188
set(WITH_MEMORY_ANALYZER_DEFAULT OFF)
192189
endif()
193190

194-
option(WITH_MEMORY_ANALYZER ${WITH_MEMORY_ANALYZER_DEFAULT}
195-
"build the memory analyzer")
191+
option(WITH_MEMORY_ANALYZER
192+
"build the memory analyzer" ${WITH_MEMORY_ANALYZER_DEFAULT})
196193

197194
add_subdirectory(src)
198195
add_subdirectory(regression)

0 commit comments

Comments
 (0)