Relative includes of json_fwd.hpp in detail/meta.hpp. [Develop branch] #928
Labels
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
Milestone
Bug Report
I have nlohmann/json library added using
ExternalProject_Add
inCMakeLists.txt
.In my project, the
<INSTALL_DIR>/include/
folder is added as the system include directories.During compilation, I've an error of missing
json_fwd.hpp
included fromdetail/meta.cpp
.The file
json_fwd.hpp
is "missing" because it is located ininclude/nlohmann
and onlyinclude/
is added to 'global' include path.I'm using
JSON_MultipleHeaders=ON
flag in CMake.File
CMakeLists.txt
File
src/test.cpp
:What is the expected behavior?
json_fwd.hpp
should be visible for files indetail/
of the json library.And what is the actual behavior instead?
The relative path in
meta.cpp
to the json_fwd.hpp
doesn't allow to compile.During compilation, I've got the following error:
Which compiler and operating system are you using? Is it a supported compiler?
Arch Linux, Clang 7.0.0
Did you use a released version of the library or the version from the
develop
branch?develop
If you experience a compilation error: can you compile and run the unit tests?
Cannot compile.
The text was updated successfully, but these errors were encountered: