Skip to content

Commit

Permalink
Automating the addition of new exe files
Browse files Browse the repository at this point in the history
  • Loading branch information
grf14003 committed Jan 28, 2020
1 parent 40d3d86 commit 7853c71
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions breadcrumbs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,14 @@ file(GLOB_RECURSE ALGOS CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/algos/*.cpp")
file(GLOB_RECURSE COMMS CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/comms/*.cpp")
file(GLOB_RECURSE CONFIG CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/config/*.cpp")
file(GLOB_RECURSE LOG CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/logging/*.cpp")
message("Source files: ${ALGOS}")

file(GLOB EXECS CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/main/*.cpp")

# Adding executables
add_executable(Breadcrumbs "${CMAKE_SOURCE_DIR}/main/Breadcrumbs.cpp" ${ALGOS} ${COMMS} ${CONFIG} ${LOG})
add_executable(VirtualOutputProcessor "${CMAKE_SOURCE_DIR}/main/VirtualOutputProcessor.cpp" ${ALGOS} ${COMMS} ${CONFIG} ${LOG})
# This is fine for now, but we may want to switch to a more manual versio so we can
# configure which files are included in which exe's
foreach(X IN LISTS EXECS)
get_filename_component(N ${X} NAME_WE)
message(STATUS "Generating Executable: ${N}.exe Main File: ${X}"})
add_executable(${N} ${X} ${ALGOS} ${COMMS} ${CONFIG} ${LOG})
endforeach()

0 comments on commit 7853c71

Please sign in to comment.