代码拉取完成,页面将自动刷新
#Copyright (c) 2024 Black Sesame Technologies
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an "AS IS" BASIS,
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#See the License for the specific language governing permissions and
#limitations under the License.
cmake_minimum_required(VERSION 3.10)
project(infra_time)
include(GNUInstallDirs)
IF(ENABLE_COVERAGE)
SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage")
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage -lgcov")
ENDIF()
if (CMAKE_EXTRA_SYSTEM MATCHES QNX)
add_definitions(-DQNX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -ggdb -g -no-pie -stdlib=libstdc++ -D_GLIBCXX_USE_C99 -std=c++14 -fPIC")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
add_compile_options("-O2")
endif()
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON)
include_directories($ENV{PKG_CONFIG_SYSROOT_DIR}/usr/include/msgbx)
include_directories(${PROJECT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(
${PROJECT_BINARY_DIR}
)
add_subdirectory(msg_box_ipc)
add_library(infra_time SHARED infra_time.cpp gtc_nl_msg.cpp)
target_link_libraries(infra_time pthread time_sync_msgbox_ipc infra_time_msgbox_ipc)
SET_TARGET_PROPERTIES(infra_time PROPERTIES VERSION 3.2.0 SOVERSION 3)
install(FILES infra_time.h gtc_nl_msg.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hanhai/infra)
install(TARGETS infra_time LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。