Skip to content
This repository was archived by the owner on Oct 12, 2026. It is now read-only.

Commit 68ad5b9

Browse files
committed
chore: cleanup CMakeLists
1 parent f4650af commit 68ad5b9

1 file changed

Lines changed: 7 additions & 23 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,17 @@ project(lambda-discipline)
44
set(CMAKE_CXX_STANDARD 20)
55

66
include_directories(
7-
${CMAKE_SOURCE_DIR}/include
7+
${PROJECT_SOURCE_DIR}/include
88
)
99

10-
add_library(frontend STATIC
11-
${CMAKE_SOURCE_DIR}/src/frontend/location.cpp
12-
${CMAKE_SOURCE_DIR}/src/frontend/token.cpp
13-
${CMAKE_SOURCE_DIR}/src/frontend/lexer.cpp
14-
${CMAKE_SOURCE_DIR}/src/frontend/ast.cpp
15-
${CMAKE_SOURCE_DIR}/src/frontend/program.cpp
16-
${CMAKE_SOURCE_DIR}/src/frontend/parser.cpp
17-
${CMAKE_SOURCE_DIR}/src/frontend/type.cpp
18-
)
10+
file(GLOB_RECURSE FRONTEND_SOURCE_FILES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/src/frontend/*.cpp)
11+
add_library(frontend STATIC ${FRONTEND_SOURCE_FILES})
1912

20-
add_library(runtime STATIC
21-
${CMAKE_SOURCE_DIR}/src/runtime/interpreter.cpp
22-
${CMAKE_SOURCE_DIR}/src/runtime/type.cpp
23-
${CMAKE_SOURCE_DIR}/src/runtime/builtins.cpp
24-
${CMAKE_SOURCE_DIR}/src/runtime/builtin-modules/builtin_module_core.cpp
25-
${CMAKE_SOURCE_DIR}/src/runtime/builtin-modules/builtin_module_list.cpp
26-
${CMAKE_SOURCE_DIR}/src/runtime/builtin-modules/builtin_module_io.cpp
27-
)
13+
file(GLOB_RECURSE RUNTIME_SOURCE_FILES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/src/runtime/*.cpp)
14+
add_library(runtime STATIC ${RUNTIME_SOURCE_FILES})
2815

29-
add_executable(lbd
30-
${CMAKE_SOURCE_DIR}/src/main.cpp
31-
${CMAKE_SOURCE_DIR}/src/cmd.cpp
32-
${CMAKE_SOURCE_DIR}/src/repl.cpp
33-
)
16+
file(GLOB LBD_SOURCE_FILES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/src/*.cpp)
17+
add_executable(lbd ${LBD_SOURCE_FILES})
3418

3519
target_link_libraries(lbd PRIVATE frontend runtime -static)
3620

0 commit comments

Comments
 (0)