cmake install: failure on `nlohmann_json`
tdegeus opened this issue · 1 comments
tdegeus commented
I am trying to install xtl using
mkdir build
cd build
cmake ..
make install
But cmake fails
CMake Warning at CMakeLists.txt:31 (find_package):
By not providing "Findnlohmann_json.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"nlohmann_json", but CMake did not find one.
Could not find a package configuration file provided by "nlohmann_json"
with any of the following names:
nlohmann_jsonConfig.cmake
nlohmann_json-config.cmake
Add the installation prefix of "nlohmann_json" to CMAKE_PREFIX_PATH or set
"nlohmann_json_DIR" to a directory containing one of the above files. If
"nlohmann_json" provides a separate development package or SDK, be sure it
has been installed.
I don't think that there exits an official way to install this dependency. What is the proper way to proceed?
JohanMabille commented
nlohmann_json
is an optional dependency, the cmake of the xtl has been fixed recently, see #90. I see three options here to fix the problem:
- you use the master branch
- you apply the change of #90 to your local CMakeLists.txt
- you install xtl from conda, you won't have any issue unless you try to use the json serialization. If you need it, you can install nlohmann_json from conda (it is available on the quantstack channel).