Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CMake/AddHpcCodingConvSubmodule.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# =============================================================================
# Copyright (C) 2016-2020 Blue Brain Project
#
# See top-level LICENSE file for details.
# =============================================================================

include(FindPackageHandleStandardArgs)
find_package(FindPkgConfig QUIET)

find_path(
HpcCodingConv_PROJ
NAMES setup.cfg
PATHS "${CORENEURON_PROJECT_SOURCE_DIR}/CMake/hpc-coding-conventions/")

find_package_handle_standard_args(HpcCodingConv REQUIRED_VARS HpcCodingConv_PROJ)

if(NOT HpcCodingConv_FOUND)
find_package(Git 1.8.3 QUIET)
if(NOT ${GIT_FOUND})
message(FATAL_ERROR "git not found, clone repository with --recursive")
endif()
message(STATUS "Sub-module CMake/hpc-coding-conventions missing: running git submodule update --init")
execute_process(
COMMAND
${GIT_EXECUTABLE} submodule update --init --
${CORENEURON_PROJECT_SOURCE_DIR}/CMake/hpc-coding-conventions
WORKING_DIRECTORY ${CORENEURON_PROJECT_SOURCE_DIR})
endif()
42 changes: 0 additions & 42 deletions CMake/ClangFormatHelper.cmake

This file was deleted.

12 changes: 0 additions & 12 deletions CMake/ClangFormatUtils.cmake

This file was deleted.

34 changes: 0 additions & 34 deletions CMake/packages/FindClangFormat.cmake

This file was deleted.

17 changes: 9 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(CORENEURON_AS_SUBPROJECT ON)
endif()

# =============================================================================
# Include cmake modules path
# =============================================================================
list(APPEND CMAKE_MODULE_PATH ${CORENEURON_PROJECT_SOURCE_DIR}/CMake
${CORENEURON_PROJECT_SOURCE_DIR}/CMake/packages
${CORENEURON_PROJECT_SOURCE_DIR}/CMake/config)

# =============================================================================
# HPC Coding Conventions
# =============================================================================
Expand All @@ -43,15 +50,9 @@ set(CORENRN_ClangFormat_EXCLUDES_RE
set(CORENRN_CMakeFormat_EXCLUDES_RE
".*/external/.*$$" ".*/CMake/packages/.*$$"
CACHE STRING "list of regular expressions to exclude CMake files from formatting" FORCE)
include(AddHpcCodingConvSubmodule)
add_subdirectory(CMake/hpc-coding-conventions/cpp)

# =============================================================================
# Include cmake modules path
# =============================================================================
list(APPEND CMAKE_MODULE_PATH ${CORENEURON_PROJECT_SOURCE_DIR}/CMake
${CORENEURON_PROJECT_SOURCE_DIR}/CMake/packages
${CORENEURON_PROJECT_SOURCE_DIR}/CMake/config)

# =============================================================================
# Include common cmake modules
# =============================================================================
Expand All @@ -62,6 +63,7 @@ include(SetRpath)
include(CTest)
include(AddRandom123Submodule)
include(AddCLI11Submodule)

add_subdirectory(${CORENEURON_PROJECT_SOURCE_DIR}/external/CLI11)

# =============================================================================
Expand Down Expand Up @@ -106,7 +108,6 @@ endif()
# Include cmake modules after cmake options
# =============================================================================
include(OpenAccHelper)
include(ClangFormatHelper)

# =============================================================================
# Common dependencies
Expand Down