Skip to content

Commit be84cd1

Browse files
authored
Merge pull request #5208 from karkhaz/kk-correct-cmake-invocation
Fix cmake flag in COMPILING.md and other docs
2 parents 0e51ef3 + ac76105 commit be84cd1

6 files changed

+11
-11
lines changed

.travis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ jobs:
211211
install:
212212
- ccache -z
213213
- ccache --max-size=1G
214-
- cmake -H. -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_CXX_COMPILER=/usr/bin/g++-7' '-DCMAKE_CXX_FLAGS=-DNAMED_SUB_IS_FORWARD_LIST' '-DWITH_MEMORY_ANALYZER=On'
214+
- cmake -S . -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_CXX_COMPILER=/usr/bin/g++-7' '-DCMAKE_CXX_FLAGS=-DNAMED_SUB_IS_FORWARD_LIST' '-DWITH_MEMORY_ANALYZER=On'
215215
- git submodule update --init --recursive
216216
- cmake --build build -- -j4
217217
script: (cd build; bin/unit "[core][irept]")
@@ -240,7 +240,7 @@ jobs:
240240
install:
241241
- ccache -z
242242
- ccache --max-size=1G
243-
- cmake -H. -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_CXX_COMPILER=/usr/bin/g++-7' '-DCMAKE_USE_CUDD=true' -DCMAKE_CXX_FLAGS="-DBDD_GUARDS" '-DWITH_MEMORY_ANALYZER=On'
243+
- cmake -S . -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_CXX_COMPILER=/usr/bin/g++-7' '-DCMAKE_USE_CUDD=true' -DCMAKE_CXX_FLAGS="-DBDD_GUARDS" '-DWITH_MEMORY_ANALYZER=On'
244244
- git submodule update --init --recursive
245245
- cmake --build build -- -j4
246246
script: (cd build; ctest -V -L CORE -j2)
@@ -277,7 +277,7 @@ jobs:
277277
install:
278278
- ccache -z
279279
- ccache --max-size=1G
280-
- cmake -H. -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_CXX_COMPILER=/usr/bin/clang++-7' '-DCMAKE_CXX_FLAGS=-Qunused-arguments' '-DWITH_MEMORY_ANALYZER=On'
280+
- cmake -S . -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_CXX_COMPILER=/usr/bin/clang++-7' '-DCMAKE_CXX_FLAGS=-Qunused-arguments' '-DWITH_MEMORY_ANALYZER=On'
281281
- git submodule update --init --recursive
282282
- cmake --build build -- -j4
283283
script: (cd build; ctest -V -L CORE -j2)
@@ -297,7 +297,7 @@ jobs:
297297
install:
298298
- ccache -z
299299
- ccache --max-size=1G
300-
- cmake -H. -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_OSX_ARCHITECTURES=x86_64'
300+
- cmake -S . -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_OSX_ARCHITECTURES=x86_64'
301301
- git submodule update --init --recursive
302302
- cmake --build build -- -j4
303303
script: (cd build; ctest -V -L CORE -j2)

COMPILING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ require manual modification of build files.
245245
```
246246
4. Generate build files with CMake:
247247
```
248-
cmake -H. -Bbuild
248+
cmake -S . -Bbuild
249249
```
250250
This command tells CMake to use the configuration in the current directory,
251251
and to generate build files into the `build` directory. This is the point
@@ -314,7 +314,7 @@ If compiling with cmake:
314314
1. Add the `-DCMAKE_USE_CUDD=true` flag to the `cmake` configuration phase.
315315
For instance:
316316
```
317-
cmake -H. -Bbuild -DCMAKE_USE_CUDD=true
317+
cmake -S . -Bbuild -DCMAKE_USE_CUDD=true
318318
```
319319
2. Run the build:
320320
```
@@ -336,6 +336,6 @@ compilation flag:
336336
```
337337
* If compiling with CMake:
338338
```
339-
cmake -H. -Bbuild -DCMAKE_CXX_FLAGS="-DBDD_GUARDS"
339+
cmake -S . -Bbuild -DCMAKE_CXX_FLAGS="-DBDD_GUARDS"
340340
```
341341
and then `cmake --build build`

buildspec-linux-cmake-gcc-cov.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ phases:
1818
commands:
1919
- echo Build started on `date`
2020
- git submodule update --init --recursive
21-
- cmake -H. -Bbuild '-Denable_coverage=1' '-Dparallel_tests=2' '-DCMAKE_CXX_COMPILER=/usr/bin/g++'
21+
- cmake -S . -Bbuild '-Denable_coverage=1' '-Dparallel_tests=2' '-DCMAKE_CXX_COMPILER=/usr/bin/g++'
2222
- cmake --build build --target coverage -- -j2
2323
post_build:
2424
commands:

buildspec-linux-cmake-gcc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ phases:
1616
build:
1717
commands:
1818
- echo Build started on `date`
19-
- cmake -H. -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_CXX_COMPILER=/usr/bin/g++'
19+
- cmake -S . -Bbuild '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_CXX_COMPILER=/usr/bin/g++'
2020
- git submodule update --init --recursive
2121
- cmake --build build -- -j2
2222
post_build:

buildspec-windows-cmake.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ phases:
2222
$Env:PATH = "C:\tools\cygwin\bin;c:\tools\clcache\clcache-4.1.0;$Env:PATH"
2323
& .\scripts\vcvars64.ps1
2424
git submodule update --init --recursive
25-
cmake "-H." -Bbuild -G Ninja "-DCMAKE_C_COMPILER=clcache.exe" "-DCMAKE_CXX_COMPILER=clcache.exe" -DCMAKE_BUILD_TYPE=Release
25+
cmake -S . -Bbuild -G Ninja "-DCMAKE_C_COMPILER=clcache.exe" "-DCMAKE_CXX_COMPILER=clcache.exe" -DCMAKE_BUILD_TYPE=Release
2626
cmake --build build --config Release --target cbmc
2727
cmake --build build --config Release --target jbmc
2828
cmake --build build --config Release --target unit

doc/architectural/compilation-and-development.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ obtain an HTML report for the test and unit tests, first build the dedicated
186186
coverage configuration using CMake (setting `enable_coverage` and building the
187187
`coverage` target):
188188

189-
cmake -H. -Bcov-build -Denable_coverage=1 -Dparallel_tests=2
189+
cmake -S . -Bcov-build -Denable_coverage=1 -Dparallel_tests=2
190190
make -C cov-build coverage
191191

192192
This configures a build environment in the `cov-build/` folder with coverage

0 commit comments

Comments
 (0)