Skip to content
Snippets Groups Projects
  1. Sep 27, 2016
    • Jö Fahlke's avatar
      [cmake][Vc] Use the HAVE/ENABLE trick for Vc. · 53ee4035
      Jö Fahlke authored
      This solves a problem that is introduced by unconditionally setting
      `HAVE_VC=1` in config.h:
      
      If a compilation unit is compiled without the `-fabi-version=6` or similar
      then the compilers vector types (which are used by Vc under the hood if
      available) will mangle to the same string, irrespective of the number of lanes
      they actually use.  This makes certain overloaded function definitions in the
      Vc headers clash, since their only difference is whether they apply to
      e.g. AVX types (4 lanes) or SSE types (2 lanes).
      
      This is normally not a problem, since any program that uses Vc needs to have a
      call to `add_dune_vc_flags()` in `CMakeLists.txt`.  However, since I now want
      to put support for vectorized types into the `fmatrix.hh`, any compilation
      unit that uses a `FieldMatrix` will automatically include the Vc headers
      because `config.h` unconditionally sets `HAVE_VC=1`.
      
      Using the HAVE/ENABLE-trick makes sure that the value of `HAVE_VC` is in sync
      with the compilation flags.
      
      Note: I tried using `COMPILE_DEFINITION` for `ENABLE_VC=1` in
            `dune_register_package_flags()`, but that will always add
            `-DENABLE_VC=1` to the compiler command line, even when
            `add_dune_vc_flags()` hasn't been called for that target, and
            `dune_enable_all_packages()` isn't in use.  Using `COMPILE_OPTIONS`
            instead seems inappropriate, but does work.
      53ee4035
  2. Aug 04, 2016
  3. Aug 02, 2016
  4. Jul 30, 2016
  5. Jul 29, 2016
    • Ansgar Burchardt's avatar
      add_dune_test: Handle complex expressions in `CMAKE_GUARD` · 80023ad9
      Ansgar Burchardt authored
      The check `if(NOT ${condition})` does not behave as expected when
      `condition` is a complex string expression such as `A OR B`. It does
      however work when `condition` is a list.
      
      Therefore convert `condition` to a list by calling `separate_arguments`.
      
      Note that this change also adds missing parenthesis around `condition`
      which also results in wrong results for complex expressions.
      
      Closes issue #39.
      80023ad9
  6. Jul 26, 2016
  7. Jul 25, 2016
  8. Jul 22, 2016
    • Dominic Kempf's avatar
      Merge branch 'feature/improved-cmake-test-skipping' into 'master' · 491f4cae
      Dominic Kempf authored
      Feature/improved cmake test skipping
      
      #28 did not get much attention by fellow developers, so I hope this implementation
      will draw some attention...
      
      This MR adds a CMAKE_GUARD option to dune_add_test
      
      A list of conditions can be passed to the argument. CMake
      will evaluate these conditions, and if one of them does not
      evaluate to TRUE, the test sources will be replaced by a dummy
      source, that returns 77.
      
      This option should be used instead of guarding the call to
      dune_add_test with a cmake if-clause. The idea behind it is
      to always give the user an idea of which tests are available,
      but have not been run on his system.
      
      
      Furthermore, the MR makes SKIP_ON_77 enabled by default, no need
      to specify it manually anymore.
      
      
      See merge request !100
      491f4cae
  9. Jul 16, 2016
  10. Jul 13, 2016
  11. Jul 12, 2016
  12. Jul 11, 2016
Loading