You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FetchContent_Declare statement fails with "At least one entry of URL is a path (invalid in a list)" which indicates that cmake is unable to parse the URL parameter correctly (probably cmake bug), I had to swap the arguments like this:
FetchContent_Declare(json
DOWNLOAD_EXTRACT_TIMESTAMP ON
URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz
)
add_subdirectory fails with "add_subdirectory called with incorrect number of arguments". The issue is the extra SYSTEM argument which was introduced much later than cmake-3.22. Meanwhile the root CMakeLists.txt declares to use cmake-3.15, so this is not correct. Suggested fix:
The issues are in
cmake/nlohmann.cmake
:FetchContent_Declare
statement fails with "At least one entry of URL is a path (invalid in a list)" which indicates that cmake is unable to parse the URL parameter correctly (probably cmake bug), I had to swap the arguments like this:FetchContent_Declare(json DOWNLOAD_EXTRACT_TIMESTAMP ON URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz )
add_subdirectory
fails with "add_subdirectory called with incorrect number of arguments". The issue is the extraSYSTEM
argument which was introduced much later thancmake-3.22
. Meanwhile the rootCMakeLists.txt
declares to usecmake-3.15
, so this is not correct. Suggested fix:(
EXCLUDE_FROM_ALL
excludes nlohmann targets from the main project targets minimizing development clutter)The text was updated successfully, but these errors were encountered: