Начало рефакторинга
This commit is contained in:
parent
b845211222
commit
44817a8a94
@ -15,7 +15,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/find)
|
||||
|
||||
include(CMLibCommon)
|
||||
|
||||
option(MYXLIB_BUILD_COMPILED "Build compiled version of library" OFF)
|
||||
option(MYXLIB_HEADER_ONLY "Build header only version of library" ON)
|
||||
option(MYXLIB_BUILD_EXAMPLES "Build examples" OFF)
|
||||
|
||||
# Поиск библиотек с помощью pkgconfig
|
||||
@ -64,4 +64,3 @@ endif()
|
||||
|
||||
# Документация
|
||||
add_subdirectory(cmake/doc)
|
||||
|
||||
|
@ -9,6 +9,7 @@ set(TRGT_cpp
|
||||
# Список заголовочных файлов
|
||||
set(TRGT_hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/config.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/config-inl.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/limits.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enum_bitmask_operations.hpp)
|
||||
|
||||
@ -33,7 +34,7 @@ add_pvs_check(${TRGT})
|
||||
# Создание цели для автоматического форматирования кода
|
||||
add_format_sources(${TRGT} ${TRGT_cpp} ${TRGT_headers})
|
||||
|
||||
target_include_directories(${TRGT} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})
|
||||
target_include_directories(${TRGT} SYSTEM PRIVATE ${CMAKE_SOURCE_DIR}/src)
|
||||
|
||||
cotire(${TRGT})
|
||||
|
||||
|
10
src/myx/base/config-inl.hpp
Normal file
10
src/myx/base/config-inl.hpp
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef MYX_BASE_CONFIG_INL_HPP_
|
||||
#define MYX_BASE_CONFIG_INL_HPP_
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef MYXLIB_HEADER_ONLY
|
||||
#include <myx/base/config.hpp>
|
||||
#endif
|
||||
|
||||
#endif // MYX_BASE_CONFIG_INL_HPP_
|
@ -1,6 +1,12 @@
|
||||
#ifndef MYX_BASE_CONFIG_HPP_
|
||||
#define MYX_BASE_CONFIG_HPP_
|
||||
|
||||
#include "config_flags.hpp"
|
||||
#pragma once
|
||||
|
||||
#include <myx/base/config_flags.hpp>
|
||||
|
||||
#ifdef MYXLIB_HEADER_ONLY
|
||||
#include "config-inl.hpp"
|
||||
#endif
|
||||
|
||||
#endif // MYX_BASE_CONFIG_HPP_
|
||||
|
@ -37,7 +37,6 @@ add_format_sources(${TRGT} ${TRGT_cpp} ${TRGT_headers})
|
||||
|
||||
target_include_directories(${TRGT} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})
|
||||
target_include_directories(${TRGT} SYSTEM PRIVATE ${CMAKE_SOURCE_DIR}/src)
|
||||
target_include_directories(${TRGT} PRIVATE ${CMAKE_BINARY_DIR}/include)
|
||||
|
||||
cotire(${TRGT})
|
||||
|
||||
|
@ -44,9 +44,7 @@ add_pvs_check(${TRGT})
|
||||
# Создание цели для автоматического форматирования кода
|
||||
add_format_sources(${TRGT} ${TRGT_sources} ${TRGT_headers})
|
||||
|
||||
target_include_directories(${TRGT} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})
|
||||
target_include_directories(${TRGT} SYSTEM PRIVATE ${CMAKE_SOURCE_DIR}/src)
|
||||
target_include_directories(${TRGT} PRIVATE ${CMAKE_BINARY_DIR}/include)
|
||||
|
||||
cotire(${TRGT})
|
||||
|
||||
|
@ -43,7 +43,6 @@ add_format_sources(${TRGT} ${TRGT_cpp} ${TRGT_headers})
|
||||
target_include_directories(${TRGT} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})
|
||||
target_include_directories(${TRGT} SYSTEM PUBLIC ${Qt5Network_INCLUDE_DIRS})
|
||||
target_include_directories(${TRGT} SYSTEM PRIVATE ${CMAKE_SOURCE_DIR}/src)
|
||||
target_include_directories(${TRGT} PRIVATE ${CMAKE_BINARY_DIR}/include)
|
||||
|
||||
cotire(${TRGT})
|
||||
|
||||
|
@ -9,6 +9,6 @@
|
||||
// #define MYX_REDIS_EXPORT Q_DECL_IMPORT
|
||||
// #endif
|
||||
|
||||
#include "config_flags.hpp"
|
||||
#include <myx/base/config_flags.hpp>
|
||||
|
||||
#endif // MYX_REDIS_CONFIG_HPP_
|
||||
|
Loading…
Reference in New Issue
Block a user