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

chore(cmake): sort link libaries #90

Merged
merged 1 commit into from
Jul 15, 2024
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ if(MSVC)
PUBLIC DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS)
endif()
target_compile_features(monkey_lib PUBLIC cxx_std_20)
target_link_libraries(monkey_lib PRIVATE fmt::fmt doctest::doctest doctest::dll)
target_link_libraries(monkey_lib PRIVATE doctest::dll doctest::doctest fmt::fmt)

add_executable(monkey_exe source/main.cpp)
add_executable(monkey::exe ALIAS monkey_exe)
Expand Down
2 changes: 1 addition & 1 deletion test/benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project(Benchmark LANGUAGES CXX)
add_executable(benchmark source/main.cpp)

target_precompile_headers(benchmark REUSE_FROM monkey_lib)
target_link_libraries(benchmark PRIVATE monkey::lib fmt::fmt)
target_link_libraries(benchmark PRIVATE fmt::fmt monkey::lib)
target_compile_features(benchmark PRIVATE cxx_std_20)

add_folders(Benchmark)
3 changes: 1 addition & 2 deletions test/doctest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ target_link_libraries(doctest_dll PRIVATE doctest::doctest)
add_executable(doctest_exe main.cpp)

target_precompile_headers(doctest_exe REUSE_FROM monkey_lib)
target_link_libraries(doctest_exe PRIVATE doctest::doctest doctest::dll
fmt::fmt monkey::lib)
target_link_libraries(doctest_exe PRIVATE doctest::dll doctest::doctest fmt::fmt monkey::lib)
add_executable(doctest::exe ALIAS doctest_exe)
set_property(TARGET doctest_exe PROPERTY OUTPUT_NAME doctest)
target_compile_features(doctest_exe PRIVATE cxx_std_20)
Expand Down