A metronome using the FRDM K64F board

Committer:
ram54288
Date:
Sun May 14 18:40:18 2017 +0000
Revision:
0:a7a43371b306
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ram54288 0:a7a43371b306 1 if(TARGET_LIKE_X86_LINUX_NATIVE_COVERAGE)
ram54288 0:a7a43371b306 2 SET(CMAKE_CXX_FLAGS "")
ram54288 0:a7a43371b306 3 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage -Wall -Wextra -include /usr/include/CppUTest/MemoryLeakDetectorMallocMacros.h -include /usr/include/CppUTest/MemoryLeakDetectorNewMacros.h -D__thumb2__ -DMBED_CLIENT_C_NEW_API -w")
ram54288 0:a7a43371b306 4 include_directories($ENV{CPPUTEST_HOME}/include)
ram54288 0:a7a43371b306 5 link_directories($ENV{CPPUTEST_HOME}/lib)
ram54288 0:a7a43371b306 6 MACRO(SUBDIRLIST result curdir)
ram54288 0:a7a43371b306 7 FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
ram54288 0:a7a43371b306 8 SET(dirlist "")
ram54288 0:a7a43371b306 9 FOREACH(child ${children})
ram54288 0:a7a43371b306 10 IF(IS_DIRECTORY ${curdir}/${child})
ram54288 0:a7a43371b306 11 if(EXISTS "${curdir}/${child}/CMakeLists.txt")
ram54288 0:a7a43371b306 12 LIST(APPEND dirlist ${curdir}/${child})
ram54288 0:a7a43371b306 13 endif()
ram54288 0:a7a43371b306 14 ENDIF()
ram54288 0:a7a43371b306 15 ENDFOREACH()
ram54288 0:a7a43371b306 16 SET(${result} ${dirlist})
ram54288 0:a7a43371b306 17 ENDMACRO()
ram54288 0:a7a43371b306 18
ram54288 0:a7a43371b306 19 SUBDIRLIST(SUBDIRS ${CMAKE_CURRENT_SOURCE_DIR}/mbedclient/utest)
ram54288 0:a7a43371b306 20
ram54288 0:a7a43371b306 21 FOREACH(subdir ${SUBDIRS})
ram54288 0:a7a43371b306 22 ADD_SUBDIRECTORY(${subdir})
ram54288 0:a7a43371b306 23 ENDFOREACH()
ram54288 0:a7a43371b306 24
ram54288 0:a7a43371b306 25 endif()
ram54288 0:a7a43371b306 26
ram54288 0:a7a43371b306 27 if(TARGET_LIKE_LINUX AND NOT TARGET_LIKE_X86_LINUX_NATIVE_COVERAGE)
ram54288 0:a7a43371b306 28 add_executable(mbed-client-test-mbedclient_linux
ram54288 0:a7a43371b306 29 "mbedclient_linux/main.cpp"
ram54288 0:a7a43371b306 30 )
ram54288 0:a7a43371b306 31 target_link_libraries(mbed-client-test-mbedclient_linux
ram54288 0:a7a43371b306 32 mbed-client-c
ram54288 0:a7a43371b306 33 mbed-client-linux
ram54288 0:a7a43371b306 34 mbed-client
ram54288 0:a7a43371b306 35 )
ram54288 0:a7a43371b306 36 #add_test(mbed-client-test-mbedclient_linux mbed-client-test-mbedclient_linux)
ram54288 0:a7a43371b306 37 add_dependencies(all_tests mbed-client-test-mbedclient_linux)
ram54288 0:a7a43371b306 38
ram54288 0:a7a43371b306 39 add_executable(mbed-client-test-helloworld-mbedclient
ram54288 0:a7a43371b306 40 "helloworld-mbedclient/main.cpp"
ram54288 0:a7a43371b306 41 "helloworld-mbedclient/mbedclient.cpp"
ram54288 0:a7a43371b306 42 "helloworld-mbedclient/to_be_ported.c"
ram54288 0:a7a43371b306 43 )
ram54288 0:a7a43371b306 44 target_link_libraries(mbed-client-test-helloworld-mbedclient
ram54288 0:a7a43371b306 45 mbed-client-c
ram54288 0:a7a43371b306 46 mbed-client-linux
ram54288 0:a7a43371b306 47 mbed-client
ram54288 0:a7a43371b306 48 )
ram54288 0:a7a43371b306 49 #add_test(mbed-client-test-helloworld-mbedclient mbed-client-test-helloworld-mbedclient)
ram54288 0:a7a43371b306 50 add_dependencies(all_tests mbed-client-test-helloworld-mbedclient)
ram54288 0:a7a43371b306 51
ram54288 0:a7a43371b306 52 endif()
ram54288 0:a7a43371b306 53
ram54288 0:a7a43371b306 54 if(TARGET_LIKE_MBED)
ram54288 0:a7a43371b306 55
ram54288 0:a7a43371b306 56 add_executable(mbed-client-test-mbedclient-smokeTest EXCLUDE_FROM_ALL
ram54288 0:a7a43371b306 57 "mbedclient-smokeTest/main.cpp"
ram54288 0:a7a43371b306 58 "mbedclient-smokeTest/testconfig.cpp"
ram54288 0:a7a43371b306 59 "mbedclient-smokeTest/testconfig.h"
ram54288 0:a7a43371b306 60 )
ram54288 0:a7a43371b306 61 target_link_libraries(mbed-client-test-mbedclient-smokeTest
ram54288 0:a7a43371b306 62 mbed-client-c
ram54288 0:a7a43371b306 63 mbed-client-mbed-os
ram54288 0:a7a43371b306 64 mbed-client
ram54288 0:a7a43371b306 65 )
ram54288 0:a7a43371b306 66
ram54288 0:a7a43371b306 67 #add_test(mbed-client-test-mbedclient-smokeTest mbed-client-test-mbedclient-smokeTest)
ram54288 0:a7a43371b306 68 add_dependencies(all_tests mbed-client-test-mbedclient-smokeTest)
ram54288 0:a7a43371b306 69
ram54288 0:a7a43371b306 70 # if the target has defined a post-processing step, perform it:
ram54288 0:a7a43371b306 71 if(YOTTA_POSTPROCESS_COMMAND)
ram54288 0:a7a43371b306 72 string(REPLACE YOTTA_CURRENT_EXE_NAME "mbed-client-test-mbedclient-smokeTest" LOCAL_POSTPROCESS_COMMAND "${YOTTA_POSTPROCESS_COMMAND}")
ram54288 0:a7a43371b306 73 separate_arguments(LOCAL_POSTPROCESS_COMMAND_SEPARATED UNIX_COMMAND ${LOCAL_POSTPROCESS_COMMAND})
ram54288 0:a7a43371b306 74 add_custom_command(
ram54288 0:a7a43371b306 75 TARGET mbed-client-test-mbedclient-smokeTest
ram54288 0:a7a43371b306 76 POST_BUILD
ram54288 0:a7a43371b306 77 COMMAND ${LOCAL_POSTPROCESS_COMMAND_SEPARATED}
ram54288 0:a7a43371b306 78 )
ram54288 0:a7a43371b306 79 endif()
ram54288 0:a7a43371b306 80
ram54288 0:a7a43371b306 81 add_executable(mbed-client-test-helloworld-mbedclient EXCLUDE_FROM_ALL
ram54288 0:a7a43371b306 82 "helloworld-mbedclient/main.cpp"
ram54288 0:a7a43371b306 83 "helloworld-mbedclient/mbedclient.cpp"
ram54288 0:a7a43371b306 84 "helloworld-mbedclient/to_be_ported.c"
ram54288 0:a7a43371b306 85 )
ram54288 0:a7a43371b306 86 target_link_libraries(mbed-client-test-helloworld-mbedclient
ram54288 0:a7a43371b306 87 mbed-client-c
ram54288 0:a7a43371b306 88 mbed-client-mbed-os
ram54288 0:a7a43371b306 89 mbed-client
ram54288 0:a7a43371b306 90 )
ram54288 0:a7a43371b306 91 # if the target has defined a post-processing step, perform it:
ram54288 0:a7a43371b306 92 if(YOTTA_POSTPROCESS_COMMAND)
ram54288 0:a7a43371b306 93 string(REPLACE YOTTA_CURRENT_EXE_NAME "mbed-client-test-helloworld-mbedclient" LOCAL_POSTPROCESS_COMMAND "${YOTTA_POSTPROCESS_COMMAND}")
ram54288 0:a7a43371b306 94 separate_arguments(LOCAL_POSTPROCESS_COMMAND_SEPARATED UNIX_COMMAND ${LOCAL_POSTPROCESS_COMMAND})
ram54288 0:a7a43371b306 95 add_custom_command(
ram54288 0:a7a43371b306 96 TARGET mbed-client-test-helloworld-mbedclient
ram54288 0:a7a43371b306 97 POST_BUILD
ram54288 0:a7a43371b306 98 COMMAND ${LOCAL_POSTPROCESS_COMMAND_SEPARATED}
ram54288 0:a7a43371b306 99 )
ram54288 0:a7a43371b306 100 endif()
ram54288 0:a7a43371b306 101
ram54288 0:a7a43371b306 102 #add_test(mbed-client-test-helloworld-mbedclient mbed-client-test-helloworld-mbedclient)
ram54288 0:a7a43371b306 103 add_dependencies(all_tests mbed-client-test-helloworld-mbedclient)
ram54288 0:a7a43371b306 104
ram54288 0:a7a43371b306 105 endif()
ram54288 0:a7a43371b306 106
ram54288 0:a7a43371b306 107
ram54288 0:a7a43371b306 108