hwinfo
cross-platform C++ API for hardware information (CPU, RAM, GPU, ...)
Checkout dev to access latest features like: – Motherboard information – GPU information – Harddrive information – ...
Warning dev is not production ready!
Content
hwinfo
Build Requirements: git, cmake, gcc
- Download repository:
git clone https://github.com/lfreist/hwinfo
- Build using cmake:
mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. && make -j $(nproc)
Example
See example.cpp
hwinfo
in your cmake project
Include - Download
hwinfo
into your project (e.g. in<project-root>/third_party/hwinfo
)mkdir third_party cd third_party git clone https://github.com/lfreist/hwinfo
- Simply add the following to your
<project-root>/CMakeLists.txt
file:# file: <project-root>/CMakeLists.txt add_subdirectory(third_party/hwinfo) include_directories(third_party/hwinfo/include)
- Include
hwinfo
into your.cpp/.h
files:// file: your_benchmarks.cpp #include "hwinfo/hwinfo.h"
- Link it in cmake
add_executable(your_executable your_executable.cpp) target_link_libraries(your_executable PUBLIC hwinfo::HWinfo)