diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40b74d2b..2ebbc4ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,8 @@ jobs: vcpkg: true conan: 2.6.0 cppcheck: true - clangtidy: true + cmakelang: true + clang-tidy: true task: true doxygen: true python: true @@ -80,5 +81,4 @@ jobs: - name: Lint run: | - pipx install cmakelang[YAML] task lint diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 78edba5a..c613d4c3 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,8 +1,9 @@ name: docs on: push: - branches: - - main + tags: + - "*" + workflow_dispatch: jobs: Test: @@ -36,12 +37,11 @@ jobs: git checkout main task docs - # TODO Automatic deploys fail - # - name: Deploy Documentation - # uses: Cecilapp/GitHub-Pages-deploy@v3 - # with: - # build_dir: docs/build/html/ - # branch: gh-pages - # email: aminyahyaabadi74@gmail.com - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Deploy Documentation + uses: Cecilapp/GitHub-Pages-deploy@v3 + with: + build_dir: docs/build/ + branch: gh-pages + email: ${{ github.actor }}@users.noreply.github.com + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index a9d62bda..e59bc804 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.4") +set(PROJECT_OPTIONS_VERSION "v0.36.5") FetchContent_Declare( _project_options URL https://github.com/aminya/project_options/archive/refs/tags/${PROJECT_OPTIONS_VERSION}.zip) @@ -77,7 +77,7 @@ include(${_project_options_SOURCE_DIR}/Index.cmake) # install vcpkg dependencies: - should be called before defining project() run_vcpkg( VCPKG_URL "https://github.com/microsoft/vcpkg.git" - VCPKG_REV "10e052511428d6b0c7fcc63a139e8024bb146032" + VCPKG_REV "86a181505ac6460f98496a79abdee6a0f49905ec" ) # Install conan dependencies: - should be called before defining project() run_conan() @@ -101,7 +101,7 @@ if(FEATURE_TESTS) set(ENABLE_COVERAGE "ENABLE_COVERAGE") set(ENABLE_SANITIZER_ADDRESS "ENABLE_SANITIZER_ADDRESS") - set(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR "ENABLE_SANITIZER_UNDEFINED_BEHAVIOR") + set(ENABLE_SANITIZER_UNDEFINED "ENABLE_SANITIZER_UNDEFINED") endif() # Enable doxgen for the docs @@ -123,7 +123,7 @@ project_options( ${ENABLE_DOXYGEN} ${ENABLE_COVERAGE} ${ENABLE_SANITIZER_ADDRESS} - ${ENABLE_SANITIZER_UNDEFINED_BEHAVIOR} + ${ENABLE_SANITIZER_UNDEFINED} # ${ENABLE_SANITIZER_THREAD} # ${ENABLE_SANITIZER_MEMORY} # ENABLE_SANITIZER_POINTER_COMPARE diff --git a/docs/Taskfile.yml b/docs/Taskfile.yml index f7b05e51..8a75fcc5 100644 --- a/docs/Taskfile.yml +++ b/docs/Taskfile.yml @@ -15,6 +15,7 @@ tasks: - 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: diff --git a/docs/src/project_options_example.md b/docs/src/project_options_example.md index 872d5228..384d287d 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.4") +set(PROJECT_OPTIONS_VERSION "v0.36.5") FetchContent_Declare( _project_options URL https://github.com/aminya/project_options/archive/refs/tags/${PROJECT_OPTIONS_VERSION}.zip) @@ -30,8 +30,7 @@ include(${_project_options_SOURCE_DIR}/Index.cmake) # install vcpkg dependencies: - should be called before defining project() run_vcpkg( VCPKG_URL "https://github.com/microsoft/vcpkg.git" - VCPKG_REV "10e052511428d6b0c7fcc63a139e8024bb146032" - ENABLE_VCPKG_UPDATE + VCPKG_REV "86a181505ac6460f98496a79abdee6a0f49905ec" ) # Install conan dependencies: - should be called before defining project() run_conan() @@ -55,7 +54,7 @@ if(FEATURE_TESTS) set(ENABLE_COVERAGE "ENABLE_COVERAGE") set(ENABLE_SANITIZER_ADDRESS "ENABLE_SANITIZER_ADDRESS") - set(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR "ENABLE_SANITIZER_UNDEFINED_BEHAVIOR") + set(ENABLE_SANITIZER_UNDEFINED "ENABLE_SANITIZER_UNDEFINED") endif() # Enable doxgen for the docs @@ -77,7 +76,7 @@ project_options( ${ENABLE_DOXYGEN} ${ENABLE_COVERAGE} ${ENABLE_SANITIZER_ADDRESS} - ${ENABLE_SANITIZER_UNDEFINED_BEHAVIOR} + ${ENABLE_SANITIZER_UNDEFINED} # ${ENABLE_SANITIZER_THREAD} # ${ENABLE_SANITIZER_MEMORY} # ENABLE_SANITIZER_POINTER_COMPARE diff --git a/src/DynamicProjectOptions.cmake b/src/DynamicProjectOptions.cmake index d44c7465..b43d061f 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.4") + set(PROJECT_OPTIONS_VERSION "v0.36.5") FetchContent_Declare( _project_options URL https://github.com/aminya/project_options/archive/refs/tags/${PROJECT_OPTIONS_VERSION}.zip) @@ -103,27 +103,18 @@ macro(dynamic_project_options) ) endif() - check_sanitizers_support( - ENABLE_SANITIZER_ADDRESS - ENABLE_SANITIZER_UNDEFINED_BEHAVIOR - ENABLE_SANITIZER_LEAK - ENABLE_SANITIZER_THREAD - ENABLE_SANITIZER_MEMORY - ENABLE_SANITIZER_POINTER_COMPARE - ENABLE_SANITIZER_POINTER_SUBTRACT - ) - - if(ENABLE_SANITIZER_ADDRESS) - set(SUPPORTS_ASAN ON) - else() - set(SUPPORTS_ASAN OFF) - endif() + # Fallback for ENABLE_SANITIZER_UNDEFINED_BEHAVIOR option + foreach(default_type IN ITEMS DEFAULT DEVELOPER_DEFAULT USER_DEFAULT) + if(DEFINED ENABLE_SANITIZER_UNDEFINED_BEHAVIOR_${default_type}) + if(DEFINED ENABLE_SANITIZER_UNDEFINED_${default_type}) + message(WARNING "Don't set both ENABLE_SANITIZER_UNDEFINED_BEHAVIOR_${default_type} and ENABLE_SANITIZER_UNDEFINED_${default_type}. Use ENABLE_SANITIZER_UNDEFINED_${default_type} only.") + else() + message(DEPRECATION "ENABLE_SANITIZER_UNDEFINED_BEHAVIOR_${default_type} is deprecated. Use ENABLE_SANITIZER_UNDEFINED_${default_type} instead.") + endif() - if(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR) - set(SUPPORTS_UBSAN ON) - else() - set(SUPPORTS_UBSAN OFF) - endif() + set(ENABLE_SANITIZER_UNDEFINED_${default_type} ${ENABLE_SANITIZER_UNDEFINED_BEHAVIOR_${default_type}}) + endif() + endforeach() # ccache, clang-tidy, cppcheck are only supported with Ninja and Makefile based generators # note that it is possible to use Ninja with cl, so this still allows clang-tidy on Windows @@ -163,9 +154,9 @@ macro(dynamic_project_options) "0\;DISABLE_RTTI\;OFF\;OFF\;Disable RTTI (no-rtti flag)" "0\;ENABLE_BUILD_WITH_TIME_TRACE\;OFF\;OFF\;Generates report of where compile-time is spent" "0\;ENABLE_UNITY\;OFF\;OFF\;Merge C++ files into larger C++ files, can speed up compilation sometimes" - "0\;ENABLE_SANITIZER_ADDRESS\;OFF\;${SUPPORTS_ASAN}\;Make memory errors into hard runtime errors (windows/linux/macos)" + "0\;ENABLE_SANITIZER_ADDRESS\;OFF\;ON\;Make memory errors into hard runtime errors (windows/linux/macos)" "0\;ENABLE_SANITIZER_LEAK\;OFF\;OFF\;Make memory leaks into hard runtime errors" - "0\;ENABLE_SANITIZER_UNDEFINED_BEHAVIOR\;OFF\;${SUPPORTS_UBSAN}\;Make certain types (numeric mostly) of undefined behavior into runtime errors" + "0\;ENABLE_SANITIZER_UNDEFINED\;OFF\;ON\;Make certain types (numeric mostly) of undefined behavior into runtime errors" "0\;ENABLE_SANITIZER_THREAD\;OFF\;OFF\;Make thread race conditions into hard runtime errors" "0\;ENABLE_SANITIZER_MEMORY\;OFF\;OFF\;Make other memory errors into runtime errors" "0\;ENABLE_CONTROL_FLOW_PROTECTION\;OFF\;OFF\;Enable control flow protection instrumentation" @@ -277,7 +268,7 @@ macro(dynamic_project_options) ${ENABLE_UNITY_VALUE} ${ENABLE_SANITIZER_ADDRESS_VALUE} ${ENABLE_SANITIZER_LEAK_VALUE} - ${ENABLE_SANITIZER_UNDEFINED_BEHAVIOR_VALUE} + ${ENABLE_SANITIZER_UNDEFINED_VALUE} ${ENABLE_SANITIZER_THREAD_VALUE} ${ENABLE_SANITIZER_MEMORY_VALUE} ${ENABLE_CONTROL_FLOW_PROTECTION_VALUE} diff --git a/src/Git.cmake b/src/Git.cmake index a73e12ad..e3a19f7f 100644 --- a/src/Git.cmake +++ b/src/Git.cmake @@ -319,13 +319,16 @@ function(git_add_remote) find_program(GIT_EXECUTABLE "git" REQUIRED) - # ensure that the given repository's remote is the current remote + # Get the list of the remotes execute_process( COMMAND "${GIT_EXECUTABLE}" "remote" "-v" WORKING_DIRECTORY "${_fun_REPOSITORY_PATH}" COMMAND_ERROR_IS_FATAL LAST OUTPUT_VARIABLE _remote_output ) - string(FIND "${_remote_output}" "${_fun_REMOTE_URL}" _find_index) + # Remove .git from the URL + string(REGEX REPLACE "^(.*)\.git$" "\\1" _fun_REMOTE_URL_no_git "${_fun_REMOTE_URL}") + # Check if the given remote already exists in the remote list + string(FIND "${_remote_output}" "${_fun_REMOTE_URL_no_git}" _find_index) # Add the given remote if it doesn't exist if(${_find_index} EQUAL -1) @@ -343,12 +346,8 @@ function(git_add_remote) endif() execute_process( - COMMAND "${GIT_EXECUTABLE}" "remote" "add" "${_fun_REMOTE_NAME}" "${_fun_REMOTE_URL}" - WORKING_DIRECTORY "${_fun_REPOSITORY_PATH}" COMMAND_ERROR_IS_FATAL LAST - ) - execute_process( - COMMAND "${GIT_EXECUTABLE}" "fetch" "${_fun_REMOTE_NAME}" WORKING_DIRECTORY "${_fun_REPOSITORY_PATH}" - COMMAND_ERROR_IS_FATAL LAST + COMMAND "${GIT_EXECUTABLE}" "remote" "add" "--fetch" "${_fun_REMOTE_NAME}" "${_fun_REMOTE_URL}" + WORKING_DIRECTORY "${_fun_REPOSITORY_PATH}" ) endif() endfunction() diff --git a/src/Index.cmake b/src/Index.cmake index f4544398..a46f387a 100644 --- a/src/Index.cmake +++ b/src/Index.cmake @@ -82,7 +82,7 @@ include("${ProjectOptions_SRC_DIR}/Vcpkg.cmake") those. - ``ENABLE_SANITIZER_ADDRESS``: Enable address sanitizer - ``ENABLE_SANITIZER_LEAK``: Enable leak sanitizer -- ``ENABLE_SANITIZER_UNDEFINED_BEHAVIOR``: Enable undefined behavior +- ``ENABLE_SANITIZER_UNDEFINED``: Enable undefined behavior sanitizer - ``ENABLE_SANITIZER_THREAD``: Enable thread sanitizer - ``ENABLE_SANITIZER_MEMORY``: Enable memory sanitizer @@ -148,7 +148,8 @@ macro(project_options) ENABLE_UNITY ENABLE_SANITIZER_ADDRESS ENABLE_SANITIZER_LEAK - ENABLE_SANITIZER_UNDEFINED_BEHAVIOR + ENABLE_SANITIZER_UNDEFINED + ENABLE_SANITIZER_UNDEFINED_BEHAVIOR # deprecated, ENABLE_SANITIZER_UNDEFINED ENABLE_SANITIZER_THREAD ENABLE_SANITIZER_MEMORY ENABLE_SANITIZER_POINTER_COMPARE @@ -260,12 +261,23 @@ macro(project_options) enable_coverage(${_options_target}) endif() + # Fallback for deprecated ENABLE_SANITIZER_UNDEFINED_BEHAVIOR + if(ProjectOptions_ENABLE_SANITIZER_UNDEFINED_BEHAVIOR) + if(ProjectOptions_ENABLE_SANITIZER_UNDEFINED) + message(WARNING "Don't switch on both ENABLE_SANITIZER_UNDEFINED_BEHAVIOR and ENABLE_SANITIZER_UNDEFINED. Use ENABLE_SANITIZER_UNDEFINED only.") + else() + message(DEPRECATION "ENABLE_SANITIZER_UNDEFINED_BEHAVIOR is deprecated. Use ENABLE_SANITIZER_UNDEFINED instead.") + endif() + + set(ProjectOptions_ENABLE_SANITIZER_UNDEFINED ${ProjectOptions_ENABLE_SANITIZER_UNDEFINED_BEHAVIOR}) + endif() + # sanitizer options if supported by compiler enable_sanitizers( ${_options_target} ${ProjectOptions_ENABLE_SANITIZER_ADDRESS} ${ProjectOptions_ENABLE_SANITIZER_LEAK} - ${ProjectOptions_ENABLE_SANITIZER_UNDEFINED_BEHAVIOR} + ${ProjectOptions_ENABLE_SANITIZER_UNDEFINED} ${ProjectOptions_ENABLE_SANITIZER_THREAD} ${ProjectOptions_ENABLE_SANITIZER_MEMORY} ${ProjectOptions_ENABLE_SANITIZER_POINTER_COMPARE} diff --git a/src/Sanitizers.cmake b/src/Sanitizers.cmake index 7d516ba9..8100b6f9 100644 --- a/src/Sanitizers.cmake +++ b/src/Sanitizers.cmake @@ -8,7 +8,7 @@ function( _project_name ENABLE_SANITIZER_ADDRESS ENABLE_SANITIZER_LEAK - ENABLE_SANITIZER_UNDEFINED_BEHAVIOR + ENABLE_SANITIZER_UNDEFINED ENABLE_SANITIZER_THREAD ENABLE_SANITIZER_MEMORY ENABLE_SANITIZER_POINTER_COMPARE @@ -18,7 +18,7 @@ function( # check if the sanitizers are supported check_sanitizers_support( SUPPORTS_SANITIZER_ADDRESS - SUPPORTS_SANITIZER_UNDEFINED_BEHAVIOR + SUPPORTS_SANITIZER_UNDEFINED SUPPORTS_SANITIZER_LEAK SUPPORTS_SANITIZER_THREAD SUPPORTS_SANITIZER_MEMORY @@ -38,8 +38,11 @@ function( "pointer-compare" "pointer-subtract" ) - if(${ENABLE_SANITIZER_${SANITIZER}}) - if(${SUPPORTS_SANITIZER_${SANITIZER}}) + set(SANITIZER_UPPERCASE "${SANITIZER}") + string(TOUPPER ${SANITIZER} SANITIZER_UPPERCASE) + + if(${ENABLE_SANITIZER_${SANITIZER_UPPERCASE}}) + if(${SUPPORTS_SANITIZER_${SANITIZER_UPPERCASE}}) list(APPEND SANITIZERS ${SANITIZER}) else() # do not enable the sanitizer if it is not supported @@ -134,7 +137,7 @@ Note that some sanitizers cannot be enabled together, and this function doesn't Output variables: - ``ENABLE_SANITIZER_ADDRESS``: Address sanitizer is supported -- ``ENABLE_SANITIZER_UNDEFINED_BEHAVIOR``: Undefined behavior sanitizer is supported +- ``ENABLE_SANITIZER_UNDEFINED``: Undefined behavior sanitizer is supported - ``ENABLE_SANITIZER_LEAK``: Leak sanitizer is supported - ``ENABLE_SANITIZER_THREAD``: Thread sanitizer is supported - ``ENABLE_SANITIZER_MEMORY``: Memory sanitizer is supported @@ -145,7 +148,7 @@ Output variables: .. code:: cmake check_sanitizers_support(ENABLE_SANITIZER_ADDRESS - ENABLE_SANITIZER_UNDEFINED_BEHAVIOR + ENABLE_SANITIZER_UNDEFINED ENABLE_SANITIZER_LEAK ENABLE_SANITIZER_THREAD ENABLE_SANITIZER_MEMORY @@ -158,7 +161,7 @@ Output variables: function( check_sanitizers_support ENABLE_SANITIZER_ADDRESS - ENABLE_SANITIZER_UNDEFINED_BEHAVIOR + ENABLE_SANITIZER_UNDEFINED ENABLE_SANITIZER_LEAK ENABLE_SANITIZER_THREAD ENABLE_SANITIZER_MEMORY diff --git a/src/Vcpkg.cmake b/src/Vcpkg.cmake index 750f97b2..2cbb8984 100644 --- a/src/Vcpkg.cmake +++ b/src/Vcpkg.cmake @@ -170,7 +170,7 @@ Or by specifying the options run_vcpkg( VCPKG_URL "https://github.com/microsoft/vcpkg.git" - VCPKG_REV "10e052511428d6b0c7fcc63a139e8024bb146032" + VCPKG_REV "86a181505ac6460f98496a79abdee6a0f49905ec" ENABLE_VCPKG_UPDATE ) diff --git a/tests/install/CMakeLists.txt b/tests/install/CMakeLists.txt index 091ab6de..27ff2633 100644 --- a/tests/install/CMakeLists.txt +++ b/tests/install/CMakeLists.txt @@ -11,7 +11,7 @@ project(anotherproj VERSION 0.1.0 LANGUAGES CXX C) option(FEATURE_TESTS "Enable the tests" ON) if(FEATURE_TESTS) set(ENABLE_SANITIZER_ADDRESS "ENABLE_SANITIZER_ADDRESS") - set(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR "ENABLE_SANITIZER_UNDEFINED_BEHAVIOR") + set(ENABLE_SANITIZER_UNDEFINED "ENABLE_SANITIZER_UNDEFINED") endif() # Initialize project_options @@ -33,7 +33,7 @@ project_options( # ENABLE_BUILD_WITH_TIME_TRACE # ENABLE_UNITY ${ENABLE_SANITIZER_ADDRESS} - ${ENABLE_SANITIZER_UNDEFINED_BEHAVIOR} + ${ENABLE_SANITIZER_UNDEFINED} # ${ENABLE_SANITIZER_LEAK} # ${ENABLE_SANITIZER_THREAD} # ${ENABLE_SANITIZER_MEMORY} diff --git a/tests/install/vcpkg.json b/tests/install/vcpkg.json index c682f737..a38c3b13 100644 --- a/tests/install/vcpkg.json +++ b/tests/install/vcpkg.json @@ -2,7 +2,7 @@ "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "another-project", "version-string": "0.1.0", - "builtin-baseline": "10e052511428d6b0c7fcc63a139e8024bb146032", + "builtin-baseline": "86a181505ac6460f98496a79abdee6a0f49905ec", "dependencies": [ { "name": "eigen3", diff --git a/tests/minimal/CMakeLists.txt b/tests/minimal/CMakeLists.txt index 9e8f02c2..7bb7ac26 100644 --- a/tests/minimal/CMakeLists.txt +++ b/tests/minimal/CMakeLists.txt @@ -44,7 +44,7 @@ if(ENABLE_TESTING) if(NOT DISABLE_SANITIZER) if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") set(ENABLE_SANITIZER_ADDRESS "ENABLE_SANITIZER_ADDRESS") - set(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR "ENABLE_SANITIZER_UNDEFINED_BEHAVIOR") + set(ENABLE_SANITIZER_UNDEFINED "ENABLE_SANITIZER_UNDEFINED") else() # or it is MSVC and has run vcvarsall string(FIND "$ENV{PATH}" "$ENV{VSINSTALLDIR}" index_of_vs_install_dir) @@ -64,7 +64,7 @@ project_options( ENABLE_VS_ANALYSIS ${ENABLE_COVERAGE} ${ENABLE_SANITIZER_ADDRESS} - ${ENABLE_SANITIZER_UNDEFINED_BEHAVIOR} + ${ENABLE_SANITIZER_UNDEFINED} # DISABLE_EXCEPTIONS # DISABLE_RTTI # Note: PCH is disabled by default in developer mode because these headers become globally included and they can mask other errors diff --git a/tests/myproj/CMakeLists.txt b/tests/myproj/CMakeLists.txt index 413898b4..4c4470f5 100644 --- a/tests/myproj/CMakeLists.txt +++ b/tests/myproj/CMakeLists.txt @@ -18,7 +18,7 @@ if(ENABLE_CROSS_COMPILING) endif() run_vcpkg(VCPKG_URL "https://github.com/microsoft/vcpkg.git" VCPKG_REV - "10e052511428d6b0c7fcc63a139e8024bb146032" ENABLE_VCPKG_UPDATE + "86a181505ac6460f98496a79abdee6a0f49905ec" ENABLE_VCPKG_UPDATE ) run_conan() @@ -40,7 +40,7 @@ option(FEATURE_TESTS "Enable the tests" ON) if(FEATURE_TESTS) # Enable sanitizers and static analyzers when running the tests set(ENABLE_SANITIZER_ADDRESS "ENABLE_SANITIZER_ADDRESS") - set(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR "ENABLE_SANITIZER_UNDEFINED_BEHAVIOR") + set(ENABLE_SANITIZER_UNDEFINED "ENABLE_SANITIZER_UNDEFINED") set(ENABLE_SANITIZER_POINTER_COMPARE "ENABLE_SANITIZER_POINTER_COMPARE") set(ENABLE_SANITIZER_POINTER_SUBTRACT "ENABLE_SANITIZER_POINTER_SUBTRACT") endif() @@ -73,7 +73,7 @@ project_options( # ENABLE_UNITY ${ENABLE_SANITIZER_ADDRESS} # ${ENABLE_SANITIZER_LEAK} - ${ENABLE_SANITIZER_UNDEFINED_BEHAVIOR} + ${ENABLE_SANITIZER_UNDEFINED} ${ENABLE_SANITIZER_POINTER_COMPARE} ${ENABLE_SANITIZER_POINTER_SUBTRACT} # ${ENABLE_SANITIZER_THREAD} diff --git a/tests/myproj/vcpkg.json b/tests/myproj/vcpkg.json index c4cbbf8c..cb7a84b8 100644 --- a/tests/myproj/vcpkg.json +++ b/tests/myproj/vcpkg.json @@ -2,7 +2,7 @@ "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "myproject", "version-string": "0.1.0", - "builtin-baseline": "10e052511428d6b0c7fcc63a139e8024bb146032", + "builtin-baseline": "86a181505ac6460f98496a79abdee6a0f49905ec", "dependencies": [ { "name": "eigen3", diff --git a/tests/rpi3/CMakeLists.txt b/tests/rpi3/CMakeLists.txt index de9007a2..535df44f 100644 --- a/tests/rpi3/CMakeLists.txt +++ b/tests/rpi3/CMakeLists.txt @@ -67,7 +67,7 @@ if(ENABLE_TESTING) if(NOT DISABLE_SANITIZER) if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") set(ENABLE_SANITIZER_ADDRESS "ENABLE_SANITIZER_ADDRESS") - set(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR "ENABLE_SANITIZER_UNDEFINED_BEHAVIOR") + set(ENABLE_SANITIZER_UNDEFINED "ENABLE_SANITIZER_UNDEFINED") else() # or it is MSVC and has run vcvarsall string(FIND "$ENV{PATH}" "$ENV{VSINSTALLDIR}" index_of_vs_install_dir) @@ -90,7 +90,7 @@ project_options( ENABLE_VS_ANALYSIS ${ENABLE_COVERAGE} ${ENABLE_SANITIZER_ADDRESS} - ${ENABLE_SANITIZER_UNDEFINED_BEHAVIOR} + ${ENABLE_SANITIZER_UNDEFINED} DISABLE_EXCEPTIONS DISABLE_RTTI # Note: PCH is disabled by default in developer mode because these headers become globally included and they can mask other errors diff --git a/tests/rpi4-vcpkg/CMakeLists.txt b/tests/rpi4-vcpkg/CMakeLists.txt index 07dc289b..8f86ab77 100644 --- a/tests/rpi4-vcpkg/CMakeLists.txt +++ b/tests/rpi4-vcpkg/CMakeLists.txt @@ -44,7 +44,7 @@ if(ENABLE_TESTING) if(NOT DISABLE_SANITIZER) if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") set(ENABLE_SANITIZER_ADDRESS "ENABLE_SANITIZER_ADDRESS") - set(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR "ENABLE_SANITIZER_UNDEFINED_BEHAVIOR") + set(ENABLE_SANITIZER_UNDEFINED "ENABLE_SANITIZER_UNDEFINED") else() # or it is MSVC and has run vcvarsall string(FIND "$ENV{PATH}" "$ENV{VSINSTALLDIR}" index_of_vs_install_dir) @@ -64,7 +64,7 @@ project_options( ENABLE_VS_ANALYSIS ${ENABLE_COVERAGE} ${ENABLE_SANITIZER_ADDRESS} - ${ENABLE_SANITIZER_UNDEFINED_BEHAVIOR} + ${ENABLE_SANITIZER_UNDEFINED} # DISABLE_EXCEPTIONS # DISABLE_RTTI # Note: PCH is disabled by default in developer mode because these headers become globally included and they can mask other errors diff --git a/tests/rpi4/CMakeLists.txt b/tests/rpi4/CMakeLists.txt index 68b245ae..27fb4f66 100644 --- a/tests/rpi4/CMakeLists.txt +++ b/tests/rpi4/CMakeLists.txt @@ -62,7 +62,7 @@ if(ENABLE_TESTING) if(NOT DISABLE_SANITIZER) if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") set(ENABLE_SANITIZER_ADDRESS "ENABLE_SANITIZER_ADDRESS") - set(ENABLE_SANITIZER_UNDEFINED_BEHAVIOR "ENABLE_SANITIZER_UNDEFINED_BEHAVIOR") + set(ENABLE_SANITIZER_UNDEFINED "ENABLE_SANITIZER_UNDEFINED") else() # or it is MSVC and has run vcvarsall string(FIND "$ENV{PATH}" "$ENV{VSINSTALLDIR}" index_of_vs_install_dir) @@ -82,7 +82,7 @@ project_options( ENABLE_VS_ANALYSIS ${ENABLE_COVERAGE} ${ENABLE_SANITIZER_ADDRESS} - ${ENABLE_SANITIZER_UNDEFINED_BEHAVIOR} + ${ENABLE_SANITIZER_UNDEFINED} DISABLE_EXCEPTIONS DISABLE_RTTI # Note: PCH is disabled by default in developer mode because these headers become globally included and they can mask other errors