Comments (7)
This is probably not the correct approach
Right. The problem is not with the target compiler, but with the target generator. MSVC+Ninja works correctly; it's only when using MSBUILD as the generator that this issue presents itself
from wil.
Can you share what commands you ran and the outputs you got?
from wil.
F:\wil> scripts\init.cmd -c msvc -g msbuild
The system cannot find the drive specified.
The system cannot find the drive specified.
Using compiler....... msvc
Using architecture... x64
Using build type..... debug
Using build root..... F:\wil\build\msvc64debug
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.25300.0 to target Windows 10.0.
-- The C compiler identification is MSVC 19.35.32215.0
-- The CXX compiler identification is MSVC 19.35.32215.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: F:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: F:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.35.32215/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Feeds used:
C:\Users\asklar\.nuget\packages\
https://api.nuget.org/v3/index.json
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
C:\temp
Attempting to gather dependency information for package 'Microsoft.Windows.CppWinRT.2.0.221121.5' with respect to project 'F:\wil\build\msvc64debug\packages', targeting 'Any,Version=v0.0'
Gathering dependency information took 258 ms
Attempting to resolve dependencies for package 'Microsoft.Windows.CppWinRT.2.0.221121.5' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Microsoft.Windows.CppWinRT.2.0.221121.5'
Resolved actions to install package 'Microsoft.Windows.CppWinRT.2.0.221121.5'
Retrieving package 'Microsoft.Windows.CppWinRT 2.0.221121.5' from 'C:\Users\asklar\.nuget\packages\'.
Adding package 'Microsoft.Windows.CppWinRT.2.0.221121.5' to folder 'F:\wil\build\msvc64debug\packages'
Added package 'Microsoft.Windows.CppWinRT.2.0.221121.5' to folder 'F:\wil\build\msvc64debug\packages'
Successfully installed 'Microsoft.Windows.CppWinRT 2.0.221121.5' to F:\wil\build\msvc64debug\packages
Executing nuget actions took 453 ms
CMake Error at tests/CMakeLists.txt:44 (if):
if given arguments:
"STREQUAL" "RelWithDebInfo"
Unknown arguments specified
-- Configuring incomplete, errors occurred!
See also "F:/wil/build/msvc64debug/CMakeFiles/CMakeOutput.log".
from wil.
Thanks! Looks like this is as I suspected.
Your original comment suggested that you were getting errors with the init_all.cmd
script - is that still the case?
from wil.
yes, init-all
fails for me because I don't have/use clang :)
from wil.
Gotcha. So, in that case, it sounds like this should just be scoped down to running init.cmd
with MSBuild as the generator
from wil.
I have a mitigation for this---
Wrap the if conditions that check CMAKE_BUILD_TYPE
(on ~line 45 and ~75) in checks for Clang:
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# For some unknown reason, 'RelWithDebInfo' compiles with '/Ob1' as opposed to '/Ob2' which prevents inlining of
# functions not marked 'inline'. The reason we prefer 'RelWithDebInfo' over 'Release' is to get debug info, so manually
# revert to the desired (and default) inlining behavior as that exercises more interesting code paths
if (${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
# TODO: This is currently blocked by an apparent Clang bug: https://github.com/llvm/llvm-project/issues/59690
# replace_cxx_flag("/Ob1" "/Ob2")
endif()
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set(DEBUG_BUILD TRUE)
set(HAS_DEBUG_INFO TRUE)
elseif(${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
set(HAS_DEBUG_INFO TRUE)
endif()
endif()
This is probably not the correct approach (CMAKE_BUILD_TYPE should probably have a value during msbuild
), but it unblocked me.
from wil.
Related Issues (20)
- wil headers are not code analysis clean
- wil\winrt.h's wil::wait_for_completion_or_timeout_nothrow() returns 0x8000000e when it hits timeout
- unique_hkey should be available under UWP HOT 5
- WinUIApplication: Application loading WinUI 3 theme
- to_vector doesn't work for types that can't be constructed
- single_threaded_property<> doesn't work for enums?
- This repo is missing important files HOT 1
- Token query types and performance optimizations HOT 1
- How about WI_AreAnyOtherFlagsSet? HOT 1
- wil::reg functions need an enumeration function to walk values and keys HOT 3
- wil::reg should expose an object type to unique_hkey and shared_hkey
- Build Issues with registry changes
- Staging.h fails to compile in VS 17.6.5 with error C2678 HOT 1
- warning C6001 HOT 1
- simple_event seems to be unusable - Compilation error with wil::simple_event, const vs non-cost handler. HOT 2
- Synchronous generator support for IIterable<T> HOT 1
- Some questions about wil::reg HOT 3
- `single_threaded_property` should not be externally writeable HOT 4
- `untyped_event` and `typed_event` do not work for events that don't derive from `EventHandler` or `TypedEventHandler` (eg `Windows.UI.Xaml.Data.CurrentChangingEventHandler`) HOT 2
- [C++/WinRT] Helpers to make it easier to copy data from one collection type (std::initializer_list, etc.) to another (IVector, ValueSet, etc.) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wil.