Replies: 1 comment
-
A workaround (besides adjusting CPM.cmake) would be to already |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Some background:
We had a project in which we have created several CMake modules. Now I want to take these CMake modules out and reuse them in other projects (also see #390).
This works up to a point, but we also have a few CMake modules that also have a CMake script (which we execute via a
add_custom_target
oradd_custom_command
).Now the problem arises is that one of those scripts depends on the another CMake module, which I now want to include via CPM.cmake.
Unfortunately, at this time, you can't use CPM.cmake from a CMake script as it uses
add_subdirectory
, which results in the following error:What would be the suggested way of dealing with this situation?
E.g. when a CMake scripts needs to pull in a "module" via CPM.cmake, how can it be achieved?
Beta Was this translation helpful? Give feedback.
All reactions