Skip to content

Commit

Permalink
fixup! Implement slog2 logging capability
Browse files Browse the repository at this point in the history
  • Loading branch information
kheaactua committed May 29, 2024
1 parent 568411d commit de5cf0d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,16 @@ target_link_libraries(OS_INTERFACE INTERFACE Threads::Threads)

if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(DL_LIBRARY "dl")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# This is only relevant for GCC and causes warnings on Clang
set(EXPORTSYMBOLS "-Wl,-export-dynamic -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exportmap.gcc")
set(OS_CXX_FLAGS "${OS_CXX_FLAGS} -Wno-tsan -Wl,-z,now")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_link_options(
-Wno-tsan -Wl,-z,relro,-z,now -Wl,-export-dynamic -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exportmap.gcc
)
endif()
message("Matt: Adding wrap options")
add_link_options(-Wl,--wrap=socket,--wrap=accept,--wrap=open)

set(NO_DEPRECATED "")
set(OPTIMIZE "")
Expand All @@ -97,14 +100,12 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-Wformat
-Wformat-security
-Wpedantic
-Werror
# -Werror
)

# force all use of std::mutex and std::recursive_mutex to use runtime init
# instead of static initialization so mutexes can be hooked to enable PI as needed
add_definitions(-D_GTHREAD_USE_MUTEX_INIT_FUNC -D_GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC -D_FORTIFY_SOURCE=${_FORTIFY_SOURCE})

add_link_options(-Wl,--wrap=socket,--wrap=accept,--wrap=open)
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")

if(${CMAKE_SYSTEM_NAME} MATCHES "QNX")
Expand Down

0 comments on commit de5cf0d

Please sign in to comment.