Skip to content

Commit

Permalink
Merge pull request #831 from wildmeshing/mtao/simpler_app_declaration
Browse files Browse the repository at this point in the history
adding a macro to simplify application declaration
  • Loading branch information
mtao authored Oct 30, 2024
2 parents 1f4e2e6 + e780534 commit 0b34620
Showing 1 changed file with 19 additions and 44 deletions.
63 changes: 19 additions & 44 deletions applications/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,66 +4,41 @@ list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/applications/cmake")
# clear out the parent targets
set(WMTK_APPLICATION_HEADER_TARGETS )



include(wmtk_add_application)
include(wmtk_register_integration_test)
include(wmtk_generate_test_config)

add_subdirectory(utils)

option(WMTK_ENABLE_APPLICATION_delaunay "Runs delaunay application" ON)
if(WMTK_ENABLE_APPLICATION_delaunay)
add_subdirectory(delaunay)
endif()

option(WMTK_ENABLE_APPLICATION_marching "Runs marching application" ON)
if(WMTK_ENABLE_APPLICATION_marching)
add_subdirectory(marching)
endif()

option(WMTK_ENABLE_APPLICATION_procedural "Runs procedural application" ON)
if(WMTK_ENABLE_APPLICATION_procedural)
add_subdirectory(procedural)
endif()
macro(add_application APP_NAME DEFAULT_STATE)

option(WMTK_ENABLE_APPLICATION_multimesh "Runs multimesh application" OFF)
if(WMTK_ENABLE_APPLICATION_multimesh)
add_subdirectory(multimesh)
endif()
option(WMTK_ENABLE_APPLICATION_${APP_NAME} "Enables ${APP_NAME} Application" ${DEFAULT_STATE})
if(WMTK_ENABLE_APPLICATION_${APP_NAME})
add_subdirectory(${APP_NAME})
endif()
endmacro()

add_application(delaunay ON)
add_application(marching ON)
add_application(procedural ON)
add_application(multimesh OFF)
add_application(isotropic_remeshing OFF)
add_application(tetwild_simplification ON)
add_application(triwild ON)
add_application(cdt_sec ON)
add_application(shortest_edge_collapse ON)
add_application(insertion ON)

option(WMTK_ENABLE_APPLICATION_isotropic_remeshing "Runs isotropic_remeshing application" OFF)
if(WMTK_ENABLE_APPLICATION_isotropic_remeshing)
add_subdirectory(isotropic_remeshing)
endif()

option(WMTK_ENABLE_APPLICATION_tetwild_simplification "Runs tetwild_simplification application" ON)
if(WMTK_ENABLE_APPLICATION_tetwild_simplification)
add_subdirectory(tetwild_simplification)
endif()

option(WMTK_ENABLE_APPLICATION_tetwild "Runs tetwild application" ON)
if(WMTK_ENABLE_APPLICATION_tetwild)
add_subdirectory(tetwild)
endif()

option(WMTK_ENABLE_APPLICATION_triwild "Runs triwild application" ON)
if(WMTK_ENABLE_APPLICATION_triwild)
add_subdirectory(triwild)
endif()

option(WMTK_ENABLE_APPLICATION_cdt_sec "Runs cdt_sec application" ON)
if(WMTK_ENABLE_APPLICATION_cdt_sec)
add_subdirectory(cdt_sec)
endif()

option(WMTK_ENABLE_APPLICATION_shortest_edge_collapse "Runs shortest-edge collapse application" ON)
if(WMTK_ENABLE_APPLICATION_shortest_edge_collapse)
add_subdirectory(shortest_edge_collapse)
endif()

option(WMTK_ENABLE_APPLICATION_insertion "Runs insertion application" ON)
if(WMTK_ENABLE_APPLICATION_insertion)
add_subdirectory(insertion)
endif()

wmtk_generate_test_config("${WMTK_TEST_CONFIG}")

Expand Down

0 comments on commit 0b34620

Please sign in to comment.