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

Detect OS type and exit if not built in Linux #1951

Merged
merged 2 commits into from
Mar 23, 2020
Merged
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: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ project("Nebula Graph" C CXX)

# Set the project home dir
set(NEBULA_HOME ${CMAKE_CURRENT_SOURCE_DIR})

if(${CMAKE_SYSTEM_NAME} MATCHES "(Darwin|FreeBSD|Windows)")
MESSAGE(FATAL_ERROR "Only Linux is supported")
endif ()

# To include customized FindXXX.cmake modules
set(CMAKE_MODULE_PATH "${NEBULA_HOME}/cmake" ${CMAKE_MODULE_PATH})
include(LinkerConfig)
Expand Down
2 changes: 1 addition & 1 deletion cmake/LinkerConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
)

if (${default_linker_type} STREQUAL "ld")
if ("${default_linker_type}" STREQUAL "ld")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

set(default_linker_type "bfd")
endif()

Expand Down
10 changes: 5 additions & 5 deletions third-party/install-third-party.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@

# Usage: install-third-party.sh --prefix=/opt/vesoft/third-party

[[ $(uname) = Linux ]] || {
echo "Only Linux is supported"
exit 1
}

# Always use bash
shell=$(basename $(readlink /proc/$$/exe))
if [ ! x$shell = x"bash" ]
Expand All @@ -15,11 +20,6 @@ then
exit $?
fi

[[ $(uname) = Linux ]] || {
echo "Only Linux is supported"
exit 1
}

url_base=https://nebula-graph.oss-accelerate.aliyuncs.com/third-party
this_dir=$(dirname $(readlink -f $0))
cxx_cmd=${CXX:-g++}
Expand Down