-
mac版的LeetCode是否存在?
资源介绍
leetcode有mac版吗leetcode
设置
假设
mac
os
和
vscode
以及以下项目结构:
.
├──
.gitignore
├──
setup.md
└──
src
└──
main.cpp
制作
用于管理构建过程
安装cmake
:
brew
install
cmake
在项目根文件夹中创建CMakeLists.txt
:
cmake_minimum_required
(
VERSION
3.18.3)
project
(algorithms)
set
(CMAKE_CXX_STANDARD
11)
set
(CMAKE_EXPORT_COMPILE_COMMANDS
ON
)
#
Enable
some
warnings.
See
https://*.com/a/14235055.
if
(CMAKE_COMPILER_IS_GNUCC)
set
(CMAKE_CXX_FLAGS
"
${CMAKE_CXX_FLAGS}
-Wall
-Wextra
-pedantic"
)
endif
(CMAKE_COMPILER_IS_GNUCC)