ulib/CMakeLists.txt
tqcq 03b38d43ce
Some checks failed
rpcrypto-build / build (Debug, hisiv500.toolchain.cmake) (push) Waiting to run
rpcrypto-build / build (Debug, himix200.toolchain.cmake) (push) Successful in 1m14s
rpcrypto-build / build (Debug, mipsel-openwrt-linux-musl.toolchain.cmake) (push) Failing after 41s
rpcrypto-build / build (Debug, host-afl.toolchain.cmake) (push) Failing after 11m20s
rpcrypto-build / build (Release, hisiv510.toolchain.cmake) (push) Failing after 43s
rpcrypto-build / build (Release, host.toolchain.cmake) (push) Failing after 15s
rpcrypto-build / build (Debug, host.toolchain.cmake) (push) Failing after 15m6s
rpcrypto-build / build (Debug, mips64el-linux-gnuabi64.toolchain.cmake) (push) Failing after 18m58s
rpcrypto-build / build (Debug, mipsel-openwrt-linux.toolchain.cmake) (push) Failing after 16m38s
rpcrypto-build / build (Debug, hisiv510.toolchain.cmake) (push) Failing after 26m18s
rpcrypto-build / build (Release, himix200.toolchain.cmake) (push) Failing after 19m20s
rpcrypto-build / build (Release, hisiv500.toolchain.cmake) (push) Failing after 17m12s
rpcrypto-build / build (Release, host-afl.toolchain.cmake) (push) Failing after 12m49s
rpcrypto-build / build (Release, mips64el-linux-gnuabi64.toolchain.cmake) (push) Failing after 13m13s
rpcrypto-build / build (Release, mipsel-openwrt-linux-musl.toolchain.cmake) (push) Failing after 13m8s
rpcrypto-build / build (Release, mipsel-openwrt-linux.toolchain.cmake) (push) Failing after 13m2s
fix disable CPP11 for fmt
2023-12-05 13:47:33 +08:00

32 lines
932 B
CMake

cmake_minimum_required(VERSION 3.10)
project(ulib LANGUAGES CXX VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 98)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
find_package(Threads REQUIRED)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(FMT_USE_CPP11 OFF)
set(FMT_TEST OFF)
set(FMT_USE_CPP11 OFF)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3party/fmt)
option(ULIB_BUILD_TESTS "Build tests" OFF)
add_library(${PROJECT_NAME} STATIC
src/ulib/empty.cpp
src/ulib/log/logger.cpp
src/ulib/log/log.cpp
src/ulib/log/level.cpp
)
target_link_libraries(${PROJECT_NAME} PUBLIC fmt::fmt)
target_compile_definitions(${PROJECT_NAME} PRIVATE ULIB_LIBRARY_IMPL)
target_include_directories(${PROJECT_NAME} PUBLIC src)
add_executable(ulib_main_test src/main.cpp)
target_link_libraries(ulib_main_test PRIVATE ${PROJECT_NAME})
install(TARGETS ${PROJECT_NAME} DESTINATION lib)