← Back to team overview

yade-dev team mailing list archive

Compiling Yade with Clang

 

Dear all,

Yade can now be compiled by an alternative CLANG-compiler. About 2
years ago we have tried already to do it [1], but at that time this compiler
was "young" and not enough good.

Some of Debian-developers are working on a project of recompiling the
whole archive by this compiler [2].

Now you can try to use clang by setting up the environmental variables
before running cmake, like described in documentation [3].

  export CC=/usr/bin/clang
  export CXX=/usr/bin/clang++
  cmake ...

Be sure, you have installed corresponding clang and LLVM packages installed
before you do it.

The negative sides of clang regarding Yade:
  1) no OpenMP support. There are some starting projects, but still not
      available working code.
  2) CGAL-feature is not compilable at the moment due to some errors
      in CGAL-headers, found by clang (should be fixed soon, I hope).

Positive sides:
  1) I have found some slight performance-increase in about 1..7%
  2) LLVM produces additional warnings and errors during compilation
      process, so it should improve Yade's code quality.

If you find it interesting and useful, feel free to try it. Be sure you have
the new versions of clang, llvm and boost.

Cheers,

Anton

[1] http://www.mail-archive.com/yade-dev@xxxxxxxxxxxxxxxxxxx/msg05005.html
[2] http://www.phoronix.com/scan.php?page=news_item&px=MTA2NjQ
[3] https://yade-dem.org/doc/installation.html#compilation


Follow ups