Skip to content

Commit

Permalink
Create a C++-only version of the app4triqs skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed Jul 26, 2023
1 parent 178fe60 commit 7933744
Show file tree
Hide file tree
Showing 17 changed files with 5 additions and 264 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: build

on:
push:
branches: [ notriqs ]
branches: [ cpp_only_notriqs ]
pull_request:
branches: [ notriqs ]
branches: [ cpp_only_notriqs ]

jobs:
build:
Expand Down
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ if(NOT IS_SUBPROJECT)
message(STATUS "-------- BUILD-TYPE: ${CMAKE_BUILD_TYPE} --------")
endif()

# Python Support
option(PythonSupport "Build with Python support" ON)

# Documentation
option(Build_Documentation "Build documentation" OFF)
if(Build_Documentation AND NOT PythonSupport)
Expand Down Expand Up @@ -144,11 +141,6 @@ if(Build_Tests)
add_subdirectory(test)
endif()

# Python
if(PythonSupport)
add_subdirectory(python/${PROJECT_NAME})
endif()

# Docs
if(Build_Documentation)
add_subdirectory(doc)
Expand Down
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To adapt this skeleton for a new TRIQS application, the following steps are nece
* Run the following commands in order after replacing **appname** accordingly

```bash
git clone https://github.com/triqs/app4triqs --branch unstable appname
git clone https://github.com/triqs/app4triqs --branch cpp_only appname
cd appname
./share/squash_history.sh
./share/replace_and_rename.py appname
Expand All @@ -36,7 +36,7 @@ You can merge future changes to the app4triqs skeleton into your project with th

```bash
git remote update
git merge app4triqs_remote/unstable -m "Merge latest app4triqs skeleton changes"
git merge app4triqs_remote/cpp_only -m "Merge latest app4triqs skeleton changes"
```

If you should encounter any conflicts resolve them and `git commit`.
Expand All @@ -56,9 +56,6 @@ according to your needs (replace app4triqs in the following by the name of your
* Adjust or remove the `README.md` and `doc/ChangeLog.md` file
* In the `c++/app4triqs` subdirectory adjust the example files `app4triqs.hpp` and `app4triqs.cpp` or add your own source files.
* In the `test/c++` subdirectory adjust the example test `basic.cpp` or add your own tests.
* In the `python/app4triqs` subdirectory add your Python source files.
Be sure to remove the `app4triqs_module_desc.py` file unless you want to generate a Python module from your C++ source code.
* In the `test/python` subdirectory adjust the example test `Basic.py` or add your own tests.
* Adjust any documentation examples given as `*.rst` files in the doc directory.
* Adjust the sphinx configuration in `doc/conf.py.in` as necessary.
* The build and install process is identical to the one outline [here](https://triqs.github.io/app4triqs/unstable/install.html).
Expand Down
2 changes: 1 addition & 1 deletion deps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ else()
endif()

# -- Cpp2Py --
if(PythonSupport OR Build_Documentation)
if(Build_Documentation)
external_dependency(Cpp2Py
GIT_REPO https://github.com/TRIQS/cpp2py
VERSION 2.0
Expand Down
6 changes: 0 additions & 6 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ add_custom_command(

option(Sphinx_Only "When building the documentation, skip the Python Modules and the generation of C++ Api and example outputs" OFF)
if(NOT Sphinx_Only)
# Autodoc usage requires the python modules to be built first
get_property(CPP2PY_MODULES_LIST GLOBAL PROPERTY CPP2PY_MODULES_LIST)
if(CPP2PY_MODULES_LIST)
add_dependencies(${PROJECT_NAME}_docs_sphinx ${CPP2PY_MODULES_LIST})
endif()

# Generation of C++ Api and Example Outputs
add_dependencies(${PROJECT_NAME}_docs_sphinx ${PROJECT_NAME}_docs_cpp2rst ${PROJECT_NAME}_docs_example_output)
endif()
Expand Down
10 changes: 0 additions & 10 deletions doc/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,3 @@ C++ reference manual
:maxdepth: 5

cpp2rst_generated/contents

Python reference manual
=======================

.. autosummary::
:toctree: _autosummary
:template: autosummary_module_template.rst
:recursive:

app4triqs
26 changes: 0 additions & 26 deletions python/app4triqs/CMakeLists.txt

This file was deleted.

30 changes: 0 additions & 30 deletions python/app4triqs/__init__.py

This file was deleted.

76 changes: 0 additions & 76 deletions python/app4triqs/app4triqs_module_desc.py

This file was deleted.

31 changes: 0 additions & 31 deletions python/app4triqs/version.py.in

This file was deleted.

5 changes: 0 additions & 5 deletions share/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ if(NOT IS_SUBPROJECT
AND NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr/local"
)

if(PythonSupport)
set(EXPORT_PYTHON_PATH "export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CPP2PY_PYTHON_LIB_DEST_ROOT}:$PYTHONPATH")
set(MODFILE_PYTHON_PATH "prepend-path PYTHONPATH $root/${CPP2PY_PYTHON_LIB_DEST_ROOT}")
endif()

configure_file(${PROJECT_NAME}.modulefile.in ${PROJECT_NAME}.modulefile @ONLY)
configure_file(${PROJECT_NAME}vars.sh.in ${PROJECT_NAME}vars.sh @ONLY)

Expand Down
1 change: 0 additions & 1 deletion share/app4triqs.modulefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ prepend-path CPLUS_INCLUDE_PATH $root/include
prepend-path LIBRARY_PATH $root/lib
prepend-path LD_LIBRARY_PATH $root/lib
prepend-path CMAKE_PREFIX_PATH $root
@MODFILE_PYTHON_PATH@
1 change: 0 additions & 1 deletion share/app4triqsvars.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ export PATH=@CMAKE_INSTALL_PREFIX@/bin:$PATH
export LIBRARY_PATH=@CMAKE_INSTALL_PREFIX@/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=@CMAKE_INSTALL_PREFIX@/lib:$LD_LIBRARY_PATH
export CMAKE_PREFIX_PATH=@CMAKE_INSTALL_PREFIX@:$CMAKE_PREFIX_PATH
@EXPORT_PYTHON_PATH@
6 changes: 0 additions & 6 deletions share/cmake/app4triqs-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,4 @@ message(STATUS "Found @[email protected] with version @PROJECT_VERSION@
# Was the Project built with Documentation?
set(@PROJECT_NAME@_WITH_DOCUMENTATION @Build_Documentation@ CACHE BOOL "Was @PROJECT_NAME@ build with documentation?")

# Was the Project built with PythonSupport?
set(@PROJECT_NAME@_WITH_PYTHON_SUPPORT @PythonSupport@ CACHE BOOL "Was @PROJECT_NAME@ build with python support?")
if(@PythonSupport@)
set(@PROJECT_NAME@_MODULE_DIR @CMAKE_INSTALL_PREFIX@/@CPP2PY_PYTHON_LIB_DEST_ROOT@ CACHE BOOL "The @PROJECT_NAME@ python module directory")
endif()

endif()
4 changes: 0 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
add_subdirectory(c++)

if(PythonSupport)
add_subdirectory(python)
endif()
37 changes: 0 additions & 37 deletions test/python/Basic.py

This file was deleted.

15 changes: 0 additions & 15 deletions test/python/CMakeLists.txt

This file was deleted.

0 comments on commit 7933744

Please sign in to comment.