File: 01_find-packaged-hpc-coding-conventions.patch

package info (click to toggle)
neuron 8.2.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,760 kB
  • sloc: cpp: 149,571; python: 58,465; ansic: 50,329; sh: 3,510; xml: 213; pascal: 51; makefile: 35; sed: 5
file content (23 lines) | stat: -rw-r--r-- 1,061 bytes parent folder | download | duplicates (2)
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.