Skip to content
Snippets Groups Projects
  1. Feb 23, 2016
  2. Feb 20, 2016
  3. Feb 19, 2016
  4. Feb 17, 2016
    • Steffen Müthing's avatar
      Merge branch 'feature/cmake-rewrite-c++-standard-detection' into 'master' · c293cf77
      Steffen Müthing authored
      
      [CMake] Rewrite C++ standard detection
      
      This is a complete rewrite of the existing C++ standard version test
      that tries the various `-std=c++xy` flags and tries to figure out which
      version of the standard to enable.
      
      The existing version has a few problems:
      
      - it is not really extensible to newer standards, those will just lead
      to a deeper and deeper nesting of `if` statements.
      
      - More importantly, there is no way to say: I want C++11, but not C++14
        (or, in the future, I want C++14, but not C++17). Being able to do so
        is important for testing and compatibility reason.
      
      - There is no easy way for downstream modules to require a newer version
        of the standard than the core modules.
      
      The new version of the test separates the logic from the data (versions,
      flag names, compiler test sources) and just iterates over lists of that
      data, in descending order to make sure the newest available standard
      gets picked. The numerical value of that standard is stored in the
      variable `CXX_MAX_SUPPORTED_STANDARD` and the test stops. If the test
      fails to find a working combination, it issues a warning to the user and
      only records support for C++03.
      
      The test can be influenced by two CMake variables:
      
      - `DISABLE_CXX_VERSION_CHECK` already existed in the old version of the
        test. It completely disables all testing and requires the user to
        manually set `CXX_MAX_SUPPORTED_STANDARD` to the correct value.
        Moreover, any required compiler command line switches have to be
        manually added to `CMAKE_CXX_FLAGS`.
      
      - `CXX_MAX_STANDARD` defines the maximum version of the standard that
        the build system will try to enable. With this new switch, it becomes
        possible to limit the compiler to an older version of the standard
        than what it could theoretically support. For now, this defaults to
        C++14.
      
      In order to allow module authors to easily state their minimum version
      requirements, there is a new CMake function
      `dune_require_cxx_standard()` that any Dune module can call to require
      support for at least a given C++ standard:
      
      ```
      dune_require_cxx_standard(MODULE "dune-functions" VERSION 14)
      ```
      
      If the compiler doesn't meet the requirements, the function will report
      the required and the actually available standard versions and abort with
      a fatal error.
      
      Moreover, it knows about CXX_MAX_STANDARD and will tell the user if the
      value of that variable is below the requirements. This avoids desperate
      users that have a shiny beta of GCC 6 with C++17 support wondering why
      their own module using shiny C++17 concepts stubbornly fails to build...
      
      This fixes #16, and a backport to 2.4 will also be a fix for #15.
      
      See merge request !46
      (cherry picked from commit 31252385)
      
      Signed-off-by: default avatarSteffen Müthing <muething@dune-project.org>
      c293cf77
  5. Feb 16, 2016
  6. Feb 15, 2016
  7. Feb 14, 2016
    • Steffen Müthing's avatar
      Merge branch 'feature/backport-suitesparse-test' into 'releases/2.4' · 2a2c8337
      Steffen Müthing authored
      Backport suitesparse test to 2.4
      
      This is a straightforward backport of the new SuiteSparse test from
      master by simply cherry-picking all commits that touched either
      `FindSuiteSparse.cmake` or `FindUMFPack.cmake`. On top of that, I
      removed the deprecation warning from the old UMFPack test and extended
      it to automatically populate `SuiteSparse_ROOT` from `UMFPACK_ROOT` if
      only the latter is set.
      
      This fixes #14 
      
      See merge request !40
      2a2c8337
  8. Feb 09, 2016
  9. Feb 08, 2016
  10. Feb 05, 2016
Loading