Howard Hinnant
5bdb7e6f31
Update project version
2024-10-20 14:14:05 -04:00
fkobi
e396108ee3
Update project version
2024-10-19 09:52:15 +00:00
Partha Biswas
361352673d
Include additional headers during cmake install
2024-09-30 11:54:39 -04:00
Vasyl Gello
fca69e308d
Ensure Android private functions dont show up
...
... for external consumers like tests
Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
2024-09-30 11:00:51 -04:00
Olivier Le Doeuff
ab1dc3a5eb
Fix description
...
Co-authored-by: Gerhard Olsson <6248932+gerhardol@users.noreply.github.com>
2024-09-28 16:41:52 -04:00
Olivier Le Doeuff
7c151cdb6a
build: introduce ENABLE_DATE_INSTALL
to allow user opt-out of install
...
When using `date` as a PRIVATE dependency, it is not required to install it. This flag give user using `date` with add_subdirectory the opportunity to disable install target Default behavior is conserved since ENABLE_DATE_INSTALL is ON
2024-09-28 16:41:52 -04:00
Olivier Le Doeuff
3286289bf6
build: use standard CMAKE_INSTALL_INCLUDEDIR
for header install folder.
...
This gives user control over which folder header should be installed to instead of using hardcoded value `include/`.
Variable `CMAKE_INSTALL_INCLUDEDIR` is provided after a call to `include(GNUInstallDirs)`
More info can be found about usage in docs: https://cmake.org/cmake/help/latest/command/install.html
2024-09-28 16:41:22 -04:00
Andrea Pappacoda
cf8f25b183
build(cmake): always mark HAS_STRING_VIEW as part…
...
…of the interface
If the library gets compiled with HAS_STRING_VIEW=1, consumers always
need to link to the functions using std::string_view, as they are the
only ones compiled into the shared library.
You can find a longer explanation here:
<https://github.com/HowardHinnant/date/pull/754#issuecomment-1361248007 >
2024-09-28 16:40:52 -04:00
Krzysiek Karbowiak
939031c38c
Fix typo
2024-09-28 15:38:46 -04:00
Nikolay Baklicharov
1ead6715de
Allow option override by FetchContent
2024-05-14 09:51:08 -04:00
Andrea Pappacoda
2e19c006e2
cmake: update project version ( #699 )
2021-09-01 09:57:59 -04:00
theirix
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
Michael Ellery
313189b0a8
Correct lingering references to bare "tz" libname: ( #600 )
...
Fixes : #599
2020-08-25 16:57:00 -04:00
Nico Schlömer
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
Michael Ellery
a6243ce56f
set cmake proj ver to 3.0: ( #584 )
...
FIXES : #583
2020-06-22 11:48:09 -04:00
Mike Ellery
e6adff6754
[cmake] Rename tz library to date-tz:
...
Fixes : #426
2020-05-24 21:31:18 -04:00
Asad. Gharighi
9cc3a7bca1
Adding Persian/Jalali/Solar-Hijri calendar
2020-03-08 20:18:45 -04:00
Robert Campion
c8d311f6f1
fixes #534 ( #535 )
2020-01-16 18:16:58 -05:00
Michael Ellery
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
Anton Voloshin
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
Michael Ellery
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
Mike Ellery
48f1455cd2
CMake refactor for easier subdirectory inclusion
2019-10-18 14:59:37 -04:00
Vitaliy Demidov
e3186e36c2
typo ( #498 )
2019-10-18 14:47:38 -04:00
Erik Rigtorp
e6d2c08159
Honor symbol visibility settings ( #464 )
2019-09-23 22:08:07 -04:00
Michael Tsukerman
fe491eff1c
Add travis ci configuration file
2019-09-10 09:36:13 -04:00
Alexej Harm
c56f915cc3
fixed shared library support
2019-09-09 11:47:47 -04:00
Alexej Harm
5e57a19abe
renamed targets to date and tz
2019-09-09 11:47:47 -04:00
Michael Tsukerman
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
Michael Tsukerman
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
carlos.alvaro
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
Harry Mallon
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
Harry Mallon
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
Harry Mallon
e6941697eb
Validate TZdata failed with OS TZdata
2018-03-18 18:17:27 -04:00
Eugene Shalygin
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
Don Smyth
afe61df277
Fix case of generated dateConfig so it will work on a case sensitive filesystem
2018-03-02 16:37:32 -05:00
Howard Hinnant
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
Tommy Nguyen
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
Tommy Nguyen
362cd8f27e
Account for WIN32
2018-01-21 12:29:13 -05:00
Tommy Nguyen
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
Tommy Nguyen
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
Darrell Wright
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
Darrell Wright
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
ajneu
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
ajneu
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
ajneu
dbd6e6e388
cmake: remove include_directories() command that is missing directory
2017-12-26 13:35:25 -05:00
ajneu
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
Roey Darwish Dror
44c2515280
Use the highest possible C++ standard ( #18 )
2017-12-26 11:12:11 +02:00
Andreas Stallinger
d3b8d4af8d
use target_include_directories instead of include_directories
2017-12-01 11:18:59 -05:00
Darrell Wright
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
Darrell Wright
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