Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
NexusCPP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Libraries
NexusCPP
Commits
0c1807f1
Commit
0c1807f1
authored
Jun 17, 2024
by
Patrick MADELA
Browse files
Options
Downloads
Patches
Plain Diff
Add conan recipe
parent
37289e9a
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!2
HDF5 1.14.3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitattributes
+1
-0
1 addition, 0 deletions
.gitattributes
CMakeLists.txt
+27
-27
27 additions, 27 deletions
CMakeLists.txt
Jenkinsfile
+1
-0
1 addition, 0 deletions
Jenkinsfile
conanfile.py
+65
-0
65 additions, 0 deletions
conanfile.py
src/CMakeLists.txt
+7
-10
7 additions, 10 deletions
src/CMakeLists.txt
with
101 additions
and
37 deletions
.gitattributes
0 → 100644
+
1
−
0
View file @
0c1807f1
* text=auto eol=lf
\ No newline at end of file
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
27
−
27
View file @
0c1807f1
cmake_minimum_required
(
VERSION 3.15
)
project
(
nexuscpp
)
cmake_minimum_required
(
VERSION 2.6
)
set
(
CMAKE_VERBOSE_MAKEFILE TRUE
)
option
(
BUILD_SHARED_LIBS
"Build using shared libraries"
ON
)
set
(
MAJOR_VERSION
"3"
)
set
(
MINOR_VERSION
"5"
)
set
(
PATCH_VERSION
"3"
)
set
(
VERSION
"
${
MAJOR_VERSION
}
.
${
MINOR_VERSION
}
.
${
PATCH_VERSION
}
"
)
find_package
(
yat CONFIG REQUIRED
)
find_package
(
HDF5 CONFIG REQUIRED
)
if
(
NOT DEFINED CMAKE_INSTALL_PREFIX AND CMAKE_SIZEOF_VOID_P EQUAL 8
)
set
(
LIB_INSTALL_DIR
"lib64"
)
else
()
set
(
LIB_INSTALL_DIR
"lib"
)
endif
()
add_compile_definitions
(
PROJECT_NAME=
${
PROJECT_NAME
}
)
add_compile_definitions
(
PROJECT_VERSION=
${
VERSION
}
)
find_package
(
PkgConfig
)
pkg_check_modules
(
YAT yat>=1.18.7
)
pkg_check_modules
(
HDF5 hdf5>=1.8.16
)
add_compile_definitions
(
HDF_PROJECT_NAME=HDF5
)
add_compile_definitions
(
HDF_PROJECT_VERSION=
${
HDF_PROJECT_VERSION
}
)
add_compile_definitions
(
NEXUSCPP_HAVE_LZ4_FILTER
)
if
(
UNIX
)
set
(
CPP_FLAGS
"-O2 -g -gstabs+ -std=c++0x -Wall -Wno-unused-variable"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
CPP_FLAGS
}
"
)
add_definitions
(
-DLinux -DGNU_GCC -D_REENTRANT
)
add_definitions
(
-DPROJECT_NAME=NexusCPP -DPROJECT_VERSION=
${
VERSION
}
-DNEXUSCPP_HAVE_LZ4_FILTER -DNEXUSCPP_HAVE_BSLZ4_FILTER -DHDF_PROJECT_NAME=HDF5 -DHDF_PROJECT_VERSION=1.8.18
)
set
(
CMAKE_SHARED_LINKER_FLAGS
"-Wl,-z,defs"
)
add_definitions
(
-std=c++0x
)
add_compile_definitions
(
Linux
)
add_
compile_
definitions
(
GNU_GCC
)
add_
compile_
definitions
(
_REENTRANT
)
add_compile_definitions
(
NEXUSCPP_HAVE_BSLZ4_FILTER
)
endif
()
include_directories
(
SYSTEM
${
YAT_INCLUDE_DIRS
}
${
HDF5_INCLUDE_DIRS
}
)
link_directories
(
${
YAT_LIBRARY_DIRS
}
${
HDF5_LIBRARY_DIRS
}
)
if
(
WIN32
)
add_compile_definitions
(
_HDF5USEDLL_
)
add_compile_definitions
(
WITH_HDF5
)
if
(
BUILD_SHARED_LIBS MATCHES
"ON"
)
add_compile_definitions
(
NEXUSCPP_DLL
)
add_compile_definitions
(
NEXUSCPP_BUILD
)
endif
()
endif
()
add_subdirectory
(
src
)
set
(
prefix
${
CMAKE_INSTALL_PREFIX
}
)
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/nexuscpp.pc.in"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/nexuscpp.pc"
@ONLY IMMEDIATE
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/nexuscpp.pc DESTINATION
${
LIB_INSTALL_DIR
}
/pkgconfig
)
if
(
UNIX AND EXISTS
${
CMAKE_SOURCE_DIR
}
/nexuscpp.pc.in
)
configure_file
(
"
${
CMAKE_SOURCE_DIR
}
/nexuscpp.pc.in"
"
${
CMAKE_BINARY_DIR
}
/nexuscpp.pc"
@ONLY IMMEDIATE
)
install
(
FILES
${
CMAKE_BINARY_DIR
}
/nexuscpp.pc DESTINATION lib/pkgconfig
)
endif
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Jenkinsfile
0 → 100644
+
1
−
0
View file @
0c1807f1
conan
.
create
([
'el6-gcc44-x86_64-shared'
,
'el6-gcc44-x86_64-static'
,
'el6-gcc44-x86-shared'
,
'el6-gcc44-x86-static'
,
'el7-gcc48-x86_64-shared'
,
'el7-gcc48-x86_64-static'
,
'win10-msvc14-x86-shared'
,
'win10-msvc14-x86-static'
,
'win10-msvc14-x86_64-shared'
,
'win10-msvc14-x86_64-static'
])
This diff is collapsed.
Click to expand it.
conanfile.py
0 → 100644
+
65
−
0
View file @
0c1807f1
from
conan
import
ConanFile
from
conan.tools.cmake
import
CMakeToolchain
,
CMake
,
CMakeDeps
class
nexuscppRecipe
(
ConanFile
):
name
=
"
nexuscpp
"
version
=
"
4.0.0
"
package_type
=
"
library
"
user
=
"
soleil
"
# Optional metadata
license
=
"
GPL-2
"
author
=
"
stephane.poirier@synchrotron-soleil.fr
"
url
=
"
https://gitlab.synchrotron-soleil.fr/software-control-system/libraries/nexuscpp
"
description
=
"
NexusCPP library
"
topics
=
(
"
utility
"
,
"
control-system
"
)
# Binary configuration
settings
=
"
os
"
,
"
compiler
"
,
"
build_type
"
,
"
arch
"
options
=
{
"
shared
"
:
[
True
,
False
],
"
fPIC
"
:
[
True
,
False
]}
default_options
=
{
"
shared
"
:
False
,
"
fPIC
"
:
True
}
# Sources are located in the same place as this recipe, copy them to the recipe
exports_sources
=
"
CMakeLists.txt
"
,
"
src/**
"
,
"
include/**
"
def
requirements
(
self
):
self
.
requires
(
"
yat/[>=1.0]@soleil/stable
"
,
transitive_headers
=
True
,
transitive_libs
=
True
)
self
.
requires
(
"
hdf5/1.14.3@soleil/stable
"
)
def
config_options
(
self
):
if
self
.
settings
.
os
==
"
Windows
"
:
self
.
options
.
rm_safe
(
"
fPIC
"
)
def
configure
(
self
):
if
self
.
options
.
shared
:
self
.
options
.
rm_safe
(
"
fPIC
"
)
def
generate
(
self
):
deps
=
CMakeDeps
(
self
)
deps
.
generate
()
tc
=
CMakeToolchain
(
self
)
major
,
minor
,
patch
=
map
(
int
,
self
.
version
.
split
(
'
.
'
))
tc
.
variables
[
"
VERSION
"
]
=
self
.
version
tc
.
variables
[
"
MAJOR_VERSION
"
]
=
major
tc
.
variables
[
"
MINOR_VERSION
"
]
=
minor
tc
.
variables
[
"
PATCH_VERSION
"
]
=
patch
tc
.
variables
[
"
HDF_PROJECT_VERSION
"
]
=
self
.
dependencies
[
"
hdf5
"
].
ref
.
version
tc
.
generate
()
def
build
(
self
):
cmake
=
CMake
(
self
)
cmake
.
configure
()
cmake
.
build
()
def
package
(
self
):
cmake
=
CMake
(
self
)
cmake
.
install
()
def
package_info
(
self
):
self
.
cpp_info
.
libs
=
[
"
nexuscpp
"
]
if
self
.
settings
.
os
==
"
Windows
"
:
self
.
cpp_info
.
system_libs
+=
[
"
WS2_32
"
]
if
self
.
options
.
shared
:
self
.
cpp_info
.
defines
+=
[
"
NEXUSCPP_DLL
"
]
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
7
−
10
View file @
0c1807f1
...
...
@@ -14,18 +14,15 @@ set (source_files
bslz4/iochain.c
)
include_directories
(
../include
../src/bslz4
)
add_library
(
nexuscpp SHARED
${
source_files
}
)
target_link_libraries
(
nexuscpp
${
YAT_LIBRARIES
}
${
HDF5_LIBRARIES
}
)
add_library
(
nexuscpp
${
source_files
}
)
target_include_directories
(
nexuscpp PUBLIC
${
CMAKE_SOURCE_DIR
}
/include ../src/bslz4
)
target_link_libraries
(
nexuscpp
${
yat_LIBRARIES
}
${
HDF5_LIBRARIES
}
)
if
(
MAJOR_VERSION
)
set_target_properties
(
nexuscpp PROPERTIES VERSION
${
VERSION
}
SOVERSION
${
MAJOR_VERSION
}
)
endif
()
install
(
DIRECTORY
..
/include/nexuscpp DESTINATION include
/
install
(
DIRECTORY
${
CMAKE_SOURCE_DIR
}
/include/nexuscpp DESTINATION include
FILES_MATCHING PATTERN
"*.h"
PATTERN
"*.hpp"
PATTERN
".svn"
EXCLUDE
...
...
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