Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cellframe-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
16
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
cellframe-sdk
Compare revisions
986fc5a916307a01c1ec64bb53f5e1932509544c to f94212973623702bff498780fc2d0426e595d5ec
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
cellframe/cellframe-sdk
Select target project
No results found
f94212973623702bff498780fc2d0426e595d5ec
Select Git revision
Swap
Target
cellframe/cellframe-sdk
Select target project
cellframe/cellframe-sdk
MIKA83/cellframe-sdk
2 results
986fc5a916307a01c1ec64bb53f5e1932509544c
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
[*] Moved imporant defines to include file
· f9421297
Dmitriy A. Gerasimov
authored
4 years ago
f9421297
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+0
-85
0 additions, 85 deletions
CMakeLists.txt
cmake/OS_Detection.cmake
+85
-0
85 additions, 0 deletions
cmake/OS_Detection.cmake
with
85 additions
and
85 deletions
CMakeLists.txt
View file @
f9421297
...
...
@@ -6,91 +6,6 @@ set(CELLFRAME_SDK_NATIVE_VERSION "1.2-1")
include
(
cmake/OS_Detection.cmake
)
add_definitions
(
"-DCELLFRAME_SDK_VERSION=
\"
${
CELLFRAME_SDK_NATIVE_VERSION
}
\"
"
)
if
((
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
OR
(
DAP_DEBUG
))
message
(
"Debug build"
)
SET
(
DAP_DEBUG ON
)
else
()
message
(
"Release build"
)
SET
(
DAP_RELEASE ON
)
endif
()
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
(
UNIX
)
add_definitions
(
"-DDAP_OS_LINUX -DDAP_OS_UNIX"
)
# add_definitions ("-DDAP_LOG_MT")
if
(
DAP_DEBUG
)
set
(
_CCOPT
"-DDAP_DEBUG -Wall -Wno-unused-function -Wno-implicit-fallthrough -Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable -pg -g3 -ggdb -fno-eliminate-unused-debug-symbols"
)
set
(
_LOPT
"-pg"
)
SET
(
CMAKE_SHARED_LINKER_FLAGS
"
${
CMAKE_SHARED_LINKER_FLAGS
}
-pg"
)
else
()
set
(
_CCOPT
"-Wno-unused-function -Wno-implicit-fallthrough -Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable -O3 -fPIC -fno-ident -ffast-math -ftree-vectorize -fno-asynchronous-unwind-tables -ffunction-sections -Wl,--gc-sections -Wl,--strip-all -std=gnu11"
)
endif
()
if
(
ANDROID
)
set
(
_CCOPT
"
${
_CCOPT
}
-fforce-enable-int128 -std=gnu11"
)
add_definitions
(
"-DDAP_OS_ANDROID"
)
endif
()
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
_CCOPT
}
"
)
set
(
CMAKE_LINKER_FLAGS
"
${
CMAKE_LINKER_FLAGS
}
${
_LOPT
}
"
)
if
(
ANDROID
)
add_subdirectory
(
lib/json-c
)
add_subdirectory
(
lib/sqlite3
)
#add_subdirectory(lib/libev)
include_directories
(
lib/
)
else
()
endif
(
ANDROID
)
endif
()
if
(
WIN32
)
message
(
STATUS
"Building for Windows"
)
add_definitions
(
"-DHAVE_PREAD"
)
add_definitions
(
"-DHAVE_MMAP"
)
add_definitions
(
"-DHAVE_STRNDUP"
)
add_definitions
(
"-DUNDEBUG"
)
add_definitions
(
"-DNDEBUG"
)
add_definitions
(
"-DWIN32"
)
add_definitions
(
"-D_WINDOWS"
)
add_definitions
(
"-D__WINDOWS__"
)
add_definitions
(
"-D_CRT_SECURE_NO_WARNINGS"
)
add_definitions
(
"-DCURL_STATICLIB"
)
add_definitions
(
"-DHAVE_PREAD"
)
add_definitions
(
"-DHAVE_MMAP"
)
add_definitions
(
"-DHAVE_STRNDUP"
)
add_definitions
(
"-DNGHTTP2_STATICLIB"
)
add_compile_definitions
(
WINVER=0x0600 _WIN32_WINNT=0x0600
)
add_definitions
(
"-DDAP_OS_WINDOWS"
)
if
(
DAP_DEBUG
)
set
(
_CCOPT
"-mconsole -static -Wall -std=gnu11 -Wextra -Wno-unused-function -Wno-implicit-fallthrough -Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable -g3 -ggdb -fno-eliminate-unused-debug-symbols -pg"
)
set
(
_LOPT
"-mconsole -static -pg"
)
else
()
set
(
_CCOPT
"-static -std=gnu11 -Wall -Wextra -Wno-unused-function -Wno-implicit-fallthrough -Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable -O3 -fno-ident -ffast-math -ftree-vectorize -mfpmath=sse -mmmx -msse2 -fno-asynchronous-unwind-tables -ffunction-sections -Wl,--gc-sections -Wl,--strip-all"
)
endif
()
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
_CCOPT
}
"
)
set
(
CMAKE_LINKER_FLAGS
"
${
CMAKE_LINKER_FLAGS
}
${
_LOPT
}
"
)
include_directories
(
3rdparty/uthash/src/
)
include_directories
(
3rdparty/wepoll/
)
#include_directories(libdap-chain-net-srv-vpn/)
endif
()
add_subdirectory
(
libdap
)
add_subdirectory
(
libdap-app-cli
)
add_subdirectory
(
libdap-crypto
)
...
...
This diff is collapsed.
Click to expand it.
cmake/OS_Detection.cmake
View file @
f9421297
...
...
@@ -21,3 +21,88 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Win")
message
(
"Win build"
)
set
(
OS_TYPE_DESKTOP ON
)
endif
()
if
((
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
OR
(
DAP_DEBUG
))
message
(
"Debug build"
)
SET
(
DAP_DEBUG ON
)
else
()
message
(
"Release build"
)
SET
(
DAP_RELEASE ON
)
endif
()
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
(
UNIX
)
add_definitions
(
"-DDAP_OS_LINUX -DDAP_OS_UNIX"
)
# add_definitions ("-DDAP_LOG_MT")
if
(
DAP_DEBUG
)
set
(
_CCOPT
"-DDAP_DEBUG -Wall -Wno-unused-function -Wno-implicit-fallthrough -Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable -pg -g3 -ggdb -fno-eliminate-unused-debug-symbols"
)
set
(
_LOPT
"-pg"
)
SET
(
CMAKE_SHARED_LINKER_FLAGS
"
${
CMAKE_SHARED_LINKER_FLAGS
}
-pg"
)
else
()
set
(
_CCOPT
"-Wno-unused-function -Wno-implicit-fallthrough -Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable -O3 -fPIC -fno-ident -ffast-math -ftree-vectorize -fno-asynchronous-unwind-tables -ffunction-sections -Wl,--gc-sections -Wl,--strip-all -std=gnu11"
)
endif
()
if
(
ANDROID
)
set
(
_CCOPT
"
${
_CCOPT
}
-fforce-enable-int128 -std=gnu11"
)
add_definitions
(
"-DDAP_OS_ANDROID"
)
endif
()
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
_CCOPT
}
"
)
set
(
CMAKE_LINKER_FLAGS
"
${
CMAKE_LINKER_FLAGS
}
${
_LOPT
}
"
)
if
(
ANDROID
)
add_subdirectory
(
lib/json-c
)
add_subdirectory
(
lib/sqlite3
)
#add_subdirectory(lib/libev)
include_directories
(
lib/
)
else
()
endif
(
ANDROID
)
endif
()
if
(
WIN32
)
message
(
STATUS
"Building for Windows"
)
add_definitions
(
"-DHAVE_PREAD"
)
add_definitions
(
"-DHAVE_MMAP"
)
add_definitions
(
"-DHAVE_STRNDUP"
)
add_definitions
(
"-DUNDEBUG"
)
add_definitions
(
"-DNDEBUG"
)
add_definitions
(
"-DWIN32"
)
add_definitions
(
"-D_WINDOWS"
)
add_definitions
(
"-D__WINDOWS__"
)
add_definitions
(
"-D_CRT_SECURE_NO_WARNINGS"
)
add_definitions
(
"-DCURL_STATICLIB"
)
add_definitions
(
"-DHAVE_PREAD"
)
add_definitions
(
"-DHAVE_MMAP"
)
add_definitions
(
"-DHAVE_STRNDUP"
)
add_definitions
(
"-DNGHTTP2_STATICLIB"
)
add_compile_definitions
(
WINVER=0x0600 _WIN32_WINNT=0x0600
)
add_definitions
(
"-DDAP_OS_WINDOWS"
)
if
(
DAP_DEBUG
)
set
(
_CCOPT
"-mconsole -static -Wall -std=gnu11 -Wextra -Wno-unused-function -Wno-implicit-fallthrough -Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable -g3 -ggdb -fno-eliminate-unused-debug-symbols -pg"
)
set
(
_LOPT
"-mconsole -static -pg"
)
else
()
set
(
_CCOPT
"-static -std=gnu11 -Wall -Wextra -Wno-unused-function -Wno-implicit-fallthrough -Wno-unused-variable -Wno-unused-parameter -Wno-unused-but-set-variable -O3 -fno-ident -ffast-math -ftree-vectorize -mfpmath=sse -mmmx -msse2 -fno-asynchronous-unwind-tables -ffunction-sections -Wl,--gc-sections -Wl,--strip-all"
)
endif
()
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
_CCOPT
}
"
)
set
(
CMAKE_LINKER_FLAGS
"
${
CMAKE_LINKER_FLAGS
}
${
_LOPT
}
"
)
include_directories
(
3rdparty/uthash/src/
)
include_directories
(
3rdparty/wepoll/
)
#include_directories(libdap-chain-net-srv-vpn/)
endif
()
This diff is collapsed.
Click to expand it.