diff options
author | John Wiegley <johnw@newartisans.com> | 2019-01-25 15:48:39 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-25 15:48:39 -0800 |
commit | 7f8f3275ad251d805eaeda379b7dda7291167243 (patch) | |
tree | 73d600e971695b4b08ce02d9302ae03c3b1922e8 /src/CMakeLists.txt | |
parent | 644db80fd377a4ee05bc2d6385b99ab152c13958 (diff) | |
parent | 347029a803475c21bf9fa508f27b0ed7233ff312 (diff) | |
download | fork-ledger-7f8f3275ad251d805eaeda379b7dda7291167243.tar.gz fork-ledger-7f8f3275ad251d805eaeda379b7dda7291167243.tar.bz2 fork-ledger-7f8f3275ad251d805eaeda379b7dda7291167243.zip |
Merge pull request #1726 from scfc/compile-strptime-only-on-windows
Compile strptime.cc only on Windows
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 71d9478a..9cd54dbe 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -52,7 +52,6 @@ set(LEDGER_SOURCES times.cc error.cc utils.cc - strptime.cc wcwidth.cc) if (HAVE_BOOST_PYTHON) @@ -134,9 +133,16 @@ set(LEDGER_INCLUDES value.h views.h xact.h - strptime.h ${PROJECT_BINARY_DIR}/system.hh) +# Windows provides no strptime(), so supply our own. +if (WIN32 OR CYGWIN) + list(APPEND LEDGER_INCLUDES + strptime.h) + list(APPEND LEDGER_SOURCES + strptime.cc) +endif() + if (CMAKE_BUILD_TYPE STREQUAL "Debug") if (CMAKE_CXX_COMPILER MATCHES "clang\\+\\+") add_definitions( |