[ https://issues.apache.org/jira/browse/AVRO-4171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Tzvetanov Grigorov resolved AVRO-4171. --------------------------------------------- Fix Version/s: 1.13.0 Assignee: Martin Tzvetanov Grigorov Resolution: Fixed > Avro cpp build with system installed fmt > ---------------------------------------- > > Key: AVRO-4171 > URL: https://issues.apache.org/jira/browse/AVRO-4171 > Project: Apache Avro > Issue Type: Improvement > Components: c++ > Affects Versions: 1.12.0 > Environment: macos 15.5(24F74) with homebrew > Reporter: Daeho Ro > Assignee: Martin Tzvetanov Grigorov > Priority: Minor > Labels: pull-request-available > Fix For: 1.13.0 > > Time Spent: 1h 10m > Remaining Estimate: 0h > > We may use the system installed `fmt` not download for every build especially > working with `homebrew`. > Here is my suggestion. > > {code:java} > diff --git a/CMakeLists.txt b/CMakeLists.txt > index 19059a4..ba95df6 100644 > --- a/CMakeLists.txt > +++ b/CMakeLists.txt > @@ -82,15 +82,18 @@ endif () > find_package (Boost 1.38 REQUIRED > COMPONENTS filesystem iostreams program_options regex system) > > -include(FetchContent) > -FetchContent_Declare( > - fmt > - GIT_REPOSITORY https://github.com/fmtlib/fmt.git > - GIT_TAG 10.2.1 > - GIT_PROGRESS TRUE > - USES_TERMINAL_DOWNLOAD TRUE > -) > -FetchContent_MakeAvailable(fmt) > +find_package(fmt) > +if (NOT fmt_FOUND) > + include(FetchContent) > + FetchContent_Declare( > + fmt > + GIT_REPOSITORY https://github.com/fmtlib/fmt.git > + GIT_TAG 10.2.1 > + GIT_PROGRESS TRUE > + USES_TERMINAL_DOWNLOAD TRUE > + ) > + FetchContent_MakeAvailable(fmt) > +endif (NOT fmt_FOUND) > > find_package(Snappy) > if (SNAPPY_FOUND) > {code} > > > -- This message was sent by Atlassian Jira (v8.20.10#820010)