-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ninja prefers Clang over MSVC #280
Comments
@aminya I have just tested the current main with the example cpp_vcpkg_project project on windows 10 with
It have tested the Workflow presets:
I dit not generate a VS solution with cmake, I just opended the project directory from VS2022! But I had to change some values, first, than in works for me: MINGW64 ~/Workspace/cmake/project_options/examples/cpp_vcpkg_project (main)
$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 93f08e6..02adf7f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.21...3.28)
+cmake_minimum_required(VERSION 3.25...3.30)
# set a default CXX standard for the tools and targets that do not specify them.
# If commented, the latest supported standard for your compiler is automatically set.
@@ -14,13 +14,14 @@ 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")
-FetchContent_Declare(
- _project_options
- URL https://github.com/aminya/project_options/archive/refs/tags/${PROJECT_OPTIONS_VERSION}.zip)
-
-FetchContent_MakeAvailable(_project_options)
-include(${_project_options_SOURCE_DIR}/Index.cmake)
+## set(PROJECT_OPTIONS_VERSION "v0.36.4")
+## FetchContent_Declare(
+## _project_options
+## URL https://github.com/aminya/project_options/archive/refs/tags/${PROJECT_OPTIONS_VERSION}.zip)
+##
+## FetchContent_MakeAvailable(_project_options)
+## include(${_project_options_SOURCE_DIR}/Index.cmake)
+include(../../Index.cmake)
# Define the features of the project
include("./Features.cmake")
@@ -84,8 +85,8 @@ project_options(
PREFIX
"my"
ENABLE_CACHE
- ${ENABLE_CPPCHECK}
- ${ENABLE_CLANG_TIDY}
+ # ${ENABLE_CPPCHECK}
+ # ${ENABLE_CLANG_TIDY}
${ENABLE_VS_ANALYSIS}
# ENABLE_CONAN
# ENABLE_INTERPROCEDURAL_OPTIMIZATION
diff --git a/cmake/presets/CMakeUnixPresets.json b/cmake/presets/CMakeUnixPresets.json
index 25551d0..dd57396 100644
--- a/cmake/presets/CMakeUnixPresets.json
+++ b/cmake/presets/CMakeUnixPresets.json
@@ -2,7 +2,7 @@
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
- "minor": 27,
+ "minor": 25,
"patch": 0
},
"include": [
diff --git a/cmake/presets/CMakeWindowsPresets.json b/cmake/presets/CMakeWindowsPresets.json
index 3e63a17..f40eebf 100644
--- a/cmake/presets/CMakeWindowsPresets.json
+++ b/cmake/presets/CMakeWindowsPresets.json
@@ -27,10 +27,12 @@
"value": "host=x64",
"strategy": "external"
},
- "cacheVariables": {
- "ENABLE_CPPCHECK_DEFAULT": false,
- "ENABLE_CLANG_TIDY_DEFAULT": false
- }
+ "cacheVariables": {
+ "CMAKE_VS_VERSION_RANGE": "[17.0,)",
+ "CMAKE_HOST_SYSTEM_PROCESSOR": "AMD64",
+ "ENABLE_CPPCHECK_DEFAULT": false,
+ "ENABLE_CLANG_TIDY_DEFAULT": false
+ }
},
{
"name": "windows-msvc-debug",
MINGW64 ~/Workspace/cmake/project_options/examples/cpp_vcpkg_project (main)
$ |
It seems that Ninja prefers Clang over MSVC. This can be fixed in |
log of Test(windows-2022, msvc, _, _):
I couldn't track down which commit introduced this issue because the logs have been outdated.
Upvote & Fund
@aminya is using Polar.sh so you can upvote and help fund this issue. The funding is received once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog!
The text was updated successfully, but these errors were encountered: