Skip to content

Commit

Permalink
simplify generator expression
Browse files Browse the repository at this point in the history
  • Loading branch information
wgtmac committed Jan 22, 2025
1 parent 69b9bd8 commit 7c63dbc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lang/c++/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ set (AVRO_SOURCE_FILES
impl/CustomAttributes.cc
)

add_library (avrocpp SHARED ${AVRO_SOURCE_FILES})
add_library (avrocpp SHARED ${AVRO_SOURCE_FILES})
add_library (avrocpp_s STATIC ${AVRO_SOURCE_FILES})

target_compile_definitions(avrocpp PRIVATE AVRO_SOURCE AVRO_DYN_LINK)
target_compile_definitions(avrocpp PRIVATE AVRO_SOURCE AVRO_DYN_LINK)
target_compile_definitions(avrocpp_s PRIVATE AVRO_SOURCE)

set_target_properties (avrocpp PROPERTIES VERSION ${AVRO_VERSION})
set_target_properties (avrocpp PROPERTIES VERSION ${AVRO_VERSION})
set_target_properties (avrocpp_s PROPERTIES VERSION ${AVRO_VERSION})

target_link_libraries(avrocpp PUBLIC
Expand Down Expand Up @@ -212,7 +212,7 @@ if (AVRO_BUILD_TESTS)

macro (unittest name)
add_executable (${name} test/${name}.cc)
target_link_libraries (${name} avrocpp_s Boost::system ZLIB::ZLIB $<IF:$<TARGET_EXISTS:Snappy::snappy>,Snappy::snappy,>)
target_link_libraries (${name} avrocpp_s Boost::system ZLIB::ZLIB $<$<TARGET_EXISTS:Snappy::snappy>:Snappy::snappy>)
add_test (NAME ${name} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${name})
endmacro (unittest)
Expand Down

0 comments on commit 7c63dbc

Please sign in to comment.