Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 指定cmake的最小版本
cmake_minimum_required(VERSION 3.10)# 声明要求的cmake最低版本

# 设置项目名称
project(CppHttpDemo)# 声明cmake工程名字,还可以增加版本号码

set(CMAKE_CXX_STANDARD 14)# 指定C++标准

# 设置编译类型
add_executable(CppHttpDemo httpserver/main.cpp httpserver/http_server.cpp httpserver/http_server.h httpclient/http_client.cpp httpclient/http_client.h common/mongoose.c common/mongoose.h )

# print project_name
message(${PROJECT_SOURCE_DIR})
13 changes: 13 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

set -x

SOURCE_DIR=`pwd`
BUILD_DIR=${BUILD_DIR:-./build}

mkdir -p $BUILD_DIR \
&& cd $BUILD_DIR \
&& cmake \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
$SOURCE_DIR \
&& make $*