Skip to content

Commit a1aee75

Browse files
committed
integrate feedback from @bretbrownjr
1 parent 386d543 commit a1aee75

File tree

1 file changed

+17
-159
lines changed

1 file changed

+17
-159
lines changed

CMakeLists.txt

Lines changed: 17 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -151,135 +151,16 @@ set(stdexec_export_targets)
151151
# Define the main library
152152
add_library(stdexec INTERFACE)
153153

154+
file(GLOB_RECURSE exec_headers CONFIGURE_DEPENDS include/exec/*.hpp)
155+
file(GLOB_RECURSE stdexec_headers CONFIGURE_DEPENDS include/stdexec/*.hpp)
154156
target_sources(stdexec
155157
PUBLIC
156158
FILE_SET headers
157159
TYPE HEADERS
158160
BASE_DIRS include
159161
FILES
160-
include/exec/__detail/__atomic_intrusive_queue.hpp
161-
include/exec/__detail/__atomic_ref.hpp
162-
include/exec/__detail/__basic_sequence.hpp
163-
include/exec/__detail/__bit_cast.hpp
164-
include/exec/__detail/__bwos_lifo_queue.hpp
165-
include/exec/__detail/__numa.hpp
166-
include/exec/__detail/__system_context_default_impl.hpp
167-
include/exec/__detail/__system_context_default_impl_entry.hpp
168-
include/exec/__detail/__system_context_replaceability_api.hpp
169-
include/exec/__detail/__xorshift.hpp
170-
include/exec/__detail/intrusive_heap.hpp
171-
include/exec/any_sender_of.hpp
172-
include/exec/async_scope.hpp
173-
include/exec/at_coroutine_exit.hpp
174-
include/exec/create.hpp
175-
include/exec/env.hpp
176-
include/exec/finally.hpp
177-
include/exec/inline_scheduler.hpp
178-
include/exec/into_tuple.hpp
179-
include/exec/just_from.hpp
180-
include/exec/libdispatch_queue.hpp
181-
include/exec/linux/__detail/memory_mapped_region.hpp
182-
include/exec/linux/__detail/safe_file_descriptor.hpp
183-
include/exec/linux/io_uring_context.hpp
184-
include/exec/linux/memory_mapped_region.hpp
185-
include/exec/linux/safe_file_descriptor.hpp
186-
include/exec/materialize.hpp
187-
include/exec/on.hpp
188-
include/exec/on_coro_disposition.hpp
189-
include/exec/repeat_effect_until.hpp
190-
include/exec/repeat_n.hpp
191-
include/exec/reschedule.hpp
192-
include/exec/scope.hpp
193-
include/exec/sequence.hpp
194-
include/exec/sequence/any_sequence_of.hpp
195-
include/exec/sequence/empty_sequence.hpp
196-
include/exec/sequence/ignore_all_values.hpp
197-
include/exec/sequence/iterate.hpp
198-
include/exec/sequence/transform_each.hpp
199-
include/exec/sequence_senders.hpp
200-
include/exec/single_thread_context.hpp
201-
include/exec/start_now.hpp
202-
include/exec/static_thread_pool.hpp
203-
include/exec/system_context.hpp
204-
include/exec/task.hpp
205-
include/exec/timed_scheduler.hpp
206-
include/exec/timed_thread_scheduler.hpp
207-
include/exec/trampoline_scheduler.hpp
208-
include/exec/variant_sender.hpp
209-
include/exec/when_any.hpp
210-
include/stdexec/__detail/__as_awaitable.hpp
211-
include/stdexec/__detail/__awaitable.hpp
212-
include/stdexec/__detail/__basic_sender.hpp
213-
include/stdexec/__detail/__bulk.hpp
214-
include/stdexec/__detail/__completion_signatures.hpp
215-
include/stdexec/__detail/__concepts.hpp
216-
include/stdexec/__detail/__config.hpp
217-
include/stdexec/__detail/__connect_awaitable.hpp
218-
include/stdexec/__detail/__continues_on.hpp
219-
include/stdexec/__detail/__cpo.hpp
220-
include/stdexec/__detail/__debug.hpp
221-
include/stdexec/__detail/__diagnostics.hpp
222-
include/stdexec/__detail/__domain.hpp
223-
include/stdexec/__detail/__ensure_started.hpp
224-
include/stdexec/__detail/__env.hpp
225-
include/stdexec/__detail/__execute.hpp
226-
include/stdexec/__detail/__execution_fwd.hpp
227-
include/stdexec/__detail/__force_include.hpp
228-
include/stdexec/__detail/__inline_scheduler.hpp
229-
include/stdexec/__detail/__into_variant.hpp
230-
include/stdexec/__detail/__intrusive_mpsc_queue.hpp
231-
include/stdexec/__detail/__intrusive_ptr.hpp
232-
include/stdexec/__detail/__intrusive_queue.hpp
233-
include/stdexec/__detail/__intrusive_slist.hpp
234-
include/stdexec/__detail/__just.hpp
235-
include/stdexec/__detail/__let.hpp
236-
include/stdexec/__detail/__manual_lifetime.hpp
237-
include/stdexec/__detail/__meta.hpp
238-
include/stdexec/__detail/__on.hpp
239-
include/stdexec/__detail/__operation_states.hpp
240-
include/stdexec/__detail/__optional.hpp
241-
include/stdexec/__detail/__ranges.hpp
242-
include/stdexec/__detail/__read_env.hpp
243-
include/stdexec/__detail/__receiver_adaptor.hpp
244-
include/stdexec/__detail/__receiver_ref.hpp
245-
include/stdexec/__detail/__receivers.hpp
246-
include/stdexec/__detail/__run_loop.hpp
247-
include/stdexec/__detail/__schedule_from.hpp
248-
include/stdexec/__detail/__schedulers.hpp
249-
include/stdexec/__detail/__scope.hpp
250-
include/stdexec/__detail/__sender_adaptor_closure.hpp
251-
include/stdexec/__detail/__sender_introspection.hpp
252-
include/stdexec/__detail/__senders.hpp
253-
include/stdexec/__detail/__senders_core.hpp
254-
include/stdexec/__detail/__shared.hpp
255-
include/stdexec/__detail/__spin_loop_pause.hpp
256-
include/stdexec/__detail/__split.hpp
257-
include/stdexec/__detail/__start_detached.hpp
258-
include/stdexec/__detail/__starts_on.hpp
259-
include/stdexec/__detail/__stop_token.hpp
260-
include/stdexec/__detail/__stopped_as_error.hpp
261-
include/stdexec/__detail/__stopped_as_optional.hpp
262-
include/stdexec/__detail/__submit.hpp
263-
include/stdexec/__detail/__sync_wait.hpp
264-
include/stdexec/__detail/__tag_invoke.hpp
265-
include/stdexec/__detail/__then.hpp
266-
include/stdexec/__detail/__transfer_just.hpp
267-
include/stdexec/__detail/__transform_completion_signatures.hpp
268-
include/stdexec/__detail/__transform_sender.hpp
269-
include/stdexec/__detail/__tuple.hpp
270-
include/stdexec/__detail/__type_traits.hpp
271-
include/stdexec/__detail/__upon_error.hpp
272-
include/stdexec/__detail/__upon_stopped.hpp
273-
include/stdexec/__detail/__utility.hpp
274-
include/stdexec/__detail/__variant.hpp
275-
include/stdexec/__detail/__when_all.hpp
276-
include/stdexec/__detail/__with_awaitable_senders.hpp
277-
include/stdexec/__detail/__write_env.hpp
278-
include/stdexec/concepts.hpp
279-
include/stdexec/coroutine.hpp
280-
include/stdexec/execution.hpp
281-
include/stdexec/functional.hpp
282-
include/stdexec/stop_token.hpp
162+
${exec_headers}
163+
${stdexec_headers}
283164
# stdexec_version_config.hpp is generated by raipds' script
284165
FILE_SET version_config
285166
TYPE HEADERS
@@ -401,41 +282,14 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "NVHPC")
401282
endif()
402283

403284
if(STDEXEC_ENABLE_CUDA)
404-
285+
file(GLOB_RECURSE nvexec_headers CONFIGURE_DEPENDS include/nvexec/*.cuh)
405286
add_library(nvexec INTERFACE)
406287
target_sources(nvexec
407288
PUBLIC
408289
FILE_SET headers
409290
TYPE HEADERS
410291
BASE_DIRS include
411-
FILES
412-
include/nvexec/detail/config.cuh
413-
include/nvexec/detail/cuda_atomic.cuh
414-
include/nvexec/detail/cuda_fwd.cuh
415-
include/nvexec/detail/memory.cuh
416-
include/nvexec/detail/queue.cuh
417-
include/nvexec/detail/throw_on_cuda_error.cuh
418-
include/nvexec/detail/variant.cuh
419-
include/nvexec/multi_gpu_context.cuh
420-
include/nvexec/nvtx.cuh
421-
include/nvexec/stream/algorithm_base.cuh
422-
include/nvexec/stream/bulk.cuh
423-
include/nvexec/stream/common.cuh
424-
include/nvexec/stream/continues_on.cuh
425-
include/nvexec/stream/ensure_started.cuh
426-
include/nvexec/stream/launch.cuh
427-
include/nvexec/stream/let_xxx.cuh
428-
include/nvexec/stream/reduce.cuh
429-
include/nvexec/stream/schedule_from.cuh
430-
include/nvexec/stream/split.cuh
431-
include/nvexec/stream/start_detached.cuh
432-
include/nvexec/stream/submit.cuh
433-
include/nvexec/stream/sync_wait.cuh
434-
include/nvexec/stream/then.cuh
435-
include/nvexec/stream/upon_error.cuh
436-
include/nvexec/stream/upon_stopped.cuh
437-
include/nvexec/stream/when_all.cuh
438-
include/nvexec/stream_context.cuh
292+
FILES ${nvexec_headers}
439293
)
440294
list(APPEND stdexec_export_targets nvexec)
441295
add_library(STDEXEC::nvexec ALIAS nvexec)
@@ -499,25 +353,29 @@ if (STDEXEC_ENABLE_TBB)
499353
INSTALL_EXPORT_SET stdexec-exports
500354
)
501355

502-
add_library(tbbexec INTERFACE)
503-
target_sources(tbbexec
356+
# CONFIGURE_DEPENDS ensures that CMake reconfigures when a relevant hpp file is
357+
# added or removed.
358+
file(GLOB_RECURSE tbbpool_headers CONFIGURE_DEPENDS include/execpools/tbb/*.hpp)
359+
add_library(tbbpool INTERFACE)
360+
list(APPEND stdexec_export_targets tbbpool)
361+
add_library(STDEXEC::tbbpool ALIAS tbbpool)
362+
target_sources(tbbpool
504363
PUBLIC
505364
FILE_SET headers
506365
TYPE HEADERS
507366
BASE_DIRS include
508-
FILES
509-
include/tbbexec/tbb_thread_pool.hpp
367+
FILES ${tbbpool_headers}
510368
)
511-
list(APPEND stdexec_export_targets tbbexec)
512-
add_library(STDEXEC::tbbexec ALIAS tbbexec)
369+
list(APPEND stdexec_export_targets tbbpool)
370+
add_library(STDEXEC::tbbpool ALIAS tbbpool)
513371

514372
target_link_libraries(tbbpool
515373
INTERFACE
516374
STDEXEC::stdexec
517375
TBB::tbb
518376
)
519377

520-
install(TARGETS tbbexec
378+
install(TARGETS tbbpool
521379
EXPORT stdexec-exports
522380
FILE_SET headers)
523381
endif()

0 commit comments

Comments
 (0)