Рефакторинг 2
This commit is contained in:
		@@ -27,13 +27,18 @@ add_pvs_check(${TRGT})
 | 
			
		||||
# Создание цели для автоматического форматирования кода
 | 
			
		||||
add_format_sources(${TRGT} ${TRGT_cpp})
 | 
			
		||||
 | 
			
		||||
add_dependencies(${TRGT} base_static)
 | 
			
		||||
add_dependencies(${TRGT} filesystem_static)
 | 
			
		||||
 | 
			
		||||
target_include_directories(${TRGT} PRIVATE ${CMAKE_SOURCE_DIR}/src)
 | 
			
		||||
target_include_directories(${TRGT} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})
 | 
			
		||||
 | 
			
		||||
target_link_libraries(${TRGT} myx-filesystem)
 | 
			
		||||
if(NOT MYXLIB_HEADER_ONLY)
 | 
			
		||||
    add_dependencies(${TRGT} base_static filesystem_static)
 | 
			
		||||
    target_link_libraries(${TRGT} myx-filesystem)
 | 
			
		||||
else()
 | 
			
		||||
    target_compile_definitions(${TRGT} PUBLIC MYXLIB_HEADER_ONLY)
 | 
			
		||||
    target_include_directories(${TRGT} SYSTEM PRIVATE ${CMAKE_SOURCE_DIR}/src)
 | 
			
		||||
    add_dependencies(${TRGT} base filesystem)
 | 
			
		||||
endif()
 | 
			
		||||
 | 
			
		||||
target_link_libraries(${TRGT} Qt5::Core)
 | 
			
		||||
target_link_libraries(${TRGT} Threads::Threads)
 | 
			
		||||
 | 
			
		||||
@@ -48,4 +53,4 @@ cotire(${TRGT})
 | 
			
		||||
add_dependencies(${TRGT} create_auxilary_symlinks)
 | 
			
		||||
 | 
			
		||||
# Правила для установки
 | 
			
		||||
install(TARGETS ${TRGT} COMPONENT EXAMPLES RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
 | 
			
		||||
install(TARGETS ${TRGT} COMPONENT examples RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,4 @@
 | 
			
		||||
#include "cmlib_private_config.hpp"
 | 
			
		||||
 | 
			
		||||
// #include <myx/base/cmlib_private_config.hpp>
 | 
			
		||||
#include <myx/base/config.hpp>
 | 
			
		||||
 | 
			
		||||
#include <myx/filesystem/paths.hpp>
 | 
			
		||||
@@ -8,12 +7,15 @@
 | 
			
		||||
#include <QCoreApplication>
 | 
			
		||||
#include <QDebug>
 | 
			
		||||
 | 
			
		||||
#define CMLIB_PROJECT_NAME "myxlib"
 | 
			
		||||
 | 
			
		||||
namespace MF = myx::filesystem;
 | 
			
		||||
 | 
			
		||||
// Переменные для защиты экземпляра класса MF::PathsMT
 | 
			
		||||
std::atomic< MF::PathsMT* > MF::PathsMT::mInstance;
 | 
			
		||||
std::mutex MF::PathsMT::mMutex;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int main( int argc, char** argv )
 | 
			
		||||
{
 | 
			
		||||
	(void)argc;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user