mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -04:00
Merge pull request #1757 from gridley/use_system_pugi_fmt
Do not use pugixml and fmt submodule if already found on system
This commit is contained in:
commit
489a02bd03
1 changed files with 26 additions and 4 deletions
|
|
@ -49,6 +49,24 @@ if(dagmc)
|
|||
find_package(DAGMC REQUIRED PATH_SUFFIXES lib/cmake)
|
||||
endif()
|
||||
|
||||
#===============================================================================
|
||||
# Check for submodules perhaps already on system
|
||||
#===============================================================================
|
||||
|
||||
# If not found, we just pull appropriate versions from github and build them.
|
||||
find_package(fmt QUIET)
|
||||
if(fmt_FOUND)
|
||||
message(STATUS "Found fmt: ${fmt_DIR} (version ${fmt_VERSION})")
|
||||
else()
|
||||
message(STATUS "Did not find fmt, will use submodule instead")
|
||||
endif()
|
||||
find_package(pugixml QUIET)
|
||||
if(pugixml_FOUND)
|
||||
message(STATUS "Found pugixml: ${pugixml_DIR}")
|
||||
else()
|
||||
message(STATUS "Did not find pugixml, will use submodule instead")
|
||||
endif()
|
||||
|
||||
#===============================================================================
|
||||
# HDF5 for binary output
|
||||
#===============================================================================
|
||||
|
|
@ -85,7 +103,7 @@ endif()
|
|||
# Set compile/link flags based on which compiler is being used
|
||||
#===============================================================================
|
||||
|
||||
# Skip for Visual Stduio which has its own configurations through GUI
|
||||
# Skip for Visual Studio which has its own configurations through GUI
|
||||
if(NOT MSVC)
|
||||
|
||||
if(openmp)
|
||||
|
|
@ -151,14 +169,18 @@ endif()
|
|||
# pugixml library
|
||||
#===============================================================================
|
||||
|
||||
add_subdirectory(vendor/pugixml)
|
||||
if (NOT pugixml_FOUND)
|
||||
add_subdirectory(vendor/pugixml)
|
||||
endif()
|
||||
|
||||
#===============================================================================
|
||||
# {fmt} library
|
||||
#===============================================================================
|
||||
|
||||
set(FMT_INSTALL ON CACHE BOOL "Generate the install target.")
|
||||
add_subdirectory(vendor/fmt)
|
||||
if (NOT fmt_FOUND)
|
||||
set(FMT_INSTALL ON CACHE BOOL "Generate the install target.")
|
||||
add_subdirectory(vendor/fmt)
|
||||
endif()
|
||||
|
||||
#===============================================================================
|
||||
# xtensor header-only library
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue