Skip to content

Commit 24ea39a

Browse files
committed
Address rabbit comments; Improve style consistency.
1 parent 1e7cd87 commit 24ea39a

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS
3838
FORCE
3939
)
4040

41-
set(YSTDLIB_LIBRARIES
41+
set(ystdlib_LIBRARIES
4242
"containers"
4343
"error_handling"
4444
"io_interface"
@@ -48,8 +48,8 @@ set(YSTDLIB_LIBRARIES
4848
)
4949

5050
message(STATUS "Building the following libraries:")
51-
foreach(lib IN LISTS YSTDLIB_LIBRARIES)
52-
message(" - ${lib}")
51+
foreach(LIB IN LISTS ystdlib_LIBRARIES)
52+
message(" - ${LIB}")
5353
endforeach()
5454

5555
if(ystdlib_IS_TOP_LEVEL)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ cmake -S . -B ./build
7272
cmake --build ./build
7373
```
7474

75-
To build a subset of libraries, set the variable `YSTDLIB_LIBRARIES` to a semicolon(`;`) separated
75+
To build a subset of libraries, set the variable `ystdlib_LIBRARIES` to a semicolon(`;`) separated
7676
list of library names. The library names match their [directory name in src/](./src/ystdlib).
7777
For example:
7878

7979
```shell
80-
cmake -S . -B ./build -DYSTDLIB_LIBRARIES="containers;io_interface"
80+
cmake -S . -B ./build -Dystdlib_LIBRARIES="containers;io_interface"
8181
cmake --build ./build
8282
```
8383

cmake/ystdlib-config.cmake.in

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ include(CMakeFindDependencyMacro)
77
# If no component is specified we require all libraries.
88
# We guard against repeatedly including targets to support multiple find_package calls.
99
if(NOT ystdlib_FIND_COMPONENTS)
10-
set(YSTDLIB_LIBRARIES_LIST "@YSTDLIB_LIBRARIES@")
11-
foreach(lib IN LISTS YSTDLIB_LIBRARIES_LIST)
12-
if(NOT TARGET ystdlib::${lib})
13-
include("${CMAKE_CURRENT_LIST_DIR}/libs/${lib}-config.cmake")
10+
set(ystdlib_LIBRARIES_LIST "@ystdlib_LIBRARIES@")
11+
foreach(LIB IN LISTS ystdlib_LIBRARIES_LIST)
12+
if(NOT TARGET ystdlib::${LIB})
13+
include("${CMAKE_CURRENT_LIST_DIR}/libs/${LIB}-config.cmake")
1414
endif()
1515
endforeach()
1616
else()
17-
foreach(lib IN LISTS ystdlib_FIND_COMPONENTS)
18-
if(NOT TARGET "ystdlib::${lib}")
19-
if(ystdlib_FIND_REQUIRED_${lib})
20-
include("${CMAKE_CURRENT_LIST_DIR}/libs/${lib}-config.cmake")
17+
foreach(LIB IN LISTS ystdlib_FIND_COMPONENTS)
18+
if(NOT TARGET "ystdlib::${LIB}")
19+
if(ystdlib_FIND_REQUIRED_${LIB})
20+
include("${CMAKE_CURRENT_LIST_DIR}/libs/${LIB}-config.cmake")
2121
else()
22-
include("${CMAKE_CURRENT_LIST_DIR}/libs/${lib}-config.cmake" OPTIONAL)
22+
include("${CMAKE_CURRENT_LIST_DIR}/libs/${LIB}-config.cmake" OPTIONAL)
2323
endif()
2424
endif()
2525
endforeach()

src/ystdlib/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
if(NOT YSTDLIB_LIBRARIES)
2-
message(FATAL_ERROR "YSTDLIB_LIBRARIES must be defined and non-empty.")
1+
if(NOT DEFINED ystdlib_LIBRARIES OR ystdlib_LIBRARIES STREQUAL "")
2+
message(FATAL_ERROR "ystdlib_LIBRARIES must be defined and non-empty.")
33
endif()
44

5-
foreach(lib IN LISTS YSTDLIB_LIBRARIES)
6-
add_subdirectory("${lib}")
5+
foreach(LIB IN LISTS ystdlib_LIBRARIES)
6+
add_subdirectory("${LIB}")
77
endforeach()

src/ystdlib/io_interface/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ if(TARGET ystdlib::io_interface)
22
return()
33
endif()
44

5-
if(NOT wrapped_facade_headers IN_LIST YSTDLIB_LIBRARIES)
5+
if(NOT wrapped_facade_headers IN_LIST ystdlib_LIBRARIES)
66
add_subdirectory(
77
"${CMAKE_CURRENT_LIST_DIR}/../wrapped_facade_headers"
88
"${CMAKE_CURRENT_BINARY_DIR}/implicit_dep/wrapped_facade_headers"

0 commit comments

Comments
 (0)