From da53b433750df43e7015610a54d1021e7ca17405 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 13 Jan 2020 07:02:06 -0600 Subject: [PATCH] Add {fmt} modern formatting library as dependency --- .gitmodules | 3 +++ CMakeLists.txt | 9 ++++++++- vendor/fmt | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 160000 vendor/fmt diff --git a/.gitmodules b/.gitmodules index 4e2f341674..ff91200103 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "vendor/xtl"] path = vendor/xtl url = https://github.com/xtensor-stack/xtl.git +[submodule "vendor/fmt"] + path = vendor/fmt + url = https://github.com/fmtlib/fmt.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 212e55cdae..ec6b500b45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,6 +140,13 @@ endif() add_subdirectory(vendor/pugixml) +#=============================================================================== +# {fmt} library +#=============================================================================== + +set(FMT_INSTALL ON CACHE BOOL "Generate the install target.") +add_subdirectory(vendor/fmt) + #=============================================================================== # xtensor header-only library #=============================================================================== @@ -346,7 +353,7 @@ endif() # target_link_libraries treats any arguments starting with - but not -l as # linker flags. Thus, we can pass both linker flags and libraries together. target_link_libraries(libopenmc ${ldflags} ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES} - pugixml faddeeva xtensor gsl-lite-v1) + pugixml faddeeva xtensor gsl-lite-v1 fmt::fmt) if(dagmc) target_compile_definitions(libopenmc PRIVATE DAGMC) diff --git a/vendor/fmt b/vendor/fmt new file mode 160000 index 0000000000..65ac626c58 --- /dev/null +++ b/vendor/fmt @@ -0,0 +1 @@ +Subproject commit 65ac626c5856f5aad1f1542e79407a6714357043