Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LHCb
Phys
Commits
e52c6db1
Commit
e52c6db1
authored
Nov 24, 2021
by
Marco Clemencic
Browse files
fix issue with the installation of libfvm and simplenn
parent
71048e5e
Pipeline
#3279490
passed with stage
in 33 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Phys/FlavourTagging/CMakeLists.txt
View file @
e52c6db1
...
...
@@ -15,19 +15,26 @@ Phys/FlavourTagging
# Get and make available the header only libraries simplenn and libfvm
include
(
FetchContent
)
set
(
SIMPLENN_TAG version-0.1.0 CACHE STRING
"simpleNN version"
)
set
(
LIBFVM_TAG version-0.1.0 CACHE STRING
"libfvm version (to set according to simpleNN)"
)
mark_as_advanced
(
SIMPLENN_TAG LIBFVM_TAG
)
set
(
libfvm_disable_tests TRUE CACHE BOOL
"Disable libfvm tests"
)
set
(
simplenn_disable_tests TRUE CACHE BOOL
"Disable simplenn tests"
)
mark_as_advanced
(
SIMPLENN_TAG LIBFVM_TAG libfvm_disable_tests simplenn_disable_tests
)
FetchContent_Declare
(
libfvm
URL
"https://gitlab.cern.ch/mschille/libfvm/-/archive/
${
LIBFVM_TAG
}
/libfvm-
${
LIBFVM_TAG
}
.tar.gz"
PATCH_COMMAND patch -p1 <
${
CMAKE_CURRENT_SOURCE_DIR
}
/patches/libfvm.patch
)
FetchContent_Declare
(
simplenn
URL
"https://gitlab.cern.ch/mschille/simplenn/-/archive/
${
SIMPLENN_TAG
}
/simplenn-
${
SIMPLENN_TAG
}
.tar.gz"
PATCH_COMMAND patch -p1 <
${
CMAKE_CURRENT_SOURCE_DIR
}
/simplenn.patch
PATCH_COMMAND patch -p1 <
${
CMAKE_CURRENT_SOURCE_DIR
}
/
patches/
simplenn.patch
)
FetchContent_MakeAvailable
(
libfvm simplenn
)
# Normal business from here on
gaudi_add_header_only_library
(
FlavourTaggingLib
...
...
Phys/FlavourTagging/patches/libfvm.patch
0 → 100644
View file @
e52c6db1
diff -u libfvm-src.orig/CMakeLists.txt libfvm-src/CMakeLists.txt
--- libfvm-src.orig/CMakeLists.txt 2021-02-01 19:30:30.000000000 +0100
+++ libfvm-src/CMakeLists.txt 2021-11-24 14:31:35.203013243 +0100
@@ -70,7 +70,7 @@
add_subdirectory(tests)
endif()
-set(libfvm_header_destination ${CMAKE_INSTALL_PREFIX}/include CACHE STRING
+set(libfvm_header_destination include CACHE STRING
"destination for libfvm headers, i.e. headers can be found in ${libfvm_header_destination}/libfvm")
install(TARGETS libfvm DESTINATION lib EXPORT libfvmTargets)
@@ -79,15 +79,15 @@
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/libfvm/fvm-config.h
DESTINATION ${libfvm_header_destination}/libfvm)
install(EXPORT libfvmTargets FILE libfvmTargets.cmake
- DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/libfvm)
+ DESTINATION lib/cmake/libfvm)
install(FILES README.md LICENSE
- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/libfvm)
+ DESTINATION share/doc/libfvm)
include(CMakePackageConfigHelpers)
# generate the config file that is includes the exports
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/libfvmConfig.cmake"
- INSTALL_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/example"
+ INSTALL_DESTINATION "lib/cmake/example"
NO_SET_AND_CHECK_MACRO
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)
@@ -100,7 +100,7 @@
# install the configuration file
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/libfvmConfig.cmake
- DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/libfvm)
+ DESTINATION lib/cmake/libfvm)
export(EXPORT libfvmTargets
FILE "${CMAKE_CURRENT_BINARY_DIR}/libfvmTargets.cmake")
Common subdirectories: libfvm-src.orig/include and libfvm-src/include
Common subdirectories: libfvm-src.orig/tests and libfvm-src/tests
Phys/FlavourTagging/patches/simplenn.patch
0 → 100644
View file @
e52c6db1
diff -u simplenn-src.orig/CMakeLists.txt simplenn-src/CMakeLists.txt
--- simplenn-src.orig/CMakeLists.txt 2021-11-24 14:34:35.541040982 +0100
+++ simplenn-src/CMakeLists.txt 2021-11-24 14:35:40.872500188 +0100
@@ -14,8 +14,7 @@
endif()
set(libfvm_MIN_VERSION 0.1)
-find_package(libfvm QUIET)
-if (NOT libfvm_FOUND)
+if (NOT TARGET libfvm)
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libfvm/include)
message(STATUS getting libfvm from git submodule)
# libfvm is not installed on system, so build the submodule
@@ -91,7 +90,7 @@
add_subdirectory(tests)
endif()
-set(simplenn_header_destination ${CMAKE_INSTALL_PREFIX}/include CACHE STRING
+set(simplenn_header_destination include CACHE STRING
"destination for libfvm headers, i.e. headers can be found in ${simplenn_header_destination}/simplenn")
install(TARGETS simplenn DESTINATION lib EXPORT simplennTargets)
@@ -100,15 +99,15 @@
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/simplenn/simplenn-config.h
DESTINATION ${simplenn_header_destination}/simplenn)
install(EXPORT simplennTargets FILE simplennTargets.cmake
- DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/simplenn)
+ DESTINATION lib/cmake/simplenn)
install(FILES README.md LICENSE
- DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/simplenn)
+ DESTINATION share/doc/simplenn)
include(CMakePackageConfigHelpers)
# generate the config file that is includes the exports
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/simplennConfig.cmake"
- INSTALL_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/example"
+ INSTALL_DESTINATION "lib/cmake/example"
NO_SET_AND_CHECK_MACRO
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)
@@ -121,7 +120,7 @@
# install the configuration file
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/simplennConfig.cmake
- DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/cmake/simplenn)
+ DESTINATION lib/cmake/simplenn)
export(EXPORT simplennTargets
FILE "${CMAKE_CURRENT_BINARY_DIR}/simplennTargets.cmake")
Common subdirectories: simplenn-src.orig/include and simplenn-src/include
Common subdirectories: simplenn-src.orig/libfvm and simplenn-src/libfvm
Common subdirectories: simplenn-src.orig/tests and simplenn-src/tests
Phys/FlavourTagging/simplenn.patch
deleted
100644 → 0
View file @
71048e5e
--- simplenn-src/CMakeLists.txt.orig 2021-11-23 13:16:41.184000000 +0100
+++ simplenn-src/CMakeLists.txt 2021-11-23 13:17:24.307331737 +0100
@@ -14,8 +14,7 @@
endif()
set(libfvm_MIN_VERSION 0.1)
-find_package(libfvm QUIET)
-if (NOT libfvm_FOUND)
+if (NOT TARGET libfvm)
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libfvm/include)
message(STATUS getting libfvm from git submodule)
# libfvm is not installed on system, so build the submodule
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment