From c429a4c9eebea411d94a87403b95728459c10533 Mon Sep 17 00:00:00 2001 From: Florian OMNES Date: Thu, 19 Dec 2024 10:49:37 +0100 Subject: [PATCH] Fix build --- src/CMakeLists.txt | 1 + src/solver/modelParser/CMakeLists.txt | 4 +--- src/solver/modeler/parameters/CMakeLists.txt | 10 ++++------ src/tests/src/libs/antares/yaml-parser/CMakeLists.txt | 7 ++----- .../modeler/parameters/testParametersParsing.cpp | 2 +- 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 56dc5e2bf8..f0a61959bf 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -192,6 +192,7 @@ endif() find_package(Boost REQUIRED) find_package(antlr4-runtime REQUIRED) +find_package(yaml-cpp REQUIRED) #Sirius solver if(POLICY CMP0074) diff --git a/src/solver/modelParser/CMakeLists.txt b/src/solver/modelParser/CMakeLists.txt index 1881ba78fa..8e5ac13726 100644 --- a/src/solver/modelParser/CMakeLists.txt +++ b/src/solver/modelParser/CMakeLists.txt @@ -1,5 +1,3 @@ -find_package(yaml-cpp REQUIRED) - set(SOURCES parser.cpp encoders.hxx @@ -24,4 +22,4 @@ target_link_libraries(modelParser install(DIRECTORY include/antares DESTINATION "include" -) \ No newline at end of file +) diff --git a/src/solver/modeler/parameters/CMakeLists.txt b/src/solver/modeler/parameters/CMakeLists.txt index 63610bd34e..6721526c4c 100644 --- a/src/solver/modeler/parameters/CMakeLists.txt +++ b/src/solver/modeler/parameters/CMakeLists.txt @@ -2,14 +2,12 @@ add_library(modeler-parameters include/antares/solver/modeler/parameters/modelerParameters.h include/antares/solver/modeler/parameters/parseModelerParameters.h parseModelerParameters.cpp - encoder.hxx -) + encoder.hxx) target_link_libraries(modeler-parameters - PRIVATE - yaml-cpp) + PRIVATE + yaml-cpp) target_include_directories(modeler-parameters PUBLIC - $ -) + $) diff --git a/src/tests/src/libs/antares/yaml-parser/CMakeLists.txt b/src/tests/src/libs/antares/yaml-parser/CMakeLists.txt index 1633966826..dd9ef54891 100644 --- a/src/tests/src/libs/antares/yaml-parser/CMakeLists.txt +++ b/src/tests/src/libs/antares/yaml-parser/CMakeLists.txt @@ -1,6 +1,4 @@ - -find_package(yaml-cpp CONFIG REQUIRED) -Set(SRCS test_yaml_parser.cpp +set(SRCS test_yaml_parser.cpp ) set(execname "yaml-parser-test") @@ -8,8 +6,7 @@ add_executable(${execname} ${SRCS}) target_link_libraries(${execname} PRIVATE yaml-cpp - Boost::unit_test_framework - ) + Boost::unit_test_framework) add_test(NAME yaml-parser COMMAND ${execname}) diff --git a/src/tests/src/solver/modeler/parameters/testParametersParsing.cpp b/src/tests/src/solver/modeler/parameters/testParametersParsing.cpp index 6af788500f..4ffdfee429 100644 --- a/src/tests/src/solver/modeler/parameters/testParametersParsing.cpp +++ b/src/tests/src/solver/modeler/parameters/testParametersParsing.cpp @@ -31,7 +31,7 @@ BOOST_AUTO_TEST_SUITE(read_modeler_parameters) -BOOST_AUTO_TEST_CASE(simple) +BOOST_AUTO_TEST_CASE(all_properties_set) { const auto working_tmp_dir = CREATE_TMP_DIR_BASED_ON_TEST_NAME(); const auto fileP = working_tmp_dir / "parameters.yaml";