加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
all_project.cmake 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
pengjinlu 提交于 2024-04-30 10:26 . hiredis 初始化 编译动态库
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed
set(CMAKE_AUTOMOC ON)
# Create code from a list of Qt designer ui files
set(CMAKE_AUTOUIC ON)
#生成pdb
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Z7")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /POT:ICF")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /POT:ICF")
set(CMAKE_CONFIGURATION_TYPES "Release")
######################使用多处理器编译########################
if(MSVC)
OPTION(USE_MP "use multiple" ON)
OPTION(ProjectConfig_Global_COMPILE_FLAGS_WITH_MP
"Set The Global Option COMPILE_FLAGS /MP to target." ON)
if(ProjectConfig_Global_COMPILE_FLAGS_WITH_MP OR USE_MP)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
endif()
set(VS_STARTUP_PROJECT ${PROJECT_NAME})
ENDIF(MSVC)
#set Qt dir
set(CMAKE_PREFIX_PATH $ENV{QTDIR5113_64})
#设置宽字符
add_definitions(-DUNICODE -D_UNICODE)
function(GetOutputDir dir)
if(WIN32)
set(dir ${PROJECT_SOURCE_DIR}/bin/Windows)
elseif(UNIX)
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
set(dir ${PROJECT_SOURCE_DIR}/bin/Uos)
else()
set(dir ${PROJECT_SOURCE_DIR}/bin/Ubuntu)
endif()
endif()
endfunction()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化