Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit bfe2c5c

Browse files
Nicolas CornuNicolas Cornu
authored andcommitted
Add Random123 as a submodule and remove files
1 parent 4c88a1f commit bfe2c5c

28 files changed

+32
-5359
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "external/nmodl"]
55
path = external/nmodl
66
url = https://github.com/BlueBrain/nmodl
7+
[submodule "external/Random123"]
8+
path = external/Random123
9+
url = https://github.com/BlueBrain/Random123.git

CMake/AddRandom123Submodule.cmake

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# =============================================================================
2+
# Copyright (C) 2020 Blue Brain Project
3+
#
4+
# See top-level LICENSE file for details.
5+
# =============================================================================
6+
7+
8+
include(FindPackageHandleStandardArgs)
9+
find_package(FindPkgConfig QUIET)
10+
find_path(Random123_PROJ NAMES LICENSE PATHS "${CORENEURON_PROJECT_SOURCE_DIR}/external/Random123")
11+
find_package_handle_standard_args(Random123 REQUIRED_VARS Random123_PROJ)
12+
13+
if(NOT Random123_FOUND)
14+
find_package(Git 1.8.3 QUIET)
15+
if(NOT ${GIT_FOUND})
16+
message(FATAL_ERROR "git not found, clone repository with --recursive")
17+
endif()
18+
message(STATUS "Sub-module Random123 missing: running git submodule update --init --recursive")
19+
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive --
20+
${CORENEURON_PROJECT_SOURCE_DIR}/external/Random123
21+
WORKING_DIRECTORY ${CORENEURON_PROJECT_SOURCE_DIR})
22+
endif()
23+

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ include(ReleaseDebugAutoFlags)
4646
include(CrayPortability)
4747
include(SetRpath)
4848
include(CTest)
49+
include(AddRandom123Submodule)
4950

5051
# =============================================================================
5152
# Build options

coreneuron/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ target_link_libraries(coreneuron
173173
${CALIPER_LIB}
174174
${CALIPER_MPI_LIB}
175175
${likwid_LIBRARIES})
176+
target_include_directories(coreneuron SYSTEM PRIVATE
177+
${CORENEURON_PROJECT_SOURCE_DIR}/external/Random123/include)
176178

177179
target_link_libraries(corenrnmech scopmath coreneuron)
178180

0 commit comments

Comments
 (0)