-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.template
43 lines (34 loc) · 1.57 KB
/
CMakeLists.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# MAIN CMAKElISTS.TXT TO COMPILE SUBDIRECTORIES IN ROOT FOLDER OF AXIOM
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
cmake_minimum_required(VERSION 3.1.0)
site_name(HostName)
message("HostName = ${HostName}")
set(HOME $ENV{HOME})
message("HOME = ${HOME}")
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# FIND PYTHON LIBRARIES AND COMPILE PYBIND11
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
project (AXIOM)
if("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")
message(FATAL_ERROR "\nIn-source builds are not allowed. Clean up by:\n rm -rf CMakeCache.txt CMakeFiles")
endif()
find_package(PythonLibs 3.6 REQUIRED)
find_package(PythonInterp 3.6 REQUIRED)
include_directories(${include_directories} ${CPLUS_INCLUDE_DIR} ${PYTHON_INCLUDE_DIR})
add_subdirectory(ext_pybind11)
if(UNIX OR APPLE OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated -std=c++11")
else()
message(FATAL_ERROR "CMakeLists.txt has not been tested/written for your compiler.= ${CMAKE_COMPILER_IS_GNUCXX}")
endif()
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# CLEAN
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
add_custom_target(clean-all
command ${CMAKE_MAKE_PROGRAM} clean
command rm -rf CMakeFiles CMakeCache.txt cmake*.cmake
)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# EXAMPLES (ADD YOUR OWN DIRECTORIES BELOW)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # #