Giter VIP home page Giter VIP logo

eaf's People

Contributors

cassioneri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jsacchini

eaf's Issues

need to specify C++14 even on UNIX

Two related problems actually:

  • setting CXX_STANDARD via GLOBAL PROPERTY doesn't seem to work on modern cmake versions(?)
  • the latest versions of Boost.Math warn about an impending shift to C++14, which breaks the compile due to -Werror:
#    warning "The minimum language standard to use Boost.Math will be C++14 starting in July 2023 (Boost 1.82 release)"

The easiest fix is to just consider C++14 the new minimum version everywhere, and specify it using the the CMAKE_CXX_STANDARD setting (see https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html) instead of via properties:

index 954c62e..9d6f4ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,12 +16,11 @@ project(EAF VERSION 1.0
   LANGUAGES CXX
 )
 
+set(CMAKE_CXX_STANDARD 14)
 if (MSVC)
-  set_property(GLOBAL PROPERTY CXX_STANDARD 14)
   string(REGEX REPLACE "/W[0-4]" "/W4 /WX" CMAKE_CXX_FLAGS
     "${CMAKE_CXX_FLAGS}")
 else()
-  set_property(GLOBAL PROPERTY CXX_STANDARD 11)
   add_compile_options(-Wall -Wextra -Wpedantic -Werror)
 endif()

I think the recommended way of tweaking it on "modern" cmake is via the target-specific "features", i.e. for each executable you'd have...

target_link_libraries(to_date benchmark benchmark_main)
target_compile_features(to_date PRIVATE cxx_std_14)

...but for this simple use-case probably just setting a global CMAKE_CXX_STANDARD is good enough.

make date structs comparabler

why don't you use uint32 or similar inthe struct and lay it out in little endian order (day, month, year) (eg, uint16, uint16, uint32 or uint8, uint8, uint16) then you can do a simple less/greater than to compare the dates?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.