mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
feat: Require DDS 3.5.13.7
This commit is contained in:
parent
81b1ba1f20
commit
1df338b262
|
@ -28,7 +28,7 @@ if(BUILD_SDK_COMMANDS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(BUILD_DDS_PLUGIN OR BUILD_SDK)
|
if(BUILD_DDS_PLUGIN OR BUILD_SDK)
|
||||||
find_package2(PRIVATE DDS REQUIRED VERSION 3.5.3)
|
find_package2(PRIVATE DDS REQUIRED VERSION 3.5.13.7)
|
||||||
set(DDS_Boost_COMPONENTS system log log_setup regex filesystem thread)
|
set(DDS_Boost_COMPONENTS system log log_setup regex filesystem thread)
|
||||||
set(DDS_Boost_VERSION 1.67)
|
set(DDS_Boost_VERSION 1.67)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
|
# Copyright (C) 2019-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
|
||||||
# #
|
# #
|
||||||
# This software is distributed under the terms of the #
|
# This software is distributed under the terms of the #
|
||||||
# GNU Lesser General Public Licence (LGPL) version 3, #
|
# GNU Lesser General Public Licence (LGPL) version 3, #
|
||||||
|
@ -18,12 +18,6 @@ cleanup() {
|
||||||
echo "CLEANUP PERFORMED"
|
echo "CLEANUP PERFORMED"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ -e "@DDS_INSTALL_PREFIX@/DDS_env.sh" ]]; then
|
|
||||||
source @DDS_INSTALL_PREFIX@/DDS_env.sh
|
|
||||||
elif command -v DDS_env.sh &> /dev/null; then
|
|
||||||
source DDS_env.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
export PATH=@BIN_DIR@:$PATH
|
export PATH=@BIN_DIR@:$PATH
|
||||||
|
|
||||||
plugin=${1:-localhost}
|
plugin=${1:-localhost}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
|
# Copyright (C) 2019-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
|
||||||
# #
|
# #
|
||||||
# This software is distributed under the terms of the #
|
# This software is distributed under the terms of the #
|
||||||
# GNU Lesser General Public Licence (LGPL) version 3, #
|
# GNU Lesser General Public Licence (LGPL) version 3, #
|
||||||
|
@ -15,12 +15,6 @@ cleanup() {
|
||||||
echo "CLEANUP PERFORMED"
|
echo "CLEANUP PERFORMED"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ -e "@DDS_INSTALL_PREFIX@/DDS_env.sh" ]]; then
|
|
||||||
source @DDS_INSTALL_PREFIX@/DDS_env.sh
|
|
||||||
elif command -v DDS_env.sh &> /dev/null; then
|
|
||||||
source DDS_env.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
export PATH=@BIN_DIR@:$PATH
|
export PATH=@BIN_DIR@:$PATH
|
||||||
|
|
||||||
exec 5>&1
|
exec 5>&1
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
|
# Copyright (C) 2019-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
|
||||||
# #
|
# #
|
||||||
# This software is distributed under the terms of the #
|
# This software is distributed under the terms of the #
|
||||||
# GNU Lesser General Public Licence (LGPL) version 3, #
|
# GNU Lesser General Public Licence (LGPL) version 3, #
|
||||||
|
@ -15,12 +15,6 @@ cleanup() {
|
||||||
echo "CLEANUP PERFORMED"
|
echo "CLEANUP PERFORMED"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ -e "@DDS_INSTALL_PREFIX@/DDS_env.sh" ]]; then
|
|
||||||
source @DDS_INSTALL_PREFIX@/DDS_env.sh
|
|
||||||
elif command -v DDS_env.sh &> /dev/null; then
|
|
||||||
source DDS_env.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
export PATH=@BIN_DIR@:$PATH
|
export PATH=@BIN_DIR@:$PATH
|
||||||
|
|
||||||
exec 5>&1
|
exec 5>&1
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
|
# Copyright (C) 2019-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH #
|
||||||
# #
|
# #
|
||||||
# This software is distributed under the terms of the #
|
# This software is distributed under the terms of the #
|
||||||
# GNU Lesser General Public Licence (LGPL) version 3, #
|
# GNU Lesser General Public Licence (LGPL) version 3, #
|
||||||
|
@ -17,13 +17,6 @@ cleanup() {
|
||||||
echo "CLEANUP PERFORMED"
|
echo "CLEANUP PERFORMED"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if [[ -e "@DDS_INSTALL_PREFIX@/DDS_env.sh" ]]; then
|
|
||||||
source @DDS_INSTALL_PREFIX@/DDS_env.sh
|
|
||||||
elif command -v DDS_env.sh &> /dev/null; then
|
|
||||||
source DDS_env.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
export PATH=@BIN_DIR@:$PATH
|
export PATH=@BIN_DIR@:$PATH
|
||||||
|
|
||||||
exec 5>&1
|
exec 5>&1
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (C) 2019 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
* Copyright (C) 2019-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||||
* *
|
* *
|
||||||
* This software is distributed under the terms of the *
|
* This software is distributed under the terms of the *
|
||||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||||
|
@ -27,27 +27,10 @@ struct DDSEnvironment::Impl
|
||||||
: fLocation(DDSInstallPrefix)
|
: fLocation(DDSInstallPrefix)
|
||||||
, fConfigHome(std::move(configHome))
|
, fConfigHome(std::move(configHome))
|
||||||
{
|
{
|
||||||
SetupLocation();
|
|
||||||
SetupDynamicLoader();
|
|
||||||
SetupPath();
|
SetupPath();
|
||||||
SetupConfigHome();
|
SetupConfigHome();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto SetupLocation() -> void
|
|
||||||
{
|
|
||||||
std::string location(GetEnv("DDS_LOCATION"));
|
|
||||||
if (location != DDSInstallPrefix) {
|
|
||||||
if (location.empty()) {
|
|
||||||
setenv("DDS_LOCATION", DDSInstallPrefix.c_str(), 1);
|
|
||||||
} else {
|
|
||||||
LOG(debug) << "$DDS_LOCATION appears to point to a different installation than this"
|
|
||||||
<< "program was linked against. Things might still work out, so not"
|
|
||||||
<< "touching it.";
|
|
||||||
fLocation = location;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
auto SetupConfigHome() -> void
|
auto SetupConfigHome() -> void
|
||||||
{
|
{
|
||||||
if (fConfigHome.empty()) {
|
if (fConfigHome.empty()) {
|
||||||
|
@ -55,22 +38,6 @@ struct DDSEnvironment::Impl
|
||||||
} else {
|
} else {
|
||||||
setenv("HOME", fConfigHome.c_str(), 1);
|
setenv("HOME", fConfigHome.c_str(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::stringstream cmd;
|
|
||||||
#ifdef __APPLE__
|
|
||||||
// On macOS System Integrity Protection might filter out the DYLD_LIBRARY_PATH, so we pass it
|
|
||||||
// through explicitely here.
|
|
||||||
cmd << "export " << fgLdVar << "=" << GetEnv(fgLdVar) << "\n";
|
|
||||||
#endif
|
|
||||||
cmd << "DDS_CFG=`dds-user-defaults --ignore-default-sid -p`\n"
|
|
||||||
"if [ -z \"$DDS_CFG\" ]; then\n"
|
|
||||||
" mkdir -p \"$HOME/.DDS\"\n"
|
|
||||||
" dds-user-defaults --ignore-default-sid -d -c \"$HOME/.DDS/DDS.cfg\"\n"
|
|
||||||
"fi\n";
|
|
||||||
auto rc(std::system(cmd.str().c_str()));
|
|
||||||
if (rc != 0) {
|
|
||||||
LOG(warn) << "DDSEnvironment::SetupConfigHome failed";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto SetupPath() -> void
|
auto SetupPath() -> void
|
||||||
|
@ -81,22 +48,6 @@ struct DDSEnvironment::Impl
|
||||||
setenv("PATH", path.c_str(), 1);
|
setenv("PATH", path.c_str(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto GenerateDDSLibDir() const -> Path
|
|
||||||
{
|
|
||||||
return {(fLocation == DDSInstallPrefix) ? DDSLibraryDir : fLocation / Path("lib")};
|
|
||||||
}
|
|
||||||
|
|
||||||
auto SetupDynamicLoader() -> void
|
|
||||||
{
|
|
||||||
std::string ld(GetEnv(fgLdVar));
|
|
||||||
if (ld.empty()) {
|
|
||||||
ld = GenerateDDSLibDir().string();
|
|
||||||
} else {
|
|
||||||
ld = GenerateDDSLibDir().string() + std::string(":") + ld;
|
|
||||||
}
|
|
||||||
setenv(fgLdVar.c_str(), ld.c_str(), 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
auto GetEnv(const std::string& key) const -> std::string
|
auto GetEnv(const std::string& key) const -> std::string
|
||||||
{
|
{
|
||||||
auto value = std::getenv(key.c_str());
|
auto value = std::getenv(key.c_str());
|
||||||
|
@ -112,11 +63,6 @@ struct DDSEnvironment::Impl
|
||||||
|
|
||||||
Path fLocation;
|
Path fLocation;
|
||||||
Path fConfigHome;
|
Path fConfigHome;
|
||||||
#ifdef __APPLE__
|
|
||||||
std::string const fgLdVar = "DYLD_LIBRARY_PATH";
|
|
||||||
#else
|
|
||||||
std::string const fgLdVar = "LD_LIBRARY_PATH";
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
DDSEnvironment::DDSEnvironment()
|
DDSEnvironment::DDSEnvironment()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user