diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index beb582b6e7..3348dc6d97 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -2,12 +2,7 @@ # Licensed under the MIT License. # Minimum CMake required -if(WIN32) - # TODO: actually we need cmake 3.26+ on Windows but QNN EP's build machine doesn't have it - cmake_minimum_required(VERSION 3.25) -else() - cmake_minimum_required(VERSION 3.26) -endif() +cmake_minimum_required(VERSION 3.26) cmake_policy(SET CMP0069 NEW) set(CMAKE_POLICY_DEFAULT_CMP0069 NEW) @@ -19,13 +14,7 @@ cmake_policy(SET CMP0117 NEW) cmake_policy(SET CMP0104 OLD) # Enable Hot Reload for MSVC compilers if supported. -if (POLICY CMP0141) - if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.26.0") - cmake_policy(SET CMP0141 NEW) - else() - cmake_policy(SET CMP0141 OLD) - endif() -endif() +cmake_policy(SET CMP0141 NEW) # Project project(onnxruntime C CXX ASM) diff --git a/cmake/adjust_global_compile_flags.cmake b/cmake/adjust_global_compile_flags.cmake index 5b201665ff..68522a7dda 100644 --- a/cmake/adjust_global_compile_flags.cmake +++ b/cmake/adjust_global_compile_flags.cmake @@ -228,25 +228,12 @@ if (MSVC) endif() if (onnxruntime_target_platform STREQUAL "ARM64") set(onnxruntime_target_platform "ARM64") - if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.26.0") - enable_language(ASM_MARMASM) - else() - enable_language(ASM_MASM) - endif() + enable_language(ASM_MARMASM) elseif (onnxruntime_target_platform STREQUAL "ARM64EC") - set(onnxruntime_target_platform "ARM64EC") - if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.26.0") - enable_language(ASM_MARMASM) - else() - enable_language(ASM_MASM) - endif() + enable_language(ASM_MARMASM) elseif (onnxruntime_target_platform STREQUAL "ARM" OR CMAKE_GENERATOR MATCHES "ARM") set(onnxruntime_target_platform "ARM") - if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.26.0") - enable_language(ASM_MARMASM) - else() - enable_language(ASM_MASM) - endif() + enable_language(ASM_MARMASM) elseif (onnxruntime_target_platform STREQUAL "x64" OR onnxruntime_target_platform STREQUAL "x86_64" OR onnxruntime_target_platform STREQUAL "AMD64" OR CMAKE_GENERATOR MATCHES "Win64") set(onnxruntime_target_platform "x64") enable_language(ASM_MASM) diff --git a/tools/ci_build/github/azure-pipelines/templates/win-ci.yml b/tools/ci_build/github/azure-pipelines/templates/win-ci.yml index cb059e4b54..f6da7bb857 100644 --- a/tools/ci_build/github/azure-pipelines/templates/win-ci.yml +++ b/tools/ci_build/github/azure-pipelines/templates/win-ci.yml @@ -251,18 +251,6 @@ stages: artifactName: 'drop-onnxruntime-java-win-${{ parameters.packageName }}' - ${{ if eq(parameters['DoCompliance'], 'true') }}: - - task: Semmle@0 - condition: and(succeeded(), eq('${{ parameters.buildJava}}', true)) - inputs: - sourceCodeDirectory: '$(Build.SourcesDirectory)\java' - language: 'java' - cleanupBuildCommands: '$(Build.SourcesDirectory)\java\gradlew.bat -Dorg.gradle.daemon=false clean' - buildCommands: '$(Build.SourcesDirectory)\java\gradlew.bat -Dorg.gradle.daemon=false jar' - querySuite: 'Recommended' - timeout: '7200' - ram: '16384' - addProjectDirToScanningExclusionList: true - - task: CredScan@3 displayName: 'Run CredScan' inputs: @@ -291,10 +279,7 @@ stages: inputs: msBuildArchitecture: amd64 setupCommandlines: 'python $(Build.SourcesDirectory)\tools\ci_build\build.py --config Debug --disable_rtti --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --update --cmake_generator "$(VSGenerator)" --enable_onnx_tests $(TelemetryOption) ${{ parameters.buildparameter }} --cmake_extra_defines onnxruntime_ENABLE_STATIC_ANALYSIS=ON' - ${{if eq(variables.VSGenerator, 'Visual Studio 16 2019')}}: - msBuildCommandline: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\msbuild.exe" "$(Build.BinariesDirectory)\Debug\onnxruntime.sln" /p:platform="$(MsbuildPlatform)" /p:configuration=Debug /p:VisualStudioVersion="16.0" /m /p:PreferredToolArchitecture=x64' - ${{else}}: - msBuildCommandline: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\msbuild.exe" "$(Build.BinariesDirectory)\Debug\onnxruntime.sln" /p:platform="$(MsbuildPlatform)" /p:configuration=Debug /p:VisualStudioVersion="17.0" /m /p:PreferredToolArchitecture=x64' + msBuildCommandline: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\msbuild.exe" "$(Build.BinariesDirectory)\Debug\onnxruntime.sln" /p:platform="$(MsbuildPlatform)" /p:configuration=Debug /p:VisualStudioVersion="17.0" /m /p:PreferredToolArchitecture=x64' excludedPaths: '$(Build.BinariesDirectory)#$(Build.SourcesDirectory)\cmake#C:\program files (x86)' - task: PostAnalysis@2