File tree Expand file tree Collapse file tree 5 files changed +8
-47
lines changed Expand file tree Collapse file tree 5 files changed +8
-47
lines changed Original file line number Diff line number Diff line change 11# ##############################################################################
22#
3- # triqs_dft_tools - An example application using triqs and cpp2py
3+ # triqs_dft_tools - An example application using triqs
44#
55# Copyright (C) ...
66#
@@ -28,7 +28,7 @@ project(triqs_dft_tools VERSION 3.3.1 LANGUAGES C CXX Fortran)
2828get_directory_property (IS_SUBPROJECT PARENT_DIRECTORY )
2929
3030# ############
31- # Load TRIQS and CPP2PY
31+ # Load TRIQS
3232find_package (TRIQS 3.3 REQUIRED)
3333
3434# Get the git hash & print status
@@ -66,17 +66,8 @@ if(NOT IS_SUBPROJECT)
6666 message (STATUS "-------- BUILD-TYPE: ${CMAKE_BUILD_TYPE} --------" )
6767endif ()
6868
69- # Python Support
70- option (PythonSupport "Build with Python support" ON )
71- if (PythonSupport AND NOT TRIQS_WITH_PYTHON_SUPPORT)
72- message (FATAL_ERROR "TRIQS was installed without Python support. Cannot build the Python Interface. Disable the build with -DPythonSupport=OFF" )
73- endif ()
74-
7569# Documentation
7670option (Build_Documentation "Build documentation" OFF )
77- if (NOT IS_SUBPROJECT AND (Build_Documentation AND NOT PythonSupport))
78- message (FATAL_ERROR "Build_Documentation=ON requires PythonSupport to be enabled" )
79- endif ()
8071
8172# Testing
8273option (Build_Tests "Build tests" ON )
@@ -140,9 +131,7 @@ if(Build_Tests)
140131endif ()
141132
142133# Python
143- if (PythonSupport)
144- add_subdirectory (python/${PROJECT_NAME} )
145- endif ()
134+ add_subdirectory (python/${PROJECT_NAME} )
146135
147136# Docs
148137if (NOT IS_SUBPROJECT AND Build_Documentation)
Original file line number Diff line number Diff line change @@ -47,17 +47,6 @@ else()
4747 endif ()
4848endif ()
4949
50- # -- Cpp2Py --
51- if (PythonSupport OR (NOT IS_SUBPROJECT AND Build_Documentation))
52- external_dependency(Cpp2Py
53- GIT_REPO https://github.com/TRIQS/cpp2py
54- VERSION 3.3
55- GIT_TAG main
56- BUILD_ALWAYS
57- EXCLUDE_FROM_ALL
58- )
59- endif ()
60-
6150# -- GTest --
6251external_dependency(GTest
6352 GIT_REPO https://github.com/google/googletest
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ configure_file(version.py.in version.py)
33
44# All Python files. Copy them in the build dir to have a complete package for the tests.
55file (GLOB_RECURSE python_sources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.py)
6- list (REMOVE_ITEM python_sources "${wrap_generators} " )
76foreach (file ${python_sources} )
87 configure_file (${file} ${file} COPYONLY )
98endforeach ()
@@ -12,14 +11,3 @@ endforeach()
1211set (PYTHON_LIB_DEST ${TRIQS_PYTHON_LIB_DEST_ROOT} /${PROJECT_NAME} )
1312install (FILES ${CMAKE_CURRENT_BINARY_DIR} /version .py DESTINATION ${PYTHON_LIB_DEST} )
1413install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${TRIQS_PYTHON_LIB_DEST_ROOT} FILES_MATCHING PATTERN "*.py" PATTERN "*_desc.py" EXCLUDE )
15-
16- # Build and install any python modules
17- foreach (gen ${wrap_generators} )
18- string (REPLACE "_desc.py" "" gen ${gen} )
19- get_filename_component (module_name ${gen} NAME_WE )
20- get_filename_component (module_dir ${gen} DIRECTORY )
21- add_cpp2py_module(NAME ${module_name} DIRECTORY ${module_dir} )
22- add_library (${PROJECT_NAME} ::${module_name} ALIAS ${module_name} )
23- target_link_libraries (${module_name} ${PROJECT_NAME} _c triqs_py)
24- install (TARGETS ${module_name} DESTINATION ${PYTHON_LIB_DEST} /${module_dir} )
25- endforeach ()
Original file line number Diff line number Diff line change @@ -6,10 +6,8 @@ if(NOT IS_SUBPROJECT
66 AND NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr/local"
77)
88
9- if (PythonSupport)
10- set (EXPORT_PYTHON_PATH "export PYTHONPATH=${CMAKE_INSTALL_PREFIX} /${CPP2PY_PYTHON_LIB_DEST_ROOT} :$PYTHONPATH" )
11- set (MODFILE_PYTHON_PATH "prepend-path PYTHONPATH $root/${CPP2PY_PYTHON_LIB_DEST_ROOT} " )
12- endif ()
9+ set (EXPORT_PYTHON_PATH "export PYTHONPATH=${CMAKE_INSTALL_PREFIX} /${CPP2PY_PYTHON_LIB_DEST_ROOT} :$PYTHONPATH" )
10+ set (MODFILE_PYTHON_PATH "prepend-path PYTHONPATH $root/${CPP2PY_PYTHON_LIB_DEST_ROOT} " )
1311
1412 configure_file (${PROJECT_NAME} .modulefile.in ${PROJECT_NAME} .modulefile @ONLY)
1513 configure_file (${PROJECT_NAME} vars.sh.in ${PROJECT_NAME} vars.sh @ONLY)
Original file line number Diff line number Diff line change 1-
2- if (PythonSupport)
3- add_subdirectory (python)
4- add_subdirectory (python/plovasp)
5- add_subdirectory (python/elk)
6- endif ()
1+ add_subdirectory (python)
2+ add_subdirectory (python/plovasp)
3+ add_subdirectory (python/elk)
You can’t perform that action at this time.
0 commit comments