From 3f886513247261de4e9ba41480478a7c1d2ff3b0 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Sat, 5 Oct 2024 01:27:23 -0700 Subject: [PATCH 1/7] chore(release): v0.36.6 --- README.md | 2 +- docs/src/project_options_example.md | 2 +- package.json | 2 +- src/DynamicProjectOptions.cmake | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e59bc804..43fd5cd2 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ endif() # Add project_options from https://github.com/aminya/project_options # Change the version in the following URL to update the package (watch the releases of the repository for future updates) -set(PROJECT_OPTIONS_VERSION "v0.36.5") +set(PROJECT_OPTIONS_VERSION "v0.36.6") FetchContent_Declare( _project_options URL https://github.com/aminya/project_options/archive/refs/tags/${PROJECT_OPTIONS_VERSION}.zip) diff --git a/docs/src/project_options_example.md b/docs/src/project_options_example.md index 384d287d..bd18e8bd 100644 --- a/docs/src/project_options_example.md +++ b/docs/src/project_options_example.md @@ -20,7 +20,7 @@ endif() # Add project_options from https://github.com/aminya/project_options # Change the version in the following URL to update the package (watch the releases of the repository for future updates) -set(PROJECT_OPTIONS_VERSION "v0.36.5") +set(PROJECT_OPTIONS_VERSION "v0.36.6") FetchContent_Declare( _project_options URL https://github.com/aminya/project_options/archive/refs/tags/${PROJECT_OPTIONS_VERSION}.zip) diff --git a/package.json b/package.json index 6d4e06fd..ae14f496 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "name": "project_options", - "version": "0.34.0", + "version": "0.36.6", "homepage": "http://aminya.github.io/project_options" } diff --git a/src/DynamicProjectOptions.cmake b/src/DynamicProjectOptions.cmake index b43d061f..3c5c9bcc 100644 --- a/src/DynamicProjectOptions.cmake +++ b/src/DynamicProjectOptions.cmake @@ -57,7 +57,7 @@ Here is an example of how to use ``dynamic_project_options``: # Add project_options from https://github.com/aminya/project_options # Change the version in the following URL to update the package (watch the releases of the repository for future updates) - set(PROJECT_OPTIONS_VERSION "v0.36.5") + set(PROJECT_OPTIONS_VERSION "v0.36.6") FetchContent_Declare( _project_options URL https://github.com/aminya/project_options/archive/refs/tags/${PROJECT_OPTIONS_VERSION}.zip) From 9cde8af359568355910ee757884e9a1aec604705 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Sat, 5 Oct 2024 01:31:28 -0700 Subject: [PATCH 2/7] ci: remove git checkout for docs building --- .github/workflows/docs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c613d4c3..0825a9bc 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -34,7 +34,6 @@ jobs: - name: Build Documentation run: | - git checkout main task docs - name: Deploy Documentation From fdd981f9db623e401924c234134b24126965ada3 Mon Sep 17 00:00:00 2001 From: FeignClaims Date: Wed, 23 Oct 2024 00:09:27 +0800 Subject: [PATCH 3/7] chore: remove redundant [skip ci] check Skipping workflow runs is now supported by default (see [Skipping workflow runs](https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/skipping-workflow-runs)). --- .github/workflows/ci.cross.arm.yml | 1 - .github/workflows/ci.cross.mingw.yml | 1 - .github/workflows/ci.emscripten.yml | 1 - .github/workflows/ci.yml | 1 - 4 files changed, 4 deletions(-) diff --git a/.github/workflows/ci.cross.arm.yml b/.github/workflows/ci.cross.arm.yml index 0a8e2ecf..162f66c2 100644 --- a/.github/workflows/ci.cross.arm.yml +++ b/.github/workflows/ci.cross.arm.yml @@ -8,7 +8,6 @@ on: jobs: Test: - if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} runs-on: ${{ matrix.os }} strategy: fail-fast: false diff --git a/.github/workflows/ci.cross.mingw.yml b/.github/workflows/ci.cross.mingw.yml index 975562cd..e7b48b69 100644 --- a/.github/workflows/ci.cross.mingw.yml +++ b/.github/workflows/ci.cross.mingw.yml @@ -8,7 +8,6 @@ on: jobs: Test: - if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} runs-on: ${{ matrix.os }} strategy: fail-fast: false diff --git a/.github/workflows/ci.emscripten.yml b/.github/workflows/ci.emscripten.yml index 8c5d7c70..a744fbcf 100644 --- a/.github/workflows/ci.emscripten.yml +++ b/.github/workflows/ci.emscripten.yml @@ -8,7 +8,6 @@ on: jobs: Test: - if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} runs-on: ${{ matrix.os }} strategy: fail-fast: false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ebbc4ce..df0c1ea2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,6 @@ on: jobs: Test: - if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} runs-on: ${{ matrix.os }} strategy: fail-fast: false From cea7292c877dc05d6659c4052bc4ed21eb77ce79 Mon Sep 17 00:00:00 2001 From: FeignClaims Date: Wed, 23 Oct 2024 08:00:13 +0800 Subject: [PATCH 4/7] fix: correct message level for cppcheck fallback standard We provide no way to explicitly and separately (without changing `CMAKE__STANDARD`) specify what standard cppcheck should use. Therefore, when cppcheck fallbacking to use the default standard, the corresponding cmake message should be `STATUS` instead of `${WARNING_MESSAGE}` which fails the compilation when `WARNINGS_AS_ERRORS`. --- src/StaticAnalyzers.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/StaticAnalyzers.cmake b/src/StaticAnalyzers.cmake index 5041adf3..666397bc 100644 --- a/src/StaticAnalyzers.cmake +++ b/src/StaticAnalyzers.cmake @@ -42,7 +42,7 @@ macro(enable_cppcheck CPPCHECK_OPTIONS) set(CMAKE_CXX_CPPCHECK ${CMAKE_CXX_CPPCHECK} --std=c++${CMAKE_CXX_STANDARD}) else() message( - ${WARNING_MESSAGE} + STATUS "cppcheck doesn't support specified C++ standard ${CMAKE_CXX_STANDARD}. Using the cppcheck default C++ standard version." ) endif() @@ -54,8 +54,8 @@ macro(enable_cppcheck CPPCHECK_OPTIONS) elseif(CMAKE_C_STANDARD MATCHES [[99|11]]) set(CMAKE_C_CPPCHECK ${CMAKE_C_CPPCHECK} --std=c${CMAKE_C_STANDARD}) else() - message(${WARNING_MESSAGE} - "cppcheck doesn't support C ${CMAKE_C_STANDARD} standard. Using the cppcheck default" + message(STATUS + "cppcheck doesn't support C ${CMAKE_C_STANDARD} standard. Using the cppcheck default C standard version" ) endif() endif() From d58a7b6d36dd7786df8e060580b229da80f6f54f Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Tue, 22 Oct 2024 19:10:18 -0700 Subject: [PATCH 5/7] fix: do not activate the MSVC Windows toolchain by default --- src/Index.cmake | 8 -------- src/VCEnvironment.cmake | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/Index.cmake b/src/Index.cmake index a46f387a..a04538df 100644 --- a/src/Index.cmake +++ b/src/Index.cmake @@ -43,14 +43,6 @@ include("${ProjectOptions_SRC_DIR}/DetectCompiler.cmake") include("${ProjectOptions_SRC_DIR}/CrossCompiler.cmake") include("${ProjectOptions_SRC_DIR}/DynamicProjectOptions.cmake") include("${ProjectOptions_SRC_DIR}/Hardening.cmake") - -# Include msvc toolchain on windows if the generator is not visual studio. Should be called before run_vcpkg and run_conan to be effective -if("${CMAKE_TOOLCHAIN_FILE}" STREQUAL "") - msvc_toolchain() -else() - message(STATUS "project_options: skipping msvc_toolchain as CMAKE_TOOLCHAIN_FILE is set") -endif() - include("${ProjectOptions_SRC_DIR}/Conan.cmake") include("${ProjectOptions_SRC_DIR}/Vcpkg.cmake") diff --git a/src/VCEnvironment.cmake b/src/VCEnvironment.cmake index 374f984f..e02e9dd8 100644 --- a/src/VCEnvironment.cmake +++ b/src/VCEnvironment.cmake @@ -46,7 +46,21 @@ function(is_msvc value) set(${value} OFF PARENT_SCOPE) endfunction() -# Include msvc toolchain on windows if the generator is not visual studio. Should be called before run_vcpkg and run_conan to be effective +#[[.rst: + +``msvc_toolchain`` +=============== + +Include msvc toolchain on windows if the generator is not visual studio. Should be called before run_vcpkg and run_conan to be effective + +Notes: if running in a cross-compilation situation, the toolchain might not work as expected. So add proper if-checks if you have such a configuration + +.. code:: cmake + + msvc_toolchain() + # should be included before run_vcpkg/run_conan to be effective + +]] macro(msvc_toolchain) if(# if on windows and the generator is not Visual Studio WIN32 AND NOT CMAKE_GENERATOR MATCHES "Visual Studio*" From 26c18b0ceeb53240c0e97c4e13a32fca1c1f4980 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Tue, 22 Oct 2024 19:21:01 -0700 Subject: [PATCH 6/7] chore(release): v0.40.0 --- README.md | 2 +- docs/src/project_options_example.md | 2 +- package.json | 2 +- src/DynamicProjectOptions.cmake | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 43fd5cd2..da4d9dce 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ endif() # Add project_options from https://github.com/aminya/project_options # Change the version in the following URL to update the package (watch the releases of the repository for future updates) -set(PROJECT_OPTIONS_VERSION "v0.36.6") +set(PROJECT_OPTIONS_VERSION "v0.40.0") FetchContent_Declare( _project_options URL https://github.com/aminya/project_options/archive/refs/tags/${PROJECT_OPTIONS_VERSION}.zip) diff --git a/docs/src/project_options_example.md b/docs/src/project_options_example.md index bd18e8bd..3e0bd266 100644 --- a/docs/src/project_options_example.md +++ b/docs/src/project_options_example.md @@ -20,7 +20,7 @@ endif() # Add project_options from https://github.com/aminya/project_options # Change the version in the following URL to update the package (watch the releases of the repository for future updates) -set(PROJECT_OPTIONS_VERSION "v0.36.6") +set(PROJECT_OPTIONS_VERSION "v0.40.0") FetchContent_Declare( _project_options URL https://github.com/aminya/project_options/archive/refs/tags/${PROJECT_OPTIONS_VERSION}.zip) diff --git a/package.json b/package.json index ae14f496..0e0aab89 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "name": "project_options", - "version": "0.36.6", + "version": "0.40.0", "homepage": "http://aminya.github.io/project_options" } diff --git a/src/DynamicProjectOptions.cmake b/src/DynamicProjectOptions.cmake index 3c5c9bcc..0728fa8a 100644 --- a/src/DynamicProjectOptions.cmake +++ b/src/DynamicProjectOptions.cmake @@ -57,7 +57,7 @@ Here is an example of how to use ``dynamic_project_options``: # Add project_options from https://github.com/aminya/project_options # Change the version in the following URL to update the package (watch the releases of the repository for future updates) - set(PROJECT_OPTIONS_VERSION "v0.36.6") + set(PROJECT_OPTIONS_VERSION "v0.40.0") FetchContent_Declare( _project_options URL https://github.com/aminya/project_options/archive/refs/tags/${PROJECT_OPTIONS_VERSION}.zip) From 86e68a9267caa3fdad3e8ad16d52ac02884ca13e Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Tue, 22 Oct 2024 19:31:43 -0700 Subject: [PATCH 7/7] docs: use a virtual env for pip deps [skip ci] --- .github/workflows/docs.yml | 8 +++++--- docs/Taskfile.yml | 19 ++++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0825a9bc..1f0ffebd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,12 +28,14 @@ jobs: - name: Setup pandoc run: | - wget https://github.com/jgm/pandoc/releases/download/3.1.2/pandoc-3.1.2-1-amd64.deb - sudo dpkg -i pandoc-3.1.2-1-amd64.deb - rm pandoc-3.1.2-1-amd64.deb + wget https://github.com/jgm/pandoc/releases/download/3.5/pandoc-3.5-1-amd64.deb + sudo dpkg -i pandoc-3.5-1-amd64.deb + rm pandoc-3.5-1-amd64.deb - name: Build Documentation run: | + python -m venv ./.venv + source ./.venv/bin/activate task docs - name: Deploy Documentation diff --git a/docs/Taskfile.yml b/docs/Taskfile.yml index 8a75fcc5..4e67d31e 100644 --- a/docs/Taskfile.yml +++ b/docs/Taskfile.yml @@ -1,9 +1,13 @@ # https://taskfile.dev/#6/installation version: 3 +# Run before install pip deps +# python -m venv ./.venv +# source ./.venv/bin/activate + tasks: readme: - - pip install -q -U pandoc-include + - pipx install pandoc-include # requires pandoc 3.0.0 or higher - pandoc -s --filter pandoc-include -o ../README.md ./README.md @@ -11,11 +15,12 @@ tasks: deps: - readme cmds: - - pip install -q -U GitPython sphinx-rtd-theme breathe sphinx-sitemap sphinxcontrib-moderncmakedomain myst-parser pandoc-include - - cmake -S ./ -B ./build -G "Ninja Multi-Config" -DCMAKE_BUILD_TYPE=Release - - cmake --build ./build --config Release - - touch ./build/.nojekyll - - rm -rf ./build/*.ninja ./build/*log ./build/*.py ./build/CMakeFiles ./build/CMakeCache.txt ./build/*.cmake + - | + pip install GitPython sphinx-rtd-theme breathe sphinx-sitemap sphinxcontrib-moderncmakedomain myst-parser + cmake -S ./ -B ./build -G "Ninja Multi-Config" -DCMAKE_BUILD_TYPE=Release + cmake --build ./build --config Release + touch ./build/.nojekyll + rm -rf ./build/*.ninja ./build/*log ./build/*.py ./build/CMakeFiles ./build/CMakeCache.txt ./build/*.cmake docs.preview: deps: @@ -27,4 +32,4 @@ tasks: deps: - docs cmds: - - npx gh-pages -d ./build/ -t true + - npx -y gh-pages -d ./build/ -t true