CPM.cmake
CPM.cmake copied to clipboard
Single-argument and infer name support for CPMFindPackage
Currently, CPMFindPackage("gh:gsl-lite/gsl-lite#master") and
CPMFindPackage(
GITHUB_REPOSITORY gsl-lite/gsl-lite
GIT_TAG master
GIT_SHALLOW True)
both fail with
/home/johel/tmp/build-jge/_deps/cpm-src/cmake/CPM.cmake:204: error: cpm_check_if_package_already_added Function invoked with incorrect arguments for function named: cpm_check_if_package_already_added tools/cmake/JGEFindDependencies.cmake:55 (CPMFindPackage) CMakeLists.txt:11 (include)
Is it possible to extend this support to CPMFindPackage? Otherwise, I think this difference should be documented.
Yes, CPMFindPackage doesn't support the shorthand syntax (yet?). The discussion about this is in #208