FRDM K64F Metronome

Committer:
ram54288
Date:
Sun May 14 18:37:05 2017 +0000
Revision:
0:dbad57390bd1
Initial commit

Who changed what in which revision?

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