Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lib4neuro
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
MolDyn
lib4neuro
Commits
a90e1d94
Commit
a90e1d94
authored
6 years ago
by
Martin Beseda
Browse files
Options
Downloads
Patches
Plain Diff
FIX: Trying to fix Armadillo finding module
parent
713b2e30
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
FindArmadillo.cmake
+36
-39
36 additions, 39 deletions
FindArmadillo.cmake
with
36 additions
and
39 deletions
FindArmadillo.cmake
+
36
−
39
View file @
a90e1d94
...
@@ -24,48 +24,45 @@ FIND_PATH(
...
@@ -24,48 +24,45 @@ FIND_PATH(
include/armadillo
include/armadillo
)
)
# Find library
# Is Armadillo downloaded locally?
set
(
LIBNAME
${
LIB_PREFIX
}
armadillo.so
)
option
(
LOCAL OFF
)
message
(
${
LIBNAME
}
)
IF
(
${
ARMADILLO_INCLUDE_DIR
}
MATCHES
"^.*external_dependencies.*$"
)
FIND_LIBRARY
(
set
(
LOCAL ON
)
ARMADILLO_LIBRARY_DIR
set
(
TMP
""
)
string
(
REGEX REPLACE
"/include"
""
TMP
${
ARMADILLO_INCLUDE_DIR
}
)
add_subdirectory
(
${
TMP
}
${
TMP
}
)
endif
()
NAMES
if
(
LOCAL
)
${
LIBNAME
}
# If Armadillo is downloaded locally, the library will be compiled during build-time
INCLUDE
(
FindPackageHandleStandardArgs
)
HINTS
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
external_dependencies/armadillo
armadillo
"Armadillo was NOT found!"
PATHS
ARMADILLO_INCLUDE_DIR
)
/usr/lib
/usr/local/lib
)
# Set ARMADILLO_FOUND honoring the QUIET and REQUIRED arguments
INCLUDE
(
FindPackageHandleStandardArgs
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
armadillo
"Armadillo was NOT found!"
ARMADILLO_INCLUDE_DIR
ARMADILLO_LIBRARY_DIR
)
# Output variables
else
()
IF
(
ARMADILLO_FOUND
)
# Find library
# Include dirs
set
(
LIBNAME
${
LIB_PREFIX
}
armadillo.so
)
SET
(
ARMADILLO_INCLUDE_DIRS
${
ARMADILLO_INCLUDE_DIR
}
)
FIND_LIBRARY
(
ARMADILLO_LIBRARY_DIR
# If Armadillo is downloaded as a source code, add it to the project, so the library will be compiled
NAMES
# automatically
${
LIBNAME
}
IF
(
${
ARMADILLO_INCLUDE_DIR
}
MATCHES
"^.*external_dependencies.*$"
)
set
(
TMP
""
)
string
(
REGEX REPLACE
"/include"
""
TMP
${
ARMADILLO_INCLUDE_DIR
}
)
add_subdirectory
(
${
TMP
}
${
TMP
}
)
ENDIF
()
message
(
"Armadillo was successfully found."
)
HINTS
ENDIF
()
external_dependencies/armadillo
# Advanced options for not cluttering the cmake UIs:
PATHS
MARK_AS_ADVANCED
(
ARMADILLO_INCLUDE_DIR
)
/usr/lib
MARK_AS_ADVANCED
(
ARMADILLO_LIBRARY_DIR
)
/usr/local/lib
)
# Set ARMADILLO_FOUND honoring the QUIET and REQUIRED arguments
INCLUDE
(
FindPackageHandleStandardArgs
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
armadillo
"Armadillo was NOT found!"
ARMADILLO_INCLUDE_DIR
ARMADILLO_LIBRARY_DIR
)
endif
()
\ No newline at end of file
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