diff --git a/src/libs/antares/checks/CMakeLists.txt b/src/libs/antares/checks/CMakeLists.txt index 6e5b9f4251..8846d0eb41 100644 --- a/src/libs/antares/checks/CMakeLists.txt +++ b/src/libs/antares/checks/CMakeLists.txt @@ -10,16 +10,6 @@ add_library(checks add_library(Antares::checks ALIAS checks) target_include_directories(checks - PRIVATE - ${CMAKE_SOURCE_DIR}/libs/ - ${CMAKE_SOURCE_DIR}/libs/antares/study - ${CMAKE_SOURCE_DIR}/libs/antares/inifile #adq-patch-params - ${CMAKE_SOURCE_DIR}/libs/antares/array #area - ${CMAKE_SOURCE_DIR}/libs/antares/io #area -> matrix -> io - ${CMAKE_SOURCE_DIR}/libs/antares/date #area -> parameter -> date - ${CMAKE_SOURCE_DIR}/libs/antares/writer #area -> antares/parts/thermal/cluster -> writer - ${CMAKE_SOURCE_DIR}/libs/antares/jit #area -> matrix -> jit - ${CMAKE_SOURCE_DIR}/libs/antares/memory/include #area -> matrix -> memory PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) @@ -30,4 +20,5 @@ target_link_libraries(checks yuni-static-core exception Antares::study # cpp -> area + libantares-core ) \ No newline at end of file diff --git a/src/libs/antares/checks/checkLoadedInputData.cpp b/src/libs/antares/checks/checkLoadedInputData.cpp index 672b68d580..3fcad20e02 100644 --- a/src/libs/antares/checks/checkLoadedInputData.cpp +++ b/src/libs/antares/checks/checkLoadedInputData.cpp @@ -27,10 +27,10 @@ #include #include -#include +#include #include -#include "area.h" +#include namespace Antares::Check { diff --git a/src/libs/antares/correlation/CMakeLists.txt b/src/libs/antares/correlation/CMakeLists.txt index 07c2980829..c06f2b7a74 100644 --- a/src/libs/antares/correlation/CMakeLists.txt +++ b/src/libs/antares/correlation/CMakeLists.txt @@ -15,7 +15,7 @@ target_link_libraries(correlation yuni-static-core Antares::inifile Antares::array - Antares::study #correlation.h -> area.hxx + Antares::study #correlation.h -> area.h ) target_include_directories(correlation diff --git a/src/libs/antares/correlation/antares/correlation/correlation.h b/src/libs/antares/correlation/antares/correlation/correlation.h index e9043597e4..f69f23bcd7 100644 --- a/src/libs/antares/correlation/antares/correlation/correlation.h +++ b/src/libs/antares/correlation/antares/correlation/correlation.h @@ -243,7 +243,7 @@ IniFile* InterAreaCorrelationSaveToIniFile(const Matrix<>* m, const AreaList* l) } // namespace Data } // namespace Antares -#include "../study/area.h" +#include #include "correlation.hxx" #endif /* __ANTARES_LIBS_ARRAY_CORRELATION_H__ */ diff --git a/src/libs/antares/date/antares/date/date.h b/src/libs/antares/date/antares/date/date.h index 4800e4178b..08bc29330e 100644 --- a/src/libs/antares/date/antares/date/date.h +++ b/src/libs/antares/date/antares/date/date.h @@ -292,7 +292,7 @@ class Calendar } mapping; //! The calendar settings - struct settings + struct Settings { //! Day of the week for the 1rst January DayOfTheWeek weekday1rstJanuary; @@ -355,7 +355,7 @@ class Calendar ** Reset the calendar from an instance of the class \p Parameters, ** \param parameters Simulation settings */ - void reset(settings settings); + void reset(Settings settings); /*! ** \brief Export the whole calendar into a CSV file @@ -365,7 +365,7 @@ class Calendar bool saveToCSVFile(const AnyString& filename) const; private: - settings settings_; + Settings settings_; }; // class Calendar } // namespace Date diff --git a/src/libs/antares/date/date.cpp b/src/libs/antares/date/date.cpp index f7bd1719dd..1572c27cd3 100644 --- a/src/libs/antares/date/date.cpp +++ b/src/libs/antares/date/date.cpp @@ -402,7 +402,7 @@ Calendar::Calendar() settings_.weekday1rstJanuary = monday; } -void Calendar::reset(settings settings) +void Calendar::reset(Settings settings) { settings_ = settings; reset(); diff --git a/src/libs/antares/logs/CMakeLists.txt b/src/libs/antares/logs/CMakeLists.txt index 4eebd0483c..0915bc55de 100644 --- a/src/libs/antares/logs/CMakeLists.txt +++ b/src/libs/antares/logs/CMakeLists.txt @@ -4,6 +4,7 @@ set(HEADERS antares/${PROJ}/logs.h antares/${PROJ}/logs.hxx antares/${PROJ}/hostinfo.h + antares/${PROJ}/hostname.hxx ) set(SRC_LOGS ${HEADERS} @@ -16,10 +17,14 @@ source_group("misc\\logs" FILES ${SRC_LOGS}) add_library(${PROJ} ${SRC_LOGS}) add_library(Antares::${PROJ} ALIAS ${PROJ}) +if(WIN32) + find_library(WSOCK32_LIBRARY wsock32) + find_library(WS2_32_LIBRARY ws2_32) + target_link_libraries(${PROJ} PUBLIC wsock32 ws2_32) +endif() target_link_libraries(${PROJ} - PRIVATE + PUBLIC yuni-static-core - Antares::sys ) target_include_directories(${PROJ} diff --git a/src/libs/antares/sys/include/antares/sys/hostname.hxx b/src/libs/antares/logs/antares/logs/hostname.hxx similarity index 100% rename from src/libs/antares/sys/include/antares/sys/hostname.hxx rename to src/libs/antares/logs/antares/logs/hostname.hxx diff --git a/src/libs/antares/logs/hostinfo.cpp b/src/libs/antares/logs/hostinfo.cpp index 9d352541f7..009a0a96b4 100644 --- a/src/libs/antares/logs/hostinfo.cpp +++ b/src/libs/antares/logs/hostinfo.cpp @@ -30,7 +30,7 @@ #include "antares/logs/hostinfo.h" #include -#include "antares/sys/hostname.hxx" +#include "antares/logs/hostname.hxx" using namespace Yuni; using namespace Antares; diff --git a/src/libs/antares/study/CMakeLists.txt b/src/libs/antares/study/CMakeLists.txt index c05529b43a..0f0dbaa197 100644 --- a/src/libs/antares/study/CMakeLists.txt +++ b/src/libs/antares/study/CMakeLists.txt @@ -153,7 +153,6 @@ source_group("study\\action\\handler\\antares study\\constraint" FILES ${SRC_STU set(SRC_AREAS - area.h area/constants.h area/area.h area/area.hxx @@ -428,6 +427,7 @@ target_link_libraries(study PUBLIC Boost::boost yuni-static-core + Boost::boost Antares::array #xcast Antares::date #parameters Antares::inifile #parameters @@ -444,6 +444,7 @@ target_link_libraries(study ) target_include_directories(study - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR}/../.. + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/../.. #Dirty trick to allow inclusion via + # Make more than just study visible but it's the lesser evil for now ) \ No newline at end of file diff --git a/src/libs/antares/study/area.h b/src/libs/antares/study/area.h deleted file mode 100644 index d9efa3204a..0000000000 --- a/src/libs/antares/study/area.h +++ /dev/null @@ -1,32 +0,0 @@ -/* -** Copyright 2007-2023 RTE -** Authors: Antares_Simulator Team -** -** This file is part of Antares_Simulator. -** -** Antares_Simulator is free software: you can redistribute it and/or modify -** it under the terms of the GNU General Public License as published by -** the Free Software Foundation, either version 3 of the License, or -** (at your option) any later version. -** -** There are special exceptions to the terms and conditions of the -** license as they are applied to this software. View the full text of -** the exceptions in file COPYING.txt in the directory of this software -** distribution -** -** Antares_Simulator is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -** GNU General Public License for more details. -** -** You should have received a copy of the GNU General Public License -** along with Antares_Simulator. If not, see . -** -** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions -*/ -#ifndef __ANTARES_LIBS_STUDY_AREA_H__ -#define __ANTARES_LIBS_STUDY_AREA_H__ - -#include "area/area.h" - -#endif // __ANTARES_LIBS_STUDY_AREA_H__ diff --git a/src/libs/antares/study/parts/hydro/container.h b/src/libs/antares/study/parts/hydro/container.h index 7916c02803..84f9f4cc8f 100644 --- a/src/libs/antares/study/parts/hydro/container.h +++ b/src/libs/antares/study/parts/hydro/container.h @@ -191,6 +191,6 @@ double getWeeklyModulation(const double& level /* format : in % of reservoir cap } // namespace Antares::Data -#include "../../area.h" +#include #endif /* __ANTARES_LIBS_STUDY_PARTS_HYDRO_CONTAINER_H__ */ diff --git a/src/libs/antares/study/parts/renewable/cluster_list.cpp b/src/libs/antares/study/parts/renewable/cluster_list.cpp index 6f02bfaf38..c7c01a00bd 100644 --- a/src/libs/antares/study/parts/renewable/cluster_list.cpp +++ b/src/libs/antares/study/parts/renewable/cluster_list.cpp @@ -1,7 +1,7 @@ #include "cluster_list.h" #include #include "../../study.h" -#include "../../area.h" +#include using namespace Yuni; diff --git a/src/libs/antares/study/ui-runtimeinfos.h b/src/libs/antares/study/ui-runtimeinfos.h index 5a229b40d0..3353b81b62 100644 --- a/src/libs/antares/study/ui-runtimeinfos.h +++ b/src/libs/antares/study/ui-runtimeinfos.h @@ -30,7 +30,7 @@ #include #include #include "fwd.h" -#include "area.h" +#include "area/area.h" #include "binding_constraint/BindingConstraint.h" namespace Antares diff --git a/src/libs/antares/sys/CMakeLists.txt b/src/libs/antares/sys/CMakeLists.txt index 0f3ff8a1fb..b0cd415915 100644 --- a/src/libs/antares/sys/CMakeLists.txt +++ b/src/libs/antares/sys/CMakeLists.txt @@ -2,7 +2,6 @@ set(PROJ sys) set(HEADERS include/antares/${PROJ}/appdata.h include/antares/${PROJ}/policy.h - include/antares/${PROJ}/hostname.hxx ) set(SRC_PROJ ${HEADERS} diff --git a/src/libs/antares/sys/policy.cpp b/src/libs/antares/sys/policy.cpp index 05dc41f76f..c45de88af5 100644 --- a/src/libs/antares/sys/policy.cpp +++ b/src/libs/antares/sys/policy.cpp @@ -31,7 +31,7 @@ #include "antares/sys/appdata.h" #include #include -#include "antares/sys/hostname.hxx" +#include #include "../config.h" #include #include diff --git a/src/libs/antares/writer/CMakeLists.txt b/src/libs/antares/writer/CMakeLists.txt index 7afb136de7..a1e62da260 100644 --- a/src/libs/antares/writer/CMakeLists.txt +++ b/src/libs/antares/writer/CMakeLists.txt @@ -31,7 +31,6 @@ target_include_directories(result_writer target_link_libraries(result_writer PRIVATE - Antares::benchmarking yuni-static-core MINIZIP::minizip logs diff --git a/src/solver/simulation/CMakeLists.txt b/src/solver/simulation/CMakeLists.txt index 304e69059b..2fb31c1159 100644 --- a/src/solver/simulation/CMakeLists.txt +++ b/src/solver/simulation/CMakeLists.txt @@ -57,6 +57,9 @@ target_include_directories(libantares-solver-simulation PUBLIC ${CMAKE_SOURCE_DIR}/solver/simulation) target_link_libraries(libantares-solver-simulation PRIVATE - libantares-core Antares::infoCollection + PUBLIC + yuni-static-core + Antares::study + Antares::result_writer ) diff --git a/src/solver/ts-generator/xcast/predicate.hxx b/src/solver/ts-generator/xcast/predicate.hxx index bc02a44d9d..5797a00b72 100644 --- a/src/solver/ts-generator/xcast/predicate.hxx +++ b/src/solver/ts-generator/xcast/predicate.hxx @@ -28,7 +28,7 @@ #define __SOLVER_TS_GENERATOR_XCAST_PREDICATE_HXX__ #include -#include +#include #include #include "antares/study/parts/load/prepro.h" diff --git a/src/solver/variable/commons/links/links.cpp.inc.hxx b/src/solver/variable/commons/links/links.cpp.inc.hxx index 2f79991628..fbb860b19e 100644 --- a/src/solver/variable/commons/links/links.cpp.inc.hxx +++ b/src/solver/variable/commons/links/links.cpp.inc.hxx @@ -26,7 +26,7 @@ */ #include "../../variable.h" -#include "../../area.h" +#include #include "../../setofareas.h" using namespace Yuni; diff --git a/src/tests/src/libs/antares/CMakeLists.txt b/src/tests/src/libs/antares/CMakeLists.txt index 61ad648f26..b4c1d790c9 100644 --- a/src/tests/src/libs/antares/CMakeLists.txt +++ b/src/tests/src/libs/antares/CMakeLists.txt @@ -18,16 +18,13 @@ set(SRC_MATRIX_LIB add_library(lib-matrix ${SRC_MATRIX_LIB}) target_link_libraries(lib-matrix - PRIVATE + PUBLIC yuni-static-core ) target_include_directories(lib-matrix PRIVATE - "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/logs" - "${CMAKE_SOURCE_DIR}/tests/src/libs" - ) # Storing lib-matrix under the folder Unit-tests in the IDE @@ -49,7 +46,6 @@ target_include_directories(tests-matrix-save "${src_libs_antares}/array" "${src_libs_antares}/io" "${src_libs_antares}/jit" - "${src_libs_antares}/logs" "${src_libs_antares}/memory/include" "${CMAKE_CURRENT_SOURCE_DIR}/logs" "${CMAKE_CURRENT_SOURCE_DIR}/jit" diff --git a/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt b/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt index 3a6305ff5e..43c7aca74e 100644 --- a/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt +++ b/src/tests/src/libs/antares/study/thermal-price-definition/CMakeLists.txt @@ -24,6 +24,7 @@ target_link_libraries(thermal-price-definition checks Antares::study Antares::exception + Antares::checks ) # Linux if(UNIX AND NOT APPLE) diff --git a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp index 8bff9b724f..7748e7466d 100644 --- a/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp +++ b/src/tests/src/libs/antares/study/thermal-price-definition/thermal-price-definition.cpp @@ -9,12 +9,10 @@ #include #include -#include #include #include #include "cluster_list.h" -#include "container.h" const auto SEP = Yuni::IO::Separator; using namespace Antares::Data; diff --git a/src/tests/src/solver/simulation/CMakeLists.txt b/src/tests/src/solver/simulation/CMakeLists.txt index acf826f1c8..7dcdba69e7 100644 --- a/src/tests/src/solver/simulation/CMakeLists.txt +++ b/src/tests/src/solver/simulation/CMakeLists.txt @@ -45,6 +45,7 @@ target_link_libraries(test-store-timeseries-number test_utils_unit libantares-solver-simulation Antares::study + Antares::result_writer ) # Linux diff --git a/src/tests/src/solver/simulation/test-store-timeseries-number.cpp b/src/tests/src/solver/simulation/test-store-timeseries-number.cpp index 8cbac1ce83..8066be02f2 100644 --- a/src/tests/src/solver/simulation/test-store-timeseries-number.cpp +++ b/src/tests/src/solver/simulation/test-store-timeseries-number.cpp @@ -12,8 +12,8 @@ #include "timeseries-numbers.h" #include "BindingConstraintsTimeSeriesNumbersWriter.h" #include "utils.h" -#include "antares/writer/writer_factory.h" -#include "antares/writer/result_format.h" +#include +#include using namespace Antares::Solver; using namespace Antares::Data; diff --git a/src/ui/simulator/application/study.cpp b/src/ui/simulator/application/study.cpp index 3a3e7911e3..9fbf768e4e 100644 --- a/src/ui/simulator/application/study.cpp +++ b/src/ui/simulator/application/study.cpp @@ -25,10 +25,8 @@ ** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions */ #include "study.h" -#include -#include #include -#include +#include #include #include @@ -44,7 +42,6 @@ #include "../windows/saveas.h" #include "main.h" #include "menus.h" -#include #include "../windows/inspector/inspector.h" #include @@ -52,7 +49,6 @@ #include "wait.h" #include #include -#include "../toolbox/dispatcher/study.h" #include "../windows/startupwizard.h" #include diff --git a/src/ui/simulator/toolbox/components/datagrid/dbgrid.h b/src/ui/simulator/toolbox/components/datagrid/dbgrid.h index 72169d7a04..a7f32b98b8 100644 --- a/src/ui/simulator/toolbox/components/datagrid/dbgrid.h +++ b/src/ui/simulator/toolbox/components/datagrid/dbgrid.h @@ -28,6 +28,7 @@ #define __ANTARES_TOOLBOX_COMPONENT_DATAGRID_DBGRID_H__ #include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.h b/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.h index 9f1649845b..e3b7b0a58c 100644 --- a/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.h +++ b/src/ui/simulator/toolbox/components/datagrid/filter/operator.list.h @@ -28,6 +28,7 @@ #define __ANTARES_TOOLBOX_FILTER_OPERATOR_LIST_H__ #include +#include #include namespace Antares diff --git a/src/ui/simulator/toolbox/components/map/nodes/connection.h b/src/ui/simulator/toolbox/components/map/nodes/connection.h index 9cd8e249bf..31fe996072 100644 --- a/src/ui/simulator/toolbox/components/map/nodes/connection.h +++ b/src/ui/simulator/toolbox/components/map/nodes/connection.h @@ -30,7 +30,7 @@ #include "item.h" #include "node.h" #include "../tools/tool.h" -#include +#include namespace Antares { diff --git a/src/ui/simulator/toolbox/create.h b/src/ui/simulator/toolbox/create.h index 21aa3ec460..adb2402d91 100644 --- a/src/ui/simulator/toolbox/create.h +++ b/src/ui/simulator/toolbox/create.h @@ -30,6 +30,7 @@ #include #include #include +#include namespace Antares {