The title is probably not entirely correct but I have a dependency that I pull in with a custom source_dir and this results in the dependency to always be repopulated from scratch when I change cmake build type and changes to the dependency are lost in the process without any warning.
CPMAddPackage(
NAME Foo
GITHUB_REPOSITORY git/Foo
GIT_TAG dev
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/foo
)
But if I do not specify a source_dir it instead is stored inside the CPM_SOURCE_CACHE and not re-fetched. it would be nice to have the possibility to have the same behavior but still be able to define a custom source_dir by storing some data in the cache and the sources in the custom directory
The title is probably not entirely correct but I have a dependency that I pull in with a custom source_dir and this results in the dependency to always be repopulated from scratch when I change cmake build type and changes to the dependency are lost in the process without any warning.
CPMAddPackage(
NAME Foo
GITHUB_REPOSITORY git/Foo
GIT_TAG dev
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/foo
)
But if I do not specify a source_dir it instead is stored inside the CPM_SOURCE_CACHE and not re-fetched. it would be nice to have the possibility to have the same behavior but still be able to define a custom source_dir by storing some data in the cache and the sources in the custom directory