Skip to content

Commit

Permalink
Merge pull request #112 from QuantumFelidae/master
Browse files Browse the repository at this point in the history
fix usage of FetchContent for dependencies
  • Loading branch information
neoblizz authored Jun 5, 2024
2 parents 243fb75 + 33ae4ce commit c63ca8d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 54 deletions.
8 changes: 1 addition & 7 deletions cmake/FetchCSVParser.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ FetchContent_Declare(
GIT_REPOSITORY https://github.com/pratzl/csv-parser.git
GIT_TAG 2.1.3
)
FetchContent_MakeAvailable(csv_parser)

FetchContent_GetProperties(csv_parser)
if(NOT csv_parser_POPULATED)
FetchContent_Populate(
csv_parser
)
endif()
set(CSVPARSER_INCLUDE_DIR "${csv_parser_SOURCE_DIR}/single_include")

FetchContent_MakeAvailable(csv_parser)
11 changes: 1 addition & 10 deletions cmake/FetchCatch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,7 @@ FetchContent_Declare(
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.5.2
)

FetchContent_GetProperties(catch2)
if(NOT catch2_POPULATED)
FetchContent_Populate(
catch2
)
endif()

FetchContent_MakeAvailable(catch2)
set(CATCH2_SOURCE_DIR "${catch2_SOURCE_DIR}")
set(CATCH2_INCLUDE_DIR "${catch2_INCLUDE_DIR}")

FetchContent_MakeAvailable(catch2)
add_subdirectory(${catch2_SOURCE_DIR})
10 changes: 1 addition & 9 deletions cmake/FetchDocopt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,7 @@ FetchContent_Declare(
GIT_REPOSITORY https://github.com/docopt/docopt.cpp.git
GIT_TAG v0.6.3
)

FetchContent_GetProperties(docopt)
if(NOT docopt_POPULATED)
FetchContent_Populate(
docopt
)
endif()

FetchContent_MakeAvailable(docopt)
set(DOCOPT_SOURCE_DIR "${docopt_SOURCE_DIR}")
set(DOCOPT_INCLUDE_DIR "${docopt_INCLUDE_DIR}")

FetchContent_MakeAvailable(docopt)
12 changes: 2 additions & 10 deletions cmake/FetchFMT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,8 @@ FetchContent_Declare(
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 10.2.1
)

FetchContent_GetProperties(fmt)
if(NOT fmt_POPULATED)
FetchContent_Populate(
fmt
)
endif()

FetchContent_MakeAvailable(fmt)
set(FMT_SOURCE_DIR "${fmt_SOURCE_DIR}")
set(FMT_INCLUDE_DIR "${fmt_INCLUDE_DIR}")

FetchContent_MakeAvailable(fmt)
add_subdirectory(${fmt_SOURCE_DIR})

10 changes: 1 addition & 9 deletions cmake/FetchRange.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,7 @@ FetchContent_Declare(
GIT_REPOSITORY https://github.com/ericniebler/range-v3.git
GIT_TAG 0.11.0
)

FetchContent_GetProperties(range)
if(NOT range_POPULATED)
FetchContent_Populate(
range
)
endif()

FetchContent_MakeAvailable(range)
set(RANGE_SOURCE_DIR "${range_SOURCE_DIR}")
set(RANGE_INCLUDE_DIR "${range_INCLUDE_DIR}")

FetchContent_MakeAvailable(range)
10 changes: 1 addition & 9 deletions cmake/FetchSPDLog.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,7 @@ FetchContent_Declare(
GIT_REPOSITORY https://github.com/gabime/spdlog.git
GIT_TAG v1.9.2
)

FetchContent_GetProperties(spdlog)
if(NOT spdlog_POPULATED)
FetchContent_Populate(
spdlog
)
endif()

FetchContent_MakeAvailable(spdlog)
set(SPDLOG_SOURCE_DIR "${spdlog_SOURCE_DIR}")
set(SPDLOG_INCLUDE_DIR "${spdlog_INCLUDE_DIR}")

FetchContent_MakeAvailable(spdlog)

0 comments on commit c63ca8d

Please sign in to comment.