154568cb3Sopenharmony_ciset(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> -r  <TARGET> <OBJECTS>")
254568cb3Sopenharmony_ci
354568cb3Sopenharmony_ciif (${COMPILE_OPTION} STREQUAL "coverity" OR ${COMPILE_OPTION} STREQUAL "fortify" OR ${COMPILE_OPTION} STREQUAL "single")
454568cb3Sopenharmony_ci    message("Don't Compile Sec Lib In ${COMPILE_OPTION}")
554568cb3Sopenharmony_cielse()
654568cb3Sopenharmony_ci    include_directories(libboundscheck/include)
754568cb3Sopenharmony_ci    include_directories(libboundscheck/src)
854568cb3Sopenharmony_ci
954568cb3Sopenharmony_ci    set(LIB_SEC_NAME "CortexMXsec_c")
1054568cb3Sopenharmony_ci    
1154568cb3Sopenharmony_ci    file(GLOB_RECURSE SEC_SRC RELATIVE ${CMAKE_CURRENT_LIST_DIR} "./libboundscheck/src/*.c") #遍历搜索src目录下的所有c文件,RELATIVE为使用相对路径
1254568cb3Sopenharmony_ci    add_library(${LIB_SEC_NAME} STATIC ${SEC_SRC}) #在文件夹上层选择性编译与否
1354568cb3Sopenharmony_ci
1454568cb3Sopenharmony_ci    set_target_properties(${LIB_SEC_NAME} PROPERTIES SUFFIX ".lib")
1554568cb3Sopenharmony_ci
1654568cb3Sopenharmony_ciendif()