From e28230abe4ef6a0c5cf78188a2075d9882140bb3 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Mon, 26 Jun 2023 11:59:29 -0400 Subject: [PATCH 01/15] [gitignore] Ignore doc/_autosummary directory --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 226118b4..d38f325c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ compile_commands.json +doc/_autosummary doc/cpp2rst_generated From 8c67d5e9d35111fb35c270a718e049895f41ff47 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Mon, 26 Jun 2023 14:37:04 -0400 Subject: [PATCH 02/15] Rename easybuild file and update conda meta yaml with version number --- ....1.0-foss-2021b.eb => TRIQS-app4triqs-3.2.0-foss-2021b.eb} | 4 ++-- packaging/conda/meta.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename packaging/{TRIQS-app4triqs-3.1.0-foss-2021b.eb => TRIQS-app4triqs-3.2.0-foss-2021b.eb} (97%) diff --git a/packaging/TRIQS-app4triqs-3.1.0-foss-2021b.eb b/packaging/TRIQS-app4triqs-3.2.0-foss-2021b.eb similarity index 97% rename from packaging/TRIQS-app4triqs-3.1.0-foss-2021b.eb rename to packaging/TRIQS-app4triqs-3.2.0-foss-2021b.eb index 21283b04..113872b1 100644 --- a/packaging/TRIQS-app4triqs-3.1.0-foss-2021b.eb +++ b/packaging/TRIQS-app4triqs-3.2.0-foss-2021b.eb @@ -1,7 +1,7 @@ easyblock = 'CMakeMake' name = 'TRIQS-app4triqs' -version = '3.1.0' +version = '3.2.0' homepage = 'https://triqs.github.io/app4triqs/' description = """ @@ -27,7 +27,7 @@ dependencies = [ ('GMP', '6.2.1'), ('HDF5', '1.10.7'), ('Mako', '1.1.4'), - ('TRIQS', '3.1.0'), + ('TRIQS', '3.2.0'), ('NFFT', '3.5.2') ] diff --git a/packaging/conda/meta.yaml b/packaging/conda/meta.yaml index 2fd369ef..7345f852 100644 --- a/packaging/conda/meta.yaml +++ b/packaging/conda/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "3.0.0" %} +{% set version = "3.2.0" %} package: name: app4triqs From c8955dcc0c192b26eaf60c4ed11faa1f73ef87b5 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Mon, 26 Jun 2023 14:52:20 -0400 Subject: [PATCH 03/15] [ghactions] Fix llvm version number for ubuntu env --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5fe67af5..9eab1ea5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: run: > sudo apt-get update && sudo apt-get install lsb-release wget software-properties-common && - wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh && sudo chmod +x /tmp/llvm.sh && sudo /tmp/llvm.sh 13 && + wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh && sudo chmod +x /tmp/llvm.sh && sudo /tmp/llvm.sh 15 && sudo apt-get install clang-15 g++-12 From b463d5efe6f3ed48820c2a9874a7c468ba8c6be6 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Thu, 6 Jul 2023 14:57:02 -0400 Subject: [PATCH 04/15] Disable C++20 compat warnings --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 833bb9a8..ed2dd7aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,11 +116,13 @@ target_compile_options(${PROJECT_NAME}_warnings $<$:-Wshadow> $<$:-Wno-gcc-compat> $<$:-Wno-c++20-extensions> + $<$:-Wno-c++20-compat> $<$:-Wno-deprecated-comma-subscript> $<$:-Wno-unknown-warning-option> $<$:-Wshadow> $<$:-Wno-gcc-compat> $<$:-Wno-c++20-extensions> + $<$:-Wno-c++20-compat> ) # ############# From 089a5f5ab2aa6db787427428d709f525277c97bc Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Fri, 7 Jul 2023 16:32:42 -0400 Subject: [PATCH 05/15] [cmake] Include build options for TSAN and MSAN --- c++/app4triqs/CMakeLists.txt | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/c++/app4triqs/CMakeLists.txt b/c++/app4triqs/CMakeLists.txt index b9f32c96..12ea5998 100644 --- a/c++/app4triqs/CMakeLists.txt +++ b/c++/app4triqs/CMakeLists.txt @@ -49,7 +49,7 @@ if(ANALYZE_SOURCES) TARGET ${PROJECT_NAME}_c COMMAND ${CPPCHECK_EXECUTABLE} --enable=warning,style,performance,portability - --std=c++20 + --std=c++23 --template=gcc --verbose --force @@ -64,21 +64,28 @@ if(ANALYZE_SOURCES) endif() - # ========= Dynamic Analyzer Checks ========== option(ASAN OFF "Compile library and executables with LLVM Address Sanitizer") -option(UBSAN OFF "Compile library and executables with LLVM Undefined Behavior Sanitizer") - if(ASAN) - if(NOT TARGET asan) - find_package(sanitizer REQUIRED "asan") - endif() + find_package(sanitizer REQUIRED COMPONENTS asan) target_link_libraries(${PROJECT_NAME}_c PUBLIC $) endif() + +option(UBSAN OFF "Compile library and executables with LLVM Undefined Behavior Sanitizer") if(UBSAN) - if(NOT TARGET ubsan) - find_package(sanitizer REQUIRED "ubsan") - endif() + find_package(sanitizer REQUIRED COMPONENTS ubsan) target_link_libraries(${PROJECT_NAME}_c PUBLIC $) endif() + +option(MSAN OFF "Compile library and executables with LLVM Memory Sanitizer") +if(MSAN) + find_package(sanitizer REQUIRED COMPONENTS msan) + target_link_libraries(${PROJECT_NAME}_c PUBLIC $) +endif() + +option(TSAN OFF "Compile library and executables with LLVM Thread Sanitizer") +if(TSAN) + find_package(sanitizer REQUIRED COMPONENTS tsan) + target_link_libraries(${PROJECT_NAME}_c PUBLIC $) +endif() From f23ebdf228ae31d319c961dadf9991ed7b1a8d0e Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Fri, 21 Jul 2023 12:47:04 -0400 Subject: [PATCH 06/15] [cmake] Extend extract_flags.cmake to include cxx_std_23 --- share/cmake/extract_flags.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/cmake/extract_flags.cmake b/share/cmake/extract_flags.cmake index 60e4b453..dd4edffc 100644 --- a/share/cmake/extract_flags.cmake +++ b/share/cmake/extract_flags.cmake @@ -60,7 +60,9 @@ macro(extract_flags) endforeach() get_property_recursive(cxx_features TARGET ${target} PROPERTY INTERFACE_COMPILE_FEATURES) - if(cxx_std_20 IN_LIST cxx_features) + if(cxx_std_23 IN_LIST cxx_features) + set(${target}_CXXFLAGS "${${target}_CXXFLAGS} -std=c++2b") + elseif(cxx_std_20 IN_LIST cxx_features) set(${target}_CXXFLAGS "${${target}_CXXFLAGS} -std=c++20") elseif(cxx_std_17 IN_LIST cxx_features) set(${target}_CXXFLAGS "${${target}_CXXFLAGS} -std=c++17") From fdfe1277ccb0cb97bf69f8d5f4b8766478fe14d4 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Wed, 26 Jul 2023 14:55:30 -0400 Subject: [PATCH 07/15] Do not build documentation for subprojects --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ed2dd7aa..9dd2bfa2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,7 +145,7 @@ if(PythonSupport) endif() # Docs -if(Build_Documentation) +if(NOT IS_SUBPROJECT AND Build_Documentation) add_subdirectory(doc) endif() From 59674b1b9a317b5bfc615dd7c454be256e53b509 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Wed, 26 Jul 2023 15:36:55 -0400 Subject: [PATCH 08/15] [cmake] Do not check doc build options as subproject --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9dd2bfa2..d1a88fb3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,7 +74,7 @@ endif() # Documentation option(Build_Documentation "Build documentation" OFF) -if(Build_Documentation AND NOT PythonSupport) +if(NOT IS_SUBPROJECT AND (Build_Documentation AND NOT PythonSupport)) message(FATAL_ERROR "Build_Documentation=ON requires PythonSupport to be enabled") endif() From 071f4b16a6612824872c7edaa122c405d06ad5ee Mon Sep 17 00:00:00 2001 From: Alexander Hampel Date: Wed, 2 Aug 2023 15:13:45 -0400 Subject: [PATCH 09/15] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 52e2c0b4..1657290f 100644 --- a/README.md +++ b/README.md @@ -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/unstable -X ours -m "Merge latest app4triqs skeleton changes" ``` If you should encounter any conflicts resolve them and `git commit`. @@ -47,6 +47,11 @@ Finally we repeat the replace and rename command from the initial setup. git commit --amend ``` +Now you can compare against the previous commit with: +```bash +git diff prev_git_hash +```` + Getting Started --------------- From cb99846580fb4aace99079ce77d91ad29984f905 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Thu, 3 Aug 2023 16:19:59 -0400 Subject: [PATCH 10/15] [cmake] Install bash files contained in doc pages --- doc/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index b3b0458e..40eb49cd 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -76,6 +76,6 @@ endif() # --------------------------------- install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ COMPONENT documentation DESTINATION share/doc/${PROJECT_NAME} FILES_MATCHING - REGEX "\\.(html|pdf|png|gif|jpg|svg|ico|js|xsl|css|py|txt|inv|bib|ttf|woff2|eot)$" + REGEX "\\.(html|pdf|png|gif|jpg|svg|ico|js|xsl|css|py|txt|inv|bib|ttf|woff2|eot|sh)$" PATTERN "_*" ) From c0afc3c44b7abdd70747eee42d10e6d7a920cf4f Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Fri, 4 Aug 2023 14:52:46 -0400 Subject: [PATCH 11/15] [cmake] Protect against redefining santizier targets --- c++/app4triqs/CMakeLists.txt | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/c++/app4triqs/CMakeLists.txt b/c++/app4triqs/CMakeLists.txt index 12ea5998..308acf2f 100644 --- a/c++/app4triqs/CMakeLists.txt +++ b/c++/app4triqs/CMakeLists.txt @@ -68,24 +68,32 @@ endif() option(ASAN OFF "Compile library and executables with LLVM Address Sanitizer") if(ASAN) - find_package(sanitizer REQUIRED COMPONENTS asan) + if(NOT TARGET ASAN) + find_package(sanitizer REQUIRED COMPONENTS asan) + endif() target_link_libraries(${PROJECT_NAME}_c PUBLIC $) endif() option(UBSAN OFF "Compile library and executables with LLVM Undefined Behavior Sanitizer") if(UBSAN) - find_package(sanitizer REQUIRED COMPONENTS ubsan) + if(NOT TARGET UBSAN) + find_package(sanitizer REQUIRED COMPONENTS ubsan) + endif() target_link_libraries(${PROJECT_NAME}_c PUBLIC $) endif() option(MSAN OFF "Compile library and executables with LLVM Memory Sanitizer") if(MSAN) - find_package(sanitizer REQUIRED COMPONENTS msan) + if(NOT TARGET MSAN) + find_package(sanitizer REQUIRED COMPONENTS msan) + endif() target_link_libraries(${PROJECT_NAME}_c PUBLIC $) endif() option(TSAN OFF "Compile library and executables with LLVM Thread Sanitizer") if(TSAN) - find_package(sanitizer REQUIRED COMPONENTS tsan) + if(NOT TARGET TSAN) + find_package(sanitizer REQUIRED COMPONENTS tsan) + endif() target_link_libraries(${PROJECT_NAME}_c PUBLIC $) endif() From c08a0923f4926b3aa2eedc8dd1f29c24c4bc8840 Mon Sep 17 00:00:00 2001 From: Alexander Hampel Date: Tue, 15 Aug 2023 13:54:10 -0400 Subject: [PATCH 12/15] [build] add libcxx flags for clang workflows --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9eab1ea5..01b22464 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,6 +67,11 @@ jobs: pip3 install mako numpy scipy mpi4py pip3 install -r requirements.txt + - name: add clang cxxflags + if: ${{ contains(matrix.cxx, 'clang') }} + run: + echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV + - name: Build & Install TRIQS env: CC: ${{ matrix.cc }} From 74491922a87fdec0007b3f8ae24f0d7ec0e1a0ec Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Tue, 15 Aug 2023 16:13:44 -0400 Subject: [PATCH 13/15] [cmake] Do not find find cpp2py when PythonSupport==OFF and subproject --- deps/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 8281e7fb..f6a3b895 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -48,7 +48,7 @@ else() endif() # -- Cpp2Py -- -if(PythonSupport OR Build_Documentation) +if(PythonSupport OR (NOT IS_SUBPROJECT AND Build_Documentation)) external_dependency(Cpp2Py GIT_REPO https://github.com/TRIQS/cpp2py VERSION 2.0 From 54d4be9e08f1ff6890dddf673b43409ef096f363 Mon Sep 17 00:00:00 2001 From: Thomas Hahn Date: Mon, 21 Aug 2023 17:31:02 -0400 Subject: [PATCH 14/15] [cmake] Add compiler warnings for IntelLLVM --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d1a88fb3..38b0e81a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,12 +111,12 @@ target_compile_options(${PROJECT_NAME}_warnings $<$:-Wno-comma-subscript> $<$:-Wshadow=local> $<$:-Wno-attributes> - $<$:-Wno-deprecated-comma-subscript> - $<$:-Wno-unknown-warning-option> - $<$:-Wshadow> - $<$:-Wno-gcc-compat> - $<$:-Wno-c++20-extensions> - $<$:-Wno-c++20-compat> + $<$:-Wno-deprecated-comma-subscript> + $<$:-Wno-unknown-warning-option> + $<$:-Wshadow> + $<$:-Wno-gcc-compat> + $<$:-Wno-c++20-extensions> + $<$:-Wno-c++20-compat> $<$:-Wno-deprecated-comma-subscript> $<$:-Wno-unknown-warning-option> $<$:-Wshadow> From 72029ee2ba5a62d76bc9b9e69187a118f465199e Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Mon, 21 Aug 2023 17:56:30 -0400 Subject: [PATCH 15/15] [cmake] Fix sanitizer target names --- c++/app4triqs/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/c++/app4triqs/CMakeLists.txt b/c++/app4triqs/CMakeLists.txt index 308acf2f..836263eb 100644 --- a/c++/app4triqs/CMakeLists.txt +++ b/c++/app4triqs/CMakeLists.txt @@ -68,7 +68,7 @@ endif() option(ASAN OFF "Compile library and executables with LLVM Address Sanitizer") if(ASAN) - if(NOT TARGET ASAN) + if(NOT TARGET asan) find_package(sanitizer REQUIRED COMPONENTS asan) endif() target_link_libraries(${PROJECT_NAME}_c PUBLIC $) @@ -76,7 +76,7 @@ endif() option(UBSAN OFF "Compile library and executables with LLVM Undefined Behavior Sanitizer") if(UBSAN) - if(NOT TARGET UBSAN) + if(NOT TARGET ubsan) find_package(sanitizer REQUIRED COMPONENTS ubsan) endif() target_link_libraries(${PROJECT_NAME}_c PUBLIC $) @@ -84,7 +84,7 @@ endif() option(MSAN OFF "Compile library and executables with LLVM Memory Sanitizer") if(MSAN) - if(NOT TARGET MSAN) + if(NOT TARGET msan) find_package(sanitizer REQUIRED COMPONENTS msan) endif() target_link_libraries(${PROJECT_NAME}_c PUBLIC $) @@ -92,7 +92,7 @@ endif() option(TSAN OFF "Compile library and executables with LLVM Thread Sanitizer") if(TSAN) - if(NOT TARGET TSAN) + if(NOT TARGET tsan) find_package(sanitizer REQUIRED COMPONENTS tsan) endif() target_link_libraries(${PROJECT_NAME}_c PUBLIC $)