Closed LecrisUT closed 7 months ago
Many thanks for the suggestion! That seems like a convenient solution.
Would I still keep the mqt-core
submodule in that kind of setup?
Just out of curiosity: Let's say I want to try a development version of mqt-core
(no git tag available). In the current setup, that is as easy changing the submodule commit. How would that work with FetchContent_Declare
?
Would I still keep the
mqt-core
submodule in that kind of setup?
Yes, I do recommend to keep the submodule as well. That would help with offline installations
Just out of curiosity: Let's say I want to try a development version of mqt-core (no git tag available). In the current setup, that is as easy changing the submodule commit. How would that work with FetchContent_Declare?
My workflow is to declare -DFETCHCONTENT_SOURCE_DIR_<uppercaseName>=/path/to/local/git/repo
in these cases an point it to my local git repo (not the submodule).
Given that all of our core tools now rely on FetchContent
over directly using the submodules, I believe this can be closed for now 🎉
Thanks @LecrisUT for the suggestion!
This allows the user to switch between:
-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER
REQUIRED
if you wish to have it fallback-DFETCHCONTENT_SOURCE_DIR_<uppercaseName>=/path/to/submodule
Find<Package>.cmake
Note that the full syntax is only available in
Cmake 3.24
, but you can make a simple compatibility: examplePlease link upstream to this issue as well