Commit e37cc1cd authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

added cgal-mesher

parent c3e099ee
Loading
Loading
Loading
Loading

CMakeLists.txt

0 → 100644
+37 −0
Original line number Diff line number Diff line
cmake_minimum_required(VERSION 3.5)

project(cgal-mesher LANGUAGES CXX)

add_executable(cgal-mesher cgal-mesher.cpp)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# force colorized output in continuous integration
if( DEFINED ENV{CI_JOB_NAME} OR ${CMAKE_GENERATOR} STREQUAL "Ninja" )
   message(STATUS "Continuous integration or Ninja detected -- forcing compilers to produce colorized output.")
   if( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
      set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics" )
   elseif( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
      set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color" )
   endif()
endif()

# bundled packages
include_directories(libs/lyra/include)

cmake_policy(SET CMP0074 NEW)
find_package(CGAL REQUIRED)

target_link_libraries(cgal-mesher CGAL::CGAL)

# FIXME: parallel mesher segfaults (inside cgal)
option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF)

# And add -DCGAL_CONCURRENT_MESH_3 if that option is ON
if( CGAL_ACTIVATE_CONCURRENT_MESH_3 )
    find_package(TBB REQUIRED)
    target_compile_definitions(cgal-mesher PRIVATE
        -DCGAL_CONCURRENT_MESH_3
    )
endif()

cgal-mesher.cpp

0 → 100644
+486 −0

File added.

Preview size limit exceeded, changes collapsed.