mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 00:44:37 -06:00
mstarch: replacing add_subdirectory with add_fprime_subdirectory
This commit is contained in:
parent
6a59a209dd
commit
069c3733b4
@ -1,3 +1,3 @@
|
||||
# Add autocoder subdirectories
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Python/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Shell/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Python/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Shell/")
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Set python autocoder directory
|
||||
set(PYTHON_AUTOCODER_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE INTERNAL "Directory for Python autocoder")
|
||||
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/src/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/templates/")
|
||||
#TODO-MSTARCH add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/src/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/templates/")
|
||||
#TODO-MSTARCH add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/")
|
||||
|
||||
@ -1 +1 @@
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/fprime_ac/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/fprime_ac/")
|
||||
|
||||
@ -1 +1 @@
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/generators/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/generators/")
|
||||
|
||||
@ -1 +1 @@
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/templates/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/templates/")
|
||||
|
||||
@ -20,7 +20,7 @@ register_fprime_module()
|
||||
|
||||
|
||||
# Add unit test directory
|
||||
##TODO-MSTARCH add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
##TODO-MSTARCH add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
# Sets MODULE_NAME to unique name based on path
|
||||
get_module_name(${CMAKE_CURRENT_LIST_DIR})
|
||||
@ -30,4 +30,4 @@ set_target_properties(
|
||||
${MODULE_NAME}
|
||||
PROPERTIES
|
||||
EXCLUDE_FROM_ALL TRUE
|
||||
)
|
||||
)
|
||||
|
||||
@ -1,62 +1,62 @@
|
||||
# Many unit tests were broken before the switch to cmake
|
||||
# There are also missing dependencies between test cases.
|
||||
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/active_tester")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/active_tester")
|
||||
# Broken topology
|
||||
# add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/app1")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/app2")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/cnt_only")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/command_multi_inst")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/command_res")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/command_string")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/command_tester")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/command1")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/command2")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/comp_diff_namespace")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/comp_no_namespace")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/enum_return_port")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/enum1port")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/event_enum")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/event_multi_inst")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/event_string")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/event_throttle")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/event1")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/event2")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ext_dict")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/interface1")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/log_tester")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/log1")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/main")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/noargport")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/param_enum")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/param_multi_inst")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/param_string")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/param_tester")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/param1")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/param2")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/pass_by_attrib")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/port_loopback")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/port_nogen")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/port_return_type")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/queued1")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serial_passive")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serialize_enum")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serialize_stringbuffer")
|
||||
# add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/app1")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/app2")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/cnt_only")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/command_multi_inst")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/command_res")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/command_string")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/command_tester")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/command1")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/command2")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/comp_diff_namespace")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/comp_no_namespace")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/enum_return_port")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/enum1port")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/event_enum")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/event_multi_inst")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/event_string")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/event_throttle")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/event1")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/event2")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ext_dict")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/interface1")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/log_tester")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/log1")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/main")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/noargport")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/param_enum")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/param_multi_inst")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/param_string")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/param_tester")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/param1")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/param2")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/pass_by_attrib")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/port_loopback")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/port_nogen")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/port_return_type")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/queued1")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serial_passive")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serialize_enum")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serialize_stringbuffer")
|
||||
|
||||
# Template uses a malformed XML file
|
||||
# add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serialize_template")
|
||||
# add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serialize_template")
|
||||
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serialize_user")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serialize1")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serialize2")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serialize3")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/stress")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/string_port")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/telem_tester")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/time_tester")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/tlm_enum")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/tlm_multi_inst")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/tlm_onchange")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/tlm_string")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/tlm1")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/tlm2")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serialize_user")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serialize1")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serialize2")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/serialize3")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/stress")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/string_port")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/telem_tester")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/time_tester")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/tlm_enum")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/tlm_multi_inst")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/tlm_onchange")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/tlm_string")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/tlm1")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/tlm2")
|
||||
|
||||
@ -42,4 +42,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -25,4 +25,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -25,4 +25,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -25,4 +25,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -26,4 +26,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -24,4 +24,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -33,4 +33,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -24,4 +24,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -26,4 +26,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -22,4 +22,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -24,4 +24,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -24,4 +24,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -26,4 +26,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -24,4 +24,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -32,4 +32,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -26,4 +26,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -26,4 +26,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -24,4 +24,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -28,4 +28,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -24,4 +24,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -23,4 +23,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -23,4 +23,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -24,4 +24,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -26,4 +26,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -24,4 +24,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -33,4 +33,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -26,4 +26,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -26,4 +26,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -22,4 +22,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -23,4 +23,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -26,4 +26,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -27,4 +27,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -23,4 +23,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -25,4 +25,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -24,4 +24,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -23,4 +23,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -22,4 +22,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -26,4 +26,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -47,4 +47,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -23,4 +23,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -22,4 +22,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -23,4 +23,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -26,4 +26,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -27,4 +27,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -26,4 +26,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -26,4 +26,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -27,4 +27,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -26,4 +26,4 @@ set_target_properties(
|
||||
)
|
||||
|
||||
# Add unit test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/ut")
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
# Module subdirectories
|
||||
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Checksum/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Checksum/")
|
||||
|
||||
@ -25,4 +25,4 @@ set(UT_MOD_DEPS
|
||||
)
|
||||
register_fprime_ut()
|
||||
# Add GTest directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/GTest")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/GTest")
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Module subdirectories
|
||||
|
||||
# Ports
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/DataTypes/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/DataTypes/")
|
||||
|
||||
# Components
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/BlockDriver/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/BlockDriver/")
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
# Module subdirectories
|
||||
|
||||
# Port subdirectories
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Buffer/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Com/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Cmd/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Log/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Time/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Tlm/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Prm/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Buffer/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Com/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Cmd/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Log/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Time/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Tlm/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Prm/")
|
||||
|
||||
# Framework subdirectories
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Cfg/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ComFile/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Comp/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Obj/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Port/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Types/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FilePacket/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/SerializableFile/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Cfg/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ComFile/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Comp/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Obj/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Port/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Types/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FilePacket/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/SerializableFile/")
|
||||
|
||||
@ -23,7 +23,7 @@ set(MOD_DEPS
|
||||
)
|
||||
register_fprime_module()
|
||||
# Add GTest directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/GTest")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/GTest")
|
||||
|
||||
set(UT_MOD_DEPS
|
||||
Fw/FilePacket/GTest
|
||||
@ -32,4 +32,4 @@ set(UT_MOD_DEPS
|
||||
set(UT_SOURCE_FILES
|
||||
"${CMAKE_CURRENT_LIST_DIR}/test/ut/Main.cpp"
|
||||
)
|
||||
register_fprime_ut()
|
||||
register_fprime_ut()
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
# MOD_DEPS: (optional) module dependencies
|
||||
#
|
||||
####
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/TestSerializable")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/test/TestSerializable")
|
||||
set(SOURCE_FILES
|
||||
"${CMAKE_CURRENT_LIST_DIR}/SerializableFile.cpp"
|
||||
)
|
||||
@ -25,4 +25,4 @@ set(UT_MOD_DEPS
|
||||
"${FPRIME_CORE_DIR}/Utils/Hash"
|
||||
"${FPRIME_CORE_DIR}/Os"
|
||||
)
|
||||
register_fprime_ut()
|
||||
register_fprime_ut()
|
||||
|
||||
@ -32,4 +32,4 @@ set(UT_MOD_DEPS
|
||||
register_fprime_ut()
|
||||
|
||||
# Non-test directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/GTest")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/GTest")
|
||||
|
||||
@ -37,7 +37,7 @@ set(MOD_DEPS
|
||||
register_fprime_module()
|
||||
|
||||
# Add stubs directory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Stubs/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Stubs/")
|
||||
|
||||
### UTS ### Note: 3 separate UTs registered here.
|
||||
set(UT_SOURCE_FILES
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
# This contains the basic project information. Specifically, a cmake version and
|
||||
# project definition.
|
||||
##
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(Ref C CXX)
|
||||
set(CMAKE_BUILD_TYPE DEBUG)
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
##
|
||||
# Section 2: F´ Core
|
||||
@ -48,13 +48,11 @@ include("${CMAKE_CURRENT_LIST_DIR}/../cmake/FPrime.cmake")
|
||||
# This section includes deployment specific directories. This allows use of non-
|
||||
# core components in the topology, which is also added here.
|
||||
##
|
||||
file(RELATIVE_PATH DEPLOY_BINARY_DIR "${FPRIME_CURRENT_BUILD_ROOT}" "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
# Add component subdirectories
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PingReceiver/" "${DEPLOY_BINARY_DIR}/PingReceiver")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/RecvBuffApp/" "${DEPLOY_BINARY_DIR}/RecvBuffApp")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/SendBuffApp/" "${DEPLOY_BINARY_DIR}/SendBuffApp")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/SignalGen/" "${DEPLOY_BINARY_DIR}/SignalGen")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PingReceiver/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/RecvBuffApp/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/SendBuffApp/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/SignalGen/")
|
||||
|
||||
# Add Topology subdirectory
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Top/" "${DEPLOY_BINARY_DIR}/Top")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Top/")
|
||||
|
||||
@ -1,35 +1,35 @@
|
||||
# Module subdirectories
|
||||
|
||||
# Ports
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Cycle/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Fatal/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Ping/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PolyIf/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Sched/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Seq/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/WatchDog/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Cycle/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Fatal/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Ping/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PolyIf/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Sched/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Seq/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/WatchDog/")
|
||||
|
||||
# Components
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ActiveLogger/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ActiveRateGroup/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/AssertFatalAdapter/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/BufferManager/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/BuffGndSockIf/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ComLogger/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/CmdDispatcher/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/CmdSequencer/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FatalHandler/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FileDownlink/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FileManager/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FileUplink/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/GndIf/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Health/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LinuxTime/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PassiveConsoleTextLogger/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PassiveTextLogger/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PolyDb/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PrmDb/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/RateGroupDriver/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/SocketGndIf/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Time/")
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/TlmChan/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ActiveLogger/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ActiveRateGroup/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/AssertFatalAdapter/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/BufferManager/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/BuffGndSockIf/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/ComLogger/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/CmdDispatcher/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/CmdSequencer/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FatalHandler/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FileDownlink/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FileManager/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/FileUplink/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/GndIf/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Health/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LinuxTime/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PassiveConsoleTextLogger/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PassiveTextLogger/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PolyDb/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PrmDb/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/RateGroupDriver/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/SocketGndIf/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Time/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/TlmChan/")
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
# Module subdirectories
|
||||
|
||||
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Hash/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Hash/")
|
||||
|
||||
236
cmake/API.cmake
236
cmake/API.cmake
@ -1,17 +1,69 @@
|
||||
####
|
||||
# API.cmake:
|
||||
#
|
||||
# API of the F prime CMake system. An entry point accessed by users should be exposed here. Thus,
|
||||
# a developer should understand these functions. Here-in, developers can find out how to do the
|
||||
# following tasks:
|
||||
# API of the F prime CMake system. These functions represent the external interface to all of
|
||||
# CMake system. Users and developers should understand these functions in order to perform the
|
||||
# following actions in CMake:
|
||||
#
|
||||
# - Add an F prime subdirectory to the system.
|
||||
# - Register an F prime module (library).
|
||||
# - Register an F prime executable (deployment, other executable).
|
||||
# - Register an F prime unit-test (executable with special dependencies).
|
||||
#
|
||||
# @author mstarch
|
||||
####
|
||||
|
||||
####
|
||||
# register_fprime_module:
|
||||
# Function `add_fprime_subdirectory`:
|
||||
#
|
||||
# Adds a subdirectory to the build system. This allows the system to find new available modules,
|
||||
# executables, and unit tests. Every module, used or not, by the deployment/root CMAKE file should
|
||||
# be added as a subdirectory. CMake's dependency system will prevent superfluous building, and thus
|
||||
# it is inconsequential to add a subdirectory that will not be used.
|
||||
#
|
||||
# Every subdirectory added should declare a `CMakeLists.txt`. These in-turn may add their own sub-
|
||||
# directories. This creates a directed acyclic graph of modules, one subtree of which will be built
|
||||
# for each executable in the system.
|
||||
#
|
||||
# This directory is computed based off the `FPRIME_CURRENT_BUILD_ROOT` variable. It must be set to
|
||||
# be used. Otherwise, an error will occure.
|
||||
#
|
||||
# A user can specify an optional argument to set the build-space, creating a sub-directory under
|
||||
# the `CMAKE_BINARY_DIR` to place the outputs of the builds of this directory. This is typically
|
||||
# **not needed**. `EXCLUDE-FROM-ALL` can also be supplied.
|
||||
# See: https://cmake.org/cmake/help/latest/command/add_fprime_subdirectory.html
|
||||
#
|
||||
# **Note:** Replaces CMake `add_subdirectory` call in order to automate the [binary_dir] argument.
|
||||
# F prime subdirectories have specific binary roots to avoid collisions, and provide for
|
||||
# the standard F prime #include paths rooted at the root of the repo.
|
||||
#
|
||||
# **Arguments:**
|
||||
# - FP_SOURCE_DIR: directory to add (same as add_directory)
|
||||
# - EXCLUDE_FROM_ALL: (optional) exclude any targets from 'all'. See:
|
||||
# https://cmake.org/cmake/help/latest/command/add_fprime_subdirectory.html
|
||||
####
|
||||
function(add_fprime_subdirectory FP_SOURCE_DIR)
|
||||
# Check if the binary and source directory are in agreement. If they agree, then normally add
|
||||
# the directory, as no adjustments need be made.
|
||||
get_filename_component(CBD_NAME "${CMAKE_CURRENT_BINARY_DIR}" NAME)
|
||||
get_filename_component(CSD_NAME "${CMAKE_CURRENT_SOURCE_DIR}" NAME)
|
||||
if ("${CBD_NAME}" STREQUAL "${CSD_NAME}")
|
||||
add_subdirectory(${ARGV})
|
||||
return()
|
||||
endif()
|
||||
# Cannot run without `FPRIME_CURRENT_BUILD_ROOT`
|
||||
if (NOT DEFINED FPRIME_CURRENT_BUILD_ROOT)
|
||||
message(FATAL_ERROR "FPRIME_CURRENT_BUILD_ROOT not defined. Please include 'FPrime.cmake'")
|
||||
elseif (${ARGC} GREATER 2)
|
||||
message(FATAL_ERROR "Cannot use 'add_fprime_subdirectory' with [binary_dir] argument.")
|
||||
endif()
|
||||
file(RELATIVE_PATH NEW_BIN_DIR "${FPRIME_CURRENT_BUILD_ROOT}" "${FP_SOURCE_DIR}")
|
||||
# Add component subdirectories using normal add_subdirectory with overriden binary_dir
|
||||
add_subdirectory("${FP_SOURCE_DIR}" "${NEW_BIN_DIR}" ${ARGN})
|
||||
endfunction(add_fprime_subdirectory)
|
||||
|
||||
####
|
||||
# Function `register_fprime_module`:
|
||||
#
|
||||
# Registers a module using the F prime build system. This comes with dependency management and F
|
||||
# Prime autocoding capabilities. This requires two variables to define the autocoding and source
|
||||
@ -19,8 +71,9 @@
|
||||
#
|
||||
# Required variables (defined in calling scope):
|
||||
#
|
||||
# ```
|
||||
# SOURCE_FILES - cmake list of input source files. Place any "*Ai.xml", "*.txt, "*.c", "*.cpp"
|
||||
# etc. files here. This list will be split into autocoder inputs or sources.
|
||||
# etc files here. This list will be split into autocoder inputs or sources.
|
||||
#
|
||||
# i.e. set(SOURCE_FILES
|
||||
# MyComponentAi.xml
|
||||
@ -35,13 +88,68 @@
|
||||
# Module1
|
||||
# Module2
|
||||
# -lpthread)
|
||||
# ```
|
||||
#
|
||||
# Note: if desired, these fields may be supplied in-order as arguments to the function. Passing
|
||||
# these as positional arguments overrides any specified in the parent scope.
|
||||
#
|
||||
# TODO: EXAMPLES.
|
||||
# **Note:** if desired, these fields may be supplied in-order as arguments to the function. Passing
|
||||
# these as positional arguments overrides any specified in the parent scope.
|
||||
#
|
||||
#
|
||||
# ### Standard Module Example ###
|
||||
#
|
||||
# Standard modules don't require extra modules, and define both autocoder inputs and standard source
|
||||
# files. Thus, only the SOURCE_FILE variable needs to be set and then the register call can be made.
|
||||
# This is the only required lines in a module CMakeLists.txt.
|
||||
#
|
||||
# ```
|
||||
# set(SOURCE_FILE
|
||||
# MyComponentAi.xml
|
||||
# SomeFile.cpp
|
||||
# MyComponentImpl.cpp)
|
||||
#
|
||||
# register_fprime_module()
|
||||
# ```
|
||||
#
|
||||
# ### Non-Autocoded and Autocode-Only Modules Example ###
|
||||
#
|
||||
# Modules that do not require autocoding need not specify *.xml and *.txt files as source. Thus,
|
||||
# code-only modules just define *.cpp.
|
||||
#
|
||||
# ```
|
||||
# set(SOURCE_FILE
|
||||
# SomeFile1.cpp
|
||||
# Another2.cpp)
|
||||
#
|
||||
# register_fprime_module()
|
||||
# ```
|
||||
# Modules requiring only autocoding can just specify *.xml and *.txt files.
|
||||
#
|
||||
# ```
|
||||
# set(SOURCE_FILE
|
||||
# MyComponentAi.xml)
|
||||
#
|
||||
# register_fprime_module()
|
||||
# ```
|
||||
#
|
||||
# ### Specific Dependencies and Linking in Modules Example ###
|
||||
#
|
||||
# Some modules need to pick a specific set of dependencies and ling flags. This can be done
|
||||
# with the `MOD_DEPS` variable. This feature can be used to pick specific implementations
|
||||
# for some F prime modules.
|
||||
#
|
||||
# ```
|
||||
# set(SOURCE_FILE
|
||||
# MyComponentAi.xml
|
||||
# SomeFile.cpp
|
||||
# MyComponentImpl.cpp)
|
||||
#
|
||||
# set(MOD_DEPS
|
||||
# Module1
|
||||
# -lpthread)
|
||||
#
|
||||
# register_fprime_module()
|
||||
# ```
|
||||
#
|
||||
####
|
||||
function(register_fprime_module)
|
||||
# SOURCE_FILES is supplied as the first positional -OR- as the list 'SOURCE_FILES'
|
||||
if (${ARGC} GREATER 0)
|
||||
@ -64,7 +172,7 @@ function(register_fprime_module)
|
||||
endfunction(register_fprime_module)
|
||||
|
||||
####
|
||||
# register_fprime_executable:
|
||||
# Function `register_fprime_executable`:
|
||||
#
|
||||
# Registers an executable using the F prime build system. This comes with dependency management and
|
||||
# F Prime autocoding capabilities. This requires three variables to define the executable name,
|
||||
@ -72,6 +180,7 @@ endfunction(register_fprime_module)
|
||||
#
|
||||
# Required variables (defined in calling scope):
|
||||
#
|
||||
# ```
|
||||
# EXECUTABLE_NAME - (optional) executable name supplied. If not supplied, or passed in, then
|
||||
# PROJECT_NAME from the CMake definitions is used.
|
||||
#
|
||||
@ -91,13 +200,55 @@ endfunction(register_fprime_module)
|
||||
# Module1
|
||||
# Module2
|
||||
# -lpthread)
|
||||
# ```
|
||||
#
|
||||
# Note: if desired, these fields may be supplied in-order as arguments to the function. Passing
|
||||
# these as positional arguments overrides any specified in the parent scope.
|
||||
#
|
||||
# TODO: EXAMPLES.
|
||||
# ### Standard F Prime Deployment Example ###
|
||||
#
|
||||
# To create a standard F prime deployment, an executable needs to be created. This executable
|
||||
# uses the CMake PROJECT_NAME as the executable name. Thus, it can be created with the following
|
||||
# source lists. In most F prime deployments, some modules must be specified as they don't tie
|
||||
# directly to an Ai.xml.
|
||||
#
|
||||
# ```
|
||||
# set(SOURCE_FILES
|
||||
# "${CMAKE_CURRENT_LIST_DIR}/RefTopologyAppAi.xml"
|
||||
# "${CMAKE_CURRENT_LIST_DIR}/Topology.cpp"
|
||||
# "${CMAKE_CURRENT_LIST_DIR}/Main.cpp"
|
||||
# )
|
||||
# # Note: supply non-explicit dependencies here. These are implementations to an XML that is
|
||||
# # defined in a different module.
|
||||
# set(MOD_DEPS
|
||||
# Svc/PassiveConsoleTextLogger
|
||||
# Svc/SocketGndIf
|
||||
# Svc/LinuxTime
|
||||
# )
|
||||
# register_fprime_executable()
|
||||
# ```
|
||||
# ### F Prime Executable With Autocoding/Dependencies ###
|
||||
#
|
||||
# Developers can make executables or other utilites that take advantage of F prime autocoding
|
||||
# and F prime dependencies. These can be registered using the same executable registrar function
|
||||
# but should specify a specific executable name.
|
||||
#
|
||||
# ```
|
||||
# set(EXECUTABLE_NAME "MyUtitlity")
|
||||
#
|
||||
# set(SOURCE_FILES
|
||||
# "${CMAKE_CURRENT_LIST_DIR)/ModuleAi.xml"
|
||||
# "${CMAKE_CURRENT_LIST_DIR}/Main.cpp"
|
||||
# )
|
||||
# set(MOD_DEPS
|
||||
# Svc/LinuxTime
|
||||
# -lm
|
||||
# -lpthread
|
||||
# )
|
||||
# register_fprime_executable()
|
||||
# ```
|
||||
#
|
||||
####
|
||||
function(register_fprime_executable)
|
||||
# PROJECT_NAME is used for the executable name, unless otherwise specified.
|
||||
if (${ARGC} GREATER 0)
|
||||
@ -129,19 +280,19 @@ function(register_fprime_executable)
|
||||
generate_executable("${EX_NAME}" "${SC_IFS}" "${MD_IFS}")
|
||||
endfunction(register_fprime_executable)
|
||||
|
||||
|
||||
####
|
||||
# register_fprime_ut:
|
||||
# Function `register_fprime_ut`:
|
||||
#
|
||||
# Registers an executable unit-test using the F prime build system. This comes with dependency
|
||||
# management and F Prime autocoding capabilities. This requires five variables to define the unit
|
||||
# test name, autocoding and source inputs for the unit test, and (optionally) any non-standard
|
||||
# link dependencies.
|
||||
# management and F Prime autocoding capabilities. This requires three variables defining the
|
||||
# unit test name, autocoding and source inputs for the unit test, and (optionally) any
|
||||
# non-standard link dependencies.
|
||||
#
|
||||
# Note: This is ONLY run when the platform sets UT_BUILD to TRUE
|
||||
# **Note:** This is ONLY run when the platform sets UT_BUILD to TRUE
|
||||
#
|
||||
# Required variables (defined in calling scope):
|
||||
#
|
||||
# ```
|
||||
# UT_NAME - (optional) executable name supplied. If not supplied, or passed in, then
|
||||
# the module name _exe will be used.
|
||||
#
|
||||
@ -163,19 +314,50 @@ endfunction(register_fprime_executable)
|
||||
# Module1
|
||||
# Module2
|
||||
# -lpthread)
|
||||
# ```
|
||||
#
|
||||
# Note: if desired, these fields may be supplied in-order as arguments to the function. Passing
|
||||
# these as positional arguments overrides any specified in the parent scope.
|
||||
# **Note:** if desired, these fields may be supplied in-order as arguments to the function. Passing
|
||||
# these as positional arguments overrides any specified in the parent scope.
|
||||
#
|
||||
# Note: UTs automaitcally depend on the module. In order to prevent this, explicitly pass in args
|
||||
# to this module, excluding the module.
|
||||
# **Note:** UTs automaitcally depend on the module. In order to prevent this, explicitly pass in args
|
||||
# to this module, excluding the module.
|
||||
#
|
||||
# e.g.
|
||||
# register_fprime_ut("MY_SPECIAL_UT" "${SOME_SOURCE_FILE_LIST}" "") #No dependenices.
|
||||
# e.g. register_fprime_ut("MY_SPECIAL_UT" "${SOME_SOURCE_FILE_LIST}" "") #No dependenices.
|
||||
#
|
||||
# TODO: EXAMPLES.
|
||||
# ### Unit-Test Example ###
|
||||
#
|
||||
# A standard unit test defines only UT_SOURCES. These sources have the test cpp files and the module
|
||||
# Ai.xml of the module being tested. This is used to generate the GTest and TesterBase files from this
|
||||
# Ai.xml. The other UT source files define the implementation of the test.
|
||||
#
|
||||
# ```
|
||||
# set(UT_SOURCE_FILES
|
||||
# "${FPRIME_CORE_DIR}/Svc/CmdDispatcher/CommandDispatcherComponentAi.xml"
|
||||
# "${CMAKE_CURRENT_LIST_DIR}/test/ut/CommandDispatcherTester.cpp"
|
||||
# "${CMAKE_CURRENT_LIST_DIR}/test/ut/CommandDispatcherImplTester.cpp"
|
||||
# )
|
||||
# register_fprime_ut()
|
||||
# ```
|
||||
#
|
||||
# ### Unit-Test Without GTest/TesterBase Example ###
|
||||
#
|
||||
# Some unit tests run without the need for the autocoding the GTest and TesterBase files. This can be
|
||||
# done without specifying the Ai.xml file. Most of the time, this style requires specifying some module
|
||||
# dependencies.
|
||||
#
|
||||
# ```
|
||||
# set(UT_SOURCE_FILES
|
||||
# "${FPRIME_CORE_DIR}/Svc/CmdDispatcher/CommandDispatcherComponentAi.xml"
|
||||
# "${CMAKE_CURRENT_LIST_DIR}/test/ut/CommandDispatcherTester.cpp"
|
||||
# "${CMAKE_CURRENT_LIST_DIR}/test/ut/CommandDispatcherImplTester.cpp"
|
||||
# )
|
||||
# set(UT_MOD_DEPS
|
||||
# Os
|
||||
# )
|
||||
# register_fprime_ut()
|
||||
# ```
|
||||
#
|
||||
####
|
||||
function(register_fprime_ut)
|
||||
#### CHECK UT BUILD ####
|
||||
if (NOT UT_BUILD)
|
||||
@ -218,3 +400,9 @@ function(register_fprime_ut)
|
||||
generate_ut("${UT_NAME}" "${SC_IFS}" "${MD_IFS}")
|
||||
endfunction(register_fprime_ut)
|
||||
|
||||
#### Documentation links
|
||||
# Next Topics:
|
||||
# - Options: [Options.md](Options.md) describes the CMake system options to change build options.
|
||||
# - Toolchains: [toolchain.md](toolchain.md) describes CMake cross-compile toolchain setup.
|
||||
# - Platforms: [platform.md](platform.md) describes the F prime specific platform settings.
|
||||
####
|
||||
|
||||
@ -1,44 +1,94 @@
|
||||
####
|
||||
# Options:
|
||||
# Command Line Options:
|
||||
#
|
||||
# Options used to configure F prime's CMake system. These options control various actions available
|
||||
# in the CMake system to help users achieve specific results. Each Option added *must* supply a
|
||||
# sensible default, comment defining the behaviro, and should be ON/OFF as is common with CMake
|
||||
# options.
|
||||
# in the CMake system to help users achieve specific results. Each options has a sensible default
|
||||
# such that the user need not worry about specifing each correctly.
|
||||
#
|
||||
# Typically a user need not specified any of the options to build F prime, however; when
|
||||
# non-standard build behavior is desired, then these options can be used. These options are
|
||||
# specified with the -D<OPTION>=<VALUE> flag. Usually the value is "ON" or "OFF". Other values are
|
||||
# noted if the option differs.
|
||||
|
||||
# **Non-standard behavior:**
|
||||
#
|
||||
# - Build with build system debigging messages
|
||||
# - Generate autocoding files in-source
|
||||
# - Build and link with shared libraries
|
||||
# - Generate heritage python dictionaries
|
||||
# - Manually specify the build platform
|
||||
#
|
||||
# @author mstarch
|
||||
####
|
||||
|
||||
####
|
||||
# CMAKE_DEBUG_OUTPUT:
|
||||
# `CMAKE_DEBUG_OUTPUT:`
|
||||
#
|
||||
# Turns on the reporting of debug output of the CMake build. Can help refine the CMake system,
|
||||
# and repair errors. For normal usage, this is not necessary.
|
||||
#
|
||||
# **Values:**
|
||||
# - ON: generate debugging output
|
||||
# - OFF: (default) do *not* generate debugging output
|
||||
#
|
||||
# e.g. `-DCMAKE_DEBUG_OUTPUT=ON`
|
||||
####
|
||||
option(CMAKE_DEBUG_OUTPUT "Generate F prime's debug output while running CMake" OFF)
|
||||
|
||||
####
|
||||
# GENERATE_AC_IN_SOURCE:
|
||||
# `GENERATE_AC_IN_SOURCE:`
|
||||
#
|
||||
# Allows for generating auto-coded files in the source tree. Typically, this is frowned upon as
|
||||
# this prevents using F prime as a library. However, this is necessary to support historic
|
||||
# project development practices.
|
||||
#
|
||||
# **WARNING:** due to the limitations of the autocoder, currently the CMake system generates
|
||||
# in-source and moves the files out.
|
||||
#
|
||||
# **Values:**
|
||||
# - ON: generate auto-coding files in source-tree.
|
||||
# - OFF: (default) generate auto-coding files in the build-tree.
|
||||
#
|
||||
# e.g. `-DGENERATE_AC_IN_SOURCE=ON`
|
||||
####
|
||||
option(GENERATE_AC_IN_SOURCE "Ac.cpp and Ac.hpp are placed with source files." OFF)
|
||||
|
||||
####
|
||||
# LINK_AS_SHARED_LIBS:
|
||||
# `LINK_AS_SHARED_LIBS:`
|
||||
#
|
||||
# This option swiches the default link option from static linkage to using a shared-object linkage.
|
||||
# It implies that instead of static archive files, shared objects will be generated instead. This
|
||||
# will mean smaller binaries, and partial-updates but implies less rigorous control over the
|
||||
# runtime behavior.
|
||||
# It implies that instead of static archive files, shared objects will be built instead. This will
|
||||
# mean smaller binaries, partial-updates are possible, and more rigorous project process must be
|
||||
# used.
|
||||
#
|
||||
# **Values:**
|
||||
# - ON: generate shared libraries with shared-linkage.
|
||||
# - OFF: (default) generate static libraries with static-linkage.
|
||||
#
|
||||
# e.g. `-DLINK_AS_SHARED_LIBS=ON`
|
||||
####
|
||||
option(LINK_AS_SHARED_LIBS "Link F prime with shared libraries." OFF)
|
||||
|
||||
####
|
||||
# GENERATE_HERITAGE_PY_DICT:
|
||||
# `GENERATE_HERITAGE_PY_DICT:`
|
||||
#
|
||||
# This option switches from generating XML dictionaries to generating the heritage python
|
||||
# dictionatries. This enables backward compatible use with the older Tk GUI and other tools that
|
||||
# use python fragment dictionaries.
|
||||
#
|
||||
# **Values:**
|
||||
# - ON: generate python dictionaries.
|
||||
# - OFF: (default) generate XML dictionaries.
|
||||
#
|
||||
# e.g. `-DGENERATE_HERITAGE_PY_DICT=ON`
|
||||
####
|
||||
option(GENERATE_HERITAGE_PY_DICT "Generate F prime python dictionaries instead of XML based dictionaries." OFF)
|
||||
|
||||
# Note: document other system options here.
|
||||
|
||||
####
|
||||
# `PLATFORM:`
|
||||
#
|
||||
# Specifies the platform used when building the F prime using the CMake system. See:
|
||||
# [platform.md](platform.md) for more information.
|
||||
####
|
||||
@ -9,6 +9,9 @@ Since this CMake system ships along-side the original make system, certain cavea
|
||||
These caveats should disappear after CMake replaces the original make system in its entirety
|
||||
|
||||
Installation guides for CMake can be found here: [https://cmake.org/install/](https://cmake.org/install/).
|
||||
|
||||
Further user documentation can be found in API.md: [API.md](docs/API.md)
|
||||
|
||||
Further documentation can be found in the SDD: [SDD.md](docs/sdd.md)
|
||||
|
||||
### CMakes Caveats
|
||||
|
||||
53
cmake/deployment-CMakeLists.txt.template
Normal file
53
cmake/deployment-CMakeLists.txt.template
Normal file
@ -0,0 +1,53 @@
|
||||
####
|
||||
# Deployment 'CMakeLists.txt':
|
||||
#
|
||||
# F prime deployments setup the most basic CMake settings, include the F prime build system, list
|
||||
# deployment specific module includes, and define the executable that represents the executable.
|
||||
# The F prime build system include step implicitly includes access to the F prime core components.
|
||||
# Listing the deployment specific module directories brings in access to the depoyment's modules,
|
||||
# and the
|
||||
####
|
||||
|
||||
##
|
||||
# Section 1: Basic Project Setup
|
||||
#
|
||||
# This contains the basic project information. Specifically, a cmake version and
|
||||
# project definition.
|
||||
##
|
||||
project(Ref C CXX)
|
||||
set(CMAKE_BUILD_TYPE DEBUG)
|
||||
|
||||
##
|
||||
# Section 2: F´ Core
|
||||
#
|
||||
# This includes all of the F´ core components, and imports the make-system. F´ core
|
||||
# components will be placed in the F-Prime binary subdirectory to keep them from
|
||||
# colliding with deployment specific items.
|
||||
##
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/FPrime.cmake")
|
||||
|
||||
# Note: when building a deployment outside of the F´ core directories, then the
|
||||
# build root must be re-mapped for use with the standard build system components.
|
||||
#
|
||||
# In this way, the module names can be predicted as an offset from the (new) build
|
||||
# root, without breaking the standard locations of F´.
|
||||
#
|
||||
# Uncomment the following lines, and set them to the BUILD_ROOT of your deployment,
|
||||
# which is typically one directory up from the CMakeLists.txt in the deployment dir.
|
||||
#set(FPRIME_CURRENT_BUILD_ROOT "${CMAKE_CURRENT_LIST_DIR}/..")
|
||||
#message(STATUS "F´ BUILD_ROOT currently set to: ${FPRIME_CURRENT_BUILD_ROOT}")
|
||||
|
||||
##
|
||||
# Section 3: Components and Topology
|
||||
#
|
||||
# This section includes deployment specific directories. This allows use of non-
|
||||
# core components in the topology, which is also added here.
|
||||
##
|
||||
# Add component subdirectories
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/PingReceiver/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/RecvBuffApp/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/SendBuffApp/")
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/SignalGen/")
|
||||
|
||||
# Add Topology subdirectory
|
||||
add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Top/")
|
||||
265
cmake/docs/API.md
Normal file
265
cmake/docs/API.md
Normal file
@ -0,0 +1,265 @@
|
||||
**Note:** auto-generated from comments in: ../API.cmake
|
||||
|
||||
## API.cmake:
|
||||
|
||||
API of the F prime CMake system. These functions represent the external interface to all of
|
||||
CMake system. Users and developers should understand these functions in order to perform the
|
||||
following actions in CMake:
|
||||
|
||||
- Register an F prime module (library).
|
||||
- Register an F prime executable (deployment, other executable).
|
||||
- Register an F prime unit-test (executable with special dependencies).
|
||||
|
||||
@author mstarch
|
||||
|
||||
|
||||
## Function `register_fprime_module`:
|
||||
|
||||
Registers a module using the F prime build system. This comes with dependency management and F
|
||||
Prime autocoding capabilities. This requires two variables to define the autocoding and source
|
||||
inputs, and (optionally) any non-standard link dependencies.
|
||||
|
||||
Required variables (defined in calling scope):
|
||||
|
||||
```
|
||||
SOURCE_FILES - cmake list of input source files. Place any "*Ai.xml", "*.txt, "*.c", "*.cpp"
|
||||
etc files here. This list will be split into autocoder inputs or sources.
|
||||
|
||||
i.e. set(SOURCE_FILES
|
||||
MyComponentAi.xml
|
||||
SomeFile.cpp
|
||||
MyComponentImpl.cpp)
|
||||
|
||||
MOD_DEPS - (optional) cmake list of extra link dependencies. This is optional, and only needed
|
||||
if non-standard link dependencies are used. If not set or supplied, only F prime
|
||||
detectable dependencies will be available. Link flags like "-lpthread" can be here.
|
||||
|
||||
i.e. set(LINK_DEPS
|
||||
Module1
|
||||
Module2
|
||||
-lpthread)
|
||||
```
|
||||
|
||||
**Note:** if desired, these fields may be supplied in-order as arguments to the function. Passing
|
||||
these as positional arguments overrides any specified in the parent scope.
|
||||
|
||||
|
||||
### Standard Module Example ###
|
||||
|
||||
Standard modules don't require extra modules, and define both autocoder inputs and standard source
|
||||
files. Thus, only the SOURCE_FILE variable needs to be set and then the register call can be made.
|
||||
This is the only required lines in a module CMakeLists.txt.
|
||||
|
||||
```
|
||||
set(SOURCE_FILE
|
||||
MyComponentAi.xml
|
||||
SomeFile.cpp
|
||||
MyComponentImpl.cpp)
|
||||
|
||||
register_fprime_module()
|
||||
```
|
||||
|
||||
### Non-Autocoded and Autocode-Only Modules Example ###
|
||||
|
||||
Modules that do not require autocoding need not specify *.xml and *.txt files as source. Thus,
|
||||
code-only modules just define *.cpp.
|
||||
|
||||
```
|
||||
set(SOURCE_FILE
|
||||
SomeFile1.cpp
|
||||
Another2.cpp)
|
||||
|
||||
register_fprime_module()
|
||||
```
|
||||
Modules requiring only autocoding can just specify *.xml and *.txt files.
|
||||
|
||||
```
|
||||
set(SOURCE_FILE
|
||||
MyComponentAi.xml)
|
||||
|
||||
register_fprime_module()
|
||||
```
|
||||
|
||||
### Specific Dependencies and Linking in Modules Example ###
|
||||
|
||||
Some modules need to pick a specific set of dependencies and ling flags. This can be done
|
||||
with the `MOD_DEPS` variable. This feature can be used to pick specific implementations
|
||||
for some F prime modules.
|
||||
|
||||
```
|
||||
set(SOURCE_FILE
|
||||
MyComponentAi.xml
|
||||
SomeFile.cpp
|
||||
MyComponentImpl.cpp)
|
||||
|
||||
set(MOD_DEPS
|
||||
Module1
|
||||
-lpthread)
|
||||
|
||||
register_fprime_module()
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Function `register_fprime_executable`:
|
||||
|
||||
Registers an executable using the F prime build system. This comes with dependency management and
|
||||
F Prime autocoding capabilities. This requires three variables to define the executable name,
|
||||
autocoding and source inputs, and (optionally) any non-standard link dependencies.
|
||||
|
||||
Required variables (defined in calling scope):
|
||||
|
||||
```
|
||||
EXECUTABLE_NAME - (optional) executable name supplied. If not supplied, or passed in, then
|
||||
PROJECT_NAME from the CMake definitions is used.
|
||||
|
||||
SOURCE_FILES - cmake list of input source files. Place any "*Ai.xml", "*.txt, "*.c", "*.cpp"
|
||||
etc. files here. This list will be split into autocoder inputs or sources.
|
||||
|
||||
i.e. set(SOURCE_FILES
|
||||
MyComponentAi.xml
|
||||
SomeFile.cpp
|
||||
MyComponentImpl.cpp)
|
||||
|
||||
MOD_DEPS - (optional) cmake list of extra link dependencies. This is optional, and only needed
|
||||
if non-standard link dependencies are used. If not set or supplied, only F prime
|
||||
detectable dependencies will be available. Link flags like "-lpthread" can be here.
|
||||
|
||||
i.e. set(LINK_DEPS
|
||||
Module1
|
||||
Module2
|
||||
-lpthread)
|
||||
```
|
||||
|
||||
Note: if desired, these fields may be supplied in-order as arguments to the function. Passing
|
||||
these as positional arguments overrides any specified in the parent scope.
|
||||
|
||||
### Standard F Prime Deployment Example ###
|
||||
|
||||
To create a standard F prime deployment, an executable needs to be created. This executable
|
||||
uses the CMake PROJECT_NAME as the executable name. Thus, it can be created with the following
|
||||
source lists. In most F prime deployments, some modules must be specified as they don't tie
|
||||
directly to an Ai.xml.
|
||||
|
||||
```
|
||||
set(SOURCE_FILES
|
||||
"${CMAKE_CURRENT_LIST_DIR}/RefTopologyAppAi.xml"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Topology.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Main.cpp"
|
||||
)
|
||||
# Note: supply non-explicit dependencies here. These are implementations to an XML that is
|
||||
# defined in a different module.
|
||||
set(MOD_DEPS
|
||||
Svc/PassiveConsoleTextLogger
|
||||
Svc/SocketGndIf
|
||||
Svc/LinuxTime
|
||||
)
|
||||
register_fprime_executable()
|
||||
```
|
||||
### F Prime Executable With Autocoding/Dependencies ###
|
||||
|
||||
Developers can make executables or other utilites that take advantage of F prime autocoding
|
||||
and F prime dependencies. These can be registered using the same executable registrar function
|
||||
but should specify a specific executable name.
|
||||
|
||||
```
|
||||
set(EXECUTABLE_NAME "MyUtitlity")
|
||||
|
||||
set(SOURCE_FILES
|
||||
"${CMAKE_CURRENT_LIST_DIR)/ModuleAi.xml"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/Main.cpp"
|
||||
)
|
||||
set(MOD_DEPS
|
||||
Svc/LinuxTime
|
||||
-lm
|
||||
-lpthread
|
||||
)
|
||||
register_fprime_executable()
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Function `register_fprime_ut`:
|
||||
|
||||
Registers an executable unit-test using the F prime build system. This comes with dependency
|
||||
management and F Prime autocoding capabilities. This requires three variables defining the
|
||||
unit test name, autocoding and source inputs for the unit test, and (optionally) any
|
||||
non-standard link dependencies.
|
||||
|
||||
**Note:** This is ONLY run when the platform sets UT_BUILD to TRUE
|
||||
|
||||
Required variables (defined in calling scope):
|
||||
|
||||
```
|
||||
UT_NAME - (optional) executable name supplied. If not supplied, or passed in, then
|
||||
the module name _exe will be used.
|
||||
|
||||
UT_SOURCE_FILES - cmake list of UT source files. Place any "*Ai.xml", "*.txt, "*.c", "*.cpp"
|
||||
etc. files here. This list will be split into autocoder inputs or sources.
|
||||
It is only used when building this specific unit test target.
|
||||
|
||||
i.e. set(SOURCE_FILES
|
||||
MyComponentAi.xml
|
||||
SomeFile.cpp
|
||||
MyComponentImpl.cpp)
|
||||
|
||||
UT_MOD_DEPS - (optional) cmake list of extra link dependencies. This is optional, and only
|
||||
needed if non-standard link dependencies are used. If not set or supplied, only
|
||||
F prime detectable dependencies will be available. Link flags like "-lpthread"
|
||||
can be here.
|
||||
|
||||
i.e. set(LINK_DEPS
|
||||
Module1
|
||||
Module2
|
||||
-lpthread)
|
||||
```
|
||||
|
||||
**Note:** if desired, these fields may be supplied in-order as arguments to the function. Passing
|
||||
these as positional arguments overrides any specified in the parent scope.
|
||||
|
||||
**Note:** UTs automaitcally depend on the module. In order to prevent this, explicitly pass in args
|
||||
to this module, excluding the module.
|
||||
|
||||
e.g. register_fprime_ut("MY_SPECIAL_UT" "${SOME_SOURCE_FILE_LIST}" "") #No dependenices.
|
||||
|
||||
### Unit-Test Example ###
|
||||
|
||||
A standard unit test defines only UT_SOURCES. These sources have the test cpp files and the module
|
||||
Ai.xml of the module being tested. This is used to generate the GTest and TesterBase files from this
|
||||
Ai.xml. The other UT source files define the implementation of the test.
|
||||
|
||||
```
|
||||
set(UT_SOURCE_FILES
|
||||
"${FPRIME_CORE_DIR}/Svc/CmdDispatcher/CommandDispatcherComponentAi.xml"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/test/ut/CommandDispatcherTester.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/test/ut/CommandDispatcherImplTester.cpp"
|
||||
)
|
||||
register_fprime_ut()
|
||||
```
|
||||
|
||||
### Unit-Test Without GTest/TesterBase Example ###
|
||||
|
||||
Some unit tests run without the need for the autocoding the GTest and TesterBase files. This can be
|
||||
done without specifying the Ai.xml file. Most of the time, this style requires specifying some module
|
||||
dependencies.
|
||||
|
||||
```
|
||||
set(UT_SOURCE_FILES
|
||||
"${FPRIME_CORE_DIR}/Svc/CmdDispatcher/CommandDispatcherComponentAi.xml"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/test/ut/CommandDispatcherTester.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/test/ut/CommandDispatcherImplTester.cpp"
|
||||
)
|
||||
set(UT_MOD_DEPS
|
||||
Os
|
||||
)
|
||||
register_fprime_ut()
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Next Topics:
|
||||
- Options: [Options.md](Options.md) describes the CMake system options to change build options.
|
||||
- Toolchains: [toolchain.md](toolchain.md) describes CMake cross-compile toolchain setup.
|
||||
- Platforms: [platform.md](platform.md) describes the F prime specific platform settings.
|
||||
|
||||
|
||||
85
cmake/docs/Options.md
Normal file
85
cmake/docs/Options.md
Normal file
@ -0,0 +1,85 @@
|
||||
**Note:** auto-generated from comments in: ../Options.cmake
|
||||
|
||||
## Command Line Options:
|
||||
|
||||
Options used to configure F prime's CMake system. These options control various actions available
|
||||
in the CMake system to help users achieve specific results. Each options has a sensible default
|
||||
such that the user need not worry about specifing each correctly.
|
||||
|
||||
Typically a user need not specified any of the options to build F prime, however; when
|
||||
non-standard build behavior is desired, then these options can be used. These options are
|
||||
specified with the -D<OPTION>=<VALUE> flag. Usually the value is "ON" or "OFF". Other values are
|
||||
noted if the option differs.
|
||||
|
||||
**Non-standard behavior:**
|
||||
|
||||
- Build with build system debigging messages
|
||||
- Generate autocoding files in-source
|
||||
- Build and link with shared libraries
|
||||
- Generate heritage python dictionaries
|
||||
- Manually specify the build platform
|
||||
|
||||
@author mstarch
|
||||
|
||||
|
||||
## `CMAKE_DEBUG_OUTPUT:`
|
||||
|
||||
Turns on the reporting of debug output of the CMake build. Can help refine the CMake system,
|
||||
and repair errors. For normal usage, this is not necessary.
|
||||
|
||||
**Values:**
|
||||
- ON: generate debugging output
|
||||
- OFF: (default) do *not* generate debugging output
|
||||
|
||||
e.g. `-DCMAKE_DEBUG_OUTPUT=ON`
|
||||
|
||||
|
||||
## `GENERATE_AC_IN_SOURCE:`
|
||||
|
||||
Allows for generating auto-coded files in the source tree. Typically, this is frowned upon as
|
||||
this prevents using F prime as a library. However, this is necessary to support historic
|
||||
project development practices.
|
||||
|
||||
**WARNING:** due to the limitations of the autocoder, currently the CMake system generates
|
||||
in-source and moves the files out.
|
||||
|
||||
**Values:**
|
||||
- ON: generate auto-coding files in source-tree.
|
||||
- OFF: (default) generate auto-coding files in the build-tree.
|
||||
|
||||
e.g. `-DGENERATE_AC_IN_SOURCE=ON`
|
||||
|
||||
|
||||
## `LINK_AS_SHARED_LIBS:`
|
||||
|
||||
This option swiches the default link option from static linkage to using a shared-object linkage.
|
||||
It implies that instead of static archive files, shared objects will be built instead. This will
|
||||
mean smaller binaries, partial-updates are possible, and more rigorous project process must be
|
||||
used.
|
||||
|
||||
**Values:**
|
||||
- ON: generate shared libraries with shared-linkage.
|
||||
- OFF: (default) generate static libraries with static-linkage.
|
||||
|
||||
e.g. `-DLINK_AS_SHARED_LIBS=ON`
|
||||
|
||||
|
||||
## `GENERATE_HERITAGE_PY_DICT:`
|
||||
|
||||
This option switches from generating XML dictionaries to generating the heritage python
|
||||
dictionatries. This enables backward compatible use with the older Tk GUI and other tools that
|
||||
use python fragment dictionaries.
|
||||
|
||||
**Values:**
|
||||
- ON: generate python dictionaries.
|
||||
- OFF: (default) generate XML dictionaries.
|
||||
|
||||
e.g. `-DGENERATE_HERITAGE_PY_DICT=ON`
|
||||
|
||||
|
||||
## `PLATFORM:`
|
||||
|
||||
Specifies the platform used when building the F prime using the CMake system. See:
|
||||
[platform.md](platform.md) for more information.
|
||||
|
||||
|
||||
79
cmake/docs/docs.py
Executable file
79
cmake/docs/docs.py
Executable file
@ -0,0 +1,79 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
docs.py:
|
||||
|
||||
Generate CMake documentation as *.md files. This removes CMake code, and replaces the
|
||||
comments with simple GitHub Markdown. It looks for blocks following the pattern:
|
||||
|
||||
```
|
||||
####
|
||||
# <documentation ...>
|
||||
# <documentation ...>
|
||||
# ...
|
||||
####
|
||||
```
|
||||
|
||||
@author mstarch
|
||||
"""
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import enum
|
||||
|
||||
LINE_RE = re.compile(r"^#{1,4} ?")
|
||||
|
||||
class DocState(enum.IntEnum):
|
||||
"""
|
||||
Holds the documentation generation states.
|
||||
"""
|
||||
SEARCH = 0
|
||||
HEADER = 1
|
||||
CLOSING = 2
|
||||
|
||||
|
||||
def main():
|
||||
"""
|
||||
Main function used to run this program.
|
||||
"""
|
||||
if len(sys.argv) < 2:
|
||||
print("[ERROR] Please supply a *.cmake file to generate documentation.",
|
||||
file=sys.stderr)
|
||||
sys.exit(1)
|
||||
# Read a line, and output it
|
||||
out_fn = os.path.basename(sys.argv[1])
|
||||
if out_fn == "CMakeLists.txt":
|
||||
out_fn = os.path.basename(os.path.dirname(sys.argv[1]))
|
||||
out_fn = out_fn.replace(".cmake", "") + ".md"
|
||||
|
||||
# Open both files, and loop over all the lines reading and writing each
|
||||
with open(sys.argv[1], "r") as in_file_handle:
|
||||
with open(out_fn, "w") as out_file_handle:
|
||||
state = DocState.SEARCH
|
||||
next_state = DocState.SEARCH
|
||||
out_file_handle.write("**Note:** auto-generated from comments in: {0}\n\n"
|
||||
.format(sys.argv[1]))
|
||||
for line in in_file_handle.readlines():
|
||||
state = next_state
|
||||
next_state = state
|
||||
# If we see '####' the next state changes
|
||||
if line.startswith("####") and state == DocState.SEARCH:
|
||||
next_state = DocState.HEADER
|
||||
elif line.startswith("####"):
|
||||
next_state = DocState.SEARCH
|
||||
line = LINE_RE.sub("", line).rstrip()
|
||||
#print("State: ", state, "Next State:", next_state)
|
||||
#print(line)
|
||||
# Now output, if not searching, and not blank and not searching
|
||||
if next_state == DocState.SEARCH:
|
||||
if state == DocState.CLOSING:
|
||||
out_file_handle.write("\n\n")
|
||||
continue
|
||||
if next_state == DocState.HEADER:
|
||||
out_file_handle.write("## ")
|
||||
next_state = DocState.CLOSING # Header printed
|
||||
continue
|
||||
out_file_handle.write(line)
|
||||
out_file_handle.write("\n")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
54
cmake/docs/platform.md
Normal file
54
cmake/docs/platform.md
Normal file
@ -0,0 +1,54 @@
|
||||
**Note:** auto-generated from comments in: ../platform/platform.cmake.template
|
||||
|
||||
## platform.cmake.template:
|
||||
|
||||
This file acts as a template for the fprime platform files used by the CMake system.
|
||||
These files specify build flags, compiler directives, and must specify an include
|
||||
directory for system includes like "StandardTypes.hpp".
|
||||
|
||||
Follow all the steps in this template to create a platform file. Ensure
|
||||
to remove the platform-failsafe (step 1) and fill in all <SOMETHING> tags.
|
||||
|
||||
**Note:** If the user desires to set compiler paths, and other CMake toolchain settings, a
|
||||
toolchain file should be constructed. See: [toolchain.md](toolchain.md)
|
||||
|
||||
### Platform File Loading ###
|
||||
|
||||
The user rarely needs to specify a platform file directly. It will be specified based on the data
|
||||
in the chosen Toolchain file, or by the CMake system itself. However, if the user want to control
|
||||
which platform file is used, the load is specified by the following rules:
|
||||
|
||||
If the user specifies the platform from the command line using the command line option
|
||||
`-DPLATFORM=<NAME>` then that platform file will be used e.g. `-DPLATFORM=Darwin` will load the
|
||||
Darwin.cmake regardless of the Host system. This is usually used only in the case of running UTs.
|
||||
|
||||
If the user specifies a CMake Toolchain file, then the platform file `${CMAKE_SYSTEM_NAME}.cmake`
|
||||
will be used. `${CMAKE_SYSTEM_NAME}` is set in the toolchain file.
|
||||
|
||||
Otherwise, CMake sets the `${CMAKE_SYSTEM_NAME}` to be that of the Host system, and that platform
|
||||
will be used. e.g. when building on Linux, the platform file "Linux.cmake" will be used.
|
||||
|
||||
**Note:** Unit tests are treated as a separate system. When building and running unit tests the
|
||||
user is expected to select the appropriate platform in `platform/ut/` to run their UTs.
|
||||
e.g. running UTs on Linux should be run with `-DPLATFORM=ut/Linux` on the command line.
|
||||
|
||||
### Filling In CMake Platform by Eample ###
|
||||
|
||||
F prime platform files are used to set F prime specific settings. This allows the user to control
|
||||
some aspects of the F prime build at the top-leve. This means setting global include directories
|
||||
compiler definitions for the platform, threading libraries, etc. The bare-minimum platform file
|
||||
should specify an include directory for "StandardTypes.hpp" and a threading libaray if using
|
||||
active components with OS supported threads. This can be done with the following lines:
|
||||
|
||||
```
|
||||
FIND_PACKAGE ( Threads REQUIRED )
|
||||
include_directories(SYSTEM "${FPRIME_CORE_DIR}/Fw/Types/Linux")
|
||||
```
|
||||
|
||||
**Note:** much of this is done already in *-common.cmake for Linux. If using a linux-like system,
|
||||
this can be included to save time.
|
||||
|
||||
**Note:** if copying the template, delete the message with FATAL_ERROR line. This is a fail-safe
|
||||
to prevent a raw-copy from being treated as a valid toolchain file.
|
||||
|
||||
|
||||
35
cmake/docs/toolchain.md
Normal file
35
cmake/docs/toolchain.md
Normal file
@ -0,0 +1,35 @@
|
||||
**Note:** auto-generated from comments in: ../toolchain/toolchain.cmake.template
|
||||
|
||||
## Template toolchain.cmake.template:
|
||||
|
||||
This file acts as a template for the cmake toolchains. These toolchain files
|
||||
specify what tools to use when performing the build as part of CMake. This
|
||||
file can be used to quickly set one up.
|
||||
|
||||
Follow all the steps in this template to create a toolchain file. Ensure
|
||||
to remove the template-failsafe (step 1) and fill in all <SOMETHING> tags.
|
||||
|
||||
Note: this file should follow the standard CMake toolchain format. See:
|
||||
https://cmake.org/cmake/help/v3.12/manual/cmake-toolchains.7.html
|
||||
|
||||
**Note:** If the user desires to set compile flags, or F prime specific build options, a platform
|
||||
file should be constructed. See: [platform.md](platform.md)
|
||||
|
||||
### Filling In CMake Toolchain by Eample ###
|
||||
|
||||
CMake Toolchain files, at the most basic, define the system name and C and C++ compilers. In
|
||||
addition, a find path can be set to search for other utilities. This example will walk through
|
||||
setting these values using the appropriate variables. These can be specified using the following
|
||||
CMake setting flags:
|
||||
|
||||
```
|
||||
CMAKE_SYSTEM_NAME "RaspberryPI"
|
||||
# specify the cross compiler
|
||||
set(CMAKE_C_COMPILER "/opt/rpi/bin/arm-linux-gnueabihf-gcc")
|
||||
set(CMAKE_CXX_COMPILER "/opt/rpi/bin/arm-linux-gnueabihf-g++")
|
||||
# where is the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH "/opt/rpi")
|
||||
```
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
####
|
||||
# DO SOMETHING PLEASE
|
||||
# platforms:
|
||||
#
|
||||
# Platforms in F prime's CMake system setup f prime specific items. This file loads those platforms
|
||||
# file and uses it to setup F prime's build. See: platform.cmake.template for how to generate these
|
||||
# files.
|
||||
#
|
||||
####
|
||||
if (NOT DEFINED PLATFORM)
|
||||
|
||||
@ -7,6 +7,48 @@
|
||||
#
|
||||
# Follow all the steps in this template to create a platform file. Ensure
|
||||
# to remove the platform-failsafe (step 1) and fill in all <SOMETHING> tags.
|
||||
#
|
||||
# **Note:** If the user desires to set compiler paths, and other CMake toolchain settings, a
|
||||
# toolchain file should be constructed. See: [toolchain.md](toolchain.md)
|
||||
#
|
||||
# ### Platform File Loading ###
|
||||
#
|
||||
# The user rarely needs to specify a platform file directly. It will be specified based on the data
|
||||
# in the chosen Toolchain file, or by the CMake system itself. However, if the user want to control
|
||||
# which platform file is used, the load is specified by the following rules:
|
||||
#
|
||||
# If the user specifies the platform from the command line using the command line option
|
||||
# `-DPLATFORM=<NAME>` then that platform file will be used e.g. `-DPLATFORM=Darwin` will load the
|
||||
# Darwin.cmake regardless of the Host system. This is usually used only in the case of running UTs.
|
||||
#
|
||||
# If the user specifies a CMake Toolchain file, then the platform file `${CMAKE_SYSTEM_NAME}.cmake`
|
||||
# will be used. `${CMAKE_SYSTEM_NAME}` is set in the toolchain file.
|
||||
#
|
||||
# Otherwise, CMake sets the `${CMAKE_SYSTEM_NAME}` to be that of the Host system, and that platform
|
||||
# will be used. e.g. when building on Linux, the platform file "Linux.cmake" will be used.
|
||||
#
|
||||
# **Note:** Unit tests are treated as a separate system. When building and running unit tests the
|
||||
# user is expected to select the appropriate platform in `platform/ut/` to run their UTs.
|
||||
# e.g. running UTs on Linux should be run with `-DPLATFORM=ut/Linux` on the command line.
|
||||
#
|
||||
# ### Filling In CMake Platform by Eample ###
|
||||
#
|
||||
# F prime platform files are used to set F prime specific settings. This allows the user to control
|
||||
# some aspects of the F prime build at the top-leve. This means setting global include directories
|
||||
# compiler definitions for the platform, threading libraries, etc. The bare-minimum platform file
|
||||
# should specify an include directory for "StandardTypes.hpp" and a threading libaray if using
|
||||
# active components with OS supported threads. This can be done with the following lines:
|
||||
#
|
||||
# ```
|
||||
# FIND_PACKAGE ( Threads REQUIRED )
|
||||
# include_directories(SYSTEM "${FPRIME_CORE_DIR}/Fw/Types/Linux")
|
||||
# ```
|
||||
#
|
||||
# **Note:** much of this is done already in *-common.cmake for Linux. If using a linux-like system,
|
||||
# this can be included to save time.
|
||||
#
|
||||
# **Note:** if copying the template, delete the message with FATAL_ERROR line. This is a fail-safe
|
||||
# to prevent a raw-copy from being treated as a valid toolchain file.
|
||||
####
|
||||
|
||||
## STEP 1: DELETE the following fail-safe line
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
####
|
||||
# toolchain.cmake.template:
|
||||
# Template toolchain.cmake.template:
|
||||
#
|
||||
# This file acts as a template for the cmake toolchains. These toolchain files
|
||||
# specify what tools to use when performing the build as part of CMake. This
|
||||
@ -10,6 +10,28 @@
|
||||
#
|
||||
# Note: this file should follow the standard CMake toolchain format. See:
|
||||
# https://cmake.org/cmake/help/v3.12/manual/cmake-toolchains.7.html
|
||||
#
|
||||
# **Note:** If the user desires to set compile flags, or F prime specific build options, a platform
|
||||
# file should be constructed. See: [platform.md](platform.md)
|
||||
#
|
||||
# ### Filling In CMake Toolchain by Eample ###
|
||||
#
|
||||
# CMake Toolchain files, at the most basic, define the system name and C and C++ compilers. In
|
||||
# addition, a find path can be set to search for other utilities. This example will walk through
|
||||
# setting these values using the appropriate variables. These can be specified using the following
|
||||
# CMake setting flags:
|
||||
#
|
||||
# ```
|
||||
# CMAKE_SYSTEM_NAME "RaspberryPI"
|
||||
# # specify the cross compiler
|
||||
# set(CMAKE_C_COMPILER "/opt/rpi/bin/arm-linux-gnueabihf-gcc")
|
||||
# set(CMAKE_CXX_COMPILER "/opt/rpi/bin/arm-linux-gnueabihf-g++")
|
||||
# # where is the target environment
|
||||
# set(CMAKE_FIND_ROOT_PATH "/opt/rpi")
|
||||
# ```
|
||||
#
|
||||
# **Note:** if copying the template, delete the message with FATAL_ERROR line. This is a fail-safe
|
||||
# to prevent a raw-copy from being treated as a valid toolchain file.
|
||||
####
|
||||
|
||||
## STEP 1: DELETE the following fail-safe line
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user