mirror of
https://github.com/google/cpu_features.git
synced 2025-07-01 21:31:15 +02:00
44
README.md
44
README.md
@ -216,23 +216,39 @@ Please check the [CMake build instructions](cmake/README.md).
|
||||
<a name="quickstart"></a>
|
||||
### Quickstart
|
||||
|
||||
- Run `list_cpu_features`
|
||||
```sh
|
||||
cmake -S. -Bbuild -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release -j
|
||||
./build/list_cpu_features --json
|
||||
```
|
||||
- Run `list_cpu_features`
|
||||
```sh
|
||||
cmake -S. -Bbuild -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --config Release -j
|
||||
./build/list_cpu_features --json
|
||||
```
|
||||
|
||||
_Note_: Use `--target ALL_BUILD` on the second line for `Visual Studio` and `XCode`.
|
||||
_Note_: Use `--target ALL_BUILD` on the second line for `Visual Studio` and `XCode`.
|
||||
|
||||
- run tests
|
||||
```sh
|
||||
cmake -S. -Bbuild -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
|
||||
cmake --build build --config Debug -j
|
||||
cmake --build build --config Debug --target test
|
||||
```
|
||||
- run tests
|
||||
```sh
|
||||
cmake -S. -Bbuild -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
|
||||
cmake --build build --config Debug -j
|
||||
cmake --build build --config Debug --target test
|
||||
```
|
||||
|
||||
_Note_: Use `--target RUN_TESTS` on the last line for `Visual Studio` and `--target RUN_TEST` for `XCode`.
|
||||
_Note_: Use `--target RUN_TESTS` on the last line for `Visual Studio` and `--target RUN_TEST` for `XCode`.
|
||||
|
||||
|
||||
- install `cpu_features`
|
||||
```sh
|
||||
cmake --build build --config Release --target install -v
|
||||
```
|
||||
|
||||
_Note_: Use `--target INSTALL` for `Visual Studio`.
|
||||
|
||||
_Note_: When using `Makefile` or `XCode` generator, you can use
|
||||
[`DESTDIR`](https://www.gnu.org/software/make/manual/html_node/DESTDIR.html)
|
||||
to install on a local repository.<br>
|
||||
e.g.
|
||||
```sh
|
||||
cmake --build build --config Release --target install -v -- DESTDIR=install
|
||||
```
|
||||
|
||||
<a name="bindings"></a>
|
||||
## Community bindings
|
||||
|
Reference in New Issue
Block a user