forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
09a4678
commit ef4e1e7
Showing
3 changed files
with
21 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,6 @@ | ||
cmake_minimum_required(VERSION 3.20) | ||
project(libsdk) | ||
set(CUBEFS_DIR "${ClickHouse_SOURCE_DIR}/contrib/cubefs") | ||
execute_process( | ||
COMMAND make libsdk | ||
WORKING_DIRECTORY ${CUBEFS_DIR}) | ||
set(FILE_PATH "${CUBEFS_DIR}/libsdk/libcfs.h") | ||
# Add configuration to ignore warnings in the header file | ||
file(STRINGS ${FILE_PATH} FILE_CONTENTS) | ||
list(FIND FILE_CONTENTS "#pragma GCC diagnostic push" PRAGMA_INDEX) | ||
if (PRAGMA_INDEX EQUAL -1) | ||
execute_process( | ||
COMMAND sh -c "echo '#pragma GCC diagnostic push\n#pragma GCC diagnostic ignored \"-Wreserved-identifier\"\n#pragma GCC diagnostic ignored \"-Wmacro-redefined\"\n' | cat - ${FILE_PATH}" | ||
OUTPUT_FILE "${FILE_PATH}.tmp" | ||
) | ||
execute_process( | ||
COMMAND sh -c "echo '#pragma GCC diagnostic pop' >> ${FILE_PATH}.tmp" | ||
) | ||
execute_process( | ||
COMMAND mv "${FILE_PATH}.tmp" "${FILE_PATH}" | ||
) | ||
endif() | ||
|
||
|
||
COMMAND make libsdk | ||
WORKING_DIRECTORY ${CUBEFS_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
if (ENABLE_EXAMPLES) | ||
add_subdirectory(examples) | ||
endif() | ||
|
||
set(CUBEFS_DIR "${ClickHouse_SOURCE_DIR}/contrib/cubefs") | ||
|
||
add_library(sdk SHARED ${CUBEFS_DIR}/build/bin/libcfs.a) | ||
install( | ||
TARGETS sdk | ||
EXPORT global | ||
LIBRARY DESTINATION lib | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters