Compilation error with CMake 3.20.* on Ubuntu 18.04
Closed this issue · 1 comments
AntoineGautier commented
Running cmake --build . --target install
we get
cc1: fatal error: CMakeFiles/lib_obj.dir/algorithmRectangle.c.d: No such file or directory
compilation terminated.
...
This is due to the new flag -MF
in the generated build/src/CMakeFiles/lib_obj.dir/build.make
:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/agautier/gitrepo/funnel/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object src/CMakeFiles/lib_obj.dir/algorithmRectangle.c.o"
cd /home/agautier/gitrepo/funnel/build/src && /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT src/CMakeFiles/lib_obj.dir/algorithmRectangle.c.o -MF CMakeFiles/lib_obj.dir/algorithmRectangle.c.o.d -o CMakeFiles/lib_obj.dir/algorithmRectangle.c.o -c /home/agautier/gitrepo/funnel/src/algorithmRectangle.c
as opposed to
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/Users/agautier/gitrepo/funnel/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object src/CMakeFiles/lib_obj.dir/algorithmRectangle.c.o"
cd /Users/agautier/gitrepo/funnel/build/src && /Library/Developer/CommandLineTools/usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/lib_obj.dir/algorithmRectangle.c.o -c /Users/agautier/gitrepo/funnel/src/algorithmRectangle.c
AntoineGautier commented
Closing as CMake version has been updated to 3.22 via PR #66.