Skip to content

Commit

Permalink
Changing name of cmake project to bfs from breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
grf14003 committed Feb 12, 2020
1 parent 4dbd738 commit f39005f
Show file tree
Hide file tree
Showing 240 changed files with 133 additions and 109 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.vs/*

# Excluding the build and executable folders
breadcrumbs/build/*
!breadcrumbs/build/.blank
breadcrumbs/bin/*
!breadcrumbs/bin/.blank
bfs/build/*
!bfs/build/.blank
bfs/bin/*
!bfs/bin/.blank
File renamed without changes.
File renamed without changes.
105 changes: 105 additions & 0 deletions bfs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
cmake_minimum_required (VERSION 2.6)

message("Starting CMAKE")
project(Bfs)
string(TOLOWER ${PROJECT_NAME} ROOT_FOLDER_DIRNAME)
# The version number.
set (Bfs_VERSION_MAJOR 1)
set (Bfs_VERSION_MINOR 0)

# Setting paths
message("Setting paths...")
set(CMAKE_SOURCE_DIR ${PROJECT_SOURCE_DIR}/src) # Code directory
set(CMAKE_BINARY_DIR ${PROJECT_SOURCE_DIR}/build) # Object files and such (.o)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin) # Compiled executables for execution and test (.exe)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib) # Compiled libraries (.lib and .dll)
set(CMAKE_INCLUDE_PATH ${PROJECT_SOURCE_DIR}/include) # Publicly accessible header files
set(IMPLEMENATION_PATH ${PROJECT_SOURCE_DIR}/implementations)

message("Root directory: ${PROJECT_SOURCE_DIR}")
message("Source directory: ${CMAKE_SOURCE_DIR}")
message("Build directory: ${CMAKE_BINARY_DIR}")
message("Executable directory: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
message("Library directory: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
message("")

# Including all tools
file(GLOB TOOL_INCLUDES CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR}/tools/*")

foreach(X IN LISTS TOOL_INCLUDES)
message("Including library with ${X}")
add_subdirectory(${X})
endforeach()

# Configure a header file to pass some of the CMake settings to the source code
set (Bfs_ALGORITHM_SERVER_PORT \"27634\")

configure_file (
"${PROJECT_SOURCE_DIR}/CMakeConfig.h.in"
"${CMAKE_INCLUDE_PATH}/CMakeConfig.h"
)

# Adding public includes to include search path
include_directories("${CMAKE_INCLUDE_PATH}")
# Adding private include files from source tree
include_directories("${CMAKE_SOURCE_DIR}")

# puts all .cpp files inside src to the SOURCES variable
# TODO: replace this with a script for collecting cpp files
file(GLOB_RECURSE BFS_SOURCE CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/*.cpp")

file(GLOB IMPLEMENTAIONS CONFIGURE_DEPENDS "${IMPLEMENATION_PATH}/*/")
foreach(IMPL IN LISTS IMPLEMENTAIONS)

message("Starting implementation(${IMPL}) build...\n")

set(IMPL_ALGO_PATH ${IMPL}/algos) # BFS Implemenation algo source file path
set(IMPL_IO_PROCS_PATH ${IMPL}/io_procs)
set(IMPL_INCLUDE_PATH ${IMPL}/include)

message("Implementation algo directory: ${IMPL_ALGO_PATH}")
message("Implementation io_procs directory: ${IMPL_IO_PROCS_PATH}")
message("Implementation include directory: ${IMPL_INCLUDE_PATH}")
message("")

# Adding implementation include
include_directories("${IMPL_INCLUDE_PATH}")

set(Bfs_TEMP_ALGORITHM_CLIENT_LIMIT 1)

file(MAKE_DIRECTORY ${IMPL}/gen)

file(GLOB ALGOS_EXECS CONFIGURE_DEPENDS "${IMPL_ALGO_PATH}/*.cpp")
foreach(X IN LISTS ALGOS_EXECS)
get_filename_component(N ${X} NAME_WE)
set(Bfs_TEMP_ALGORITHM_NAME ${N})
message("Generating Algorithm main(): ${PROJECT_SOURCE_DIR}/${ROOT_FOLDER_DIRNAME}/gen/${N}.cpp")
configure_file("${CMAKE_SOURCE_DIR}/template/AlgorithmTemplate.cpp.in" ${IMPL}/gen/${N}.cpp)
endforeach()

file(GLOB IO_PROC_EXECS CONFIGURE_DEPENDS "${IMPL_IO_PROCS_PATH}/*.cpp")
foreach(X IN LISTS IO_PROC_EXECS)
get_filename_component(N ${X} NAME_WE)
set(Bfs_TEMP_IOPROC_NAME ${N})
message("Generating IO Processor main(): ${PROJECT_SOURCE_DIR}/${ROOT_FOLDER_DIRNAME}/gen/${N}.cpp")
configure_file("${CMAKE_SOURCE_DIR}/template/IOProcessorTemplate.cpp.in" ${IMPL}/gen/${N}.cpp)
endforeach()
message("")

# Compiling BFS implementation source files
file(GLOB_RECURSE IMPL_SRC CONFIGURE_DEPENDS "${IMPL}/*.cpp")
list(FILTER IMPL_SRC EXCLUDE REGEX "${IMPL}/gen/*")

# Getting template output files to create executables
file(GLOB IMPL_EXECS CONFIGURE_DEPENDS "${IMPL}/gen/*.cpp")

# Adding executables
# 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 IMPL_EXECS)
get_filename_component(N ${X} NAME_WE)
message(STATUS "Generating Executable: ${N}.exe Main File: ${X}"})
add_executable(${N} ${IMPL_SRC} ${X} ${BFS_SOURCE})
target_link_libraries(${N} tinyxml2)
endforeach()
endforeach()
10 changes: 8 additions & 2 deletions breadcrumbs/CMakeSettings.json → bfs/CMakeSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
"cmakeCommandArgs": "",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"variables": []
"variables": [
{
"name": "CMAKE_INSTALL_PREFIX",
"value": "C:/Users/Greg/Documents/git/bfs/breadcrumbs/install/basic_build",
"type": "PATH"
}
]
}
]
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions bfs/scripts/log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Could not acquire mutex to add new client thread
Listening for clients...
Could not acquire mutex to add new client thread
Listening for clients...
Hello new client!
Listening for clients...
Could not acquire mutex to add new client thread
Listening for clients...
Hello new client!
Listening for clients...
Hello new client!
Listening for clients...
6 changes: 4 additions & 2 deletions breadcrumbs/scripts/startbfs.py → bfs/scripts/startbfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ def start_program_async(program):


def main():
p = start_program_async("..\\bin\\Breadcrumbs.exe")
p.join()
a = start_program_async("..\\bin\\AlgoBreadcrumbs.exe")
io = start_program_async("..\\bin\\VirtualOutputIOProcessor.exe")
a.join()
io.join()
print("DONE")


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
101 changes: 0 additions & 101 deletions breadcrumbs/CMakeLists.txt

This file was deleted.

0 comments on commit f39005f

Please sign in to comment.