简体   繁体   English

错误配置过程项目文件可能无效

[英]Error in configuration process project files may be invalid

i get this error using cmake Version 3.11.2 on Windows 10 with visual Studio 14 2015 created Project.我在 Windows 10 上使用 cmake 版本 3.11.2 和 Visual Studio 14 2015 创建的项目收到此错误。 I already used cmake on the same Project on Windows 7 but in Windows 10 it doesnt seem to work.我已经在 Windows 7 上的同一个项目上使用了 cmake,但在 Windows 10 中它似乎不起作用。

Selecting Windows SDK version to target Windows 10.0.17134.选择 Windows SDK 版本以针对 Windows 10.0.17134。

CMake Error at C:/Users/Ali/Desktop/cmake-3.11.2-win64-x64/share/cmake-3.11/Modules/Compiler/._ADSP-DetermineCompiler.cmake:1:
  Parse error.  Expected a command name, got bad character with text "".
Call Stack (most recent call first):
  C:/Users/Ali/Desktop/cmake-3.11.2-win64-x64/share/cmake-3.11/Modules/CMakeCompilerIdDetection.cmake:6 (include)
  C:/Users/Ali/Desktop/cmake-3.11.2-win64-x64/share/cmake-3.11/Modules/CMakeCompilerIdDetection.cmake:32 (_readFile)
  C:/Users/Ali/Desktop/cmake-3.11.2-win64-x64/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:128 (compiler_id_detection)
  C:/Users/Ali/Desktop/cmake-3.11.2-win64-x64/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:147 (CMAKE_DETERMINE_COMPILER_ID_WRITE)
  C:/Users/Ali/Desktop/cmake-3.11.2-win64-x64/share/cmake-3.11/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  C:/Users/Ali/Desktop/cmake-3.11.2-win64-x64/share/cmake-3.11/Modules/CMakeDetermineCCompiler.cmake:112 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt


Configuring incomplete, errors occurred!

See also "C:/Users/Ali/Desktop/Projekt1/build/CMakeFiles/CMakeOutput.log".

In the logfile there is nothing useful.Just :The system is: Windows - 10.0.17134 - AMD64在日志文件中没有任何用处。只是:系统是:Windows - 10.0.17134 - AMD64

I already checked all other threads on stackoverflow but couldnt find a solution.我已经检查了 stackoverflow 上的所有其他线程,但找不到解决方案。 Does anyone had the same error or does know what to do to fix it ?有没有人有同样的错误或知道如何修复它?

Under Modules/Compiler/ there shouldn't be files started with ._ .Modules/Compiler/应该有._文件 Probably, you got them when copy CMake from external drive, which has such files as hidden ones.可能是从外部驱动器复制 CMake 时得到的,其中包含隐藏文件。 Eg from MacOS .例如来自 MacOS

Either remove files started with ._ , or repeat copying of CMake without them.删除以._文件,或者在没有它们的情况下重复复制 CMake。

Thanks to @Tsyvarev's answer!感谢@Tsyvarev 的回答! I had never heard of macOS filesystem metadata causing problems.我从未听说过 macOS 文件系统元数据会导致问题。

If you take cmake files on macOS and tar it you'll get this.如果您在 macOS 上获取 cmake 文件并对其进行tar ,您会得到这个。 One solution is to use --disable-copyfile when you compress it to avoid these files:一种解决方案是在压缩时使用--disable-copyfile以避免这些文件:

tar --disable-copyfile -czf cmake-3.19.6-rh6.tgz ./cmake-3.19.6-rh6/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM