Skip to content

Commit

Permalink
change to new centralized registration system
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasneuner committed Sep 27, 2023
1 parent b7c70b5 commit b4cd053
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
17 changes: 11 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,18 @@ SUBDIRLIST(MATERIALSDIRS ${MATERIALSPATH})
SUBDIRLIST(ELEMENTSDIRS ${ELEMENTSPATH})

set(INSTALLED_MODULES "")
set(INSTALLED_MODULE_PATHS "")

foreach(DIRNAME ${COREDIRS})
get_filename_component(MODULEPATH "${COREPATH}/${DIRNAME}" ABSOLUTE)
if(EXISTS ${MODULEPATH}/module.cmake)
if (NOT DEFINED CORE_MODULES)
set(CORE_MODULES "all")
endif()
if( ${CORE_MODULES} STREQUAL "all" OR ${DIRNAME} IN_LIST CORE_MODULES)
if( CORE_MODULES STREQUAL "all" OR ${DIRNAME} IN_LIST CORE_MODULES)
message("--> found ${DIRNAME}")
include(${MODULEPATH}/module.cmake)
list(APPEND INSTALLED_MODULES ${DIRNAME})
list(APPEND INSTALLED_MODULEPATHS ${MODULEPATH})
endif()
endif()
endforeach(DIRNAME)
Expand All @@ -151,10 +152,10 @@ foreach(DIRNAME ${MATERIALSDIRS})
if (NOT DEFINED MATERIAL_MODULES)
set(MATERIAL_MODULES "all")
endif()
if(${MATERIAL_MODULES} STREQUAL "all" OR ${DIRNAME} IN_LIST MATERIAL_MODULES)
if(MATERIAL_MODULES STREQUAL "all" OR ${DIRNAME} IN_LIST MATERIAL_MODULES)
message("--> found ${DIRNAME}")
include(${MODULEPATH}/module.cmake)
list(APPEND INSTALLED_MODULES ${DIRNAME})
list(APPEND INSTALLED_MODULEPATHS ${MODULEPATH})
endif()
endif()
endforeach(DIRNAME)
Expand All @@ -165,14 +166,18 @@ foreach(DIRNAME ${ELEMENTSDIRS})
if (NOT DEFINED ELEMENT_MODULES)
set(ELEMENT_MODULES "all")
endif()
if(${ELEMENT_MODULES} STREQUAL "all" OR ${DIRNAME} IN_LIST ELEMENT_MODULES)
if(ELEMENT_MODULES STREQUAL "all" OR ${DIRNAME} IN_LIST ELEMENT_MODULES)
message("--> found ${DIRNAME}")
include(${MODULEPATH}/module.cmake)
list(APPEND INSTALLED_MODULES ${DIRNAME})
list(APPEND INSTALLED_MODULEPATHS ${MODULEPATH})
endif()
endif()
endforeach(DIRNAME)

foreach(MODULEPATH ${INSTALLED_MODULEPATHS})
include(${MODULEPATH}/module.cmake)
endforeach(MODULEPATH)

message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")

# compile the shared library
Expand Down
1 change: 1 addition & 0 deletions src/Marmot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "Marmot/MarmotJournal.h"
#include "Marmot/MarmotMaterial.h"
#include <cassert>
#include <iostream>
#include <string>
#include <tuple>
#include <unordered_map>
Expand Down

0 comments on commit b4cd053

Please sign in to comment.