From fdfe1277ccb0cb97bf69f8d5f4b8766478fe14d4 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Wed, 26 Jul 2023 14:55:30 -0400 Subject: [PATCH 1/7] 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 ed2dd7a..9dd2bfa 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 2/7] [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 9dd2bfa..d1a88fb 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 3/7] Update README.md --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 52e2c0b..1657290 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 4/7] [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 b3b0458..40eb49c 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 5/7] [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 12ea599..308acf2 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 6/7] [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 9eab1ea..01b2246 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 7/7] [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 8281e7f..f6a3b89 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