1
0
Fork 0
mirror of https://github.com/anrieff/libcpuid synced 2025-10-03 11:01:30 +00:00

CMake: harmonizes options

This commit is contained in:
The Tumultuous Unicorn Of Darkness 2024-07-10 20:56:38 +02:00
commit 52efefbb7d
No known key found for this signature in database
GPG key ID: 1E55EE2EFF18BC1A
5 changed files with 58 additions and 40 deletions

View file

@ -65,9 +65,17 @@ sources.
##### By using CMake
CMake options for libcpuid (use `cmake -LH` to list all options):
- `LIBCPUID_ENABLE_DOCS`: enable building documentation by using Doxyen (**ON** by default)
- `LIBCPUID_ENABLE_TESTS`: enable tests targets, like `test-fast`, `test-old` and `fix-tests` (**OFF** by default)
- `LIBCPUID_BUILD_DEPRECATED`: build support of deprecated attributes (**ON** by default to guarantee backward compatibility)
- `LIBCPUID_BUILD_DRIVERS`: enable building kernel drivers (**ON** by default)
- `LIBCPUID_DRIVER_DEBUG`: enable debug mode flr kernel drivers (**OFF** by default)
- `LIBCPUID_DRIVER_ARM_LINUX_DKMS`: use DKMS for CPUID Linux kernel module for ARM (**ON** by default), switch off to build the kernel module in the `build` directory
Basic example to build and install libcpuid by using CMake:
```shell
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIBCPUID_ENABLE_TESTS=ON
cmake --build build
cmake --install build # may need administrative privileges, install under /usr/local by default
```