上回的CMakeLists.txt里面有一句,if (WIN32)......endif(WIN32);
根据资料,这是判断操作系统是否是Windows;
下面单独看一下;
一个CMakeLists.txt文件如下;
if(WIN32)
# 如果是 Windows
message("当前操作系统为 Windows")
elseif(UNIX AND NOT APPLE)
# 如果是 Linux
message("当前操作系统为 Linux")
else()
message(FATAL_ERROR "不支持的操作系统类型")
endif()
然后运行看一下,如下图;
它有一些输出;
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
code such as
project(ProjectName)
near the top of the file, but after cmake_minimum_required().
CMake is pretending there is a "project(Proj




![[C++] STL_stack queue接口的模拟实现](https://img-blog.csdnimg.cn/ff39f40470e14ddf94928d97c0fef6b8.png)





![报错注入 [极客大挑战 2019]HardSQL1](https://img-blog.csdnimg.cn/0d1689f709104ace9556978052807ef0.png)







