│ ├─example
│ └─gexport
├─LibPython
│ ├─example
│ │ └─__pycache__
│ └─gexport
└─_doc
[请戳我下载]( ),下面展示部分文件
---
### Chap.I CMakeLists
下面是一个主 CMakeLists。
要求的 CMAKE 最低版本号
cmake_minimum_required(VERSION 3.0.0)
项目名和版本号
project(Temp VERSION 1.0.0)
information message
编译器设置
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG(“-std=c++11” COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG(“-std=c++0x” COMPILER_SUPPORTS_CXX0X)
编译选项设置
if(CMAKE_SYSTEM_NAME MATCHES “Windows”)
SET(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}_Windows)
add_compile_options(/bigobj)
add_compile_options(/MP)
add_compile_options(/w)
endif()
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS “ C M A K E _ C X X _ F L A G S − s t d = c + + 11 − p t h r e a d " ) e l s e i f ( C O M P I L E R S U P P O R T S C X X 0 X ) s e t ( C M A K E C X X F L A G S " {CMAKE\_CXX\_FLAGS} -std=c++11 -pthread") elseif(COMPILER_SUPPORTS_CXX0X) set(CMAKE_CXX_FLAGS " CMAKE_CXX_FLAGS−std=c++11−pthread")elseif(COMPILERSUPPORTSCXX0X)set(CMAKE