SHA256
.
This commit is contained in:
+26
-26
@@ -4,36 +4,36 @@ project(FeatherLog)
|
|||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||||
|
|
||||||
if (MSVC)
|
|
||||||
add_compile_options(/Wall /utf-8)
|
|
||||||
else ()
|
|
||||||
add_compile_options(-Wextra -Wpedantic -Wall)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
set(CMAKE_BINARY_DIR "out")
|
set(CMAKE_BINARY_DIR "out")
|
||||||
|
|
||||||
set(sources
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/shared")
|
||||||
src/featherlog/log_manager.hpp
|
|
||||||
src/featherlog/log_outputter.hpp
|
# 定义源文件
|
||||||
src/featherlog/logger.hpp
|
set(${PROJECT_NAME}_SOURCES
|
||||||
src/featherlog/log_formatter.hpp
|
include/log_manager.hpp
|
||||||
src/featherlog/log_level.hpp
|
include/log_outputter.hpp
|
||||||
src/featherlog/log_message.hpp
|
include/logger.hpp
|
||||||
|
include/log_formatter.hpp
|
||||||
|
include/log_level.hpp
|
||||||
|
include/log_message.hpp
|
||||||
src/featherlog/log_manager.cpp)
|
src/featherlog/log_manager.cpp)
|
||||||
|
|
||||||
# Shared Lib:
|
# 生成静态库
|
||||||
if (MSVC)
|
add_library(${PROJECT_NAME}_static STATIC ${${PROJECT_NAME}_SOURCES})
|
||||||
add_compile_options(/DFEATHER_LOG_EXPORT_DLL)
|
target_include_directories(${PROJECT_NAME}_static PUBLIC include)
|
||||||
else ()
|
set_target_properties(${PROJECT_NAME}_static PROPERTIES
|
||||||
add_compile_options(-DFEATHER_LOG_EXPORT_DLL)
|
OUTPUT_NAME ${PROJECT_NAME}
|
||||||
endif ()
|
PREFIX lib)
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/shared")
|
|
||||||
add_library(${PROJECT_NAME} SHARED ${sources})
|
|
||||||
|
|
||||||
# Shared Lib End
|
add_compile_definitions(FLOG_DLL_MODE)
|
||||||
|
add_compile_definitions(FLOG_BUILDING_DLL)
|
||||||
|
|
||||||
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/static")
|
# 生成动态库
|
||||||
#add_library(${PROJECT_NAME} STATIC ${sources})
|
add_library(${PROJECT_NAME}_shared SHARED ${${PROJECT_NAME}_SOURCES})
|
||||||
|
target_include_directories(${PROJECT_NAME}_shared PUBLIC include)
|
||||||
|
set_target_properties(${PROJECT_NAME}_shared PROPERTIES
|
||||||
|
OUTPUT_NAME ${PROJECT_NAME}
|
||||||
|
PREFIX lib)
|
||||||
|
|
||||||
# Static Lib:
|
include(CTest)
|
||||||
# Static Lib End
|
enable_testing()
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
#ifndef FEATHERLOG_LOG_OUTPUTER_HPP
|
#ifndef FEATHERLOG_LOG_OUTPUTTER_HPP
|
||||||
#define FEATHERLOG_LOG_OUTPUTER_HPP
|
#define FEATHERLOG_LOG_OUTPUTTER_HPP
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "log_formatter.hpp"
|
#include "log_formatter.hpp"
|
||||||
#include "log_message.hpp"
|
#include "log_message.hpp"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "log_manager.hpp"
|
#include "../../include/log_manager.hpp"
|
||||||
|
|
||||||
namespace flog
|
namespace flog
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user