什么是 ALL_BUILD 和 ZERO_CHECK,我需要它们吗?

2021-12-26 00:00:00 visual-studio cmake c++

我创建了一个简单的 CMakeLists.txt:

I've created a simple CMakeLists.txt:

cmake_minimum_required(VERSION 2.8)
project (HelloWorld)
add_executable (HelloWorld main.cpp)

然而,当我从 CMake 生成 VS2012 或 VS2010 项目时,我得到了这两个额外的条目 - ALL_BUILD 和 ZERO_CHECK.我不明白他们的目的,我需要他们吗?

When I generate a VS2012 or VS2010 project from CMake, however, I get these 2 additional entries - ALL_BUILD and ZERO_CHECK. I don't understand their purpose, do I need them?

推荐答案

来自 https://cmake.org/pipermail/cmake/2008-November/025448.html:

Armin Berres ― 2008 年 11 月 22 日下午 3:12:41

Armin Berres ― 11/22/2008, 3:12:41 PM

ZERO_CHECK 将重新运行 cmake.您可以/应该在之后执行此操作更改 CMake 文件中的某些内容.

ZERO_CHECK will rerun cmake. You can/should execute this after changing something on your CMake files.

ALL_BUILD 只是一个构建所有项目的目标在主动解决方案中,我想可以将其与全部解决"进行比较.

ALL_BUILD is simply a target which builds all and everything project in the active solution, I guess one can compare it to "make all".

相关文章