Skip to content

Commit

Permalink
fixed cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyu- committed Aug 11, 2017
1 parent e890a63 commit b16b37c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.7)
project(udp2raw_tunnel)

set(CMAKE_CXX_STANDARD 11)
set_source_files_properties(lib/aes.c lib/md5.c PROPERTIES LANGUAGE CXX )

set(SOURCE_FILES
lib/aes.c
Expand All @@ -13,5 +14,6 @@ set(SOURCE_FILES
network.cpp
)
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-variable -Wno-unused-parameter -static")
set(CMAKE_LINK_LIBRARY_FLAG "-lrt")
add_executable(udp2raw_tunnel ${SOURCE_FILES})
#set(CMAKE_LINK_LIBRARY_FLAG "-lrt")
add_executable(udp2raw_tunnel ${SOURCE_FILES})
target_link_libraries(udp2raw_tunnel rt)
2 changes: 1 addition & 1 deletion common.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const u32_t client_retry_interval=1000;
const u32_t server_handshake_timeout=10000;// this should be much longer than clients. client retry initially ,server retry passtively

const int conv_clear_ratio=10; //conv grabage collecter check 1/10 of all conv one time
const int conn_clear_ratio=10;
const int conn_clear_ratio=30;
const int conv_clear_min=5;
const int conn_clear_min=1;

Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FLAGS2= -O3
all:
sudo killall udp2raw||true
sleep 0.2
g++ main.cpp -o udp2raw -static -ggdb -I. lib/aes.c lib/md5.c encrypt.cpp log.cpp network.cpp common.cpp -lrt -std=c++11 ${FLAGS} ${FLAGS2}
gcc main.cpp -o udp2raw -static -ggdb -I. lib/aes.c lib/md5.c encrypt.cpp log.cpp network.cpp common.cpp -lrt -std=c++11 ${FLAGS} ${FLAGS2}
# ${ccmips} main.cpp -o udp2raw_ar71xx -lrt -I. lib/aes.c lib/md5.c encrypt.cpp log.cpp network.cpp common.cpp -std=c++11 ${FLAGS} ${FLAGS2}
fast:
sudo killall udp2raw||true
Expand Down

0 comments on commit b16b37c

Please sign in to comment.