cmake_minimum_required (VERSION 3.10 FATAL_ERROR) option(CADXFEM_ENABLE_TESTING "Enable testing targets" ON) # option is ON by default when : # 1/ there are or will be automated test cases in the projects, # 2/ all dependencies are satisfied on the compile server. # Otherwise please leave it to OFF in this file, # and turn it on locally if needed (using cmake or ccmake) option(CADXFEM_ENABLE_CAD "Enable CAD stuff" ON) option(CADXFEM_ENABLE_MG "Enable mesh generation stuff" ON) option(CADXFEM_ENABLE_GENFEM "Enable GenFem" ON) option(CADXFEM_ENABLE_TOMO "Enable Tomoprocess" OFF) option(CADXFEM_ENABLE_VORO "Enable Vorosweep" OFF) option(CADXFEM_ENABLE_CAD_REC "Enable Cad Reconstruction" OFF) option(CADXFEM_ENABLE_OPENCL "Enable the use of OpenCL" OFF) # if CMAKE_BUILD_TYPE is specified use it; otherwise set the default # build type to "RelWithDebInfo" ("-O2 -g" with gcc) prior to calling # project() if(DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose build type") else(DEFINED CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose build type") endif(DEFINED CMAKE_BUILD_TYPE) project(cadxfem CXX) INCLUDE(CTest) ENABLE_TESTING() #needed for opencascade #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fopenmp") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp") set(INSIDE_CADXFEM_TREE cache BOOL TRUE) set(DISABLE_GMSH_TESTS BOOL TRUE) set(GMSH_PATH "../gmsh" CACHE STRING "Gmsh Path") set(ENABLE_BUILD_SHARED ON CACHE BOOL "Enable 'shared' target for building shared Gmsh library" FORCE) set(ENABLE_PRIVATE_API ON CACHE BOOL "Enable private API" FORCE) add_subdirectory(${GMSH_PATH} "${CMAKE_CURRENT_BINARY_DIR}/gmsh") include_directories(${GMSH_PATH}/src/common ${GMSH_PATH}/src/geo ${GMSH_PATH}/src/graphics ${GMSH_PATH}/src/mesh ${GMSH_PATH}/src/solver ${GMSH_PATH}/src/numeric ${GMSH_PATH}/srv/parser ${GMSH_PATH}/src/plugin ${GMSH_PATH}/src/post ${GMSH_PATH}/src/Fltk ${CMAKE_CURRENT_BINARY_DIR}/gmsh/src/common ${GMSH_EXTERNAL_INCLUDE_DIRS} ${EXTERNAL_INCLUDES} ${GMSH_PATH}/contrib/gmm ${GMSH_PATH}/contrib/MathEx ${GMSH_PATH}/contrib/DiscreteIntegration ${GMSH_PATH}/contrib/ANN ${GMSH_PATH}/contrib/hxt ${GMSH_PATH}/contrib/eigen) set_target_properties(gmsh PROPERTIES EXCLUDE_FROM_ALL TRUE) FIND_PACKAGE(Boost) IF (Boost_FOUND) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}) ADD_DEFINITIONS( "-DHAS_BOOST" ) ENDIF() #cad stuff if(CADXFEM_ENABLE_CAD) add_subdirectory(nutil) add_subdirectory(gnurbs) add_subdirectory(IBrep) add_subdirectory(dcel) add_subdirectory(moshade) endif(CADXFEM_ENABLE_CAD) #meshing stuff if(CADXFEM_ENABLE_MG) add_subdirectory(MeshMachine) add_subdirectory(triangle) endif(CADXFEM_ENABLE_MG) #genfem stuff if(CADXFEM_ENABLE_GENFEM) add_subdirectory(genFem) add_subdirectory(genDElement) add_subdirectory(genTextile) #add_subdirectory(elastic_xfem) # should go to attic endif(CADXFEM_ENABLE_GENFEM) # christophe leblanc if(CADXFEM_ENABLE_TOMO) #add_subdirectory(tomoprocess) # needs ITK #add_subdirectory(poly_intersection) endif(CADXFEM_ENABLE_TOMO) # thibaud mouton if(CADXFEM_ENABLE_VORO) add_subdirectory(vormesh) add_subdirectory(vormesh3d) add_subdirectory(cadlevelset) add_subdirectory(motorgraph) # missing up-to-date dependencies add_subdirectory(rbox) add_subdirectory(vorosweep) # needs libboard endif(CADXFEM_ENABLE_VORO) # borhen louhichi if(CADXFEM_ENABLE_CAD_REC) add_subdirectory(reconstruction) endif(CADXFEM_ENABLE_CAD_REC) #misc if(CADXFEM_ENABLE_OPENCL) add_subdirectory(TestOpenCL) endif(CADXFEM_ENABLE_OPENCL) #add_subdirectory(canonical_form) #add_subdirectory(FMMPC)