Skip to content

Commit

Permalink
Improve #include structure ECFLOW-1932
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosbento authored Dec 1, 2023
2 parents 5f4e7f0 + 2861f0d commit 3dae39c
Show file tree
Hide file tree
Showing 1,043 changed files with 3,429 additions and 3,435 deletions.
162 changes: 83 additions & 79 deletions ACore/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2023- ECMWF.
# Copyright 2009- ECMWF.
#
# This software is licensed under the terms of the Apache Licence version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
Expand All @@ -8,88 +8,92 @@
# nor does it submit to any jurisdiction.
#

configure_file(src/ecflow_version.h.in ${CMAKE_BINARY_DIR}/generated/src/ecflow_version.h)
configure_file(src/ecflow_source_build_dir.h.in ${CMAKE_BINARY_DIR}/generated/src/ecflow_source_build_dir.h)
configure_file(
src/ecflow/core/ecflow_version.h.in
${CMAKE_BINARY_DIR}/generated/src/ecflow/core/ecflow_version.h)
configure_file(
src/ecflow/core/ecflow_source_build_dir.h.in
${CMAKE_BINARY_DIR}/generated/src/ecflow/core/ecflow_source_build_dir.h)

set(srcs
# Headers
${CMAKE_BINARY_DIR}/generated/src/ecflow_version.h
${CMAKE_BINARY_DIR}/generated/src/ecflow_source_build_dir.h
src/AssertTimer.hpp
src/Cal.hpp
src/Calendar.hpp
src/CalendarUpdateParams.hpp
src/CheckPt.hpp
src/Child.hpp
src/CommandLine.hpp
src/DState.hpp
src/DebugPerf.hpp
src/DurationTimer.hpp
src/Ecf.hpp
src/EcfPortLock.hpp
src/Extract.hpp
src/File.hpp
src/File_r.hpp
src/Host.hpp
src/Indentor.hpp
src/Log.hpp
src/LogVerification.hpp
src/NOrder.hpp
src/NState.hpp
src/NodePath.hpp
src/Passwd.hpp
src/PasswdFile.hpp
src/PasswordEncryption.hpp
src/Pid.hpp
src/PrintStyle.hpp
src/SState.hpp
src/Serialization.hpp
src/SerializationTest.hpp
src/Stl.hpp
src/Str.hpp
src/StringSplitter.hpp
src/TestUtil.hpp
src/TimeSeries.hpp
src/TimeSlot.hpp
src/TimeStamp.hpp
src/User.hpp
src/Version.hpp
src/WhiteListFile.hpp
src/cereal_boost_time.hpp
src/cereal_optional_nvp.hpp
src/perf_timer.hpp
${CMAKE_BINARY_DIR}/generated/src/ecflow/core/ecflow_version.h
${CMAKE_BINARY_DIR}/generated/src/ecflow/core/ecflow_source_build_dir.h
src/ecflow/core/AssertTimer.hpp
src/ecflow/core/Cal.hpp
src/ecflow/core/Calendar.hpp
src/ecflow/core/CalendarUpdateParams.hpp
src/ecflow/core/CheckPt.hpp
src/ecflow/core/Child.hpp
src/ecflow/core/CommandLine.hpp
src/ecflow/core/DState.hpp
src/ecflow/core/DebugPerf.hpp
src/ecflow/core/DurationTimer.hpp
src/ecflow/core/Ecf.hpp
src/ecflow/core/EcfPortLock.hpp
src/ecflow/core/Extract.hpp
src/ecflow/core/File.hpp
src/ecflow/core/File_r.hpp
src/ecflow/core/Host.hpp
src/ecflow/core/Indentor.hpp
src/ecflow/core/Log.hpp
src/ecflow/core/LogVerification.hpp
src/ecflow/core/NOrder.hpp
src/ecflow/core/NState.hpp
src/ecflow/core/NodePath.hpp
src/ecflow/core/Passwd.hpp
src/ecflow/core/PasswdFile.hpp
src/ecflow/core/PasswordEncryption.hpp
src/ecflow/core/Pid.hpp
src/ecflow/core/PrintStyle.hpp
src/ecflow/core/SState.hpp
src/ecflow/core/Serialization.hpp
src/ecflow/core/SerializationTest.hpp
src/ecflow/core/Stl.hpp
src/ecflow/core/Str.hpp
src/ecflow/core/StringSplitter.hpp
src/ecflow/core/TestUtil.hpp
src/ecflow/core/TimeSeries.hpp
src/ecflow/core/TimeSlot.hpp
src/ecflow/core/TimeStamp.hpp
src/ecflow/core/User.hpp
src/ecflow/core/Version.hpp
src/ecflow/core/WhiteListFile.hpp
src/ecflow/core/cereal_boost_time.hpp
src/ecflow/core/cereal_optional_nvp.hpp
src/ecflow/core/perf_timer.hpp
# Sources
src/AssertTimer.cpp
src/Cal.cpp
src/Calendar.cpp
src/Child.cpp
src/CommandLine.cpp
src/DState.cpp
src/DurationTimer.cpp
src/Ecf.cpp
src/Extract.cpp
src/File.cpp
src/File_r.cpp
src/Host.cpp
src/Indentor.cpp
src/Log.cpp
src/LogVerification.cpp
src/NOrder.cpp
src/NState.cpp
src/NodePath.cpp
src/Passwd.cpp
src/PasswdFile.cpp
src/Pid.cpp
src/PrintStyle.cpp
src/SState.cpp
src/Str.cpp
src/StringSplitter.cpp
src/TimeSeries.cpp
src/TimeSlot.cpp
src/TimeStamp.cpp
src/User.cpp
src/Version.cpp
src/WhiteListFile.cpp
src/ecflow/core/AssertTimer.cpp
src/ecflow/core/Cal.cpp
src/ecflow/core/Calendar.cpp
src/ecflow/core/Child.cpp
src/ecflow/core/CommandLine.cpp
src/ecflow/core/DState.cpp
src/ecflow/core/DurationTimer.cpp
src/ecflow/core/Ecf.cpp
src/ecflow/core/Extract.cpp
src/ecflow/core/File.cpp
src/ecflow/core/File_r.cpp
src/ecflow/core/Host.cpp
src/ecflow/core/Indentor.cpp
src/ecflow/core/Log.cpp
src/ecflow/core/LogVerification.cpp
src/ecflow/core/NOrder.cpp
src/ecflow/core/NState.cpp
src/ecflow/core/NodePath.cpp
src/ecflow/core/Passwd.cpp
src/ecflow/core/PasswdFile.cpp
src/ecflow/core/Pid.cpp
src/ecflow/core/PrintStyle.cpp
src/ecflow/core/SState.cpp
src/ecflow/core/Str.cpp
src/ecflow/core/StringSplitter.cpp
src/ecflow/core/TimeSeries.cpp
src/ecflow/core/TimeSlot.cpp
src/ecflow/core/TimeStamp.cpp
src/ecflow/core/User.cpp
src/ecflow/core/Version.cpp
src/ecflow/core/WhiteListFile.cpp
)

ecbuild_add_library(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
* nor does it submit to any jurisdiction.
*/

#include "AssertTimer.hpp"
#include "ecflow/core/AssertTimer.hpp"

#include <iostream>

#include "Log.hpp"
#include "ecflow/core/Log.hpp"

namespace ecf {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/// \brief Simple class that asserts when a time constraint is not met
///

#include "Calendar.hpp"
#include "ecflow/core/Calendar.hpp"

namespace ecf {

Expand Down
2 changes: 1 addition & 1 deletion ACore/src/Cal.cpp → ACore/src/ecflow/core/Cal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* nor does it submit to any jurisdiction.
*/

#include "Cal.hpp"
#include "ecflow/core/Cal.hpp"

long Cal::julian_to_date(long jdate) {
long x, y, d, m, e;
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions ACore/src/Calendar.cpp → ACore/src/ecflow/core/Calendar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
* nor does it submit to any jurisdiction.
*/

#include "Calendar.hpp"
#include "ecflow/core/Calendar.hpp"

#include <stdexcept>

#include <boost/date_time/posix_time/time_formatters.hpp> // requires boost date and time lib, for to_simple_string

#include "CalendarUpdateParams.hpp"
#include "Extract.hpp"
#include "Log.hpp"
#include "Serialization.hpp"
#include "cereal_boost_time.hpp"
#include "ecflow/core/CalendarUpdateParams.hpp"
#include "ecflow/core/Extract.hpp"
#include "ecflow/core/Log.hpp"
#include "ecflow/core/Serialization.hpp"
#include "ecflow/core/cereal_boost_time.hpp"

#ifdef DEBUG
#include "Ecf.hpp"
#include "ecflow/core/Ecf.hpp"
#endif

using namespace std;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions ACore/src/Child.cpp → ACore/src/ecflow/core/Child.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
* nor does it submit to any jurisdiction.
*/

#include "Child.hpp"
#include "ecflow/core/Child.hpp"

#include <cassert>

#include "Str.hpp"
#include "ecflow/core/Str.hpp"

namespace ecf {

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* nor does it submit to any jurisdiction.
*/

#include "CommandLine.hpp"
#include "ecflow/core/CommandLine.hpp"

#include <boost/program_options.hpp>
#include <boost/tokenizer.hpp>
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions ACore/src/DState.cpp → ACore/src/ecflow/core/DState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* nor does it submit to any jurisdiction.
*/

#include "DState.hpp"
#include "ecflow/core/DState.hpp"

#include <cassert>
#include <stdexcept>

#include "Ecf.hpp"
#include "Serialization.hpp"
#include "ecflow/core/Ecf.hpp"
#include "ecflow/core/Serialization.hpp"

void DState::setState(State s) {
st_ = s;
Expand Down
2 changes: 1 addition & 1 deletion ACore/src/DState.hpp → ACore/src/ecflow/core/DState.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <string>

#include "NState.hpp"
#include "ecflow/core/NState.hpp"

class DState {
public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// #define DEBUG_PERF 1
#ifdef DEBUG_PERF
#include "DurationTimer.hpp"
#include "ecflow/core/DurationTimer.hpp"
#endif

#endif /* ecflow_core_DebugPerf_HPP */
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* nor does it submit to any jurisdiction.
*/

#include "DurationTimer.hpp"
#include "ecflow/core/DurationTimer.hpp"

#include <iostream>

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion ACore/src/Ecf.cpp → ACore/src/ecflow/core/Ecf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* nor does it submit to any jurisdiction.
*/

#include "Ecf.hpp"
#include "ecflow/core/Ecf.hpp"

bool Ecf::server_ = false;
bool Ecf::debug_equality_ = false;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#include <boost/filesystem.hpp>
#include <boost/filesystem/operations.hpp>

#include "Converter.hpp"
#include "File.hpp"
#include "ecflow/core/Converter.hpp"
#include "ecflow/core/File.hpp"

namespace ecf {

Expand Down
4 changes: 2 additions & 2 deletions ACore/src/Extract.cpp → ACore/src/ecflow/core/Extract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* nor does it submit to any jurisdiction.
*/

#include "Extract.hpp"
#include "ecflow/core/Extract.hpp"

#include <stdexcept>

#include <boost/date_time/posix_time/time_formatters.hpp> // requires boost date and time lib

#include "Converter.hpp"
#include "ecflow/core/Converter.hpp"

// #define DEBUG_PARSER 1

Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions ACore/src/File.cpp → ACore/src/ecflow/core/File.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
* nor does it submit to any jurisdiction.
*/

#include "File.hpp"
#include "ecflow/core/File.hpp"

#include <fstream>
#include <stdexcept>

#include <boost/filesystem.hpp>

#include "Ecf.hpp"
#include "Log.hpp"
#include "NodePath.hpp"
#include "Str.hpp"
#include "ecflow/core/Ecf.hpp"
#include "ecflow/core/Log.hpp"
#include "ecflow/core/NodePath.hpp"
#include "ecflow/core/Str.hpp"

#ifdef CMAKE
#include "ecflow_source_build_dir.h"
#include "ecflow/core/ecflow_source_build_dir.h"
#endif

using namespace std;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion ACore/src/File_r.cpp → ACore/src/ecflow/core/File_r.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* nor does it submit to any jurisdiction.
*/

#include "File_r.hpp"
#include "ecflow/core/File_r.hpp"

using namespace std;
using namespace ecf;
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions ACore/src/Host.cpp → ACore/src/ecflow/core/Host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
* nor does it submit to any jurisdiction.
*/

#include "Host.hpp"
#include "ecflow/core/Host.hpp"

#include <cassert>
#include <stdexcept>
#include <unistd.h> // for gethostname

#include "Ecf.hpp"
#include "Str.hpp"
#include "ecflow/core/Ecf.hpp"
#include "ecflow/core/Str.hpp"

using namespace std;

Expand Down
File renamed without changes.
Loading

0 comments on commit 3dae39c

Please sign in to comment.