我试图从存储库下载“ECMConfig.cmake”,但终端给了我一个错误:“问题的标题+以下配置文件被考虑但未被接受:ECMConfig.cmake:版本未知。 我试图在谷歌上搜索,但得到了什么都没有。我想使用以下命令从源代码“kde frameworks”进行编译:
cmake .. -DCMAKE_INSTALL_PREFIX=/home/john/QtProjects/KDEStuff/frameworkintegration/build/
-DCMAKE_BUILD_TYPE=debugfull -DCMAKE_PREFIX_PATH=/home/john/Downloads/
Run Code Online (Sandbox Code Playgroud)
PS:
“/home/john/Downloads/” - 我的 *.cmake 在哪里。
这一切都在问题中。当cmake遇到错误时,有时它不会立即停止而是继续处理所有CMake文件。只有在处理结束时我们才知道有错误,因此我们必须返回整个日志以查看它的位置。
是否有任何选项、变量或方法可以在第一个错误发生后立即停止 CMake?
澄清:我不是要停止源代码的编译,而是要停止 CMake 生成(例如在 Linux 上生成 Makefile)。
这是一个示例(这不是我的真实项目,这是专门为生成错误而设计的)。我的文件 CMakeLists.txt:
cmake_minimum_required(VERSION 3.6)
project(test)
set_property(TARGET foo PROPERTY PROP1 TRUE)
set_property(TARGET bar PROPERTY PROP2 TRUE)
Run Code Online (Sandbox Code Playgroud)
当我运行时,cmake .我得到输出:
CMake Error at CMakeLists.txt:3 (set_property):
set_property could not find TARGET foo. Perhaps it has not yet been
created.
CMake Error at CMakeLists.txt:4 (set_property):
set_property could not find TARGET bar. Perhaps it has not yet been
created.
-- Configuring incomplete, errors occurred!
Run Code Online (Sandbox Code Playgroud)
我想知道的是 cmake 是否有可能在第一次报告错误后立即停止。
我刚刚cmake-mode使用以下命令在 Emacs 24 中安装了该软件包:
M-x package-install cmake-mode
Run Code Online (Sandbox Code Playgroud)
我可以在以下位置看到包~/.emacs.d/elpa/cmake-mode-20110824,并且可以使用以下Commentary:部分的说明加载它~/.emacs.d/elpa/cmake-mode-20110824/cmake-mode.el:
;; Add this code to your .emacs file to use the mode:
;;
;; (setq load-path (cons (expand-file-name "/dir/with/cmake-mode") load-path))
;; (require 'cmake-mode)
;; (setq auto-mode-alist
;; (append '(("CMakeLists\\.txt\\'" . cmake-mode)
;; ("\\.cmake\\'" . cmake-mode))
;; auto-mode-alist))
Run Code Online (Sandbox Code Playgroud)
然而,这与ELPA 的 EmacsWiki 页面上的使用说明相矛盾:
...在加载 init.el 后初始化包。这意味着您不应该将特定于包的初始化放入您的 init.el ...
我倾向于同意此说明,因为在我的~/.gnu-emacs文件中添加了一行,例如:
(add-to-list 'load-path "~/.emacs.d/elpa/cmake-mode-20110824/")
Run Code Online (Sandbox Code Playgroud)
很丑,如果我升级包会坏。但是,如果没有这条线,我将无法使用cmake-mode.
我在这里错过了什么吗?
笔记:
package-enable-at-startup,它的价值是t. …从终端运行以下命令:
sudo python3 meson _build
Run Code Online (Sandbox Code Playgroud)
:
**The Meson build system**
Version: 0.50.0
....
Checking for function "ngettext" : YES
Checking for function "bind_textdomain_codeset" : YES
Dependency mount found: NO (tried pkgconfig and cmake)
meson.build:1807:2: ERROR: Dependency "mount" not found, tried pkgconfig and cmake
A full log can be found at ~/glib-2.60.0/_build/meson-logs/meson-log.txt
Run Code Online (Sandbox Code Playgroud)
介子-log.txt 错误:
Checking for function "bind_textdomain_codeset" : YES
Pkg-config binary for MachineChoice.HOST is cached.
Determining dependency 'mount' with pkg-config executable '/usr/local/bin/pkg-config'
Called `/usr/local/bin/pkg-config --modversion mount` -> 1
CMake binary …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 cygwin 中使用 cmake 。这样做时我得到以下信息:
~> cmake --version
/usr/bin/cmake.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
Run Code Online (Sandbox Code Playgroud)
当我运行 cygcheck 时,它似乎缺少 cygnettle-4.dll (见下文),但是在运行 setup-x86 时我找不到任何名为 cygnettle 的包。
有什么建议么?
~> cygcheck /usr/bin/cmake
C:\cygwin\bin\cmake.exe
C:\cygwin\bin\cygarchive-13.dll
C:\cygwin\bin\cyggcc_s-1.dll
C:\cygwin\bin\cygwin1.dll
C:\Windows\system32\KERNEL32.dll
C:\Windows\system32\API-MS-Win-Core-RtlSupport-L1-1-0.dll
C:\Windows\system32\ntdll.dll
C:\Windows\system32\KERNELBASE.dll
C:\Windows\system32\API-MS-Win-Core-ProcessThreads-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Heap-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Memory-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Handle-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Synch-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-File-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-IO-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-ThreadPool-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-LibraryLoader-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-NamedPipe-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Misc-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-SysInfo-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Localization-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-String-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Debug-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-ErrorHandling-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Fibers-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Util-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Core-Profile-L1-1-0.dll
C:\Windows\system32\API-MS-Win-Security-Base-L1-1-0.dll
C:\cygwin\bin\cygbz2-1.dll
C:\cygwin\bin\cygiconv-2.dll
C:\cygwin\bin\cyglzma-5.dll
C:\cygwin\bin\cyglzo2-2.dll
cygcheck: track_down: could not find cygnettle-4.dll
C:\cygwin\bin\cygxml2-2.dll
C:\cygwin\bin\cygz.dll
C:\cygwin\bin\cygcurl-4.dll …Run Code Online (Sandbox Code Playgroud)