From 2135b19de96956faf21485a040032b69f8793d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandru=20S=C4=83vulescu?= Date: Mon, 3 Jul 2023 13:02:08 +0200 Subject: [PATCH] fmt: check if target already exists (#1051) --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c88dc4e8..6f7c7392e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,7 +107,10 @@ if(NOT TARGET CLI11::CLI11) endif() # For the moment do not try and use an external Eigen. cpp_cc_git_submodule(eigen) -cpp_cc_git_submodule(fmt BUILD PACKAGE fmt REQUIRED) +# We could have fmt incoming from NEURON +if(NOT TARGET fmt) + cpp_cc_git_submodule(fmt BUILD PACKAGE fmt REQUIRED) +endif() # If we're building from the submodule, make sure we pass -fPIC so that we can link the code into a # shared library later. if(NMODL_3RDPARTY_USE_FMT)