Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,24 @@ function(run_fcgen fc_input_file fc_output_file)
)
endfunction()

run_fcgen("types.h.cog" "${CMAKE_BINARY_DIR}/include/fastcat/types.h")
run_fcgen("device_includes.h.cog" "${CMAKE_BINARY_DIR}/include/fastcat/device_includes.h")
run_fcgen("signal_handling.cc.cog" "${CMAKE_BINARY_DIR}/autogen/signal_handling.cc")
run_fcgen("commander.cc.cog" "${CMAKE_BINARY_DIR}/autogen/commander.cc")
run_fcgen(types.h.cog ${CMAKE_BINARY_DIR}/include/fastcat/types.h)
run_fcgen(device_includes.h.cog ${CMAKE_BINARY_DIR}/include/fastcat/device_includes.h)
run_fcgen(signal_handling.cc.cog ${CMAKE_BINARY_DIR}/autogen/signal_handling.cc)
run_fcgen(commander.cc.cog ${CMAKE_BINARY_DIR}/autogen/commander.cc)

run_fcgen(
enum_conversions.h.cog
${CMAKE_BINARY_DIR}/include/fastcat/enum_conversions.h)

run_fcgen(
device_config_parsing_libyamlcpp.h.cog
${CMAKE_BINARY_DIR}/include/fastcat/device_config_parsing_libyamlcpp.h)

add_custom_target(fcgen DEPENDS
${CMAKE_BINARY_DIR}/include/fastcat/types.h
${CMAKE_BINARY_DIR}/include/fastcat/device_includes.h
${CMAKE_BINARY_DIR}/include/fastcat/enum_conversions.h
${CMAKE_BINARY_DIR}/include/fastcat/device_config_parsing_libyamlcpp.h
)

add_library(fastcat STATIC
Expand Down
3 changes: 2 additions & 1 deletion src/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#define FASTCAT_CONFIG_H_

#define FASTCAT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@"
#define FASTCAT_UNIT_TEST_DIR "@CMAKE_CURRENT_SOURCE_DIR@/test/test_unit/"
#define FASTCAT_TEST_DIR "@CMAKE_CURRENT_SOURCE_DIR@/test/"

#define FASTCAT_VERSION_MAJOR ${${PROJECT_NAME}_VERSION_MAJOR}
#define FASTCAT_VERSION_MINOR ${${PROJECT_NAME}_VERSION_MINOR}
#define FASTCAT_VERSION_PATCH ${${PROJECT_NAME}_VERSION_PATCH}
Expand Down
Loading