Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes committed Dec 19, 2024
1 parent 17a40f1 commit c429a4c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ endif()
find_package(Boost REQUIRED)

find_package(antlr4-runtime REQUIRED)
find_package(yaml-cpp REQUIRED)

#Sirius solver
if(POLICY CMP0074)
Expand Down
4 changes: 1 addition & 3 deletions src/solver/modelParser/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
find_package(yaml-cpp REQUIRED)

set(SOURCES
parser.cpp
encoders.hxx
Expand All @@ -24,4 +22,4 @@ target_link_libraries(modelParser

install(DIRECTORY include/antares
DESTINATION "include"
)
)
10 changes: 4 additions & 6 deletions src/solver/modeler/parameters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
7 changes: 2 additions & 5 deletions src/tests/src/libs/antares/yaml-parser/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@

find_package(yaml-cpp CONFIG REQUIRED)
Set(SRCS test_yaml_parser.cpp
set(SRCS test_yaml_parser.cpp
)

set(execname "yaml-parser-test")
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})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit c429a4c

Please sign in to comment.