第27月第10天 cmake
1.error: tool 'xcodebuild' requires Xcode的解决办法
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
https://blog.csdn.net/shorewb/article/details/52447554
2.
cmake_minimum_required(VERSION 3.5) project(server C CXX) set(CMAKE_CXX_COMPLICE '/usr/bin/clang++') #set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g") set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) set(SOURCE_FILES main.cpp Channel.cpp Channel.h EventLoop.cpp EventLoop.h Mutex.cpp Mutex.h Current.h Epoll.cpp Epoll.h Acceptor.cpp Acceptor.h InetAddress.cpp InetAddress.h Socket.h Condition.h MutexGuard.h Thread.h TcpConnection.cpp TcpConnection.h Buffer.cpp Buffer.h EventLoopThreadPool.cpp EventLoopThreadPool.h EventLoopThread.cpp EventLoopThread.h TcpServer.cpp TcpServer.h IgnorePipe.h) add_executable(server ${SOURCE_FILES}) target_link_libraries(server Threads::Threads)
https://github.com/luchen11/service
3.
xcode 导入makefile 进行调试
https://blog.csdn.net/thundon/article/details/41673837
4.macro
https://blog.csdn.net/hanjin007/article/details/7716700