Add handling for missing nvml lib
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
#include <boost/json/object.hpp>
|
||||
#include <include/nvml.h>
|
||||
#ifdef HAVE_NVML
|
||||
|
||||
#include <include/nvml.h>
|
||||
#include <sensor/NvidiaSensor.h>
|
||||
|
||||
#include <boost/json/object.hpp>
|
||||
|
||||
using namespace std;
|
||||
|
||||
NvidiaSensor::NvidiaSensor() { nvmlInit_v2(); }
|
||||
@@ -25,3 +27,5 @@ json NvidiaSensor::toJson() const {
|
||||
json obj = {"NvidiaSensor", toString()};
|
||||
return obj;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user