Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues when building with gcc on linux #220

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ if (DOBBY_DEBUG)
add_definitions(-DDOBBY_DEBUG)
add_definitions(-DLOGGING_DEBUG)
message(STATUS "[Dobby] Enable debug logging")
else ()
add_definitions(-DLOGGING_DISABLE)
message(STATUS "[Dobby] Disable logging")
endif ()

# Enable full floating point register pack
Expand Down Expand Up @@ -381,4 +384,4 @@ endif ()

if (SYSTEM.Darwin AND (NOT BUILDING_KERNEL))
include(cmake/platform/platform-darwin.cmake)
endif ()
endif ()
20 changes: 11 additions & 9 deletions builtin-plugin/SymbolResolver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,17 @@ if (SYSTEM.Windows)
)
endif ()

add_library(macho_ctx_kit
macho/macho_ctx.h
macho/macho_ctx.cc
)

add_library(shared_cache_ctx_kit
macho/shared_cache_ctx.h
macho/shared_cache_ctx.cpp
)
if (SYSTEM.Darwin)
add_library(macho_ctx_kit
macho/macho_ctx.h
macho/macho_ctx.cc
)

add_library(shared_cache_ctx_kit
macho/shared_cache_ctx.h
macho/shared_cache_ctx.cpp
)
endif ()

add_library(dobby_symbol_resolver
${SOURCE_FILE_LIST}
Expand Down
9 changes: 6 additions & 3 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

add_executable(socket_example
main.cc
socket_example.cc
)

target_link_libraries(socket_example
dobby
dobby Threads::Threads
)


Expand All @@ -13,5 +16,5 @@ add_library(socket_example_lib SHARED
)

target_link_libraries(socket_example_lib
dobby
)
dobby Threads::Threads
)
7 changes: 6 additions & 1 deletion source/dobby/common.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#pragma once

#ifndef __has_feature
#define __has_feature(x) 0
#endif

#include "dobby.h"
#include "dobby/types.h"
#include "dobby/platform_features.h"
Expand All @@ -8,4 +12,5 @@
#include "dobby/pac_kit.h"

#include "logging/logging.h"
#include "logging/check_logging.h"
#include "logging/check_logging.h"