Skip to content

Commit

Permalink
Merge pull request #1 from dsrhaslab/rgmacedo/wip-yaml-config
Browse files Browse the repository at this point in the history
Updated CMakeLists.txt
  • Loading branch information
rgmacedo authored Nov 4, 2022
2 parents 7725aed + 9f99934 commit eb0ef1f
Showing 1 changed file with 28 additions and 12 deletions.
40 changes: 28 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,20 @@ target_sources(
# ---------------------------------------------------------------------------- #
# > spdlog --- logging library

FetchContent_Declare(spdlog
URL https://github.com/gabime/spdlog/archive/v1.8.1.tar.gz
UPDATE_COMMAND ""
INSTALL_COMMAND ""
DOWNLOAD_EXTRACT_TIMESTAMP NEW
)
if(${CMAKE_VERSION} VERSION_LESS "3.24.0")
FetchContent_Declare(spdlog
URL https://github.com/gabime/spdlog/archive/v1.8.1.tar.gz
UPDATE_COMMAND ""
INSTALL_COMMAND ""
)
else ()
FetchContent_Declare(spdlog
URL https://github.com/gabime/spdlog/archive/v1.8.1.tar.gz
UPDATE_COMMAND ""
INSTALL_COMMAND ""
DOWNLOAD_EXTRACT_TIMESTAMP NEW
)
endif ()

FetchContent_MakeAvailable(spdlog)
set_target_properties(spdlog PROPERTIES POSITION_INDEPENDENT_CODE ON)
Expand All @@ -194,12 +202,20 @@ target_link_libraries(paio spdlog)
if (PAIO_BUILD_BENCHMARKS)
message(STATUS "Building gflags lib ...")

FetchContent_Declare (gflags
URL https://github.com/gflags/gflags/archive/refs/tags/v2.2.2.tar.gz
UPDATE_COMMAND ""
INSTALL_COMMAND ""
DOWNLOAD_EXTRACT_TIMESTAMP NEW
)
if(${CMAKE_VERSION} VERSION_LESS "3.24.0")
FetchContent_Declare(gflags
URL https://github.com/gflags/gflags/archive/refs/tags/v2.2.2.tar.gz
UPDATE_COMMAND ""
INSTALL_COMMAND ""
)
else ()
FetchContent_Declare(gflags
URL https://github.com/gflags/gflags/archive/refs/tags/v2.2.2.tar.gz
UPDATE_COMMAND ""
INSTALL_COMMAND ""
DOWNLOAD_EXTRACT_TIMESTAMP NEW
)
endif ()

FetchContent_MakeAvailable(gflags)
target_link_libraries(paio gflags)
Expand Down

0 comments on commit eb0ef1f

Please sign in to comment.