1
+ ## -------------------------------------------------------
2
+ ##
3
+ ## SHAMROCK code for hydrodynamics
4
+ ## Copyright (c) 2021-2024 Timothée David--Cléris <[email protected] >
5
+ ## SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6
+ ## Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7
+ ##
8
+ ## -------------------------------------------------------
9
+
10
+ ###############################################################################
11
+ ### test git submodules
12
+ ###############################################################################
13
+
1
14
function (_git_submod_is_empty directory )
2
15
file (GLOB files RELATIVE "${directory} " "${directory} /*" )
3
16
if (NOT files )
@@ -13,11 +26,29 @@ endfunction()
13
26
14
27
_git_submod_is_empty(${CMAKE_CURRENT_SOURCE_DIR} /pybind11)
15
28
16
- add_subdirectory (pybind11)
17
29
18
- option (USE_SYSTEM_FMTLIB "use fmt lib from the host system" Off )
30
+ ###############################################################################
31
+ ### pybind11
32
+ ###############################################################################
33
+ option (SHAMROCK_EXTERNAL_PYBIND11 "use pybind11 lib from the host system" Off )
34
+
35
+ if (NOT SHAMROCK_EXTERNAL_PYBIND11)
36
+ message (STATUS "Using git submodule pybind11" )
37
+ add_subdirectory (pybind11)
38
+ endif ()
39
+
40
+ ###############################################################################
41
+ ### fmt
42
+ ###############################################################################
19
43
20
- if (NOT USE_SYSTEM_FMTLIB)
44
+ option (SHAMROCK_EXTERNAL_FMTLIB "use fmt lib from the host system" Off )
45
+
46
+ # LEGACY variable
47
+ if (DEFINED USE_SYSTEM_FMTLIB)
48
+ set (SHAMROCK_EXTERNAL_FMTLIB ${USE_SYSTEM_FMTLIB} )
49
+ endif ()
50
+
51
+ if (NOT SHAMROCK_EXTERNAL_FMTLIB)
21
52
message (STATUS "Using git submodule fmtlib" )
22
53
23
54
option (USE_MANUAL_FMTLIB "Bypass fmt cmake integration" Off )
@@ -42,11 +73,18 @@ if(NOT USE_SYSTEM_FMTLIB)
42
73
endif ()
43
74
endif ()
44
75
76
+ ###############################################################################
77
+ ### NVTX
78
+ ###############################################################################
79
+
45
80
if (SHAMROCK_USE_NVTX)
46
81
#include(NVTX/c/nvtxImportedTargets.cmake)
47
82
add_subdirectory (NVTX/c)
48
83
endif ()
49
84
85
+ ###############################################################################
86
+ ### nlohmann_json
87
+ ###############################################################################
50
88
51
89
if (SHAMROCK_EXTERNAL_JSON)
52
90
find_package (nlohmann_json 3.11.3 REQUIRED)
0 commit comments