@@ -56,42 +56,7 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
5656 "Debug" "Release" "MinSizeRel" "RelWithDebInfo" )
5757endif ()
5858
59- find_package (Charm REQUIRED)
60- # Link executables with the charmc wrapper
61- STRING (REGEX REPLACE "<CMAKE_CXX_COMPILER>" "${CHARM_LINKER} "
62- CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} " )
63-
64-
65- # Need to process Grackle here as both Cello and Enzo-E depend on it
66- option (USE_GRACKLE "Use Grackle Chemistry" ON )
67- # don't bother advertising the following option (but users can
68- # overwrite it if they really want to - e.g. to reduce binary size)
69- option (GRACKLE_USE_STATIC_LIBS "sets Grackle's lib-type if USE_GRACKLE=ON" ON )
70- if (USE_GRACKLE)
71- find_package (Grackle)
72- if (Grackle_FOUND)
73- # This really only needs to be defined for a relatively small subset of
74- # files in the Enzo-layer
75- add_compile_definitions (CONFIG_USE_GRACKLE)
76-
77- else ()
78- message (FATAL_ERROR
79- "Configured to use Grackle but Grackle library not found.\n "
80- "Either disable grackle (e.g., `-DUSE_GRACKLE=OFF`) or provide path "
81- "(e.g., `-DGrackle_ROOT=/PATH/TO/GRACKLE/INSTALL/DIRECTORY`)." )
82- endif ()
83- endif ()
84-
85- find_package (PNG REQUIRED)
86- add_compile_definitions (NO_FREETYPE)
87-
88- find_package (HDF5 REQUIRED COMPONENTS C)
89- # HDF5 Interface library
90- add_library (HDF5_C INTERFACE )
91- target_link_libraries (HDF5_C INTERFACE ${HDF5_C_LIBRARIES} )
92- target_compile_definitions (HDF5_C INTERFACE ${HDF5_C_DEFINITIONS} )
93- target_include_directories (HDF5_C INTERFACE ${HDF5_C_INCLUDE_DIRS} )
94-
59+ include ("dependencies.cmake" )
9560
9661set (Cello_TARGET_LINK_OPTIONS "" )
9762
@@ -245,22 +210,6 @@ if (have_git)
245210 )
246211endif ()
247212
248-
249- option (use_jemalloc "Use the jemalloc library for memory allocation" OFF )
250- if (use_jemalloc)
251- find_package (jemalloc)
252- if (jemalloc_FOUND)
253- add_compile_definitions (CONFIG_USE_JEMALLOC)
254- else ()
255- message (FATAL_ERROR
256- "Requested to use the jemalloc library for memory allocation but jemalloc was not found. "
257- "Try setting specific path via `-Djemalloc_ROOT=/PATH/TO/jemalloc/INSTALL` "
258- " or disable jemalloc via `-Duse_jemalloc=OFF` (default)."
259- )
260- endif ()
261- endif ()
262-
263-
264213option (smp "Use Charm++ in SMP mode." OFF )
265214if (smp)
266215 if (CHARM_SMP)
@@ -274,20 +223,6 @@ if (smp)
274223endif ()
275224
276225
277- option (use_papi "Use the PAPI performance API" OFF )
278- if (use_papi)
279- find_package (PAPI)
280- if (PAPI_FOUND)
281- add_compile_definitions (CONFIG_USE_PAPI PAPI3)
282- else ()
283- message (FATAL_ERROR
284- "Requested to use PAPI performance API but PAPI was not found. "
285- "Try setting specific path via `-DPAPI_ROOT=/PATH/TO/PAPI/INSTALL` "
286- " or disable PAPI via `-Duse_papi=OFF` (default)."
287- )
288- endif ()
289- endif ()
290-
291226# define recipies for building external dependencies before we introduce
292227# compiler flags specific to Enzo-E (and Cello)
293228add_subdirectory (src/External)
0 commit comments