File tree Expand file tree Collapse file tree 1 file changed +15
-17
lines changed Expand file tree Collapse file tree 1 file changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,13 @@ find_package(Backtrace)
1212set (HAVE_BACKTRACE ${Backtrace_FOUND} )
1313set (BACKTRACE_HEADER ${Backtrace_HEADER} )
1414
15+ # Module sources that are required by other modules
16+ set (intrinsics_sources
17+ __fortran_builtins.f90
18+ __cuda_builtins.f90
19+ )
20+
21+
1522# List of files that are buildable for all devices.
1623set (supported_sources
1724 ${FLANG_SOURCE_DIR} /lib/Decimal/binary-to-decimal.cpp
@@ -97,12 +104,10 @@ set(host_sources
97104 temporary-stack.cpp
98105 time-intrinsic.cpp
99106 unit-map.cpp
100- )
101107
102- # Module sources that are required by other modules
103- set (intrinsics_sources
104- __fortran_builtins.f90
105- __cuda_builtins.f90
108+ __cuda_device.f90
109+ cooperative_groups.f90
110+ cudadevice.f90
106111)
107112
108113if (LLVM_TARGET_TRIPLE MATCHES "^ppc|^powerpc" )
@@ -113,22 +118,15 @@ if (LLVM_TARGET_TRIPLE MATCHES "^ppc|^powerpc")
113118 )
114119endif ()
115120
116- if (FLANG_RT_EXPERIMENTAL_OFFLOAD_SUPPORT STREQUAL " CUDA" )
117- list ( APPEND host_sources
121+ # Compile as CUDA-Fortran, not directly supported by CMake
122+ set_property ( SOURCE
118123 __cuda_device.f90
119124 cooperative_groups.f90
120125 cudadevice.f90
121- )
126+ APPEND PROPERTY
127+ COMPILE_OPTIONS --offload-host-only -xcuda
128+ )
122129
123- # Compile as CUDA-Fortran, not directly supported by CMake
124- set_property (SOURCE
125- __cuda_device.f90
126- cooperative_groups.f90
127- cudadevice.f90
128- APPEND PROPERTY
129- COMPILE_OPTIONS --offload-host-only -xcuda
130- )
131- endif ()
132130
133131# Sources that can be compiled directly for the GPU.
134132set (gpu_sources
You can’t perform that action at this time.
0 commit comments