From 920d1d8f7d5dfba62a4921ddeb804ec5ad86c862 Mon Sep 17 00:00:00 2001 From: Pasha Bibko <156938226+PashaBibko@users.noreply.github.com> Date: Wed, 23 Jul 2025 17:49:35 +0100 Subject: [PATCH] Stopped using GLOB in CMakeLists.txt --- Lexer/CMakeLists.txt | 8 +++++--- ast/CMakeLists.txt | 7 +++++-- tests/CMakeLists.txt | 5 +++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Lexer/CMakeLists.txt b/Lexer/CMakeLists.txt index 8ba0b40..cf43ba6 100644 --- a/Lexer/CMakeLists.txt +++ b/Lexer/CMakeLists.txt @@ -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 ( diff --git a/ast/CMakeLists.txt b/ast/CMakeLists.txt index 03cf063..4d4d871 100644 --- a/ast/CMakeLists.txt +++ b/ast/CMakeLists.txt @@ -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 ( diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2483ee2..b3410a8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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)