Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG UE
Commits
83243cee
Commit
83243cee
authored
Oct 02, 2016
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
detect nettle version using cmake
parent
9cd8732e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
20 deletions
+18
-20
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+18
-20
No files found.
cmake_targets/CMakeLists.txt
View file @
83243cee
...
@@ -186,25 +186,6 @@ set(GIT_BRANCH "UNKNOWN")
...
@@ -186,25 +186,6 @@ set(GIT_BRANCH "UNKNOWN")
set
(
GIT_COMMIT_HASH
"UNKNOWN"
)
set
(
GIT_COMMIT_HASH
"UNKNOWN"
)
set
(
GIT_COMMIT_DATE
"UNKNOWN"
)
set
(
GIT_COMMIT_DATE
"UNKNOWN"
)
#This is to detect nettle version changes between Ubuntu 14.04/16.04
set
(
nettle_cmd
"nettle-hash"
)
set
(
nettle_arg
"-V"
)
execute_process
(
COMMAND
${
nettle_cmd
}
${
nettle_arg
}
RESULT_VARIABLE rv OUTPUT_VARIABLE ov ERROR_VARIABLE ev
)
string
(
REGEX MATCH
"[+-]?[0-9]+([.][0-9]+)?"
nv
${
ov
}
)
message
(
"NETTLE_VERSION =
${
nv
}
"
)
# we need to remove decimal as floating point arithematic does not work properly with C preprocessor
STRING
(
REGEX REPLACE
"[.]"
""
nv
${
nv
}
)
if
(
"
${
nv
}
"
STREQUAL
""
)
message
(
FATAL_ERROR
"The nettle version not detected properly. Try to run build_oai -I again"
)
endif
()
set
(
NETTLE_VERSION
"
${
nv
}
"
)
add_definitions
(
"-DNETTLE_VERSION=
${
NETTLE_VERSION
}
"
)
find_package
(
Git
)
find_package
(
Git
)
if
(
GIT_FOUND
)
if
(
GIT_FOUND
)
message
(
"git found:
${
GIT_EXECUTABLE
}
"
)
message
(
"git found:
${
GIT_EXECUTABLE
}
"
)
...
@@ -1550,11 +1531,28 @@ endif()
...
@@ -1550,11 +1531,28 @@ endif()
pkg_search_module
(
NETTLE nettle
)
pkg_search_module
(
NETTLE nettle
)
if
(
NOT
${
NETTLE_FOUND
}
)
if
(
NOT
${
NETTLE_FOUND
}
)
message
(
"PACKAGE nettle not found: some targets will fail
"
)
message
(
FATAL_ERROR
"PACKAGE nettle not found: some targets will fail. Run build_oai -I again!
"
)
else
()
else
()
include_directories
(
${
NETTLE_INCLUDE_DIRS
}
)
include_directories
(
${
NETTLE_INCLUDE_DIRS
}
)
endif
()
endif
()
message
(
"NETTLE VERSION_INSTALLED =
${
NETTLE_VERSION
}
"
)
string
(
REGEX MATCH
"[+-]?[0-9]+([.][0-9]+)?"
nv
${
NETTLE_VERSION
}
)
# WE only pass the major and first minor in the define and ignore the rest
#message("NETTLE_VERSION USED = ${nv}")
# we need to remove decimal as floating point arithematic does not work properly with C preprocessor
STRING
(
REGEX REPLACE
"[.]"
""
nv
${
nv
}
)
if
(
"
${
nv
}
"
STREQUAL
""
)
message
(
FATAL_ERROR
"The nettle version not detected properly. Try to run build_oai -I again"
)
endif
()
set
(
NETTLE_VERSION
"
${
nv
}
"
)
add_definitions
(
"-DNETTLE_VERSION=
${
NETTLE_VERSION
}
"
)
pkg_search_module
(
XPM xpm
)
pkg_search_module
(
XPM xpm
)
if
(
NOT
${
XPM_FOUND
}
)
if
(
NOT
${
XPM_FOUND
}
)
message
(
"PACKAGE xpm not found: some targets will fail"
)
message
(
"PACKAGE xpm not found: some targets will fail"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment