Skip to content

Commit c8a3c93

Browse files
committed
modify according to coderabbit suggestions
1 parent 1c44077 commit c8a3c93

4 files changed

Lines changed: 11 additions & 19 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ install(TARGETS
9898
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
9999
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
100100
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
101-
FILE_SET HEADERS
101+
# FILE_SET HEADERS
102102
)
103103

104104
install(EXPORT ystdlib-targets NAMESPACE ystdlib:: DESTINATION ${ystdlib_INSTALL_CONFIG_DIR})

examples/CMakeLists.txt

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ if(ystdlib-examples_IS_TOP_LEVEL)
77
include("${CMAKE_SOURCE_DIR}/../build/deps/cmake-settings/settings.cmake" OPTIONAL)
88
endif()
99

10-
set(ystdlib_ROOT "${CMAKE_SOURCE_DIR}/../build/build_install")
10+
if(NOT DEFINED ystdlib_ROOT)
11+
set(ystdlib_ROOT "${CMAKE_SOURCE_DIR}/../build/build_install")
12+
endif()
1113
find_package(ystdlib REQUIRED)
1214

1315
add_library(
@@ -17,19 +19,9 @@ add_library(
1719
types.hpp
1820
constants.hpp
1921
)
20-
target_link_libraries(common PUBLIC ystdlib::error_handling)
22+
target_link_libraries(common PRIVATE ystdlib::error_handling)
2123
add_executable(main main.cpp)
2224

23-
get_target_property(_type ystdlib::error_handling TYPE)
24-
get_target_property(_sources ystdlib::error_handling SOURCES)
25-
get_target_property(_includes ystdlib::error_handling INCLUDE_DIRECTORIES)
26-
get_target_property(_libs ystdlib::error_handling LINK_LIBRARIES)
27-
28-
message(STATUS "Target Type: ${_type}")
29-
message(STATUS "Sources: ${_sources}")
30-
message(STATUS "Include Dirs: ${_includes}")
31-
message(STATUS "Linked Libraries: ${_libs}")
32-
3325
target_compile_features(main PRIVATE cxx_std_20)
3426
target_compile_features(common PRIVATE cxx_std_20)
3527

examples/constants.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef YSTDLIB_ERROR_HANDLING_TEST_CONSTANTS_HPP
2-
#define YSTDLIB_ERROR_HANDLING_TEST_CONSTANTS_HPP
1+
#ifndef EXAMPLE_CONSTANTS_HPP
2+
#define EXAMPLE_CONSTANTS_HPP
33

44
#include <array>
55
#include <string_view>
@@ -15,4 +15,4 @@ constexpr std::array cFailureConditions{std::errc::not_connected, std::errc::tim
1515
constexpr std::array cNoneFailureConditions{std::errc::broken_pipe, std::errc::address_in_use};
1616
} // namespace ystdlib::error_handling::test
1717

18-
#endif // YSTDLIB_ERROR_HANDLING_TEST_CONSTANTS_HPP
18+
#endif // EXAMPLE_CONSTANTS_HPP

examples/types.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef YSTDLIB_ERROR_HANDLING_TEST_TYPES_HPP
2-
#define YSTDLIB_ERROR_HANDLING_TEST_TYPES_HPP
1+
#ifndef EXAMPLE_TYPES_HPP
2+
#define EXAMPLE_TYPES_HPP
33

44
#include <cstdint>
55

@@ -24,4 +24,4 @@ YSTDLIB_ERROR_HANDLING_MARK_AS_ERROR_CODE_ENUM(
2424
);
2525
YSTDLIB_ERROR_HANDLING_MARK_AS_ERROR_CODE_ENUM(ystdlib::error_handling::test::BinaryErrorCodeEnum);
2626

27-
#endif // YSTDLIB_ERROR_HANDLING_TEST_TYPES_HPP
27+
#endif // EXAMPLE_TYPES_HPP

0 commit comments

Comments
 (0)