This repository was archived by the owner on Jan 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +15
-1
lines changed Expand file tree Collapse file tree 4 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ IF(NOT CMAKE_BUILD_TYPE MATCHES Debug)
5050ENDIF ()
5151
5252PROJECT (${PROJECT_NAME} )
53+ enable_testing ()
5354
5455#Set the c standard to use
5556INSERT_C_FLAGS(BEFORE -std=gnu99 -fno-common)
Original file line number Diff line number Diff line change 2121# Toolchain setup gcc
2222#######################################
2323
24+ # -fshort enums is required as this seems to be default with gcc-arm-none-eabi and we do some static asserts using this assumption
25+ # we also set these for c++ as this otherwise gives problems when linking mocks (C) against our test code (C++)
26+
27+ SET (CMAKE_C_FLAGS_DEBUG "-g -fshort-enums -Wno-typedef-redefinition -Wno-switch -Wno-gnu-variable-sized-type-not-at-end" )
28+ SET (CMAKE_CXX_FLAGS_DEBUG "-fshort-enums -g" )
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ MODULE_HEADER_DEFINE(
3737MODULE_BUILD_SETTINGS_FILE()
3838
3939#Export the module-specific header files to the application by using
40- EXPORT_GLOBAL_INCLUDE_DIRECTORIES(. )
40+ EXPORT_GLOBAL_INCLUDE_DIRECTORIES(inc )
4141
4242#By convention, each module should generate a single 'static' library that can be included by the application
4343ADD_LIBRARY (d7ap_fs STATIC
Original file line number Diff line number Diff line change @@ -19,7 +19,15 @@ limitations under the License.
1919
2020#Add the 'BUILD_UNIT_TESTS' option
2121OPTION (BUILD_UNIT_TESTS "Build unit tests applications" ON )
22+
23+ SET (TESTS_EXTRA_TESTS_DIR "" CACHE STRING "Path to directory containing extra, out of tree tests (optional)" )
24+
25+
2226LIST_SUBDIRS(TEST_DIRS ${CMAKE_CURRENT_SOURCE_DIR} )
27+ IF (NOT (TESTS_EXTRA_TESTS_DIR STREQUAL "" ))
28+ LIST_SUBDIRS(EXTRA_TESTS_DIRS ${TESTS_EXTRA_TESTS_DIR} )
29+ LIST (APPEND TEST_DIRS ${EXTRA_TESTS_DIRS} )
30+ ENDIF ()
2331
2432#Add conditional options for all subdirs (which are individual applications)
2533FOREACH (__dir ${TEST_DIRS} )
You can’t perform that action at this time.
0 commit comments