代码语言:javascript 代码运行次数:0 复制Cloud Studio 代码运行 list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_variable_templates result) if(result EQUAL -1) message(FATAL_ERROR "I really need variable templates.") endif() 正如您可能猜到的,为每个使用特性编写一个测试文件是一项艰巨的任务。即使是 CMake ...
您可以在 GitHub 上找到本章中存在的代码文件,地址为github.com/PacktPublishing/Modern-CMake-for-Cpp/tree/main/examples/chapter04。 要构建本书中提供的示例,始终使用推荐的命令: cmake -B <build tree> -S cmake --build <build tree> 请确保将占位符<build tree>和替换为适当的路径。作为提醒:build...