File tree Expand file tree Collapse file tree 3 files changed +22
-9
lines changed
flang/include/flang/Runtime Expand file tree Collapse file tree 3 files changed +22
-9
lines changed Original file line number Diff line number Diff line change 27
27
# Library requires include path and linking to LLVM's Support component
28
28
# ADDITIONAL_HEADERS
29
29
# May specify header files for IDE generators.
30
+ # INCLUDE_DIRECTORIES
31
+ # Additional include_directories for all added targets
32
+ # TARGET_PROPERTIES
33
+ # Set target properties of all added targets
30
34
# )
31
35
function (add_flangrt_library name )
32
36
set (options STATIC SHARED OBJECT INSTALL_WITH_TOOLCHAIN EXCLUDE_FROM_ALL LINK_TO_LLVM )
33
- set (multiValueArgs ADDITIONAL_HEADERS )
37
+ set (multiValueArgs ADDITIONAL_HEADERS INCLUDE_DIRECTORIES TARGET_PROPERTIES )
34
38
cmake_parse_arguments (ARG
35
39
"${options} "
36
40
""
@@ -152,6 +156,10 @@ function (add_flangrt_library name)
152
156
target_include_directories (${name} PUBLIC ${LLVM_INCLUDE_DIRS} )
153
157
endif ()
154
158
159
+ if (ARG_INCLUDE_DIRECTORIES )
160
+ target_include_directories (${name} ${ARG_INCLUDE_DIRECTORIES} )
161
+ endif ()
162
+
155
163
# If this is part of the toolchain, put it into the compiler's resource
156
164
# directory. Otherwise it is part of testing and is not installed at all.
157
165
# TODO: Consider multi-configuration builds (MSVC_IDE, "Ninja Multi-Config")
@@ -166,6 +174,10 @@ function (add_flangrt_library name)
166
174
)
167
175
endif ()
168
176
177
+ if (ARG_TARGET_PROPERTIES )
178
+ set_target_properties (${name} PROPERTIES ${ARG_TARGET_PROPERTIES} )
179
+ endif ()
180
+
169
181
# flang-rt should build all the Flang-RT targets that are built in an
170
182
# 'all' build.
171
183
if (NOT ARG_EXCLUDE_FROM_ALL )
Original file line number Diff line number Diff line change @@ -15,17 +15,16 @@ add_flangrt_library(CufRuntime STATIC
15
15
memmove-function.cpp
16
16
memory.cpp
17
17
registration.cpp
18
- )
19
18
20
- # libCufRuntime depends on a certain version of CUDA. To be able to have
21
- # multiple build of this library with different CUDA version, the version is
22
- # added to the library name.
23
- set_target_properties (CufRuntime
24
- PROPERTIES
19
+ # libCufRuntime depends on a certain version of CUDA. To be able to have
20
+ # multiple build of this library with different CUDA version, the version is
21
+ # added to the library name.
22
+ TARGET_PROPERTIES
25
23
OUTPUT_NAME "CufRuntime_cuda_${CUDAToolkit_VERSION_MAJOR} "
26
- )
27
24
28
- target_include_directories (CufRuntime PRIVATE ${CUDAToolkit_INCLUDE_DIRS} )
25
+ INCLUDE_DIRECTORIES
26
+ PRIVATE ${CUDAToolkit_INCLUDE_DIRS}
27
+ )
29
28
30
29
target_link_libraries (CufRuntime
31
30
PUBLIC
Original file line number Diff line number Diff line change 11
11
12
12
#include " flang/Common/ISO_Fortran_binding_wrapper.h"
13
13
#include " flang/Common/api-attrs.h"
14
+ #include " flang/Common/Fortran-consts.h"
14
15
#include < cstddef>
15
16
#include < cstdint>
16
17
@@ -29,6 +30,7 @@ class DerivedType;
29
30
namespace Fortran ::runtime {
30
31
class Descriptor ;
31
32
using SubscriptValue = ISO::CFI_index_t;
33
+ using common::TypeCategory;
32
34
33
35
// / Returns size in bytes of the descriptor (not the data)
34
36
// / This must be at least as large as the largest descriptor of any target
You can’t perform that action at this time.
0 commit comments