Closed altonlm closed 1 year ago
Why did you run cgal_create_CMakeLists
and not use the cmake script provided by CGAL? If you look at the cmake script shipped with CGAL, you will see some lines about finding Eigen and "linking" it.
You're right! I assumed that running that file would always take care of the CMakeLists.txt file creation so I bundled it together with the other two commands in a shell function for ease of use. Everything works properly now! Thank you for the help!
Please use the following template to help us solving your issue.
Issue Details
I'm trying to build the MCF_Skeleton_example.cpp example file however it seems like the compiler is unable to find the Vector or Matrix types.
Source Code
I am using the example file listed above and compiling via these shell commands: % /opt/homebrew/bin/cgal_create_CMakeLists % cmake -DCMAKE_BUILD_TYPE=Release . % make
after which I get these messages:
CGAL_COMPONENTS: moving CMakeLists.txt to CMakeLists.txt.bak ...
# Created by the script cgal_create_CMakeLists # This is the CMake script for compiling a set of CGAL applications.
cmake_minimum_required(VERSION 3.1...3.23)
project( test )
# CGAL and its components find_package( CGAL QUIET COMPONENTS )
if ( NOT CGAL_FOUND )
message(STATUS "This project requires the CGAL library, and will not be compiled.") return()
endif()
# Boost and its components find_package( Boost REQUIRED )
if ( NOT Boost_FOUND )
message(STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
# include for local directory
# include for local package
# Creating entries for all C++ files with "main" routine # ##########################################################
create_single_source_cgal_program( "MCF_Skeleton_example.cpp" )
created CMakeLists.txt in /Users/altonmiles/Desktop/Makaroff/cgal/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/test ... -- Using header-only CGAL -- Targetting Unix Makefiles -- Using /Library/Developer/CommandLineTools/usr/bin/c++ compiler. -- Running in macOS DARWIN_VERSION=22 -- Found Boost: /opt/homebrew/lib/cmake/Boost-1.81.0/BoostConfig.cmake (found suitable version "1.81.0", minimum required is "1.66")
-- Boost include dirs: /opt/homebrew/include -- Boost libraries:
-- Found Boost: /opt/homebrew/lib/cmake/Boost-1.81.0/BoostConfig.cmake (found version "1.81.0")
-- Configuring done (0.1s) -- Generating done (0.0s) -- Build files have been written to: /Users/altonmiles/Desktop/Makaroff/cgal/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/test [ 50%] Building CXX object CMakeFiles/MCF_Skeleton_example.dir/MCF_Skeleton_example.cpp.o In file included from /Users/altonmiles/Desktop/Makaroff/cgal/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/test/MCF_Skeleton_example.cpp:3: /opt/homebrew/include/CGAL/Mean_curvature_flow_skeletonization.h:895:44: error: no type named 'Matrix' in 'CGAL::Default' void assemble_LHS(typename SolverTraits::Matrix& A)