Stopped using GLOB in CMakeLists.txt

This commit is contained in:
Pasha Bibko
2025-07-23 17:49:35 +01:00
parent 69e7b0e6c1
commit 920d1d8f7d
3 changed files with 13 additions and 7 deletions

View File

@@ -1,6 +1,8 @@
# Fetches all files for in the binary #
file (GLOB LexerSources src/*.cpp inc/*.h)
add_library(Lexer STATIC ${LexerSources})
# Fetches all .cpp files for the binary #
add_library(Lexer STATIC
src/Lexer.cpp
src/Token.cpp
)
# Adds the headers in the current directory #
target_include_directories (

View File

@@ -1,5 +1,8 @@
# Fetches all files for the binary #
add_library(AST STATIC src/NodeTypes.cpp src/AST.cpp)
# Fetches all .cpp files for the binary #
add_library(AST STATIC
src/NodeTypes.cpp
src/AST.cpp
)
# Adds the headers in the current directory #
target_include_directories (

View File

@@ -1,6 +1,7 @@
# Creates the binary to run the tests #
file (GLOB TestSources src/*.cpp inc/*.h)
add_executable(LXC_Tests ${TestSources})
add_executable(LXC_Test
src/LexerTests.cpp
)
# Creates the shared precompiled header #
target_include_directories(LXC_Tests PRIVATE ${CMAKE_SOURCE_DIR}/common)