结构调整

main
parent 7cdca9d255
commit 7d81f2a594

@ -21,16 +21,18 @@ message(STATUS "message from cmake file")
add_executable(${PROJECT_NAME} src/main.cpp) add_executable(${PROJECT_NAME} src/main.cpp)
aux_source_directory(src/aspect ASPECT_DIR) aux_source_directory(src/aspect ASPECT_DIR)
aux_source_directory(src/base BASE_DIR)
aux_source_directory(src/util UTIL_DIR)
aux_source_directory(src/test TEST_DIR) aux_source_directory(src/test TEST_DIR)
target_include_directories(${PROJECT_NAME} PRIVATE target_include_directories(${PROJECT_NAME} PRIVATE
sync_queue.h
stop_watch.h
thread_pool.h
) )
target_sources(${PROJECT_NAME} PRIVATE target_sources(${PROJECT_NAME} PRIVATE
${ASPECT_DIR} ${ASPECT_DIR}
${TEST_DIR} ${TEST_DIR}
${BASE_DIR}
${UTIL_DIR}
) )

@ -22,7 +22,7 @@ HAS_MEMBER(before)
HAS_MEMBER(after) HAS_MEMBER(after)
#include "non_copy_able.h" #include "../base/non_copy_able.h"
template<typename Func, typename... Args> template<typename Func, typename... Args>
class Aspect : NonCopyAble { class Aspect : NonCopyAble {

@ -135,7 +135,7 @@ void func() {
std::this_thread::sleep_for(std::chrono::seconds(2)); std::this_thread::sleep_for(std::chrono::seconds(2));
} }
#include "sync_queue.h" #include "base/sync_queue.h"
void sync_test(){ void sync_test(){
// 同步队列 // 同步队列
auto queue = new SyncQueue<int>(3); auto queue = new SyncQueue<int>(3);
@ -165,7 +165,7 @@ void sync_test(){
#include <chrono> #include <chrono>
#include <iomanip> #include <iomanip>
#include "stop_watch.h" #include "util/stop_watch.h"
void chrono_test(){ void chrono_test(){
@ -197,7 +197,7 @@ void chrono_test(){
} }
#include "thread_pool.h" #include "base/thread_pool.h"
void thread_test(){ void thread_test(){
ThreadPool pool(3,10); ThreadPool pool(3,10);

@ -3,7 +3,7 @@
#define CPP_START_TIME_ELAPSED_ASPECT_H #define CPP_START_TIME_ELAPSED_ASPECT_H
#include <iostream> #include <iostream>
#include "../stop_watch.h" #include "../util/stop_watch.h"
class TimeElapsedAspect { class TimeElapsedAspect {
private: private:

Loading…
Cancel
Save