1 Star 0 Fork 0

黄慧亭/cgal

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CMakeLists.txt 2.03 KB
一键复制 编辑 原始数据 按行查看 历史
# Top level CMakeLists.txt for CGAL-branchbuild
# Minimal version of CMake:
cmake_minimum_required(VERSION 3.1)
message( "== CMake setup ==" )
cmake_minimum_required(VERSION 3.1...3.15)
project(CGAL CXX C)
export(PACKAGE CGAL)
set( CGAL_BRANCH_BUILD ON CACHE INTERNAL "Create CGAL from a Git branch" FORCE)
include(${CMAKE_SOURCE_DIR}/CGALConfigVersion.cmake)
include(${CMAKE_SOURCE_DIR}/Installation/cmake/modules/CGAL_SCM.cmake)
CGAL_detect_git(${CMAKE_SOURCE_DIR})
function(CGAL_error_if_detect_in_source_build)
# If in a Git repository, forbid in-source builds
get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH)
get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
if("${srcdir}" STREQUAL "${bindir}")
message(FATAL_ERROR [=[
############
Since CGAL-4.12.1, you can no longer configure an in-source build in a Git
repository. See this StackOverlow question and answers for a way to create
a separate build directory:
https://stackoverflow.com/q/45518317/1728537
############
]=])
endif()
endfunction()
if ( "${CGAL_SCM_NAME}" STREQUAL "git" )
CGAL_error_if_detect_in_source_build()
endif()
# add option for duplicate file detection
option( CGAL_REPORT_DUPLICATE_FILES "Switch on to start (naive) detection of duplicate source- and headerfiles in packages" OFF)
message( "== CMake setup (DONE) ==\n" )
# Enable testing with BUILD_TESTING
option(BUILD_TESTING "Build the testing tree." OFF)
if(BUILD_TESTING AND NOT POLICY CMP0064)
message(FATAL_ERROR "CGAL support of CTest requires CMake version 3.4 or later.
The variable BUILD_TESTING must be set of OFF.")
endif()
if(BUILD_TESTING)
enable_testing()
endif()
# and finally start actual build
add_subdirectory( Installation )
add_subdirectory( Documentation/doc)
if(NOT TARGET uninstall)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P
${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/atinmo/cgal.git
git@gitee.com:atinmo/cgal.git
atinmo
cgal
cgal
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385