Skip to content

Commit c5d09da

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 84914bb commit c5d09da

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:
@@ -427,7 +427,7 @@ jobs:
427427
- name: Fetch dependencies
428428
run: |
429429
sudo apt-get update
430-
sudo apt-get install --no-install-recommends -y g++ flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache
430+
sudo apt-get install --no-install-recommends -y g++ gdb flex bison cmake ninja-build maven jq libxml2-utils dpkg-dev ccache
431431
# remove libgcc-s1, which isn't normally available in Ubuntu 18.04
432432
target=$(dpkg-query -W --showformat='${Version}\n' gcc-8-base | head -n 1)
433433
# libgcc1 uses an epoch, thus the extra 1:
@@ -513,7 +513,7 @@ jobs:
513513
DEBIAN_FRONTEND: noninteractive
514514
run: |
515515
sudo apt-get update
516-
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
516+
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
517517
- name: Prepare ccache
518518
uses: actions/cache@v2
519519
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)