Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
celllframe-node
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Code
Merge requests
17
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
celllframe-node
Commits
af8429fc
Commit
af8429fc
authored
5 years ago
by
ANTA
Browse files
Options
Downloads
Patches
Plain Diff
new CMakeLists.txt debug/release
parent
f7a45f10
No related branches found
No related tags found
1 merge request
!1
Master
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+0
-1
0 additions, 1 deletion
.gitignore
CMakeLists.txt
+86
-37
86 additions, 37 deletions
CMakeLists.txt
win_configure.cmd
+6
-0
6 additions, 0 deletions
win_configure.cmd
win_configure_release.cmd
+6
-0
6 additions, 0 deletions
win_configure_release.cmd
wmake.cmd
+7
-0
7 additions, 0 deletions
wmake.cmd
with
105 additions
and
38 deletions
.gitignore
+
0
−
1
View file @
af8429fc
...
...
@@ -48,7 +48,6 @@ test/build
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
...
...
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
86
−
37
View file @
af8429fc
...
...
@@ -5,6 +5,27 @@ if(WIN32)
message
(
STATUS
"Building for Windows"
)
endif
()
# Check whether we're on a 32-bit or 64-bit system
if
(
CMAKE_SIZEOF_VOID_P EQUAL
"8"
)
set
(
DEFAULT_BUILD_64 ON
)
else
()
set
(
DEFAULT_BUILD_64 OFF
)
endif
()
option
(
BUILD_64
"Build for 64-bit? 'OFF' builds for 32-bit."
${
DEFAULT_BUILD_64
}
)
if
(
BUILD_64
)
set
(
ARCH_WIDTH
"64"
)
else
()
set
(
ARCH_WIDTH
"32"
)
endif
()
message
(
STATUS
"Building for a
${
ARCH_WIDTH
}
-bit system"
)
if
(
DAP_RELEASE
)
message
(
STATUS
"Building type RELEASE"
)
else
()
message
(
STATUS
"Building type DEBUG"
)
endif
()
set
(
CMAKE_VERBOSE_MAKEFILE ON
)
set
(
CMAKE_COLOR_MAKEFILE ON
)
set
(
CMAKE_CXX_STANDARD 11
)
...
...
@@ -42,6 +63,7 @@ add_definitions ("-DDAP_SERVER")
add_definitions
(
"-DNODE_NETNAME=
\"
kelvin
\"
"
)
if
(
WIN32
)
add_definitions
(
"-DUNDEBUG"
)
add_definitions
(
"-DNDEBUG"
)
add_definitions
(
"-DWIN32"
)
...
...
@@ -49,33 +71,45 @@ if(WIN32)
add_definitions
(
"-D__WINDOWS__"
)
add_definitions
(
"-D_CRT_SECURE_NO_WARNINGS"
)
add_definitions
(
"-DCURL_STATICLIB"
)
# add_definitions ("-DDAP_SERVER NODE_NETNAME=\"kelvin\"")
set
(
_CCOPT
"-mconsole -static -Wall -O3 -fno-ident -ffast-math -ftree-vectorize -mfpmath=sse -mmmx -msse2 -fno-asynchronous-unwind-tables -ffunction-sections -Wl,--gc-sections -Wl,--strip-all"
)
if
(
DAP_RELEASE
)
set
(
_CCOPT
"-mconsole -static -Wall -O3 -fno-ident -ffast-math -ftree-vectorize -mfpmath=sse -mmmx -msse2 -fno-asynchronous-unwind-tables -ffunction-sections -Wl,--gc-sections -Wl,--strip-all"
)
else
()
set
(
_CCOPT
"-mconsole -static -Wall -pg"
)
set
(
_LOPT
"-mconsole -static -pg"
)
endif
()
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
_CCOPT
}
"
)
set
(
CMAKE_LINKER_FLAGS
"
${
CMAKE_LINKER_FLAGS
}
${
_LOPT
}
"
)
endif
()
if
(
UNIX
)
add_definitions
(
"-DDAP_OS_LINUX"
)
endif
()
include_directories
(
libdap/src/win32/
)
include_directories
(
3rdparty/libmemcached/
)
include_directories
(
3rdparty/libmemcached/win32/
)
include_directories
(
3rdparty/wepoll/include/
)
include_directories
(
3rdparty/uthash/src/
)
include_directories
(
3rdparty/libjson-c/
)
include_directories
(
3rdparty/libmagic/src/
)
include_directories
(
3rdparty/curl/include/
)
include_directories
(
3rdparty/libsqlite3/
)
if
(
DAP_RELEASE
)
add_definitions
(
"-DUNDEBUG"
)
add_definitions
(
"-DNDEBUG"
)
include_directories
(
libdap-server-http-db-auth/
)
include_directories
(
libdap-chain-net-srv-vpn/
)
endif
(
)
if
(
UNIX
)
set
(
_CCOPT
"-static -Wall -O3 -fno-ident -ffast-math -ftree-vectorize -mfpmath=sse -mmmx -msse2 -fno-asynchronous-unwind-tables -ffunction-sections -Wl,--gc-sections -Wl,--strip-all"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
_CCOPT
}
"
)
endif
()
if
(
UNIX
)
add_definitions
(
"-DDAP_OS_LINUX"
)
else
()
if
(
UNIX
)
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-pg"
)
SET
(
CMAKE_LINKER_FLAGS
"
${
CMAKE_LINKER_FLAGS
}
-pg"
)
if
(
DAP_RELEASE
)
set
(
_CCOPT
"-Wall -O3 -fno-ident -ffast-math -ftree-vectorize -mfpmath=sse -mmmx -msse2 -fno-asynchronous-unwind-tables -ffunction-sections -Wl,--gc-sections -Wl,--strip-all"
)
else
()
set
(
_CCOPT
"-Wall -pg -fPIC -fno-pie -no-pie"
)
set
(
_LOPT
"-pg"
)
SET
(
CMAKE_SHARED_LINKER_FLAGS
"
${
CMAKE_SHARED_LINKER_FLAGS
}
-pg"
)
endif
()
endif
()
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
_CCOPT
}
"
)
set
(
CMAKE_LINKER_FLAGS
"
${
CMAKE_LINKER_FLAGS
}
${
_LOPT
}
"
)
endif
()
add_subdirectory
(
libdap
)
add_subdirectory
(
libdap-crypto
)
...
...
@@ -123,24 +157,6 @@ if(BUILD_KELVIN_NODE_TESTS)
add_subdirectory
(
test
)
endif
()
if
(
WIN32
)
include_directories
(
libdap/src/win32/
)
include_directories
(
3rdparty/libmemcached/
)
include_directories
(
3rdparty/libmemcached/win32/
)
include_directories
(
3rdparty/wepoll/include/
)
include_directories
(
3rdparty/uthash/src/
)
include_directories
(
3rdparty/libjson-c/
)
include_directories
(
3rdparty/libmagic/src/
)
include_directories
(
3rdparty/curl/include/
)
include_directories
(
3rdparty/libsqlite3/
)
endif
()
if
(
WIN32
)
include_directories
(
libdap-server-http-db-auth/
)
include_directories
(
libdap-chain-net-srv-vpn/
)
endif
()
if
(
UNIX
)
add_executable
(
${
PROJECT_NAME
}
"sources/main.c"
"sources/sig_unix_handler.c"
)
add_executable
(
${
PROJECT_NAME
}
-cli
"sources/main_node_cli.c"
"sources/main_node_cli_shell.c"
"sources/main_node_cli_net.c"
)
...
...
@@ -153,7 +169,40 @@ if(WIN32)
add_executable
(
${
PROJECT_NAME
}
-tool
"sources/main_node_tool.c"
)
target_link_libraries
(
${
PROJECT_NAME
}
-cli dap_chain_net
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/curl[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/libjson-c[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/libmemcached[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/wepoll[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/libmagic[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/cuttdb[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/libsqlite3[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/regex[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/libmongoc[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/libbson[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/curl[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/nghttp2[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/libssl[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/c-ares[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/misc[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/zlib[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/libssh2[x86_64CLANG].a
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib/[x86_64CLANG]/libcrypto[x86_64CLANG].a
KERNEL32
USER32
SHELL32
WINMM
GDI32
ADVAPI32
Ole32
Version
Imm32
OleAut32
ws2_32
ntdll
psapi
Shlwapi
Bcrypt
Crypt32
Secur32
)
target_link_libraries
(
${
PROJECT_NAME
}
-tool dap_core dap_crypto dap_server_core dap_enc_server dap_udp_server dap_session
...
...
This diff is collapsed.
Click to expand it.
win_configure.cmd
0 → 100644
+
6
−
0
View file @
af8429fc
@echo
off
set
CMAKE_PATH
=
C
:/cmake
set
MINGW_PATH
=
C
:/mingw
-w
64
/x
86
_64
-
8
.1.0
-posix-seh-rt
_v6
-rev
0
PATH
=
%CMAKE_PATH%
/bin
;
%MINGW_PATH%
/mingw
64
/bin
;
%MINGW_PATH%
/mingw
64
/x
86
_64
-w
64
-mingw
32
/include
;
%MINGW_PATH%
/mingw
64
/x
86
_64
-w
64
-mingw
32
/lib
cmake
-G
"MinGW Makefiles"
This diff is collapsed.
Click to expand it.
win_configure_release.cmd
0 → 100644
+
6
−
0
View file @
af8429fc
@echo
off
set
CMAKE_PATH
=
C
:/cmake
set
MINGW_PATH
=
C
:/mingw
-w
64
/x
86
_64
-
8
.1.0
-posix-seh-rt
_v6
-rev
0
PATH
=
%CMAKE_PATH%
/bin
;
%MINGW_PATH%
/mingw
64
/bin
;
%MINGW_PATH%
/mingw
64
/x
86
_64
-w
64
-mingw
32
/include
;
%MINGW_PATH%
/mingw
64
/x
86
_64
-w
64
-mingw
32
/lib
cmake
-G
"MinGW Makefiles"
-DDAP
_RELEASE
=
1
This diff is collapsed.
Click to expand it.
wmake.cmd
0 → 100644
+
7
−
0
View file @
af8429fc
@echo
off
set
CMAKE_PATH
=
C
:/cmake
set
MINGW_PATH
=
C
:/mingw
-w
64
/x
86
_64
-
8
.1.0
-posix-seh-rt
_v6
-rev
0
PATH
=
%CMAKE_PATH%
/bin
;
%MINGW_PATH%
/mingw
64
/bin
;
%MINGW_PATH%
/mingw
64
/x
86
_64
-w
64
-mingw
32
/include
;
%MINGW_PATH%
/mingw
64
/x
86
_64
-w
64
-mingw
32
/lib
mingw32
-make
.exe
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment