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

13 lines
513 B
CMake
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

cmake_minimum_required(VERSION 3.15)
project(Iterator)
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})
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(app17 ${SRC_LIST})