diff options
author | Martin Michlmayr <tbm@cyrius.com> | 2019-02-05 08:27:25 -0500 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2019-02-05 08:27:25 -0500 |
commit | 0bbb976ee3064ff59b319e30fd97e31020259760 (patch) | |
tree | 5d13986511c18d911b0d1b2dc498b0f81d3a3b0e /src/CMakeLists.txt | |
parent | 9de94d4adb7a566af38814f9d37e26c559b68b4f (diff) | |
parent | 7a5871d3b53e66ee261bea4b41512e99269b18b1 (diff) | |
download | fork-ledger-0bbb976ee3064ff59b319e30fd97e31020259760.tar.gz fork-ledger-0bbb976ee3064ff59b319e30fd97e31020259760.tar.bz2 fork-ledger-0bbb976ee3064ff59b319e30fd97e31020259760.zip |
Merge branch 'next' into release/3.1.2
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 71d9478a..9b39ea94 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,11 +133,18 @@ 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\\+\\+") + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") add_definitions( # -Weverything # -Wno-disabled-macro-expansion @@ -193,7 +199,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug") DEPENDS ${_header_filename}) endmacro(ADD_PCH_RULE _header_filename _src_list _other_srcs) - elseif (CMAKE_CXX_COMPILER MATCHES "g\\+\\+") + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(GXX_WARNING_FLAGS -pedantic -Wall @@ -261,7 +267,9 @@ else() endmacro(ADD_PCH_RULE _header_filename _src_list _other_srcs) endif() -add_pch_rule(${PROJECT_BINARY_DIR}/system.hh LEDGER_SOURCES LEDGER_CLI_SOURCES) +if(PRECOMPILE_SYSTEM_HH) + add_pch_rule(${PROJECT_BINARY_DIR}/system.hh LEDGER_SOURCES LEDGER_CLI_SOURCES) +endif() include(GNUInstallDirs) |