Skip to content

Commit

Permalink
[config] Remove simpleini as submodule (#1806)
Browse files Browse the repository at this point in the history
* Removed simpleini now also in the ecal_time module, which enables for a complete removal of that submodule
  • Loading branch information
Peguen authored Nov 27, 2024
1 parent aa60793 commit b42d2b8
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 86 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
[submodule "thirdparty/tclap"]
path = thirdparty/tclap/tclap
url = https://github.com/xguerin/tclap.git
[submodule "thirdparty/simpleini"]
path = thirdparty/simpleini/simpleini
url = https://github.com/brofield/simpleini.git
[submodule "thirdparty/spdlog"]
path = thirdparty/spdlog/spdlog
url = https://github.com/gabime/spdlog.git
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,6 @@ message(STATUS "ECAL_THIRDPARTY_BUILD_HDF5 : ${ECAL_THIRDPAR
message(STATUS "ECAL_THIRDPARTY_BUILD_PROTOBUF : ${ECAL_THIRDPARTY_BUILD_PROTOBUF}")
message(STATUS "ECAL_THIRDPARTY_BUILD_QWT : ${ECAL_THIRDPARTY_BUILD_QWT}")
message(STATUS "ECAL_THIRDPARTY_BUILD_RECYCLE : ${ECAL_THIRDPARTY_BUILD_RECYCLE}")
message(STATUS "ECAL_THIRDPARTY_BUILD_SIMPLEINI : ${ECAL_THIRDPARTY_BUILD_SIMPLEINI}")
message(STATUS "ECAL_THIRDPARTY_BUILD_SPDLOG : ${ECAL_THIRDPARTY_BUILD_SPDLOG}")
message(STATUS "ECAL_THIRDPARTY_BUILD_TCLAP : ${ECAL_THIRDPARTY_BUILD_TCLAP}")
message(STATUS "ECAL_THIRDPARTY_BUILD_TCP_PUBSUB : ${ECAL_THIRDPARTY_BUILD_TCP_PUBSUB}")
Expand Down
9 changes: 0 additions & 9 deletions NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,6 @@ recycle
- Binary distributions for Windows
- Binary distributions for Linux

SimpleIni
- License: MIT
- Project: https://github.com/brofield/simpleini
- Copyright: 2006-2013 Brodie Thiesfield
- Included in:
- Git submodule `/tirdparty/simpleini/simpleini`
- Binary distributions for Windows
- Binary distributions for Linux

spdlog
- License: MIT
- Project: https://github.com/gabime/spdlog
Expand Down
24 changes: 0 additions & 24 deletions cmake/Modules/Findsimpleini.cmake

This file was deleted.

1 change: 0 additions & 1 deletion cmake/submodule_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ set(ecal_submodule_dependencies
Protobuf
qwt
recycle
simpleini
spdlog
tclap
tcp_pubsub
Expand Down
6 changes: 3 additions & 3 deletions contrib/ecaltime/linuxptp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

project(ecaltime-linuxptp)

find_package(simpleini REQUIRED)
find_package(yaml-cpp REQUIRED)

set(ecal_time_linuxptp_src
src/ecal_time_linuxptp.cpp
Expand All @@ -38,7 +38,7 @@ endif()

ecal_add_time_plugin(${PROJECT_NAME} SHARED ${ecal_time_linuxptp_src} ${ecal_time_linuxptp_header})

target_link_libraries(${PROJECT_NAME} eCAL::core simpleini::simpleini)
target_link_libraries(${PROJECT_NAME} eCAL::core yaml-cpp::yaml-cpp)

target_include_directories(${PROJECT_NAME}
PRIVATE
Expand All @@ -49,7 +49,7 @@ ecal_install_time_plugin(${PROJECT_NAME})

set(ECALTIME_CONFIG_FILES
${ECALTIME_CONFIG_FILES}
${CMAKE_CURRENT_SOURCE_DIR}/src/config/ecaltime.ini
${CMAKE_CURRENT_SOURCE_DIR}/src/config/ecaltime.yaml
PARENT_SCOPE)

set_target_properties(${PROJECT_NAME} PROPERTIES
Expand Down
32 changes: 20 additions & 12 deletions contrib/ecaltime/linuxptp/src/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#pragma once

#include <SimpleIni.h>
#include <yaml-cpp/yaml.h>

#include <iostream>
#include <unistd.h>
Expand All @@ -32,20 +32,28 @@ namespace LinuxPtpConfig {
* @brief reads the file ~/.ecal/ecaltime.ini to get the device
* @return the device value from the linuxptp section
*/
std::string getDevice() {
CSimpleIniA ini;

std::string getDevice() {
std::string path_to_ini = eCAL::Util::GeteCALConfigPath();
path_to_ini += "ecaltime.ini";
path_to_ini += "ecaltime.yaml";

int err = ini.LoadFile(path_to_ini.c_str());
if (err != SI_OK){
std::cerr << "Error reading ecaltime config file" << std::endl;
YAML::Node yaml;
try
{
yaml = YAML::LoadFile(path_to_ini);
}
catch(const std::exception& e)
{
std::cerr << "Error reading ecaltime config file: " << e.what() << "\n";
}

if (yaml["linuxptp"])
{
if (yaml["linuxptp"]["device"])
{
return yaml["linuxptp"]["device"].as<std::string>();
}
}

const char * pVal = ini.GetValue("linuxptp", "device", "/dev/ptp0");

std::string device(pVal);
return device;
return std::string("/dev/ptp0");
}
}
15 changes: 0 additions & 15 deletions contrib/ecaltime/linuxptp/src/config/ecaltime.ini

This file was deleted.

13 changes: 13 additions & 0 deletions contrib/ecaltime/linuxptp/src/config/ecaltime.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ---------------------------------------------
# ecaltime-linuxptp Settings
# ---------------------------------------------
#
# device = /dev/ptp0 The device can be any ptp clock.
# Alternatively, you can use:
# - CLOCK_MONOTONIC (a steady clock with undefined epoche)
# - CLOCK_REALTIME (the current system time)
# - CLOCK_TAI (Like CLOCK_REALTIME but in International Atomic Time)
#
# ---------------------------------------------
linuxptp:
device: "/dev/ptp0"
1 change: 1 addition & 0 deletions contrib/ecaltime/linuxptp/src/ecaltime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <ecaltime.h>
#include <chrono>
#include <thread>
#include <cstring>

#include "ecal_time_linuxptp.h"
#include "config/config.h"
Expand Down
2 changes: 0 additions & 2 deletions doc/rst/development/ecal_cmake_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ All options can be passed on the command line cmake ``-D<option>=<value>`` or in
+-------------------------------------------+---------+-----------------------------------------------------------------+
| ``ECAL_THIRDPARTY_BUILD_SPDLOG`` | ``ON`` | Build spdlog with eCAL |
+-------------------------------------------+---------+-----------------------------------------------------------------+
| ``ECAL_THIRDPARTY_BUILD_SIMPLEINI`` | ``ON`` | Build simpleini with eCAL |
+-------------------------------------------+---------+-----------------------------------------------------------------+
| ``ECAL_THIRDPARTY_BUILD_TCLAP`` | ``ON`` | Build tclap library with eCAL |
+-------------------------------------------+---------+-----------------------------------------------------------------+
| ``ECAL_THIRDPARTY_BUILD_TCP_PUBSUB`` | ``ON`` | Build tcp_pubsub library with eCAL |
Expand Down
7 changes: 0 additions & 7 deletions doc/rst/license/thirdparty_licenses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,6 @@ They are used by Eclipse eCAL, but not associated to it in any way.
- |fa-windows| Binary distributions for Windows
- |fa-ubuntu| Binary distributions for Linux

* - `SimpleIni <https://github.com/brofield/simpleini>`_
- :ref:`mit_license`
- 2006-2013 Brodie Thiesfield
- - |fa-github| Git submodule ``/tirdparty/simpleini/simpleini``
- |fa-windows| Binary distributions for Windows
- |fa-ubuntu| Binary distributions for Linux

* - `spdlog <https://github.com/gabime/spdlog>`_
- :ref:`mit_license`
- 2016 Gabi Melman
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace eCAL
attributes.network_enabled = reg_config_.network_enabled;
attributes.loopback = reg_config_.loopback;
attributes.drop_out_of_order_messages = sub_config_.drop_out_of_order_messages;
attributes.registation_timeout_ms = reg_config_.registration_timeout;
attributes.registation_timeout_ms = reg_config_.registration_timeout;
attributes.topic_name = topic_name_;
attributes.host_name = Process::GetHostName();
attributes.host_group_name = Process::GetHostGroupName();
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ sdist.only-include = [
"thirdparty/ecaludp/",
"thirdparty/protobuf/",
"thirdparty/recycle/",
"thirdparty/simpleini/",
"thirdparty/tclap/",
"thirdparty/tcp_pubsub/",
"thirdparty/yaml-cpp/",
Expand Down
3 changes: 0 additions & 3 deletions thirdparty/simpleini/CMakeLists.txt

This file was deleted.

3 changes: 0 additions & 3 deletions thirdparty/simpleini/build-simpleini.cmake

This file was deleted.

1 change: 0 additions & 1 deletion thirdparty/simpleini/simpleini
Submodule simpleini deleted from 9b3ed7

0 comments on commit b42d2b8

Please sign in to comment.