resdata
resdata copied to clipboard
Update CMakeLists.txt
Use CMAKE_CURRENT_SOURCE_DIR when looking for tag, this will prevent potential problems if the project is grabbed by fetchContent in other project
Issue Resolves #874
Approach Should use CMAKE_CURRENT_SOURCE_DIR instead of CMAKE_SOURCE_DIR when looking for tags
Can one of the admins verify this patch?
Hi,
Thanks for the contribution and sorry for the very delayed response.
I suppose the discrepancy using CMAKE_SOURCE_DIR
when building ecl as part of a different project will be relevant for all usages of CMAKE_SOURCE_DIR
and not only when fetching tags.
Similar using CMAKE_BINARY_DIR
vs CMAKE_CURRENT_BINARY_DIR
will be affected.
Care to weigh in @pinkwah ?
Jenkins test this please
Thanks for your contribution @billcxx!
It seems that the CMake code styling check failed. Would you mind running cmake-format -i CMakeLists.txt
(after installing the pip package cmake-format
) to satisfy it? I'll merge when that is done. :)
Hi,
Thanks for the contribution and sorry for the very delayed response.
I suppose the discrepancy using
CMAKE_SOURCE_DIR
when building ecl as part of a different project will be relevant for all usages ofCMAKE_SOURCE_DIR
and not only when fetching tags.Similar using
CMAKE_BINARY_DIR
vsCMAKE_CURRENT_BINARY_DIR
will be affected.Care to weigh in @pinkwah ?
I changed all cmake_source_dir and cmake_binary_dir. Tested with a simple
mkdir build; cd build
cmake ..
make
Then also format the CMakeLists.txt with cmake-format.
Thanks for your contribution @billcxx!
It seems that the CMake code styling check failed. Would you mind running
cmake-format -i CMakeLists.txt
(after installing the pip packagecmake-format
) to satisfy it? I'll merge when that is done. :)