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 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c613d4c3..1f0ffebd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,13 +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: | - git checkout main + python -m venv ./.venv + source ./.venv/bin/activate task docs - name: Deploy Documentation diff --git a/README.md b/README.md index e59bc804..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.5") +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/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 diff --git a/docs/src/project_options_example.md b/docs/src/project_options_example.md index 384d287d..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.5") +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 6d4e06fd..0e0aab89 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "name": "project_options", - "version": "0.34.0", + "version": "0.40.0", "homepage": "http://aminya.github.io/project_options" } diff --git a/src/DynamicProjectOptions.cmake b/src/DynamicProjectOptions.cmake index b43d061f..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.5") + 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/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/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() 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*"