加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
Bob Apthorpe 提交于 2019-07-17 12:09 . Added CTest support
cmake_minimum_required(VERSION 3.1)
project(xlnt_all)
# CTest setup
# include (CTest) # Add this for valgrind support; CTest works without it
enable_testing()
# This indicates to CMakeLists in subdirectories that they are part of a larger project
set(COMBINED_PROJECT TRUE)
# Library type
option(STATIC "Set to ON to build xlnt as a static library instead of a shared library" OFF)
# c++ language standard to use
set(XLNT_VALID_LANGS 11 14 17)
set(XLNT_CXX_LANG "14" CACHE STRING "c++ language features to compile with")
# enumerate allowed values for cmake gui
set_property(CACHE XLNT_CXX_LANG PROPERTY STRINGS ${XLNT_VALID_LANGS})
# validate value is in XLNT_VALID_LANGS
list(FIND XLNT_VALID_LANGS ${XLNT_CXX_LANG} index)
if(index EQUAL -1)
message(FATAL_ERROR "XLNT_CXX_LANG must be one of ${XLNT_VALID_LANGS}")
endif()
# Optional components
option(TESTS "Set to OFF to skip building test executable (in ./tests)" ON)
option(SAMPLES "Set to ON to build executable code samples (in ./samples)" OFF)
option(BENCHMARKS "Set to ON to build performance benchmarks (in ./benchmarks)" OFF)
option(PYTHON "Set to ON to build Arrow conversion functions (in ./python)" OFF)
# Platform specific options
if(MSVC)
option(STATIC_CRT "Link with the static version of MSVCRT (/MD[d])" OFF)
else()
option(COVERAGE "Generate coverage data using gcov" OFF)
endif()
# Add components according to selected options
if(SAMPLES)
add_subdirectory(samples)
endif()
if(BENCHMARKS)
add_subdirectory(benchmarks)
endif()
if(TESTS)
add_subdirectory(tests)
endif()
if(PYTHON)
add_subdirectory(python)
endif()
add_subdirectory(source)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化