Commit Graph

30 Commits

Author SHA1 Message Date
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
Darrell Wright 53629fa30c No longer hardwiring subfolders of test
Hid build errors on should fail tests
2017-11-27 10:20:14 -05:00
Darrell Wright 98ae1e5241 part 1 of merge request 2017-11-26 23:09:46 -05:00
Darrell Wright 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
Darrell Wright 080df4988f excluded testit from Windows 2017-11-26 16:56:41 -05:00
Darrell Wright 1f27fb7d42 Cannot set USE_OS_TZDB=1 on Windows 2017-11-26 16:56:41 -05:00
Darrell Wright 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
Darrell Wright 3a33cdca7d Fixed WORKING_DIR path on testit target to use project root as base 2017-11-26 16:56:41 -05:00
Darrell Wright 3c4f0b5ada Changed testing approach and added gitignore 2017-11-26 16:56:41 -05:00
Darrell Wright c0a3e528a3 Typo 2017-11-26 16:56:41 -05:00