Skip to content

Commit 9715774

Browse files
committed
formatting
1 parent a06ac6e commit 9715774

File tree

13 files changed

+41
-53
lines changed

13 files changed

+41
-53
lines changed

.github/workflows/windows_impl.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ jobs:
101101
unset CONDARC # Interferes with tests
102102
cd ./build/libmamba && ./tests/test_libmamba
103103
104-
105104
libmambapy_tests_win:
106105
name: libmambapy tests
107106
needs: ["build_shared_win"]

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ if(BUILD_LIBMAMBA)
8080
add_subdirectory(libmamba-spdlog)
8181
endif()
8282

83-
84-
8583
# Python bindings of libmamba
8684
if(BUILD_LIBMAMBAPY)
8785
add_subdirectory(libmambapy)

cmake/CompilerWarnings.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function(mamba_target_add_compile_warnings target)
155155
endif()
156156

157157
get_target_property(type ${target} TYPE)
158-
if (NOT ${type} STREQUAL "INTERFACE_LIBRARY")
158+
if(NOT ${type} STREQUAL "INTERFACE_LIBRARY")
159159
target_compile_options("${target}" PRIVATE ${warnings})
160160
endif()
161161

dev/CMakePresetsMamba.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"BUILD_LIBMAMBA": "ON",
66
"BUILD_LIBMAMBAPY": "ON",
77
"BUILD_LIBMAMBA_TESTS": "ON",
8-
"BUILD_LIBMAMBA_SPDLOG_TESTS" : "ON",
8+
"BUILD_LIBMAMBA_SPDLOG_TESTS": "ON",
99
"BUILD_MAMBA_PACKAGE": "ON"
1010
},
1111
"description": "Base profile for building libmamba and related",

libmamba-spdlog/CMakeLists.txt

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,40 +20,31 @@ find_package(spdlog CONFIG REQUIRED)
2020
find_package(Threads REQUIRED)
2121

2222
# For some reasons, using target_compile_definitions does not set the definitions properly
23-
add_compile_definitions(
24-
SPDLOG_FMT_EXTERNAL "SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_${BUILD_LOG_LEVEL}"
25-
)
23+
add_compile_definitions(SPDLOG_FMT_EXTERNAL "SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_${BUILD_LOG_LEVEL}")
2624

2725
add_library(libmamba-spdlog INTERFACE)
28-
# target_sources(libmamba-spdlog
29-
# INTERFACE
30-
# include/mamba/spdlog/logging_spdlog.hpp
31-
# include/mamba/spdlog/logging_spdlog_impl.hpp
32-
# )
26+
# target_sources(libmamba-spdlog INTERFACE include/mamba/spdlog/logging_spdlog.hpp
27+
# include/mamba/spdlog/logging_spdlog_impl.hpp )
3328
add_library(mamba::libmamba-spdlog ALIAS libmamba-spdlog)
3429

35-
target_include_directories(libmamba-spdlog INTERFACE
36-
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
37-
$<INSTALL_INTERFACE:include>
30+
target_include_directories(
31+
libmamba-spdlog
32+
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include>
3833
)
3934

40-
41-
target_link_libraries(libmamba-spdlog
35+
target_link_libraries(
36+
libmamba-spdlog
4237
INTERFACE
4338
${libmamba_target}
44-
45-
# Since conda-forge spdlog is built with a bundled version of fmt we use the header
46-
# only version to avoid chasing after the correct fmt version matching the one used
47-
# in the bundle.
39+
# Since conda-forge spdlog is built with a bundled version of fmt we use the header only
40+
# version to avoid chasing after the correct fmt version matching the one used in the
41+
# bundle.
4842
spdlog::spdlog_header_only
49-
50-
# We need the threading facilities available whatever the user use.
51-
# This should have been part of depending on spdlog but for some reason it's
52-
# not made available automatically.
43+
# We need the threading facilities available whatever the user use. This should have been
44+
# part of depending on spdlog but for some reason it's not made available automatically.
5345
Threads::Threads
5446
)
5547

56-
5748
mamba_target_add_compile_warnings(libmamba-spdlog WARNING_AS_ERROR ${MAMBA_WARNING_AS_ERROR})
5849

5950
target_compile_features(libmamba-spdlog INTERFACE cxx_std_20)
@@ -71,7 +62,8 @@ write_basic_package_version_file(
7162
VERSION 1.0
7263
COMPATIBILITY AnyNewerVersion
7364
)
74-
install(TARGETS libmamba-spdlog
65+
install(
66+
TARGETS libmamba-spdlog
7567
EXPORT ${PROJECT_NAME}Targets
7668
LIBRARY DESTINATION lib COMPONENT Runtime
7769
ARCHIVE DESTINATION lib COMPONENT Development
@@ -85,17 +77,20 @@ configure_package_config_file(
8577
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
8678
)
8779

88-
install(EXPORT ${PROJECT_NAME}Targets
80+
install(
81+
EXPORT ${PROJECT_NAME}Targets
8982
NAMESPACE mamba::
90-
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
83+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
84+
)
9185

92-
install(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Version.cmake"
93-
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
94-
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
86+
install(
87+
FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Version.cmake"
88+
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
89+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
90+
)
9591

9692
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include)
9793

9894
if(BUILD_LIBMAMBA_SPDLOG_TESTS)
9995
add_subdirectory(tests/)
10096
endif()
101-

libmamba-spdlog/tests/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ cmake_minimum_required(VERSION 3.16)
33
find_package(Catch2 REQUIRED)
44
find_package(Threads REQUIRED)
55

6-
add_executable( test_libmamba_logging_spdlog test_logging_spdlog.cpp )
6+
add_executable(test_libmamba_logging_spdlog test_logging_spdlog.cpp)
77

8-
target_link_libraries(test_libmamba_logging_spdlog
8+
target_link_libraries(
9+
test_libmamba_logging_spdlog
910
PUBLIC
1011
mamba::libmamba
1112
mamba::libmamba-spdlog
@@ -23,7 +24,9 @@ set_target_properties(
2324
CXX_EXTENSIONS NO
2425
)
2526

26-
mamba_target_add_compile_warnings(test_libmamba_logging_spdlog WARNING_AS_ERROR ${MAMBA_WARNING_AS_ERROR})
27+
mamba_target_add_compile_warnings(
28+
test_libmamba_logging_spdlog WARNING_AS_ERROR ${MAMBA_WARNING_AS_ERROR}
29+
)
2730

2831
# ##################################################################################################
2932

libmamba-spdlog/tests/test_logging_spdlog.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <fmt/core.h>
1313

1414
#include <mamba/spdlog/logging_spdlog.hpp>
15-
1615
#include <mamba/testing/test_logging_common.hpp>
1716

1817
namespace mamba::logging

libmamba/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -621,11 +621,7 @@ macro(libmamba_create_target target_name linkage output_name)
621621

622622
target_link_libraries(
623623
${target_name}
624-
PUBLIC
625-
${LIBSOLV_LIBRARIES}
626-
${LIBSOLVEXT_LIBRARIES}
627-
yaml-cpp::yaml-cpp
628-
fmt::fmt
624+
PUBLIC ${LIBSOLV_LIBRARIES} ${LIBSOLVEXT_LIBRARIES} yaml-cpp::yaml-cpp fmt::fmt
629625
PRIVATE
630626
${LibArchive_LIBRARIES}
631627
${CURL_LIBRARIES}

libmamba/tests/CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,11 @@ set_target_properties(
167167
# libmamba logging system tests
168168

169169
add_library(libtesting_mamba_logging_common INTERFACE)
170-
target_sources(libtesting_mamba_logging_common
171-
INTERFACE
172-
libmamba_logging/include/mamba/testing/test_logging_common.hpp
170+
target_sources(
171+
libtesting_mamba_logging_common
172+
INTERFACE libmamba_logging/include/mamba/testing/test_logging_common.hpp
173173
)
174-
target_include_directories(libtesting_mamba_logging_common INTERFACE libmamba_logging/include/ )
174+
target_include_directories(libtesting_mamba_logging_common INTERFACE libmamba_logging/include/)
175175

176176
add_library(mamba::libtesting_mamba_logging_common ALIAS libtesting_mamba_logging_common)
177177

@@ -182,7 +182,8 @@ add_executable(
182182
libmamba_logging/test_logging_anyloghandler.cpp
183183
)
184184

185-
target_link_libraries(test_libmamba_logging
185+
target_link_libraries(
186+
test_libmamba_logging
186187
PRIVATE
187188
mamba::libmamba
188189
Catch2::Catch2WithMain

libmamba/tests/libmamba_logging/test_logging_anyloghandler.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
#include <catch2/catch_all.hpp>
1212

1313
#include <mamba/core/logging.hpp>
14-
#include <mamba/util/synchronized_value.hpp>
15-
1614
#include <mamba/testing/test_logging_common.hpp>
15+
#include <mamba/util/synchronized_value.hpp>
1716

1817
namespace mamba::logging
1918
{

0 commit comments

Comments
 (0)