@@ -14,22 +14,13 @@ if(STDEXEC_ENABLE_ASIO)
1414 message (FATAL_ERROR "Unknown configuration for ASIO implementation: " ${STDEXEC_ASIO_IMPLEMENTATION} )
1515 endif ()
1616
17- set (ASIOEXEC_USES_BOOST ${STDEXEC_ASIO_USES_BOOST} )
18- set (ASIOEXEC_USES_STANDALONE ${STDEXEC_ASIO_USES_STANDALONE} )
17+ set (STDEXEC_ASIO_CONFIG_HPP ${CMAKE_CURRENT_BINARY_DIR} /include /exec/asio/asio_config.hpp)
1918
20- set (STDEXEC_ASIO_POOL_CONFIG_HPP ${CMAKE_CURRENT_BINARY_DIR} /include /execpools/asio/asio_config.hpp)
21- set (ASIOEXEC_CONFIG_HPP ${CMAKE_CURRENT_BINARY_DIR} /include /exec/asio/asio_config.hpp)
22-
23- configure_file (
24- include /execpools/asio/asio_config.hpp.in
25- ${STDEXEC_ASIO_POOL_CONFIG_HPP}
26- )
2719 configure_file (
2820 include /exec/asio/asio_config.hpp.in
29- ${ASIOEXEC_CONFIG_HPP }
21+ ${STDEXEC_ASIO_CONFIG_HPP }
3022 )
3123
32- file (GLOB_RECURSE boost_pool_sources CONFIGURE_DEPENDS include /execpools/asio/*.hpp)
3324 file (GLOB_RECURSE asioexec_sources CONFIGURE_DEPENDS include /exec/asio/*.hpp)
3425
3526 if (${STDEXEC_ASIO_USES_BOOST} )
@@ -41,98 +32,72 @@ if(STDEXEC_ENABLE_ASIO)
4132 OPTIONS "BOOST_SKIP_INSTALL_RULES OFF"
4233 )
4334
44- add_library (stdexec_boost_pool INTERFACE )
45- list (APPEND stdexec_export_targets stdexec_boost_pool)
46- add_library (STDEXEC::asio_pool ALIAS stdexec_boost_pool)
35+ add_library (asioexec INTERFACE )
36+ list (APPEND stdexec_export_targets asioexec)
37+ add_library (STDEXEC::asioexec ALIAS asioexec)
38+
39+ # These aliases are provided for backwards compatibility with the old target names
40+ add_library (asioexec_boost ALIAS asioexec)
41+ add_library (stdexec_boost_pool ALIAS asioexec)
42+ add_library (STDEXEC::asio_pool ALIAS asioexec)
43+ add_library (STDEXEC::asioexec_boost ALIAS asioexec)
4744
48- target_sources (stdexec_boost_pool PUBLIC
45+ target_sources (asioexec PUBLIC
4946 FILE_SET headers
5047 TYPE HEADERS
5148 BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} /include
52- FILES ${boost_pool_sources }
49+ FILES ${asioexec_sources }
5350 BASE_DIRS ${CMAKE_CURRENT_BINARY_DIR} /include
54- FILES ${STDEXEC_ASIO_POOL_CONFIG_HPP }
51+ FILES ${STDEXEC_ASIO_CONFIG_HPP }
5552 )
5653
57- target_compile_definitions (stdexec_boost_pool INTERFACE STDEXEC_ASIO_USES_BOOST)
54+ target_compile_definitions (asioexec INTERFACE STDEXEC_ASIO_USES_BOOST)
5855
59- target_link_libraries (stdexec_boost_pool INTERFACE
56+ target_link_libraries (asioexec INTERFACE
6057 STDEXEC::stdexec
6158 Boost::asio
6259 )
63- install (TARGETS stdexec_boost_pool
60+ install (TARGETS asioexec
6461 EXPORT stdexec-exports
6562 FILE_SET headers
6663 )
6764
68- add_library (asioexec_boost INTERFACE )
69- list (APPEND stdexec_export_targets asioexec_boost)
70- add_library (STDEXEC::asioexec_boost ALIAS asioexec_boost)
71-
72- target_sources (asioexec_boost PUBLIC
73- FILE_SET headers
74- TYPE HEADERS
75- BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} /include
76- FILES ${asioexec_sources}
77- BASE_DIRS ${CMAKE_CURRENT_BINARY_DIR} /include
78- FILES ${ASIOEXEC_CONFIG_HPP}
79- )
80-
81- target_compile_definitions (asioexec_boost INTERFACE STDEXEC_ASIO_USES_BOOST)
82-
83- target_link_libraries (asioexec_boost INTERFACE
84- STDEXEC::stdexec
85- Boost::asio
86- )
87- install (TARGETS asioexec_boost EXPORT stdexec-exports FILE_SET headers)
88-
8965 elseif (${STDEXEC_ASIO_USES_STANDALONE} )
9066 include (cmake/import_standalone_asio.cmake)
9167 import_standalone_asio(
9268 TAG "asio-1-31-0"
9369 VERSION "1.31.0" )
9470
95- add_library (stdexec_asio_pool INTERFACE )
96- list (APPEND stdexec_export_targets stdexec_asio_pool )
97- add_library (STDEXEC::asio_pool ALIAS stdexec_asio_pool )
71+ add_library (asioexec INTERFACE )
72+ list (APPEND stdexec_export_targets asioexec )
73+ add_library (STDEXEC::asioexec ALIAS asioexec )
9874
99- target_sources (stdexec_asio_pool PUBLIC
75+ # These aliases are provided for backwards compatibility with the old target names
76+ add_library (asioexec_asio ALIAS asioexec)
77+ add_library (stdexec_asio_pool ALIAS asioexec)
78+ add_library (STDEXEC::asio_pool ALIAS asioexec)
79+ add_library (STDEXEC::asioexec_asio ALIAS asioexec)
80+
81+ target_sources (asioexec PUBLIC
10082 FILE_SET headers
10183 TYPE HEADERS
10284 BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} /include
103- FILES ${boost_pool_sources }
85+ FILES ${asioexec_sources }
10486 BASE_DIRS ${CMAKE_CURRENT_BINARY_DIR} /include
105- FILES ${STDEXEC_ASIO_POOL_CONFIG_HPP }
87+ FILES ${STDEXEC_ASIO_CONFIG_HPP }
10688 )
10789
108- target_compile_definitions (stdexec_asio_pool INTERFACE STDEXEC_ASIO_USES_STANDALONE)
90+ target_compile_definitions (asioexec INTERFACE STDEXEC_ASIO_USES_STANDALONE)
10991
110- target_link_libraries (stdexec_asio_pool INTERFACE
92+ target_link_libraries (asioexec INTERFACE
11193 STDEXEC::stdexec
11294 asio
11395 )
114- install (TARGETS stdexec_asio_pool EXPORT stdexec-exports FILE_SET headers)
115-
116- add_library (asioexec_asio INTERFACE )
117- list (APPEND stdexec_export_targets asioexec_asio)
118- add_library (STDEXEC::asioexec_asio ALIAS asioexec_asio)
119-
120- target_sources (asioexec_asio PUBLIC
96+ install (TARGETS asioexec
97+ EXPORT stdexec-exports
12198 FILE_SET headers
122- TYPE HEADERS
123- BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} /include
124- FILES ${asioexec_sources}
125- BASE_DIRS ${CMAKE_CURRENT_BINARY_DIR} /include
126- FILES ${ASIOEXEC_CONFIG_HPP}
12799 )
128100
129- target_compile_definitions (asioexec_asio INTERFACE STDEXEC_ASIO_USES_STANDALONE)
130-
131- target_link_libraries (asioexec_asio INTERFACE
132- STDEXEC::stdexec
133- asio
134- )
135- install (TARGETS asioexec_asio EXPORT stdexec-exports FILE_SET headers)
136101 else ()
137102 message (FATAL_ERROR "ASIO implementation is not configured" )
138103 endif ()
0 commit comments