Commit Graph

52 Commits

Author SHA1 Message Date
1658637448 C++23 enable in CMakeLists.txt 2023-04-27 14:26:47 +02:00
8ec7f3a36d Add linux build support 2023-04-13 19:03:31 +02:00
49d78d1837 Silenced warning 2021-02-09 18:32:44 +01:00
a32ff4f07e esp-idf fixes 2021-02-09 17:46:44 +01:00
3cbfa4318f Put back handling DISABLE_STRING_VIEW (#609)
* Put back handling DISABLE_STRING_VIEW
* Add HAS_DEDUCTION_GUIDES to interface library target
2020-10-08 19:22:15 -04:00
313189b0a8 Correct lingering references to bare "tz" libname: (#600)
Fixes: #599
2020-08-25 16:57:00 -04:00
9537addfc4 fix ONLY_C_LOCALE export from cmake (#590)
* fix ONLY_C_LOCALE export from cmake

* add some comments

* remove all generator expressions for target output

* cmake: fewer variables, make it easier to read
2020-07-22 19:03:42 -04:00
a6243ce56f set cmake proj ver to 3.0: (#584)
FIXES: #583
2020-06-22 11:48:09 -04:00
e6adff6754 [cmake] Rename tz library to date-tz:
Fixes: #426
2020-05-24 21:31:18 -04:00
9cc3a7bca1 Adding Persian/Jalali/Solar-Hijri calendar 2020-03-08 20:18:45 -04:00
c8d311f6f1 fixes #534 (#535) 2020-01-16 18:16:58 -05:00
fe63f0bb5f Add MANUAL_TZ_DB configure option: (#527)
* Add MANUAL_TZ_DB configure option:

FIXES: #458

* [fold] address review feedback
2020-01-15 22:08:15 -05:00
b9cd9c3fde Fixed a typo in CMakeLists.txt: USE_AUTOLOAD => AUTO_DOWNLOAD (#523)
USE_AUTOLOAD wasn't used anywhere else in date's sources. AUTO_DOWNLOAD
is used in .cpp/.h files while never mentioned in CMakeLists.txt.
Must have been a typo.
2020-01-03 20:15:29 -05:00
fc4cf092f9 Fix cmake install for 3.14 or earlier (3.7 min) (#522)
* Fix cmake install for 3.14 or earlier (3.7 min)

Fixes: #504, #505

* Add find_dependency to config file

FIXES: #514
2019-12-29 14:51:04 -05:00
48f1455cd2 CMake refactor for easier subdirectory inclusion 2019-10-18 14:59:37 -04:00
e3186e36c2 typo (#498) 2019-10-18 14:47:38 -04:00
e6d2c08159 Honor symbol visibility settings (#464) 2019-09-23 22:08:07 -04:00
fe491eff1c Add travis ci configuration file 2019-09-10 09:36:13 -04:00
c56f915cc3 fixed shared library support 2019-09-09 11:47:47 -04:00
5e57a19abe renamed targets to date and tz 2019-09-09 11:47:47 -04:00
9454aeda2b set library version to 2.4.1
Update CMakeLists.txt to set library version to 2.4.1
2019-09-06 17:32:15 -04:00
3a343adf6a Improve main CMake file
Rename target date_interface to interface and tz to timezone.
Export targets date::interface and date::timezone from cmake.
2019-09-06 10:29:30 -04:00
3933a0122d Add option to disable string_view
Also add -fPIC flag when compiling the shared version of the library.
2018-06-11 17:01:51 -04:00
e7e1482087 Remove BUILD_TZ_STATIC and replace with BUILD_SHARED_LIBS
* This is more standard CMake
* See https://cmake.org/cmake/help/v3.1/command/add_library.html
2018-03-19 18:04:34 +00:00
d6b95dc301 Remove TZ_CXX_STANDARD and instead use CMAKE_CXX_STANDARD
* See https://cmake.org/cmake/help/v3.1/variable/CMAKE_CXX_STANDARD.html?highlight=cmake_cxx_standard
2018-03-19 17:59:36 +00:00
e6941697eb Validate TZdata failed with OS TZdata 2018-03-18 18:17:27 -04:00
f105595f04 Use proper lib directory when installing on UNIX
Linux distributions use lib, lib32, and lib64 directories for library files,
symlinking them where needed. Let's follow distirbution rules by
utilising CMake module GNUInstallDirs.
2018-03-18 17:55:08 -04:00
afe61df277 Fix case of generated dateConfig so it will work on a case sensitive filesystem 2018-03-02 16:37:32 -05:00
4ada98d247 Enable testing in CMakeLists.txt
* Per instructions by @SlavSlavov in https://github.com/HowardHinnant/date/pull/278
2018-01-29 08:39:58 -05:00
637e5d8007 Use target_compile_definitions
It's generally preferred to use [`target_compile_definitions`](https://floooh.github.io/2016/01/12/cmake-dependency-juggling.html) over `add_definitions`.
2018-01-21 12:33:42 -05:00
362cd8f27e Account for WIN32 2018-01-21 12:29:13 -05:00
a4ce4bc2d3 Use correct target
Also, fix the formatting in the generator expressions. For some reason, the previous
formatting caused this error:

  Target "date_interface" INTERFACE_INCLUDE_DIRECTORIES property contains
  path:

  ...

  which is prefixed in the source directory.
2018-01-21 12:29:13 -05:00
3e5a57467a Export a CMake config file
This will allow users to import the project via CMake methods, i.e `find_package` rather than doing it manually.
2018-01-21 12:29:13 -05:00
b7e58e193f Set standard or default to C++17
Changed cmake to default to c++17 unless TZ_CXX_STANDARD is set(e.g. to 11,14 or 17)
2018-01-05 18:45:29 -05:00
7d80d89a44 Allow specifying cxx standard to target
Not everyone can use C++17 even with compilers that support it
2017-12-31 16:42:29 -05:00
d9052cffa2 rename and mark-as-advanced the following cmake-variable used in function print_option:
CURR_${OPT} -> PRINT_OPTION_CURR_${OPT}
so that the date-project now has the following advanced cmake-variables:
 PRINT_OPTION_CURR_BUILD_TZ_STATIC
 PRINT_OPTION_CURR_USE_SYSTEM_TZ_DB
 PRINT_OPTION_CURR_USE_TZ_DB_IN_DOT
2017-12-26 21:00:29 +01:00
447687870f - Interface library name changed from date to date_interface
- Print state of set options
- cleanup on duplicate ${CMAKE_THREAD_LIBS_INIT}
2017-12-26 13:39:55 -05:00
dbd6e6e388 cmake: remove include_directories() command that is missing directory 2017-12-26 13:35:25 -05:00
9178193ad2 cmake: date as INTERFACE target, to enable automatic include_directory
(for cases where just date.h, but not "tz.h and its lib" are needed)
2017-12-26 13:35:25 -05:00
44c2515280 Use the highest possible C++ standard (#18) 2017-12-26 11:12:11 +02:00
d3b8d4af8d use target_include_directories instead of include_directories 2017-12-01 11:18:59 -05:00
f8cc62c396 Changed naming
so that it is parent folder name _pass or _fail (e.g.)
date_test_fail_<test_name>
and date_test_pass_<test_name>
As this should be easier to sort
2017-11-27 10:20:14 -05:00
2d2b65906a Set so that the pass tests are all tests that do not end in .fail.cpp 2017-11-27 10:20:14 -05:00
53629fa30c No longer hardwiring subfolders of test
Hid build errors on should fail tests
2017-11-27 10:20:14 -05:00
98ae1e5241 part 1 of merge request 2017-11-26 23:09:46 -05:00
f3741d68ff Removed OpenSSL requirement. Curl, if it supports SSL, will pull it in.
Tested on Ubuntu so far
2017-11-26 16:56:41 -05:00
080df4988f excluded testit from Windows 2017-11-26 16:56:41 -05:00
1f27fb7d42 Cannot set USE_OS_TZDB=1 on Windows 2017-11-26 16:56:41 -05:00
3e47883c41 Added compile option BUILD_STATIC that defaults to ON to build static
libraries.  Set to off to build shared
2017-11-26 16:56:41 -05:00
3a33cdca7d Fixed WORKING_DIR path on testit target to use project root as base 2017-11-26 16:56:41 -05:00