11# ============================================================================
22#
3- # ztd.static_containers
3+ # ztd.inline_containers
44#
55# © ThePhD <phdofthehouse@gmail.com>
66#
@@ -28,12 +28,12 @@ set(CMAKE_PROJECT_INCLUDE ${ZTD_CMAKE_PROJECT_PRELUDE})
2828# # Project declaration
2929# informs about the project, gives a description, version and MOST IMPORTANTLY
3030# the languages the project is going to use. Required.
31- project (ztd.static_containers
31+ project (ztd.inline_containers
3232 VERSION 0.5.0
3333 DESCRIPTION "A library for a fixed-capacity vector."
3434 LANGUAGES C CXX)
3535
36- if (ZTD_STATIC_CONTAINERS_READTHEDOCS )
36+ if (ZTD_INLINE_CONTAINERS_READTHEDOCS )
3737 # ReadTheDocs seems unable to handle the include at the project level: something must be going wrong?
3838 include (CheckCXXCompilerFlag)
3939 include (CheckCCompilerFlag)
@@ -56,13 +56,13 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
5656# # # Top-Level Directories
5757# Check if this is the top-level project or not
5858if (CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR )
59- set (ZTD_STATIC_CONTAINERS_IS_TOP_LEVEL_PROJECT YES )
59+ set (ZTD_INLINE_CONTAINERS_IS_TOP_LEVEL_PROJECT YES )
6060else ()
61- set (ZTD_STATIC_CONTAINERS_IS_TOP_LEVEL_PROJECT NO )
61+ set (ZTD_INLINE_CONTAINERS_IS_TOP_LEVEL_PROJECT NO )
6262endif ()
6363
6464# Modify bad flags / change defaults if we are the top level
65- if (ZTD_STATIC_CONTAINERS_IS_TOP_LEVEL_PROJECT )
65+ if (ZTD_INLINE_CONTAINERS_IS_TOP_LEVEL_PROJECT )
6666 if (CMAKE_SIZEOF_VOID_P EQUAL 4)
6767 set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR} /x86/${CMAKE_BUILD_TYPE} /lib" )
6868 set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR} /x86/${CMAKE_BUILD_TYPE} /bin" )
@@ -81,7 +81,7 @@ if(ZTD_STATIC_CONTAINERS_IS_TOP_LEVEL_PROJECT)
8181 set (CMAKE_C_STANDARD 11)
8282 endif ()
8383
84- if (ZTD_STATIC_CONTAINERS_BENCHMARKS OR ZTD_STATIC_CONTAINERS_EXAMPLES OR ZTD_STATIC_CONTAINERS_TESTS OR ZTD_STATIC_CONTAINERS_SCRATCH )
84+ if (ZTD_INLINE_CONTAINERS_BENCHMARKS OR ZTD_INLINE_CONTAINERS_EXAMPLES OR ZTD_INLINE_CONTAINERS_TESTS OR ZTD_INLINE_CONTAINERS_SCRATCH )
8585 # normal flags
8686 check_compiler_flag(disable-permissive MSVC /permissive- GCC -pedantic)
8787
@@ -105,10 +105,10 @@ include(CMakePackageConfigHelpers)
105105include (GNUInstallDirs)
106106
107107# # Options
108- option (ZTD_STATIC_CONTAINERS_CI "Whether or not we are in contiguous integration mode" OFF )
109- option (ZTD_STATIC_CONTAINERS_TESTS "Enable build of tests" OFF )
110- option (ZTD_STATIC_CONTAINERS_EXAMPLES "Enable build of examples" OFF )
111- option (ZTD_STATIC_CONTAINERS_BENCHMARKS "Enable build of benchmarks" OFF )
108+ option (ZTD_INLINE_CONTAINERS_CI "Whether or not we are in contiguous integration mode" OFF )
109+ option (ZTD_INLINE_CONTAINERS_TESTS "Enable build of tests" OFF )
110+ option (ZTD_INLINE_CONTAINERS_EXAMPLES "Enable build of examples" OFF )
111+ option (ZTD_INLINE_CONTAINERS_BENCHMARKS "Enable build of benchmarks" OFF )
112112
113113# # Dependencies
114114# ztd.idk
@@ -117,20 +117,20 @@ FetchContent_Declare(ztd.idk
117117 GIT_TAG main)
118118FetchContent_MakeAvailable(ztd.idk)
119119
120- file (GLOB_RECURSE ztd.static_containers .sources
120+ file (GLOB_RECURSE ztd.inline_containers .sources
121121 LIST_DIRECTORIES FALSE
122122 CONFIGURE_DEPENDS
123123 include /ztd/**.*
124124)
125125
126- add_library (ztd.static_containers INTERFACE )
127- add_library (ztd::static_containers ALIAS ztd.static_containers )
128- target_sources (ztd.static_containers INTERFACE ${ztd.static_containers .sources })
129- target_link_libraries (ztd.static_containers
126+ add_library (ztd.inline_containers INTERFACE )
127+ add_library (ztd::inline_containers ALIAS ztd.inline_containers )
128+ target_sources (ztd.inline_containers INTERFACE ${ztd.inline_containers .sources })
129+ target_link_libraries (ztd.inline_containers
130130 INTERFACE
131131 ztd::idk
132132)
133- target_include_directories (ztd.static_containers INTERFACE
133+ target_include_directories (ztd.inline_containers INTERFACE
134134 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /include >
135135 $<INSTALL_INTERFACE:include >
136136)
@@ -141,33 +141,33 @@ install(DIRECTORY include/
141141# # Config / Version packaging
142142# Version configurations
143143configure_package_config_file(
144- cmake/ztd.static_containers -config.cmake.in
145- "${CMAKE_CURRENT_BINARY_DIR} /cmake/ztd.static_containers /ztd.static_containers -config.cmake"
146- INSTALL_DESTINATION lib/cmake/ztd.static_containers
144+ cmake/ztd.inline_containers -config.cmake.in
145+ "${CMAKE_CURRENT_BINARY_DIR} /cmake/ztd.inline_containers /ztd.inline_containers -config.cmake"
146+ INSTALL_DESTINATION lib/cmake/ztd.inline_containers
147147 NO_CHECK_REQUIRED_COMPONENTS_MACRO)
148148
149149write_basic_package_version_file(
150- "${CMAKE_CURRENT_BINARY_DIR} /cmake/ztd.static_containers /ztd.static_containers -config-version.cmake"
150+ "${CMAKE_CURRENT_BINARY_DIR} /cmake/ztd.inline_containers /ztd.inline_containers -config-version.cmake"
151151 COMPATIBILITY SameMajorVersion)
152152
153- export (TARGETS ztd.static_containers
153+ export (TARGETS ztd.inline_containers
154154 FILE
155- "${CMAKE_CURRENT_BINARY_DIR} /cmake/ztd.static_containers /ztd.static_containers -targets.cmake" )
155+ "${CMAKE_CURRENT_BINARY_DIR} /cmake/ztd.inline_containers /ztd.inline_containers -targets.cmake" )
156156
157157# # Benchmarks, Tests, Examples
158- if (ZTD_STATIC_CONTAINERS_TESTS )
158+ if (ZTD_INLINE_CONTAINERS_TESTS )
159159 enable_testing ()
160160endif ()
161161
162- if (ZTD_STATIC_CONTAINERS_TESTS )
162+ if (ZTD_INLINE_CONTAINERS_TESTS )
163163 enable_testing ()
164164 add_subdirectory (tests)
165165endif ()
166166
167- if (ZTD_STATIC_CONTAINERS_EXAMPLES )
167+ if (ZTD_INLINE_CONTAINERS_EXAMPLES )
168168 add_subdirectory (examples)
169169endif ()
170170
171- if (ZTD_STATIC_CONTAINERS_BENCHMARKS )
171+ if (ZTD_INLINE_CONTAINERS_BENCHMARKS )
172172 add_subdirectory (benchmarks)
173173endif ()
0 commit comments