AK+Userland: Use a CMake variable for AK_SOURCES instead of GLOB

This lets us remove a glob pattern from LibC, the DynamicLoader, and,
later, Lagom. The Kernel already has its own separate list of AK files
that it wants, which is only a subset of all AK files.
This commit is contained in:
Andrew Kaster 2022-10-13 14:00:59 -06:00 committed by Linus Groh
parent a34f8c444b
commit 1ca48a2aec
Notes: sideshowbarker 2024-07-17 05:42:31 +09:00
3 changed files with 32 additions and 2 deletions

View file

@ -1,2 +1,34 @@
set(AK_SOURCES
Assertions.cpp
Base64.cpp
FlyString.cpp
Format.cpp
FuzzyMatch.cpp
GenericLexer.cpp
Hex.cpp
JsonParser.cpp
JsonPath.cpp
JsonValue.cpp
kmalloc.cpp
LexicalPath.cpp
Random.cpp
StackInfo.cpp
String.cpp
StringBuilder.cpp
StringImpl.cpp
StringUtils.cpp
StringView.cpp
Time.cpp
URL.cpp
URLParser.cpp
Utf16View.cpp
Utf8View.cpp
UUID.cpp
)
# AK sources are included from many different places, such as the Kernel, LibC, and Loader
list(TRANSFORM AK_SOURCES PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/")
set(AK_SOURCES ${AK_SOURCES} PARENT_SCOPE)
serenity_install_headers(AK) serenity_install_headers(AK)
serenity_install_sources(AK) serenity_install_sources(AK)

View file

@ -3,7 +3,6 @@ set(LOADER_SOURCES
misc.cpp misc.cpp
) )
file(GLOB AK_SOURCES "../../AK/*.cpp")
file(GLOB ELF_SOURCES "../Libraries/LibELF/*.cpp") file(GLOB ELF_SOURCES "../Libraries/LibELF/*.cpp")
file(GLOB LIBC_SOURCES1 "../Libraries/LibC/*.cpp") file(GLOB LIBC_SOURCES1 "../Libraries/LibC/*.cpp")
file(GLOB LIBC_SOURCES2 "../Libraries/LibC/*/*.cpp") file(GLOB LIBC_SOURCES2 "../Libraries/LibC/*/*.cpp")

View file

@ -76,7 +76,6 @@ set(LIBC_SOURCES
wstdio.cpp wstdio.cpp
) )
file(GLOB AK_SOURCES CONFIGURE_DEPENDS "../../../AK/*.cpp")
file(GLOB ELF_SOURCES CONFIGURE_DEPENDS "../LibELF/*.cpp") file(GLOB ELF_SOURCES CONFIGURE_DEPENDS "../LibELF/*.cpp")
if ("${SERENITY_ARCH}" STREQUAL "aarch64") if ("${SERENITY_ARCH}" STREQUAL "aarch64")