Comments (12)
Another issue to note is that the CMake installation relies on the dependencies
directory. If you remove the dependencies
directory, CMake won't be able to clone the necessary dependencies. Maybe we can somehow make CMake do a git clone
?
[Edited]: https://github.com/vmagnin/forcolormap/blob/8e14b89f1e14e8d20a4294a5bc00fa2bda31de2f/CMakeLists.txt#L32C1-L32C31
My apologies, it was my mistake. There is no issue; the functionality is correct!
from forcolormap.
Thanks @gha3mi , I have now also moved install/
and dependencies/
to the cmake/
directory. Everything seems to run.
from forcolormap.
See also:
https://github.com/vmagnin/gtk-fortran/blob/gtk4/cmake/cmake_uninstall.cmake.in
from forcolormap.
The issue arises from assigning the same name to the CMake target uninstall
:
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake)
I suggest using distinct custom target names. For instance, you may consider using uninstall_forcolormap
, since the name uninstall
is already used in the ForImage custom target. Consequently, I need to update it to uninstall_forimage
.
from forcolormap.
I don't know if this is a problem or if it's intentional: uninstall_forcolormap
also removes ForImage!
I believe it is correct because it removes all installed libraries and dependencies. If someone wants to have ForImage, they must install ForImage again!
from forcolormap.
The issue arises from assigning the same name to the CMake target
uninstall
:
I suggest using distinct custom target names. For instance, you may consider usinguninstall_forcolormap
, since the nameuninstall
is already used in the ForImage custom target. Consequently, I need to update it touninstall_forimage
.
Thanks Ali, I will try the name uninstall_forcolormap
tomorrow.
from forcolormap.
I have pushed the CMake uninstall functionality:
$ sudo make uninstall_forcolormap
-- Uninstalling /usr/local/lib/libforimage.so.0.3.0
-- Uninstalling /usr/local/lib/libforimage.so.0
-- Uninstalling /usr/local/lib/libforimage.so
-- Uninstalling /usr/local/include/forimage.mod
-- Uninstalling /usr/local/include/forimage_parameters.mod
-- Uninstalling /usr/local/include/forcolor.mod
-- Uninstalling /usr/local/include/lut.mod
-- Uninstalling /usr/local/include/pnm.mod
-- Uninstalling /usr/local/lib/cmake/forimage/forimageTargets.cmake
-- Uninstalling /usr/local/lib/cmake/forimage/forimageTargets-release.cmake
-- Uninstalling /usr/local/lib/cmake/forimage/forimageConfig.cmake
-- Uninstalling /usr/local/lib/cmake/forimage/forimageConfigVersion.cmake
-- Uninstalling /usr/local/lib/pkgconfig/forimage.pc
-- Uninstalling /usr/local/lib/libforcolormap.so.0.8.0
-- Uninstalling /usr/local/lib/libforcolormap.so.0
-- Uninstalling /usr/local/lib/libforcolormap.so
-- Uninstalling /usr/local/include/forcolormap_info.mod
-- Uninstalling /usr/local/include/forcolormap.mod
-- Uninstalling /usr/local/include/colormap_parameters.mod
-- Uninstalling /usr/local/include/matplotlib_colormaps.mod
-- Uninstalling /usr/local/include/miscellaneous_colormaps.mod
-- Uninstalling /usr/local/include/scientific_colour_maps.mod
-- Uninstalling /usr/local/lib/cmake/forcolormap/forcolormapTargets.cmake
-- Uninstalling /usr/local/lib/cmake/forcolormap/forcolormapTargets-release.cmake
-- Uninstalling /usr/local/lib/cmake/forcolormap/forcolormapConfig.cmake
-- Uninstalling /usr/local/lib/cmake/forcolormap/forcolormapConfigVersion.cmake
-- Uninstalling /usr/local/lib/pkgconfig/forcolormap.pc
Built target uninstall_forcolormap
And I have added in the README.md a comment about the consequences for ForImage.
I don't know the best way to separate ForImage/ForColormap uninstall, but note that cmake/cmake_uninstall.cmake.in
is just running a loop on the content of build/install_manifest.txt
:
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
...
It would be (relatively) easy to add a test to avoid removing files whose path contains forimage
.
from forcolormap.
And I have added in the README.md a comment about the consequences for ForImage.
I think this is good for now.
from forcolormap.
(I have also moved all CMake-related directories for ForImage, including install
(and dependencies
), to the cmake
directory. Having the install
directory in the main path was somehow confusing for me, as it is specifically intended for CMake-related functionality.)
from forcolormap.
I tried to add such code copied from gtk-fortran (but I did not pushed it on GitHub).
The problem is that when I try to uninstall ForColormap, CMake is looking also for the ForImage install_manifest.txt
, which does not exist:
forcolormap/build (main)$ sudo make uninstall
CMake Error at cmake/cmake_uninstall.cmake:2 (message):
Cannot find install manifest: "forcolormap/build/_deps/forimage-build/install_manifest.txt"
make[3]: *** [_deps/forimage-build/CMakeFiles/uninstall.dir/build.make:70 : _deps/forimage-build/CMakeFiles/uninstall] Erreur 1
make[2]: *** [CMakeFiles/Makefile2:254 : _deps/forimage-build/CMakeFiles/uninstall.dir/all] Erreur 2
make[1]: *** [CMakeFiles/Makefile2:261 : _deps/forimage-build/CMakeFiles/uninstall.dir/rule] Erreur 2
make: *** [Makefile:195 : uninstall] Erreur 2
The install_manifest.txt
contains both ForImage and ForColormap files:
forcolormap (main)$ cat build/install_manifest.txt
/usr/local/lib/libforimage.so.0.3.0
/usr/local/lib/libforimage.so.0
/usr/local/lib/libforimage.so
/usr/local/include/lut.mod
/usr/local/include/pnm.mod
/usr/local/include/forimage_parameters.mod
/usr/local/include/forcolor.mod
/usr/local/include/forimage.mod
/usr/local/lib/cmake/forimage/forimageTargets.cmake
/usr/local/lib/cmake/forimage/forimageTargets-release.cmake
/usr/local/lib/cmake/forimage/forimageConfig.cmake
/usr/local/lib/cmake/forimage/forimageConfigVersion.cmake
/usr/local/lib/pkgconfig/forimage.pc
/usr/local/lib/libforcolormap.so.0.8.0
/usr/local/lib/libforcolormap.so.0
/usr/local/lib/libforcolormap.so
/usr/local/include/miscellaneous_colormaps.mod
/usr/local/include/matplotlib_colormaps.mod
/usr/local/include/colormap_parameters.mod
/usr/local/include/forcolormap.mod
/usr/local/include/forcolormap_info.mod
/usr/local/include/scientific_colour_maps.mod
/usr/local/lib/cmake/forcolormap/forcolormapTargets.cmake
/usr/local/lib/cmake/forcolormap/forcolormapTargets-release.cmake
/usr/local/lib/cmake/forcolormap/forcolormapConfig.cmake
/usr/local/lib/cmake/forcolormap/forcolormapConfigVersion.cmake
from forcolormap.
The ideal approach would be to have uninstall
, uninstall_forcolormap
, and uninstall_forimage
. If we could separate the install_manifest
into two files, one for ForImage and one for ForColormap, then we would be able to uninstall each library separately or all of them collectively.
from forcolormap.
If we could separate the
install_manifest
into two files, one for ForImage and one for ForColormap, then we would be able to uninstall each library separately or all of them collectively.
Indeed, we have both libraries in the same build/install_manifest.txt
...
from forcolormap.
Related Issues (20)
- Add more tests HOT 1
- Error in the pkg-config libdir variable (CMake) HOT 3
- Using ForColormap as a shared library fails HOT 12
- Using ForColormap as a static library fails HOT 6
- "bamako" scientific colormaps should not be in the Diverging category HOT 3
- Fix Broken Link to Cubehelix Colormap in README HOT 2
- Add check() Procedure HOT 3
- Colormap_info: Include all available colormaps HOT 1
- Add Lagrange Interpolation function HOT 4
- Example: Create a `modify` example for the `shift()` method HOT 1
- Create a simple documentation generated with FORD. HOT 1
- CI: Integrate fpm tests
- CI: Integrate FORD documentation HOT 1
- Wrong number of levels for the categorical colormaps
- The subroutine test_colormap() is duplicated in several examples
- access='append' is a GNU extension
- In MSYS2/Windows, CMake encounters problems with the ForImage dependency HOT 1
- Unused dummy argument ‘check_zmax’ HOT 2
- Add Support lut File Format HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forcolormap.