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 2727# Library requires include path and linking to LLVM's Support component
2828# ADDITIONAL_HEADERS
2929# 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
3034# )
3135function (add_flangrt_library name )
3236 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 )
3438 cmake_parse_arguments (ARG
3539 "${options} "
3640 ""
@@ -152,6 +156,10 @@ function (add_flangrt_library name)
152156 target_include_directories (${name} PUBLIC ${LLVM_INCLUDE_DIRS} )
153157 endif ()
154158
159+ if (ARG_INCLUDE_DIRECTORIES)
160+ target_include_directories (${name} ${ARG_INCLUDE_DIRECTORIES} )
161+ endif ()
162+
155163 # If this is part of the toolchain, put it into the compiler's resource
156164 # directory. Otherwise it is part of testing and is not installed at all.
157165 # TODO: Consider multi-configuration builds (MSVC_IDE, "Ninja Multi-Config")
@@ -166,6 +174,10 @@ function (add_flangrt_library name)
166174 )
167175 endif ()
168176
177+ if (ARG_TARGET_PROPERTIES)
178+ set_target_properties (${name} PROPERTIES ${ARG_TARGET_PROPERTIES} )
179+ endif ()
180+
169181 # flang-rt should build all the Flang-RT targets that are built in an
170182 # 'all' build.
171183 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
1515 memmove-function.cpp
1616 memory.cpp
1717 registration.cpp
18- )
1918
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
2523 OUTPUT_NAME "CufRuntime_cuda_${CUDAToolkit_VERSION_MAJOR} "
26- )
2724
28- target_include_directories (CufRuntime PRIVATE ${CUDAToolkit_INCLUDE_DIRS} )
25+ INCLUDE_DIRECTORIES
26+ PRIVATE ${CUDAToolkit_INCLUDE_DIRS}
27+ )
2928
3029target_link_libraries (CufRuntime
3130 PUBLIC
Original file line number Diff line number Diff line change 1111
1212#include " flang/Common/ISO_Fortran_binding_wrapper.h"
1313#include " flang/Common/api-attrs.h"
14+ #include " flang/Common/Fortran-consts.h"
1415#include < cstddef>
1516#include < cstdint>
1617
@@ -29,6 +30,7 @@ class DerivedType;
2930namespace Fortran ::runtime {
3031class Descriptor ;
3132using SubscriptValue = ISO::CFI_index_t;
33+ using common::TypeCategory;
3234
3335// / Returns size in bytes of the descriptor (not the data)
3436// / 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