-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests fail: cannot find -lnlohmann_json #101
Comments
This was reported earlier this week. We should either specify that it is required for the test target or skipp the corresponding tests when missing. |
It is always missing as a .so library, because it is a headers-only library. |
I don't think so. This is just that when it does not find a target, cmake assumes that you are trying to link with a library. |
Why can't it find the target? |
@yurivict Any chance you installed |
|
Are you building from the |
Building in the |
That'll be the issue, you could try changing if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
project(xtl-test)
find_package(xtl REQUIRED CONFIG)
set(XTL_INCLUDE_DIR ${xtl_INCLUDE_DIRS})
endif () in if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
project(xtl-test)
find_package(xtl REQUIRED CONFIG)
find_package(nlohmann_json QUIET)
set(XTL_INCLUDE_DIR ${xtl_INCLUDE_DIRS})
endif () |
This helped, thank you! |
nlohmann-json
is a headers-only library:and there should never be
-lnlohmann_json
for it.The text was updated successfully, but these errors were encountered: