DesignPattern/17.IteratorPattern/2.Code/CMakeLists.txt

13 lines
513 B
CMake
Raw Normal View History

2023-08-06 03:30:54 +00:00
cmake_minimum_required(VERSION 3.15)
project(Iterator)
2023-08-08 14:10:55 +00:00
get_filename_component(FOLDER_NAME ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
get_filename_component(FOLDER_NAME ${FOLDER_NAME} NAME)
set(EXECUTABLE_OUTPUT_PATH ${OUTPUT_DIR}/${FOLDER_NAME})
2023-08-06 03:30:54 +00:00
set(CMAKE_CXX_STANDARD 11)
# 搜索指定路径下的cpp文件组成一个列表结果保存至SRC_LIST变量
# CMAKE_CURRENT_SOURCE_DIR是CMakeLists.txt文件所在的路径
file(GLOB SRC_LIST ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
2023-08-08 14:10:55 +00:00
add_executable(app17 ${SRC_LIST})