makeclean / occ_faceter

GNU Lesser General Public License v2.1
4 stars 6 forks source link

Build failed on Ubuntu 20.04 (fix described here) #12

Closed qingfengxia closed 3 years ago

qingfengxia commented 3 years ago

On Ubuntu libcgal-dev relies on C++14, while the most g++ still default to c++11.

so the fix
option 1: will be in the root CMakeLists.txt, set

set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON)

option 2: does not work as C++ std has been fixed in cmake config file set(CMAKE_CXX_STANDARD 11) CXX="g++ -std=c++14" cmake .. -DCMAKE_INSTALL_PREFIX=..

[  9%] Built target vertex_inserter
[ 13%] Building CXX object src/CMakeFiles/dagmc_overlap.dir/preper.cc.o
In file included from /usr/include/CGAL/Kernel/global_functions.h:25,
                 from /usr/include/CGAL/Cartesian/Cartesian_base.h:22,
                 from /usr/include/CGAL/Simple_cartesian.h:20,
                 from /usr/include/CGAL/Exact_predicates_exact_constructions_kernel.h:20,
                 from /home/qxia/Repositories/dagmc_bld/occ_faceter/src/preper.cc:6:
/usr/include/CGAL/Kernel/hash_functions.h:25:13: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type; did you mean ‘enable_if’?
   25 | inline std::enable_if_t<std::is_same<typename K::Rep_tag, Cartesian_tag>::value, std::size_t>
      |             ^~~~~~~~~~~
      |             enable_if
makeclean commented 3 years ago

fixed by #14