From 74a44fd073aae6f9eeb87c634245f3639ab663f5 Mon Sep 17 00:00:00 2001 From: fengqiangguo Date: Sun, 6 Aug 2023 16:38:09 +0800 Subject: [PATCH] Add CMakeLists.txt at root dir. --- 01.SimpleFactory/2.Code/CMakeLists.txt | 3 ++- 02.FactoryMethod/2.Code/CMakeLists.txt | 5 +++-- CMakeLists.txt | 7 +++++++ 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 CMakeLists.txt diff --git a/01.SimpleFactory/2.Code/CMakeLists.txt b/01.SimpleFactory/2.Code/CMakeLists.txt index 1362297..93b1d2d 100644 --- a/01.SimpleFactory/2.Code/CMakeLists.txt +++ b/01.SimpleFactory/2.Code/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required(VERSION 3.10) project(SimpleFactory) set(SRC_LIST main.cpp) -add_executable(app ${SRC_LIST}) \ No newline at end of file +add_executable(app1 ${SRC_LIST}) +set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_PATH}/bin/) \ No newline at end of file diff --git a/02.FactoryMethod/2.Code/CMakeLists.txt b/02.FactoryMethod/2.Code/CMakeLists.txt index 8eecb38..85cb4f3 100644 --- a/02.FactoryMethod/2.Code/CMakeLists.txt +++ b/02.FactoryMethod/2.Code/CMakeLists.txt @@ -1,3 +1,4 @@ cmake_minimum_required(VERSION 3.10) -project(Example) -add_executable(app main.cpp) \ No newline at end of file +project(FactoryMethod) +add_executable(app2 main.cpp) +set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_PATH}/bin/) \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f05a4a2 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(cplusplus_design_pattern) + +set(OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) + +add_subdirectory(01.SimpleFactory/2.Code/) +add_subdirectory(02.FactoryMethod/2.Code/)