Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
586a095a
Commit
586a095a
authored
8 years ago
by
bigbes
Committed by
Roman Tsisyk
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix for automatic finding of homebrew's readline and openssl
Closes #1852
parent
209d7651
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/os.cmake
+38
-0
38 additions, 0 deletions
cmake/os.cmake
with
38 additions
and
0 deletions
cmake/os.cmake
+
38
−
0
View file @
586a095a
...
...
@@ -53,6 +53,44 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
# this is pretty much irrelevant. Disable CMake rpath features
# altogether. Suppresses a few warnings.
set
(
CMAKE_SKIP_RPATH true
)
# Latest versions of Homebrew wont 'link --force' for libraries, that were
# preinstalled in system. So we'll use this dirty hack
find_program
(
HOMEBREW_EXECUTABLE brew
)
if
(
EXISTS
${
HOMEBREW_EXECUTABLE
}
)
execute_process
(
COMMAND
${
HOMEBREW_EXECUTABLE
}
--prefix
OUTPUT_VARIABLE HOMEBREW_PREFIX
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message
(
STATUS
"Detected Homebrew install at
${
HOMEBREW_PREFIX
}
"
)
# Detecting LibReadline
execute_process
(
COMMAND
${
HOMEBREW_EXECUTABLE
}
--prefix readline
OUTPUT_VARIABLE HOMEBREW_READLINE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if
(
DEFINED HOMEBREW_READLINE
)
if
(
NOT DEFINED READLINE_ROOT
)
message
(
STATUS
"Setting readline root to
${
HOMEBREW_READLINE
}
"
)
set
(
READLINE_ROOT
"
${
HOMEBREW_READLINE
}
"
)
endif
()
elseif
(
NOT DEFINED
${
READLINE_ROOT
}
)
message
(
WARNING
"Homebrew's readline isn't installed. "
"Work isn't guarenteed using system readline"
)
endif
()
# Detecting OpenSSL
execute_process
(
COMMAND
${
HOMEBREW_EXECUTABLE
}
--prefix openssl
OUTPUT_VARIABLE HOMEBREW_OPENSSL
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if
(
DEFINED HOMEBREW_OPENSSL
)
if
(
NOT DEFINED OPENSSL_ROOT_DIR
)
message
(
STATUS
"Setting OpenSSL root to
${
HOMEBREW_OPENSSL
}
"
)
set
(
OPENSSL_ROOT_DIR
"
${
HOMEBREW_OPENSSL
}
"
)
endif
()
elseif
(
NOT DEFINED OPENSSL_ROOT_DIR
)
message
(
WARNING
"Homebrew's OpenSSL isn't installed. Work isn't "
"guarenteed if built with system OpenSSL"
)
endif
()
endif
()
else
()
message
(
FATAL_ERROR
"Unsupported platform --
${
CMAKE_SYSTEM_NAME
}
"
)
endif
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment