unicstl/CMakelists.txt

25 lines
519 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 0. cmake 最低版本号要求
cmake_minimum_required(VERSION 3.29)
# 0. 项目信息
project(demo)
# 0. 查找当前目录下的所有文件并将名称保存在DIR_SRC中
# aux_source_directory(. DIR_SRC)
# 1. 添加头文件路径
include_directories(include)
# 1. 添加子目录
add_subdirectory(src)
add_subdirectory(test)
# 2. 支持GDB
set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g --std=c99")
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall --std=c99")
# install
set(CMAKE_INSTALL_PREFIX "release")