feat/update_config #10

Merged
tqcq merged 26 commits from feat/update_config into master 2024-10-14 10:15:01 +08:00
Showing only changes of commit 25998dde64 - Show all commits

View File

@ -19,6 +19,10 @@ set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# add static libgcc and libstdc++ for static linking
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc -static-libstdc++")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
option(TILE_BUILD_TESTS "Build tests" OFF) option(TILE_BUILD_TESTS "Build tests" OFF)
option(TILE_BUILD_BENCHMARKS "Build tests" OFF) option(TILE_BUILD_BENCHMARKS "Build tests" OFF)
option(TILE_WITH_OPENSSL "Build with openssl" OFF) option(TILE_WITH_OPENSSL "Build with openssl" OFF)
@ -34,34 +38,34 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release") set(CMAKE_BUILD_TYPE "Release")
endif() endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gz") # # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gz")
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -gz") # # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -gz")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static") set(CMAKE_C_FLAGS # # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static") set(CMAKE_C_FLAGS
# "${CMAKE_CXX_FLAGS} -static") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} # # "${CMAKE_CXX_FLAGS} -static") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
# -fsanitize=address ") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address # # -fsanitize=address ") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address
# ") # # ")
#
set(WHOLE_ARCHIVE_PREFIX "-Wl,-force_load") # set(WHOLE_ARCHIVE_PREFIX "-Wl,-force_load")
# set(NO_WHOLE_ARCHIVE_PREFIX "") # # set(NO_WHOLE_ARCHIVE_PREFIX "")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") # elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gz") # # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gz")
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -gz") # # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -gz")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static") set(CMAKE_C_FLAGS # # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static") set(CMAKE_C_FLAGS
# "${CMAKE_CXX_FLAGS} -static") # # "${CMAKE_CXX_FLAGS} -static")
#
set(WHOLE_ARCHIVE_PREFIX "-Wl,-force_load,") # set(WHOLE_ARCHIVE_PREFIX "-Wl,-force_load,")
# set(NO_WHOLE_ARCHIVE_PREFIX "") # # set(NO_WHOLE_ARCHIVE_PREFIX "")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gz") # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gz")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -gz") # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -gz")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++") # # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
# set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++") # # set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
#
set(STATIC_BINARY_FLAGS "-static-libgcc -static-libstdc++") # set(STATIC_BINARY_FLAGS "-static-libgcc -static-libstdc++")
set(WHOLE_ARCHIVE_PREFIX "-Wl,--whole-archive") # set(WHOLE_ARCHIVE_PREFIX "-Wl,--whole-archive")
set(WHOLE_ARCHIVE_SUFFIX "-Wl,--no-whole-archive") # set(WHOLE_ARCHIVE_SUFFIX "-Wl,--no-whole-archive")
endif() # endif()
# extern int getifaddrs(struct ifaddrs **ifap); extern void freeifaddrs(struct # extern int getifaddrs(struct ifaddrs **ifap); extern void freeifaddrs(struct
# ifaddrs *ifa); # ifaddrs *ifa);