77# Distributed under the Boost Software License, Version 1.0. (See accompanying
88# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
99#
10- # Official repository: https://github.com/cppalliance/rts
10+ # Official repository: https://github.com/cppalliance/capy
1111#
1212
1313#-------------------------------------------------
1616#
1717#-------------------------------------------------
1818cmake_minimum_required (VERSION 3.8...3.20 )
19- set (BOOST_RTS_VERSION 1)
19+ set (BOOST_CAPY_VERSION 1)
2020if (BOOST_SUPERPROJECT_VERSION)
21- set (BOOST_RTS_VERSION ${BOOST_SUPERPROJECT_VERSION} )
21+ set (BOOST_CAPY_VERSION ${BOOST_SUPERPROJECT_VERSION} )
2222endif ()
23- project (boost_rts VERSION "${BOOST_RTS_VERSION } " LANGUAGES CXX )
24- set (BOOST_RTS_IS_ROOT OFF )
23+ project (boost_capy VERSION "${BOOST_CAPY_VERSION } " LANGUAGES CXX )
24+ set (BOOST_CAPY_IS_ROOT OFF )
2525if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
26- set (BOOST_RTS_IS_ROOT ON )
26+ set (BOOST_CAPY_IS_ROOT ON )
2727endif ()
2828set (__ignore__ ${CMAKE_C_COMPILER} )
2929
@@ -32,11 +32,11 @@ set(__ignore__ ${CMAKE_C_COMPILER})
3232# Options
3333#
3434#-------------------------------------------------
35- if (BOOST_RTS_IS_ROOT )
35+ if (BOOST_CAPY_IS_ROOT )
3636 include (CTest )
3737endif ()
38- option (BOOST_RTS_BUILD_TESTS "Build boost::rts tests" ${BUILD_TESTING} )
39- option (BOOST_RTS_BUILD_EXAMPLES "Build boost::rts examples" ${BOOST_RTS_IS_ROOT } )
38+ option (BOOST_CAPY_BUILD_TESTS "Build boost::capy tests" ${BUILD_TESTING} )
39+ option (BOOST_CAPY_BUILD_EXAMPLES "Build boost::capy examples" ${BOOST_CAPY_IS_ROOT } )
4040
4141
4242# Check if environment variable BOOST_SRC_DIR is set
@@ -53,35 +53,35 @@ set(BOOST_SRC_DIR ${DEFAULT_BOOST_SRC_DIR} CACHE STRING "Boost source dir to use
5353#
5454#-------------------------------------------------
5555# The boost super-project requires one explicit dependency per-line.
56- set (BOOST_RTS_DEPENDENCIES
56+ set (BOOST_CAPY_DEPENDENCIES
5757 Boost::assert
5858 Boost::config
5959 Boost::core
6060 Boost::system
6161 Boost::throw_exception)
6262
63- foreach (BOOST_RTS_DEPENDENCY ${BOOST_RTS_DEPENDENCIES } )
64- if (BOOST_RTS_DEPENDENCY MATCHES "^[ ]*Boost::([A-Za-z0-9_]+)[ ]*$" )
65- list (APPEND BOOST_RTS_INCLUDE_LIBRARIES ${CMAKE_MATCH_1} )
63+ foreach (BOOST_CAPY_DEPENDENCY ${BOOST_CAPY_DEPENDENCIES } )
64+ if (BOOST_CAPY_DEPENDENCY MATCHES "^[ ]*Boost::([A-Za-z0-9_]+)[ ]*$" )
65+ list (APPEND BOOST_CAPY_INCLUDE_LIBRARIES ${CMAKE_MATCH_1} )
6666 endif ()
6767endforeach ()
6868# Conditional dependencies
69- if (BOOST_RTS_BUILD_TESTS )
70- set (BOOST_RTS_UNIT_TEST_LIBRARIES url)
69+ if (BOOST_CAPY_BUILD_TESTS )
70+ set (BOOST_CAPY_UNIT_TEST_LIBRARIES url)
7171endif ()
72- if (BOOST_RTS_BUILD_EXAMPLES )
73- # set(BOOST_RTS_EXAMPLE_LIBRARIES url)
72+ if (BOOST_CAPY_BUILD_EXAMPLES )
73+ # set(BOOST_CAPY_EXAMPLE_LIBRARIES url)
7474endif ()
7575# Complete dependency list
76- set (BOOST_INCLUDE_LIBRARIES ${BOOST_RTS_INCLUDE_LIBRARIES } ${BOOST_RTS_UNIT_TEST_LIBRARIES } ${BOOST_RTS_EXAMPLE_LIBRARIES } )
77- set (BOOST_EXCLUDE_LIBRARIES rts )
76+ set (BOOST_INCLUDE_LIBRARIES ${BOOST_CAPY_INCLUDE_LIBRARIES } ${BOOST_CAPY_UNIT_TEST_LIBRARIES } ${BOOST_CAPY_EXAMPLE_LIBRARIES } )
77+ set (BOOST_EXCLUDE_LIBRARIES capy )
7878
7979#-------------------------------------------------
8080#
8181# Add Boost Subdirectory
8282#
8383#-------------------------------------------------
84- if (BOOST_RTS_IS_ROOT )
84+ if (BOOST_CAPY_IS_ROOT )
8585 set (CMAKE_FOLDER Dependencies)
8686 # Find absolute BOOST_SRC_DIR
8787 if (NOT IS_ABSOLUTE ${BOOST_SRC_DIR} )
@@ -129,78 +129,78 @@ endif ()
129129#-------------------------------------------------
130130set_property (GLOBAL PROPERTY USE_FOLDERS ON )
131131
132- file (GLOB_RECURSE BOOST_RTS_HEADERS CONFIGURE_DEPENDS include /boost/*.hpp include /boost/*.natvis )
133- list (FILTER BOOST_RTS_HEADERS EXCLUDE REGEX ".*/(zlib|brotli).*" )
134- file (GLOB_RECURSE BOOST_RTS_SOURCES CONFIGURE_DEPENDS src/*.cpp src/*.hpp )
132+ file (GLOB_RECURSE BOOST_CAPY_HEADERS CONFIGURE_DEPENDS include /boost/*.hpp include /boost/*.natvis )
133+ list (FILTER BOOST_CAPY_HEADERS EXCLUDE REGEX ".*/(zlib|brotli).*" )
134+ file (GLOB_RECURSE BOOST_CAPY_SOURCES CONFIGURE_DEPENDS src/*.cpp src/*.hpp )
135135
136- source_group ("" FILES "include/boost/rts .hpp" "build/Jamfile" )
137- source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} /include/boost/rts PREFIX "include" FILES ${BOOST_RTS_HEADERS } )
138- source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} /src PREFIX "src" FILES ${BOOST_RTS_SOURCES } )
136+ source_group ("" FILES "include/boost/capy .hpp" "build/Jamfile" )
137+ source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} /include/boost/capy PREFIX "include" FILES ${BOOST_CAPY_HEADERS } )
138+ source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} /src PREFIX "src" FILES ${BOOST_CAPY_SOURCES } )
139139
140- function (boost_rts_setup_properties target )
140+ function (boost_capy_setup_properties target )
141141 target_compile_features (${target} PUBLIC cxx_constexpr )
142142 target_include_directories (${target} PUBLIC "${PROJECT_SOURCE_DIR} /include" )
143- target_link_libraries (${target} PUBLIC ${BOOST_RTS_DEPENDENCIES } )
144- target_compile_definitions (${target} PUBLIC BOOST_RTS_NO_LIB )
145- target_compile_definitions (${target} PRIVATE BOOST_RTS_SOURCE )
143+ target_link_libraries (${target} PUBLIC ${BOOST_CAPY_DEPENDENCIES } )
144+ target_compile_definitions (${target} PUBLIC BOOST_CAPY_NO_LIB )
145+ target_compile_definitions (${target} PRIVATE BOOST_CAPY_SOURCE )
146146 if (BUILD_SHARED_LIBS )
147- target_compile_definitions (${target} PUBLIC BOOST_RTS_DYN_LINK )
147+ target_compile_definitions (${target} PUBLIC BOOST_CAPY_DYN_LINK )
148148 else ()
149- target_compile_definitions (${target} PUBLIC BOOST_RTS_STATIC_LINK )
149+ target_compile_definitions (${target} PUBLIC BOOST_CAPY_STATIC_LINK )
150150 endif ()
151151endfunction ()
152152
153- if (BOOST_RTS_MRDOCS_BUILD )
154- file (WRITE "${CMAKE_CURRENT_BINARY_DIR} /mrdocs.cpp" "#include <boost/rts .hpp>\n " )
155- add_library (boost_rts_mrdocs "${CMAKE_CURRENT_BINARY_DIR} /mrdocs.cpp" )
156- boost_rts_setup_properties ( boost_rts_mrdocs )
157- boost_rts_setup_properties ( boost_rts_mrdocs PUBLIC BOOST_RTS_MRDOCS )
153+ if (BOOST_CAPY_MRDOCS_BUILD )
154+ file (WRITE "${CMAKE_CURRENT_BINARY_DIR} /mrdocs.cpp" "#include <boost/capy .hpp>\n " )
155+ add_library (boost_capy_mrdocs "${CMAKE_CURRENT_BINARY_DIR} /mrdocs.cpp" )
156+ boost_capy_setup_properties ( boost_capy_mrdocs )
157+ boost_capy_setup_properties ( boost_capy_mrdocs PUBLIC BOOST_CAPY_MRDOCS )
158158 return ()
159159endif ()
160160
161- add_library (boost_rts include /boost/rts .hpp build /Jamfile ${BOOST_RTS_HEADERS } ${BOOST_RTS_SOURCES } )
162- add_library (Boost::rts ALIAS boost_rts )
163- boost_rts_setup_properties ( boost_rts )
161+ add_library (boost_capy include /boost/capy .hpp build /Jamfile ${BOOST_CAPY_HEADERS } ${BOOST_CAPY_SOURCES } )
162+ add_library (Boost::capy ALIAS boost_capy )
163+ boost_capy_setup_properties ( boost_capy )
164164
165165# Zlib
166166find_package (ZLIB )
167167if (ZLIB_FOUND)
168- file (GLOB_RECURSE BOOST_RTS_ZLIB_HEADERS CONFIGURE_DEPENDS include /boost/rts /zlib/*.hpp )
169- file (GLOB_RECURSE BOOST_RTS_ZLIB_SOURCES CONFIGURE_DEPENDS src_zlib/*.cpp src_zlib/*.hpp )
170- source_group ("" FILES "include/boost/rts /zlib.hpp" )
171- source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} /include/boost/rts /zlib PREFIX "include" FILES ${BOOST_RTS_ZLIB_HEADERS } )
172- source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} /src_zlib PREFIX "src" FILES ${BOOST_RTS_ZLIB_SOURCES } )
173- add_library (boost_rts_zlib include /boost/rts /zlib.hpp build /Jamfile ${BOOST_RTS_ZLIB_HEADERS } ${BOOST_RTS_ZLIB_SOURCES } )
174- add_library (Boost::rts_zlib ALIAS boost_rts_zlib )
175- target_link_libraries (boost_rts_zlib PUBLIC boost_rts )
176- target_link_libraries (boost_rts_zlib PRIVATE ZLIB::ZLIB )
177- target_compile_definitions (boost_rts_zlib PUBLIC BOOST_RTS_HAS_ZLIB )
178- target_compile_definitions (boost_rts_zlib PRIVATE BOOST_RTS_SOURCE )
168+ file (GLOB_RECURSE BOOST_CAPY_ZLIB_HEADERS CONFIGURE_DEPENDS include /boost/capy /zlib/*.hpp )
169+ file (GLOB_RECURSE BOOST_CAPY_ZLIB_SOURCES CONFIGURE_DEPENDS src_zlib/*.cpp src_zlib/*.hpp )
170+ source_group ("" FILES "include/boost/capy /zlib.hpp" )
171+ source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} /include/boost/capy /zlib PREFIX "include" FILES ${BOOST_CAPY_ZLIB_HEADERS } )
172+ source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} /src_zlib PREFIX "src" FILES ${BOOST_CAPY_ZLIB_SOURCES } )
173+ add_library (boost_capy_zlib include /boost/capy /zlib.hpp build /Jamfile ${BOOST_CAPY_ZLIB_HEADERS } ${BOOST_CAPY_ZLIB_SOURCES } )
174+ add_library (Boost::capy_zlib ALIAS boost_capy_zlib )
175+ target_link_libraries (boost_capy_zlib PUBLIC boost_capy )
176+ target_link_libraries (boost_capy_zlib PRIVATE ZLIB::ZLIB )
177+ target_compile_definitions (boost_capy_zlib PUBLIC BOOST_CAPY_HAS_ZLIB )
178+ target_compile_definitions (boost_capy_zlib PRIVATE BOOST_CAPY_SOURCE )
179179endif ()
180180
181181# Brotli
182182list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /cmake" )
183183find_package (Brotli )
184184if (Brotli_FOUND)
185- file (GLOB_RECURSE BOOST_RTS_BROTLI_HEADERS CONFIGURE_DEPENDS include /boost/rts /brotli/*.hpp )
186- file (GLOB_RECURSE BOOST_RTS_BROTLI_SOURCES CONFIGURE_DEPENDS src_brotli/*.cpp src_brotli/*.hpp )
187- source_group ("" FILES "include/boost/rts /brotli.hpp" )
188- source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} /include/boost/rts /brotli PREFIX "include" FILES ${BOOST_RTS_BROTLI_HEADERS } )
189- source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} /src_brotli PREFIX "src" FILES ${BOOST_RTS_BROTLI_SOURCES } )
190- add_library (boost_rts_brotli include /boost/rts /brotli.hpp build /Jamfile ${BOOST_RTS_BROTLI_HEADERS } ${BOOST_RTS_BROTLI_SOURCES } )
191- add_library (Boost::rts_brotli ALIAS boost_rts_brotli )
192- target_link_libraries (boost_rts_brotli PUBLIC boost_rts )
193- target_link_libraries (boost_rts_brotli PRIVATE Brotli::common Brotli::decoder Brotli::encoder )
194- target_compile_definitions (boost_rts_brotli PUBLIC BOOST_RTS_HAS_BROTLI )
195- target_compile_definitions (boost_rts_brotli PRIVATE BOOST_RTS_SOURCE )
185+ file (GLOB_RECURSE BOOST_CAPY_BROTLI_HEADERS CONFIGURE_DEPENDS include /boost/capy /brotli/*.hpp )
186+ file (GLOB_RECURSE BOOST_CAPY_BROTLI_SOURCES CONFIGURE_DEPENDS src_brotli/*.cpp src_brotli/*.hpp )
187+ source_group ("" FILES "include/boost/capy /brotli.hpp" )
188+ source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} /include/boost/capy /brotli PREFIX "include" FILES ${BOOST_CAPY_BROTLI_HEADERS } )
189+ source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR} /src_brotli PREFIX "src" FILES ${BOOST_CAPY_BROTLI_SOURCES } )
190+ add_library (boost_capy_brotli include /boost/capy /brotli.hpp build /Jamfile ${BOOST_CAPY_BROTLI_HEADERS } ${BOOST_CAPY_BROTLI_SOURCES } )
191+ add_library (Boost::capy_brotli ALIAS boost_capy_brotli )
192+ target_link_libraries (boost_capy_brotli PUBLIC boost_capy )
193+ target_link_libraries (boost_capy_brotli PRIVATE Brotli::common Brotli::decoder Brotli::encoder )
194+ target_compile_definitions (boost_capy_brotli PUBLIC BOOST_CAPY_HAS_BROTLI )
195+ target_compile_definitions (boost_capy_brotli PRIVATE BOOST_CAPY_SOURCE )
196196endif ()
197197
198198#-------------------------------------------------
199199#
200200# Tests
201201#
202202#-------------------------------------------------
203- if (BOOST_RTS_BUILD_TESTS )
203+ if (BOOST_CAPY_BUILD_TESTS )
204204 add_subdirectory (test )
205205endif ()
206206
@@ -209,6 +209,6 @@ endif ()
209209# Examples
210210#
211211#-------------------------------------------------
212- if (BOOST_RTS_BUILD_EXAMPLES )
212+ if (BOOST_CAPY_BUILD_EXAMPLES )
213213 # add_subdirectory(example)
214214endif ()
0 commit comments