diff --git a/17.IteratorPattern/2.Code/CMakeLists.txt b/17.IteratorPattern/2.Code/CMakeLists.txt new file mode 100644 index 0000000..4629bdf --- /dev/null +++ b/17.IteratorPattern/2.Code/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.15) +project(Iterator) + +set(WORK_DIR ../) +set(EXECUTABLE_OUTPUT_PATH ${WORK_DIR}/bin) + +set(CMAKE_CXX_STANDARD 11) + +# 搜索指定路径下的cpp文件,组成一个列表,结果保存至SRC_LIST变量 +# CMAKE_CURRENT_SOURCE_DIR是CMakeLists.txt文件所在的路径 +file(GLOB SRC_LIST ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) +add_executable(app ${SRC_LIST}) \ No newline at end of file