1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
From: Matthias Klumpp <mak@debian.org>
Date: Sat, 28 Jan 2023 00:42:27 +0100
Subject: [PATCH] Find packaged HPC coding conventions
---
CMakeLists.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -229,7 +229,11 @@
set(${CODING_CONV_PREFIX}_3RDPARTY_DIR "external")
set(${CODING_CONV_PREFIX}_ClangFormat_REQUIRED_VERSION 12.0.1)
set(${CODING_CONV_PREFIX}_ClangFormat_EXCLUDES_RE CACHE STRING "") # None needed
-set(CODING_CONV_CMAKE "${PROJECT_SOURCE_DIR}/${NRN_3RDPARTY_DIR}/coding-conventions/cpp/cmake")
+if(EXISTS "/usr/share/bluebrain-hpc-coding-conventions/cpp/CMakeLists.txt")
+ set(CODING_CONV_CMAKE "/usr/share/bluebrain-hpc-coding-conventions/cpp/cmake")
+else()
+ set(CODING_CONV_CMAKE "${PROJECT_SOURCE_DIR}/${NRN_3RDPARTY_DIR}/coding-conventions/cpp/cmake")
+endif()
if(NOT EXISTS "${CODING_CONV_CMAKE}/3rdparty.cmake")
# Abort with a helpful message if the current source tree lacks .git information, as in that case
# we're not going to be able to initialise the submodule.
|