Skip to content

Commit d11492f

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 75e2623 commit d11492f

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
@@ -128,7 +128,7 @@ jobs:
128128
DEBIAN_FRONTEND: noninteractive
129129
run: |
130130
sudo apt-get update
131-
sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc g++ maven flex bison libxml2-utils dpkg-dev ccache doxygen z3
131+
sudo apt-get install --no-install-recommends -yq cmake ninja-build gcc gdb g++ maven flex bison libxml2-utils dpkg-dev ccache doxygen z3
132132
- name: Prepare ccache
133133
uses: actions/cache@v2
134134
with:
@@ -428,7 +428,7 @@ jobs:
428428
- name: Fetch dependencies
429429
run: |
430430
sudo apt-get update
431-
sudo apt-get install --no-install-recommends -y g++ flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache
431+
sudo apt-get install --no-install-recommends -y g++ gdb flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache
432432
# remove libgcc-s1, which isn't normally available in Ubuntu 18.04
433433
target=$(dpkg-query -W --showformat='${Version}\n' gcc-8-base | head -n 1)
434434
# libgcc1 uses an epoch, thus the extra 1:
@@ -514,7 +514,7 @@ jobs:
514514
DEBIAN_FRONTEND: noninteractive
515515
run: |
516516
sudo apt-get update
517-
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
517+
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
518518
- name: Prepare ccache
519519
uses: actions/cache@v2
520520
with:

.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)