154568cb3Sopenharmony_ci################交叉编译#####################
254568cb3Sopenharmony_ciset(CPU_TYPE "$ENV{CPU_TYPE}" ) 
354568cb3Sopenharmony_ciset(PLAM_TYPE "$ENV{PLAM_TYPE}" ) 
454568cb3Sopenharmony_ciset(LIB_TYPE "$ENV{LIB_TYPE}"  ) 
554568cb3Sopenharmony_ciset(SYSTEM "$ENV{SYSTEM}" )
654568cb3Sopenharmony_ciset(CORE "$ENV{CORE}" )
754568cb3Sopenharmony_ciset(LIB_RUN_TYPE "$ENV{LIB_RUN_TYPE}" ) 
854568cb3Sopenharmony_ciset(BUILD_DIR "$ENV{BUILD_TMP_DIR}" ) #version id
954568cb3Sopenharmony_ciset(OBJCOPY_PATH "$ENV{OBJCOPY_PATH}" ) #OBJCOPY_PATH
1054568cb3Sopenharmony_ciset(COMPILE_MODE "$ENV{COMPILE_MODE}" )
1154568cb3Sopenharmony_ciset(HOME_PATH "$ENV{HOME_PATH}" )
1254568cb3Sopenharmony_ciset(COMPILE_OPTION "$ENV{COMPILE_OPTION}" )
1354568cb3Sopenharmony_ciset(RPROTON_INSTALL_FILE_OPTION "$ENV{RPROTON_INSTALL_FILE_OPTION}" )##RPROTON_INSTALL_FILE_OPTION="SUPER_BUILD";
1454568cb3Sopenharmony_ci
1554568cb3Sopenharmony_ci
1654568cb3Sopenharmony_ci#### 统一告警选项,请审慎增删
1754568cb3Sopenharmony_ciset(STRONG_COMPILE_WARING_FLAG "-Wunused -Wredundant-decls -Wfloat-conversion -Wwrite-strings -Wunused-macros -Wswitch-default -Wshift-overflow=2 -Wnested-externs -Wmissing-include-dirs -Wlogical-op -Wjump-misses-init -Wformat-security -Wvla -Wframe-larger-than=4096 -Wduplicated-cond  -Wdisabled-optimization -Wduplicated-branches -Wignored-qualifiers -Wimplicit-fallthrough=3 -Wpointer-arith -Wshift-negative-value -Wsign-compare -Wtype-limits -Wcast-qual -Wundef -Wbad-function-cast -Wold-style-definition -Wpacked -Wstrict-prototypes -Wstack-usage=2048")
1854568cb3Sopenharmony_ciset(COMPILE_WARING_FLAG " -Wall -Werror  -Wextra -Wformat=2 -Wfloat-equal -Wshadow -Wtrampolines -Wdate-time ")## -Wall -Werror  -Wextra -Wformat=2 -Wfloat-equal 
1954568cb3Sopenharmony_ci
2054568cb3Sopenharmony_ciif (${CPU_TYPE} STREQUAL "m4" )
2154568cb3Sopenharmony_ci    include(${HOME_PATH}/cmake/tool_chain/rtosk_tool_chain_gcc.cmake)
2254568cb3Sopenharmony_ciendif()
2354568cb3Sopenharmony_ci
2454568cb3Sopenharmony_ci
2554568cb3Sopenharmony_ciif (${COMPILE_OPTION} STREQUAL "coverity" OR ${COMPILE_OPTION} STREQUAL "fortify" )
2654568cb3Sopenharmony_ci    set(CMAKE_C_COMPILER_WORKS TRUE)
2754568cb3Sopenharmony_ci    set(CMAKE_CXX_COMPILER_WORKS TRUE)
2854568cb3Sopenharmony_ci    set(CMAKE_ASM_COMPILER_WORKS TRUE)
2954568cb3Sopenharmony_ciendif()
3054568cb3Sopenharmony_ci
3154568cb3Sopenharmony_ciset(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> -r -D <TARGET> <OBJECTS>") 
3254568cb3Sopenharmony_ci
3354568cb3Sopenharmony_ci
3454568cb3Sopenharmony_ci
35