-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initialize project from github.com/triqs/app4triqs@4de9b2a
- Loading branch information
0 parents
commit 687f60b
Showing
75 changed files
with
5,580 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
BasedOnStyle: LLVM | ||
|
||
AccessModifierOffset: 0 | ||
AlignAfterOpenBracket: Align | ||
AlignConsecutiveAssignments: true | ||
AlignConsecutiveDeclarations: false | ||
AlignEscapedNewlinesLeft: false | ||
AlignOperands: false | ||
AlignTrailingComments: true | ||
AllowAllParametersOfDeclarationOnNextLine: false | ||
AllowShortBlocksOnASingleLine: true | ||
AllowShortCaseLabelsOnASingleLine: true | ||
AllowShortFunctionsOnASingleLine: All | ||
AllowShortIfStatementsOnASingleLine: true | ||
AllowShortLoopsOnASingleLine: true | ||
AlwaysBreakBeforeMultilineStrings: true | ||
AlwaysBreakTemplateDeclarations: false | ||
BinPackArguments: true | ||
BinPackParameters: true | ||
BreakBeforeBinaryOperators: NonAssignment | ||
BreakBeforeBraces: Attach | ||
BreakBeforeTernaryOperators: false | ||
BreakConstructorInitializersBeforeComma: false | ||
BreakStringLiterals: false | ||
ColumnLimit: 150 | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
ConstructorInitializerIndentWidth: 3 | ||
ContinuationIndentWidth: 3 | ||
Cpp11BracedListStyle: true | ||
DerivePointerBinding : false | ||
IndentCaseLabels: true | ||
IndentWidth: 2 | ||
Language: Cpp | ||
MaxEmptyLinesToKeep: 1 | ||
NamespaceIndentation : All | ||
PointerAlignment: Right | ||
ReflowComments: false | ||
SortIncludes: false | ||
SpaceAfterControlStatementKeyword: true | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceInEmptyParentheses: false | ||
SpacesInParentheses: false | ||
Standard: Cpp11 | ||
TabWidth: 2 | ||
UseTab: Never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Checks: '-*,modernize-*,cppcoreguidelines-*,-modernize-use-trailing-return-type' | ||
HeaderFilterRegex: 'app4triqs' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.travis.yml | ||
Dockerfile | ||
Jenkinsfile | ||
.git/objects/pack | ||
build* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: Bug report | ||
labels: bug | ||
|
||
--- | ||
|
||
### Prerequisites | ||
|
||
* Please check that a similar issue isn't already filed: https://github.com/issues?q=is%3Aissue+user%3Atriqs | ||
|
||
### Description | ||
|
||
[Description of the issue] | ||
|
||
### Steps to Reproduce | ||
|
||
1. [First Step] | ||
2. [Second Step] | ||
3. [and so on...] | ||
|
||
or paste a minimal code example to reproduce the issue. | ||
|
||
**Expected behavior:** [What you expect to happen] | ||
|
||
**Actual behavior:** [What actually happens] | ||
|
||
### Versions | ||
|
||
Please provide the application version that you used. | ||
|
||
You can get this information from copy and pasting the output of | ||
```bash | ||
python -c "from app4triqs.version import *; show_version(); show_git_hash();" | ||
``` | ||
from the command line. Also, please include the OS you are running and its version. | ||
|
||
### Formatting | ||
|
||
Please use markdown in your issue message. A useful summary of commands can be found [here](https://guides.github.com/pdfs/markdown-cheatsheet-online.pdf). | ||
|
||
### Additional Information | ||
|
||
Any additional information, configuration or data that might be necessary to reproduce the issue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: Feature request | ||
labels: feature | ||
|
||
--- | ||
|
||
### Summary | ||
|
||
One paragraph explanation of the feature. | ||
|
||
### Motivation | ||
|
||
Why is this feature of general interest? | ||
|
||
### Implementation | ||
|
||
What user interface do you suggest? | ||
|
||
### Formatting | ||
|
||
Please use markdown in your issue message. A useful summary of commands can be found [here](https://guides.github.com/pdfs/markdown-cheatsheet-online.pdf). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ unstable ] | ||
pull_request: | ||
branches: [ unstable ] | ||
|
||
jobs: | ||
build: | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- {os: ubuntu-20.04, cc: gcc-10, cxx: g++-10} | ||
- {os: ubuntu-20.04, cc: clang-10, cxx: clang++-10} | ||
- {os: macos-10.15, cc: gcc-10, cxx: g++-10} | ||
- {os: macos-10.15, cc: /usr/local/opt/llvm/bin/clang, cxx: /usr/local/opt/llvm/bin/clang++} | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install ubuntu dependencies | ||
if: matrix.os == 'ubuntu-20.04' | ||
run: > | ||
sudo apt-get update && | ||
sudo apt-get install | ||
clang-10 | ||
g++-10 | ||
gfortran | ||
hdf5-tools | ||
libblas-dev | ||
libboost-dev | ||
libclang-10-dev | ||
libc++-10-dev | ||
libc++abi-10-dev | ||
libfftw3-dev | ||
libgfortran4 | ||
libgmp-dev | ||
libhdf5-dev | ||
liblapack-dev | ||
libopenmpi-dev | ||
openmpi-bin | ||
openmpi-common | ||
openmpi-doc | ||
python3-clang-10 | ||
python3-dev | ||
python3-mako | ||
python3-matplotlib | ||
python3-mpi4py | ||
python3-numpy | ||
python3-pip | ||
python3-scipy | ||
python3-sphinx | ||
python3-nbsphinx | ||
- name: Install homebrew dependencies | ||
if: matrix.os == 'macos-10.15' | ||
run: | | ||
brew install gcc@10 llvm boost fftw hdf5 open-mpi openblas | ||
pip3 install mako numpy scipy mpi4py | ||
pip3 install -r requirements.txt | ||
- name: Build & Install TRIQS | ||
env: | ||
CC: ${{ matrix.cc }} | ||
CXX: ${{ matrix.cxx }} | ||
run: | | ||
git clone https://github.com/TRIQS/triqs --branch unstable | ||
mkdir triqs/build && cd triqs/build | ||
cmake .. -DBuild_Tests=OFF -DCMAKE_INSTALL_PREFIX=$HOME/install | ||
make -j1 install VERBOSE=1 | ||
cd ../ | ||
- name: Build app4triqs | ||
env: | ||
CC: ${{ matrix.cc }} | ||
CXX: ${{ matrix.cxx }} | ||
LIBRARY_PATH: /usr/local/opt/llvm/lib | ||
run: | | ||
source $HOME/install/share/triqs/triqsvars.sh | ||
mkdir build && cmake -B build | ||
cmake --build build -j2 | ||
- name: Test app4triqs | ||
env: | ||
DYLD_FALLBACK_LIBRARY_PATH: /usr/local/opt/llvm/lib | ||
run: | | ||
source $HOME/install/share/triqs/triqsvars.sh | ||
cd build | ||
ctest -j2 --output-on-failure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
compile_commands.json | ||
doc/cpp2rst_generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
# ############################################################################## | ||
# | ||
# app4triqs - An example application using triqs and cpp2py | ||
# | ||
# Copyright (C) ... | ||
# | ||
# app4triqs is free software: you can redistribute it and/or modify it under the | ||
# terms of the GNU General Public License as published by the Free Software | ||
# Foundation, either version 3 of the License, or (at your option) any later | ||
# version. | ||
# | ||
# app4triqs is distributed in the hope that it will be useful, but WITHOUT ANY | ||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
# A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License along with | ||
# app4triqs (in the file COPYING.txt in this directory). If not, see | ||
# <http://www.gnu.org/licenses/>. | ||
# | ||
# ############################################################################## | ||
|
||
cmake_minimum_required(VERSION 3.9.6 FATAL_ERROR) | ||
cmake_policy(VERSION 3.9.6) | ||
if(POLICY CMP0074) | ||
cmake_policy(SET CMP0074 NEW) | ||
endif() | ||
if(POLICY CMP0077) | ||
cmake_policy(SET CMP0077 NEW) | ||
endif() | ||
|
||
# ############ | ||
# Define Project | ||
project(app4triqs VERSION 3.0.0 LANGUAGES C CXX) | ||
get_directory_property(IS_SUBPROJECT PARENT_DIRECTORY) | ||
|
||
# ############ | ||
# Load TRIQS and CPP2PY | ||
find_package(TRIQS 3.0 REQUIRED) | ||
|
||
# Get the git hash & print status | ||
triqs_get_git_hash_of_source_dir(PROJECT_GIT_HASH) | ||
message(STATUS "${PROJECT_NAME} version : ${PROJECT_VERSION}") | ||
message(STATUS "${PROJECT_NAME} Git hash: ${PROJECT_GIT_HASH}") | ||
|
||
# Enforce Consistent Versioning | ||
if(NOT ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR} VERSION_EQUAL ${TRIQS_VERSION_MAJOR}.${TRIQS_VERSION_MINOR}) | ||
message(FATAL_ERROR "The ${PROJECT_NAME} version ${PROJECT_VERSION} is not compatible with TRIQS version ${TRIQS_VERSION}.") | ||
endif() | ||
|
||
# Default Install directory to TRIQS_ROOT if not given or invalid. | ||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR (NOT IS_ABSOLUTE ${CMAKE_INSTALL_PREFIX})) | ||
message(STATUS "No install prefix given (or invalid). Defaulting to TRIQS_ROOT") | ||
set(CMAKE_INSTALL_PREFIX ${TRIQS_ROOT} CACHE PATH "default install path" FORCE) | ||
set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT FALSE) | ||
endif() | ||
if(NOT IS_SUBPROJECT) | ||
message(STATUS "-------- CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX} --------") | ||
endif() | ||
set(${PROJECT_NAME}_BINARY_DIR ${PROJECT_BINARY_DIR} CACHE STRING "Binary directory of the ${PROJECT_NAME} Project") | ||
|
||
# Make additional Find Modules available | ||
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/share/cmake/Modules) | ||
|
||
# ############ | ||
# CMake Options | ||
|
||
# Default to Release build type | ||
if(NOT CMAKE_BUILD_TYPE) | ||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Type of build" FORCE) | ||
endif() | ||
if(NOT IS_SUBPROJECT) | ||
message(STATUS "-------- BUILD-TYPE: ${CMAKE_BUILD_TYPE} --------") | ||
endif() | ||
|
||
# Python Support | ||
if(NOT TRIQS_WITH_PYTHON_SUPPORT) | ||
message(FATAL_ERROR "TRIQS was installed without Python support. Cannot build the Python Interface. Disable the build with -DPythonSupport=OFF") | ||
endif() | ||
|
||
# Documentation | ||
option(Build_Documentation "Build documentation" OFF) | ||
|
||
# Testing | ||
option(Build_Tests "Build tests" ON) | ||
if(Build_Tests) | ||
enable_testing() | ||
endif() | ||
|
||
# ############# | ||
# Build Project | ||
|
||
# Find / Build dependencies | ||
add_subdirectory(deps) | ||
|
||
# Tests | ||
if(Build_Tests) | ||
add_subdirectory(test) | ||
endif() | ||
|
||
# Python | ||
add_subdirectory(python/${PROJECT_NAME}) | ||
|
||
# Docs | ||
if(Build_Documentation) | ||
add_subdirectory(doc) | ||
endif() | ||
|
||
# Additional configuration files | ||
add_subdirectory(share) | ||
|
||
# ############# | ||
# Debian Package | ||
|
||
option(BUILD_DEBIAN_PACKAGE "Build a deb package" OFF) | ||
if(BUILD_DEBIAN_PACKAGE AND NOT IS_SUBPROJECT) | ||
if(NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr") | ||
message(FATAL_ERROR "CMAKE_INSTALL_PREFIX must be /usr for packaging") | ||
endif() | ||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) | ||
set(CPACK_GENERATOR "DEB") | ||
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) | ||
set(CPACK_PACKAGE_CONTACT "https://github.com/TRIQS/${PROJECT_NAME}") | ||
execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CMAKE_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "triqs (>= 3.0)") | ||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) | ||
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON) | ||
include(CPack) | ||
endif() |
Oops, something went wrong.