Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Antares::action" CMake library, build only if BUILD_UI=ON #1637

Merged
merged 5 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 1 addition & 126 deletions src/libs/antares/study/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,125 +33,6 @@ set(SRC_STUDY_SCENARIO_BUILDER
)
source_group("study\\scenario builder" FILES ${SRC_MATRIX})

set(SRC_STUDY_ACTIONS
action/fwd.h
action/action.h
action/action.hxx
action/action.cpp
action/text.h
action/text.hxx
action/settings/suffix-for-area-names.h
action/settings/suffix-for-area-names.hxx
action/settings/suffix-for-area-names.cpp
action/settings/suffix-for-cluster-names.h
action/settings/suffix-for-cluster-names.hxx
action/settings/suffix-for-cluster-names.cpp
action/settings/suffix-for-constraint-names.h
action/settings/suffix-for-constraint-names.hxx
action/settings/suffix-for-constraint-names.cpp
action/settings/decal-area-position.h
action/settings/decal-area-position.hxx
action/settings/decal-area-position.cpp
action/behavior.h
action/behavior.cpp
action/state.h
action/state.cpp
action/context.h
action/context.cpp)
source_group("study\\actions" FILES ${SRC_STUDY_ACTIONS})

set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_AREA
action/handler/antares-study/area/create.h
action/handler/antares-study/area/create.hxx
action/handler/antares-study/area/create.cpp
action/handler/antares-study/area/position.h
action/handler/antares-study/area/position.cpp
action/handler/antares-study/area/filtering.h
action/handler/antares-study/area/filtering.cpp
action/handler/antares-study/area/color.h
action/handler/antares-study/area/color.cpp
action/handler/antares-study/area/nodal-optimization.h
action/handler/antares-study/area/nodal-optimization.cpp
action/handler/antares-study/area/reserves.h
action/handler/antares-study/area/reserves.cpp
action/handler/antares-study/area/misc-gen.h
action/handler/antares-study/area/misc-gen.cpp
action/handler/antares-study/area/timeseries.h
action/handler/antares-study/area/timeseries.cpp
action/handler/antares-study/area/ts-generator.h
action/handler/antares-study/area/ts-generator.cpp
action/handler/antares-study/area/ts-node.h
action/handler/antares-study/area/ts-node.hxx
action/handler/antares-study/area/ts-node.cpp
action/handler/antares-study/area/correlation.h
action/handler/antares-study/area/correlation.cpp
action/handler/antares-study/area/correlation-post.h
action/handler/antares-study/area/correlation-post.hxx
action/handler/antares-study/area/correlation-post.cpp

action/handler/antares-study/area/allocation-hydro.h
action/handler/antares-study/area/allocation-hydro.cpp
action/handler/antares-study/area/allocation-hydro-post.h
action/handler/antares-study/area/allocation-hydro-post.hxx
action/handler/antares-study/area/allocation-hydro-post.cpp)
source_group("study\\actions\\handler\\antares study\\area" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_AREA})

set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_LINK
action/handler/antares-study/link/create.h
action/handler/antares-study/link/create.hxx
action/handler/antares-study/link/create.cpp
action/handler/antares-study/link/ntc.h
action/handler/antares-study/link/ntc.cpp
action/handler/antares-study/link/hurdles-cost.h
action/handler/antares-study/link/hurdles-cost.cpp
action/handler/antares-study/link/impedances.h
action/handler/antares-study/link/impedances.cpp
action/handler/antares-study/link/comments.h
action/handler/antares-study/link/comments.hxx
action/handler/antares-study/link/comments.cpp
action/handler/antares-study/link/copper-plate.h
action/handler/antares-study/link/copper-plate.cpp
action/handler/antares-study/link/filtering.h
action/handler/antares-study/link/filtering.cpp
action/handler/antares-study/link/unload-data.h
action/handler/antares-study/link/unload-data.hxx
action/handler/antares-study/link/unload-data.cpp)
source_group("study\\actions\\handler\\antares study\\link" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_LINK})

set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_THERMAL
action/handler/antares-study/thermal-cluster/create.h
action/handler/antares-study/thermal-cluster/create.hxx
action/handler/antares-study/thermal-cluster/create.cpp
action/handler/antares-study/thermal-cluster/root-node.h
action/handler/antares-study/thermal-cluster/root-node.hxx
action/handler/antares-study/thermal-cluster/root-node.cpp
action/handler/antares-study/thermal-cluster/common.h
action/handler/antares-study/thermal-cluster/common.cpp
)
source_group("study\\action\\handler\\sntares study\\thermal cluster" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_THERMAL})


set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_CONSTRAINT
action/handler/antares-study/constraint/create.h
action/handler/antares-study/constraint/create.hxx
action/handler/antares-study/constraint/create.cpp
action/handler/antares-study/constraint/comments.h
action/handler/antares-study/constraint/comments.hxx
action/handler/antares-study/constraint/comments.cpp
action/handler/antares-study/constraint/data.h
action/handler/antares-study/constraint/data.hxx
action/handler/antares-study/constraint/data.cpp
action/handler/antares-study/constraint/weights.h
action/handler/antares-study/constraint/weights.cpp
action/handler/antares-study/constraint/offsets.h
action/handler/antares-study/constraint/offsets.cpp
action/handler/antares-study/constraint/enabled.h
action/handler/antares-study/constraint/enabled.hxx
action/handler/antares-study/constraint/enabled.cpp
)
source_group("study\\action\\handler\\antares study\\constraint" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_CONSTRAINT})


set(SRC_AREAS
area/constants.h
area/area.h
Expand Down Expand Up @@ -401,11 +282,6 @@ set(SRC_ALL
${SRC_AREAS}
${SRC_XCAST}
${SRC_STUDY_AREA_UI}
${SRC_STUDY_ACTIONS}
${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_THERMAL}
${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_AREA}
${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_LINK}
${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_CONSTRAINT}
${SRC_STUDY_UI}
${SRC_STUDY_PARAMETERS}
${SRC_STUDY_FINDER}
Expand All @@ -427,7 +303,6 @@ target_link_libraries(study
PUBLIC
Boost::boost
yuni-static-core
Boost::boost
Antares::array #xcast
Antares::date #parameters
Antares::inifile #parameters
Expand All @@ -447,4 +322,4 @@ target_include_directories(study
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../.. #Dirty trick to allow inclusion via <antares/study/X>
# Make more than just study visible but it's the lesser evil for now
)
)
1 change: 1 addition & 0 deletions src/ui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ endif()

add_subdirectory(common) #All UI libraries
add_subdirectory(simulator) #Simulator application
add_subdirectory(action) #Async action handler

144 changes: 144 additions & 0 deletions src/ui/action/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_AREA
include/action/handler/antares-study/area/create.h
include/action/handler/antares-study/area/create.hxx
handler/antares-study/area/create.cpp
handler/antares-study/area/position.h
handler/antares-study/area/position.cpp
handler/antares-study/area/filtering.h
handler/antares-study/area/filtering.cpp
handler/antares-study/area/color.h
handler/antares-study/area/color.cpp
handler/antares-study/area/nodal-optimization.h
handler/antares-study/area/nodal-optimization.cpp
handler/antares-study/area/reserves.h
handler/antares-study/area/reserves.cpp
handler/antares-study/area/misc-gen.h
handler/antares-study/area/misc-gen.cpp
handler/antares-study/area/timeseries.h
handler/antares-study/area/timeseries.cpp
handler/antares-study/area/ts-generator.h
handler/antares-study/area/ts-generator.cpp
handler/antares-study/area/ts-node.h
handler/antares-study/area/ts-node.hxx
handler/antares-study/area/ts-node.cpp
handler/antares-study/area/correlation.h
handler/antares-study/area/correlation.cpp
handler/antares-study/area/correlation-post.h
handler/antares-study/area/correlation-post.hxx
handler/antares-study/area/correlation-post.cpp

handler/antares-study/area/allocation-hydro.h
handler/antares-study/area/allocation-hydro.cpp
handler/antares-study/area/allocation-hydro-post.h
handler/antares-study/area/allocation-hydro-post.hxx
handler/antares-study/area/allocation-hydro-post.cpp)
source_group("study\\actions\\handler\\antares study\\area" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_AREA})

set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_LINK
include/action/handler/antares-study/link/create.h
include/action/handler/antares-study/link/create.hxx
handler/antares-study/link/create.cpp
handler/antares-study/link/ntc.h
handler/antares-study/link/ntc.cpp
handler/antares-study/link/hurdles-cost.h
handler/antares-study/link/hurdles-cost.cpp
handler/antares-study/link/impedances.h
handler/antares-study/link/impedances.cpp
handler/antares-study/link/comments.h
handler/antares-study/link/comments.hxx
handler/antares-study/link/comments.cpp
handler/antares-study/link/copper-plate.h
handler/antares-study/link/copper-plate.cpp
handler/antares-study/link/filtering.h
handler/antares-study/link/filtering.cpp
handler/antares-study/link/unload-data.h
handler/antares-study/link/unload-data.hxx
handler/antares-study/link/unload-data.cpp)
source_group("study\\actions\\handler\\antares study\\link" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_LINK})

set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_THERMAL
handler/antares-study/thermal-cluster/create.h
handler/antares-study/thermal-cluster/create.hxx
handler/antares-study/thermal-cluster/create.cpp
handler/antares-study/thermal-cluster/root-node.h
handler/antares-study/thermal-cluster/root-node.hxx
handler/antares-study/thermal-cluster/root-node.cpp
handler/antares-study/thermal-cluster/common.h
handler/antares-study/thermal-cluster/common.cpp
)
source_group("study\\action\\handler\\sntares study\\thermal cluster" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_THERMAL})


set(SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_CONSTRAINT
include/action/handler/antares-study/constraint/create.h
include/action/handler/antares-study/constraint/create.hxx
handler/antares-study/constraint/create.cpp
handler/antares-study/constraint/comments.h
handler/antares-study/constraint/comments.hxx
handler/antares-study/constraint/comments.cpp
handler/antares-study/constraint/data.h
handler/antares-study/constraint/data.hxx
handler/antares-study/constraint/data.cpp
handler/antares-study/constraint/weights.h
handler/antares-study/constraint/weights.cpp
handler/antares-study/constraint/offsets.h
handler/antares-study/constraint/offsets.cpp
handler/antares-study/constraint/enabled.h
handler/antares-study/constraint/enabled.hxx
handler/antares-study/constraint/enabled.cpp
)
source_group("study\\action\\handler\\antares study\\constraint" FILES ${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_CONSTRAINT})

set(SRC_STUDY_ACTIONS
include/action/fwd.h
include/action/action.h
include/action/action.hxx
action.cpp
include/action/text.h
include/action/text.hxx
include/action/settings/suffix-for-area-names.h
include/action/settings/suffix-for-area-names.hxx
settings/suffix-for-area-names.cpp
include/action/settings/suffix-for-cluster-names.h
include/action/settings/suffix-for-cluster-names.hxx
settings/suffix-for-cluster-names.cpp
include/action/settings/suffix-for-constraint-names.h
include/action/settings/suffix-for-constraint-names.hxx
settings/suffix-for-constraint-names.cpp
include/action/settings/decal-area-position.h
include/action/settings/decal-area-position.hxx
settings/decal-area-position.cpp
include/action/behavior.h
behavior.cpp
include/action/state.h
state.cpp
include/action/context.h
context.cpp)
source_group("study\\actions" FILES ${SRC_STUDY_ACTIONS})


set(SRC_HANDLER
${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_THERMAL}
${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_AREA}
${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_LINK}
${SRC_STUDY_ACTIONS_HANDLER_ANTARES_STUDY_CONSTRAINT}
${SRC_STUDY_ACTIONS})

add_library(antares-action ${SRC_HANDLER})

target_link_libraries(antares-action
PUBLIC
yuni-static-core
Antares::result_writer #study.h
Antares::date #parameters
Antares::inifile #parameters
Antares::object
Antares::study
)

target_include_directories(antares-action
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
)

add_library(Antares::action ALIAS antares-action)
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions
*/

#include "action.h"
#include "../../antares.h"
#include <action/action.h>
#include <antares/antares.h>

using namespace Yuni;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/

#include <yuni/yuni.h>
#include "behavior.h"
#include <action/behavior.h>
#include <cassert>

namespace Antares
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions
*/

#include "context.h"
#include <action/context.h>

using namespace Yuni;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define __ANTARES_LIBS_STUDY_ACTION_HANDLER_ANTARES_AREA_ALLOCATION_HYDRO_POST_H__

#include <yuni/yuni.h>
#include "../../../action.h"
#include <action/action.h>

namespace Antares
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define __ANTARES_LIBS_STUDY_ACTION_HANDLER_ANTARES_AREA_ALLOCATION_HYDRO_H__

#include <yuni/yuni.h>
#include "../../../action.h"
#include <action/action.h>

namespace Antares
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define __ANTARES_LIBS_STUDY_ACTION_HANDLER_ANTARES_AREA_COLOR_H__

#include <yuni/yuni.h>
#include "../../../action.h"
#include <action/action.h>

namespace Antares
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define __ANTARES_LIBS_STUDY_ACTION_HANDLER_ANTARES_AREA_CORRELATION_POST_H__

#include <yuni/yuni.h>
#include "../../../action.h"
#include <action/action.h>

namespace Antares
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define __ANTARES_LIBS_STUDY_ACTION_HANDLER_ANTARES_AREA_CORRELATION_H__

#include <yuni/yuni.h>
#include "../../../action.h"
#include <action/action.h>

namespace Antares
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
** SPDX-License-Identifier: licenceRef-GPL3_WITH_RTE-Exceptions
*/

#include "create.h"
#include <action/handler/antares-study/area/create.h>
#include <antares/utils/utils.h>
#include "nodal-optimization.h"
#include "reserves.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define __ANTARES_LIBS_STUDY_ACTION_HANDLER_ANTARES_AREA_FILTERING_H__

#include <yuni/yuni.h>
#include "../../../action.h"
#include <action/action.h>

namespace Antares
{
Expand Down
Loading