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
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=..