• make file



    CPPUTEST_USE_EXTENSIONS = Y
    如果没有这一句定义,
    CppUTestExt/MockSupport.h和CppUTestExt/MockSupport_c.h文件中的定义就不能用,编译后提示未定义
    #include "CppUTest/TestHarness.h"
    #include "CppUTestExt/MockSupport.h"
    extern"C"
    {
    #include "CppUTestExt/MockSupport_c.h"
    #include "Flash.h"
    #include "m28w160ect.h"
    #include "FakeMicroTime.h"
    }
     $(CPPUTEST_HOME)/include/
    定义很简单,CPPUTEST_HOME = E:cpputest
    windows中地址用的是反斜杠,Linux中用的是斜杠
    #include "CppUTestExt/MockSupport_c.h"
    它的原地址是“E:cpputestincludeCppUTest”
    Set this to @ to keep the makefile quiet
    SILENCE = @
    CPPUTEST_HOME = E:cpputest
    #---- Outputs ----#
    COMPONENT_NAME = t1
    TARGET_LIB = 
        lib/lib$(COMPONENT_NAME).a
        
    TEST_TARGET = 
        $(COMPONENT_NAME)_tests
    
    #--- Inputs ----#
    PROJECT_HOME_DIR = .
    CPP_PLATFORM = Gcc
    
    CPPUTEST_USE_EXTENSIONS = Y
    CPPUTEST_WARNINGFLAGS += -Wall 
    CPPUTEST_WARNINGFLAGS += -Werror 
    CPPUTEST_WARNINGFLAGS += -Wswitch-default 
    CPPUTEST_WARNINGFLAGS += -Wswitch-enum  
    CPPUTEST_WARNINGFLAGS += -Wno-self-assign
    //CPPUTEST_CFLAGS += -std=c89
    CPPUTEST_CFLAGS += -Wextra 
    CPPUTEST_CFLAGS += -pedantic 
    CPPUTEST_CFLAGS += -Wstrict-prototypes
    
    SRC_DIRS = 
        src/*
        src/MyOS/Acme
    
    TEST_SRC_DIRS = 
        tests 
        tests/IO 
        mocks/IO 
        mocks
        
    INCLUDE_DIRS =
      .
      $(CPPUTEST_HOME)/include/
      include/*
      mocks/IO 
      mocks
    
      
    ifeq ($(CPPUTEST_HOME),)
    $(info CPPUTEST_HOME not set! See README.txt)
    else  
    include $(CPPUTEST_HOME)/build/MakefileWorker.mk
    endif
  • 相关阅读:
    打造自定义 eslint
    二叉树(三): 二叉查找树
    二叉树(二): 补充
    二叉树(一): 遍历
    redux 源码浅析
    react-redux 源码浅析
    WebComponents使用以及思考
    SHELL 语法以及实例
    React-Native 原生 APP 更新
    关于 cdn 在项目中的使用
  • 原文地址:https://www.cnblogs.com/aprilapril/p/5259315.html
Copyright © 2020-2023  润新知