You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1021 B

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 的最低要求版本
cmake_minimum_required(VERSION 3.25)
# 设置c++版本要求
set(CMAKE_CXX_STANDARD 11)
# 强制指定,不允许编译器降级
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# 关闭编译器扩展功能
set(CMAKE_CXX_EXTENSIONS OFF)
# 项目名称
project(cpp_start LANGUAGES CXX VERSION 1.0.0)
# 设置编译器参数
#set(CMAKE_CXX_FLAGS "-fno-elide-constructors") # 关闭编译优化
# 消息提示
message(STATUS "message from cmake file")
# 添加用于生成可执行文件
add_executable(${PROJECT_NAME} src/main.cpp)
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/ioc IOC_DIR)
aux_source_directory(src/bus BUS_DIR)
aux_source_directory(src/test TEST_DIR)
target_include_directories(${PROJECT_NAME} PRIVATE
)
target_sources(${PROJECT_NAME} PRIVATE
${ASPECT_DIR}
${TEST_DIR}
${BASE_DIR}
${IOC_DIR}
${BUS_DIR}
${UTIL_DIR}
)