Skip to content

Commit

Permalink
update with upstream-fork 8.80 , conditional-linkage of 'date' lib
Browse files Browse the repository at this point in the history
  • Loading branch information
panchaBhuta committed Aug 5, 2023
2 parents f356ddb + 23f370c commit 90199e9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
26 changes: 15 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Project
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
project(rapidcsv VERSION 2.04.08.78 LANGUAGES CXX)
project(rapidcsv VERSION 2.05.08.80 LANGUAGES CXX)
set (CMAKE_CXX_STANDARD 20)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")

Expand Down Expand Up @@ -125,6 +125,10 @@ endif()
# Library
add_library(rapidcsv INTERFACE)
target_include_directories(rapidcsv INTERFACE include)
if(DATELIB)
message(STATUS "'rapidcsv' linking to '${DATELIB}'")
target_link_libraries(rapidcsv INTERFACE ${DATELIB})
endif()


# Install / Uninstall targets for standalone rapidcsv build
Expand All @@ -149,13 +153,6 @@ endif()



# Ccache
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
message(STATUS "Found ccache")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()

# Tests
option(RAPIDCSV_BUILD_TESTS "Build tests" OFF)
message(STATUS "Build tests: ${RAPIDCSV_BUILD_TESTS}")
Expand All @@ -165,6 +162,13 @@ if(RAPIDCSV_BUILD_TESTS)
include(CTest)
enable_testing()

# Ccache
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
message(STATUS "Found ccache")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()

# Enable codecvt tests if supported
if (CMAKE_CXX_STANDARD VERSION_LESS "17")
include(CheckIncludeFileCXX)
Expand All @@ -182,7 +186,7 @@ if(RAPIDCSV_BUILD_TESTS)
FILE(GLOB sources tests/${testname}*.cpp)
add_executable(${testname} ${sources})
add_test(NAME ${testname} COMMAND "${PROJECT_BINARY_DIR}/${testname}")
target_link_libraries(${testname} PUBLIC rapidcsv ${DATELIB})
target_link_libraries(${testname} PUBLIC rapidcsv)
endif()
endmacro(add_perf_test)

Expand All @@ -192,7 +196,7 @@ if(RAPIDCSV_BUILD_TESTS)
FILE(GLOB sources tests/${testname}*.cpp)
add_executable(${testname} ${sources})
add_test(NAME ${testname} COMMAND "${PROJECT_BINARY_DIR}/${testname}")
target_link_libraries(${testname} PUBLIC rapidcsv ${DATELIB})
target_link_libraries(${testname} PUBLIC rapidcsv)
endif()
endmacro(add_unit_test)

Expand Down Expand Up @@ -346,7 +350,7 @@ if(RAPIDCSV_BUILD_TESTS)
macro(add_example testname)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
add_executable(${testname} examples/${testname}.cpp)
target_link_libraries(${testname} PUBLIC rapidcsv ${DATELIB})
target_link_libraries(${testname} PUBLIC rapidcsv)
endif()
endmacro(add_example)

Expand Down
4 changes: 2 additions & 2 deletions include/rapidcsv/rapidcsv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* rapidcsv.h
*
* URL: https://github.com/panchaBhuta/rapidcsv_FilterSort
* Version: v2.03.fs-8.78
* Version: v2.05.fs-8.80
*
* Copyright (C) 2022-2023 Gautam Dhar
* All rights reserved.
Expand All @@ -13,7 +13,7 @@
* ***********************************************************************************
*
* URL: https://github.com/d99kris/rapidcsv
* Version: 8.78
* Version: 8.80
*
* Copyright (C) 2017-2023 Kristofer Berggren
* All rights reserved.
Expand Down

0 comments on commit 90199e9

Please sign in to comment.