-
Run this on a new project: Results in this output:
Is there something in the cmake scripts that would cause this issue? I reported it earlier to Microsoft here, assuming it was an issue with Visual Studio 2022 17.8.0, but they cannot reproduce it. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 4 replies
-
it's should be cmake bug, or vs bug |
Beta Was this translation helpful? Give feedback.
-
just test a very simple demo: cmake_minimum_required(VERSION 3.27.0)
add_library(dummy dummy.cpp) also has error: build1k: CONFIG_ALL_OPTIONS=-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -A x64 -DCMAKE_INSTALL_PREFIX=E:\dev\oss\test\install_winuwp_x64, Count=5
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
-- Building for: Visual Studio 17 2022
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) in CMakeLists.txt:
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.
-- The C compiler identification is unknown
-- The CXX compiler identification is MSVC 19.38.33130.0
CMake Error in CMakeLists.txt:
No CMAKE_C_COMPILER could be found.
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred! |
Beta Was this translation helpful? Give feedback.
-
Thanks for testing that out. I'm just a little confused as to how MS can't reproduce it. I've posted step by step instructions on the MS site regarding how to reproduce this issue, so hopefully we can get clarification if it is a VS or cmake issue. The post is flagged as private so may not be visible in that thread. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
There are 3 files define default compiler option "/FU":
|
Beta Was this translation helpful? Give feedback.
-
Is that what is causing the issue with UWP project generation with CMake? If so, could you possibly add all of this info to this post so they can hopefully fix it quicker? |
Beta Was this translation helpful? Give feedback.
-
The root cause maybe the vs2022 17.8 remove C compiler flag |
Beta Was this translation helpful? Give feedback.
-
Fair enough. I see many logged issues regarding the "/FU" switch in v17.8 and the affect it is having on UWP projects, so it seems like they already know about it. |
Beta Was this translation helpful? Give feedback.
The root cause maybe the vs2022 17.8 remove C compiler flag
FU
support.