Skip to content

Commit

Permalink
A few more dependency cleanup
Browse files Browse the repository at this point in the history
We still have some issues preventing even data_file_test from depending
on the world:

1. `options` transitively depends on everything because of the change
   handlers.
2. `sound` depends on `monster` via `sgbSaveSoundOn` and
   `monster` depends on `sound` via `gbSoundOn`.
  • Loading branch information
glebm committed Jan 10, 2025
1 parent 3ce83d6 commit 3933201
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ set(libdevilutionx_SRCS
utils/cl2_to_clx.cpp
utils/display.cpp
utils/language.cpp
utils/logged_fstream.cpp
utils/pcx_to_clx.cpp
utils/sdl_bilinear_scale.cpp
utils/sdl_thread.cpp
Expand Down Expand Up @@ -290,6 +289,14 @@ target_link_dependencies(libdevilutionx_lighting PUBLIC
tl
)

add_devilutionx_object_library(libdevilutionx_logged_fstream
utils/logged_fstream.cpp
)
target_link_dependencies(libdevilutionx_logged_fstream PUBLIC
libdevilutionx_file_util
libdevilutionx_log
)

add_devilutionx_object_library(libdevilutionx_items
itemdat.cpp
items.cpp
Expand Down Expand Up @@ -376,6 +383,7 @@ if(SUPPORTS_MPQ)
tl
libmpq
libdevilutionx_file_util
libdevilutionx_logged_fstream
libdevilutionx_pkware_encrypt
libdevilutionx_strings
)
Expand Down Expand Up @@ -403,6 +411,7 @@ target_link_dependencies(libdevilutionx_options PUBLIC
${LUA_LIBRARIES}
sol2::sol2
libdevilutionx_game_mode
libdevilutionx_logged_fstream
libdevilutionx_strings
libdevilutionx_ini
)
Expand Down Expand Up @@ -473,6 +482,7 @@ target_link_dependencies(libdevilutionx_txtdata PUBLIC
fmt::fmt
tl
libdevilutionx_assets
libdevilutionx_parse_int
libdevilutionx_strings
)

Expand Down Expand Up @@ -501,6 +511,8 @@ else()
fmt::fmt
tl
unordered_dense::unordered_dense
libdevilutionx_options
libdevilutionx_random
libdevilutionx_sdl2_to_1_2_backports
)
endif()
Expand Down
6 changes: 6 additions & 0 deletions test/app_fatal_for_testing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,10 @@ namespace devilution {
std::abort();
}

[[noreturn]] void InsertCDDlg(std::string_view archiveName)
{
std::cerr << "InsertCDDlg error: " << archiveName << std::endl;
std::abort();
}

} // namespace devilution

0 comments on commit 3933201

Please sign in to comment.