← Back to team overview

yade-dev team mailing list archive

Re: [Bug 1160959] [NEW] evironment variables are not collected by cmake

 

Hi,

I am not sure, whether it is a bug. Cmake has some environment
variables which effect its behavior [1], but it is not a common practice
for cmake-scripts to consider env-variables. We do it only for build-flags.

We, actually, did the same on cluster, compiling Yade adding -DVARIABLES
explicitly. One more option is to set CMAKE_INCLUDE_PATH  and
CMAKE_LIBRARY_PATH and then cmake should look for those libs in
pre-defined paths.

[1]
http://www.cmake.org/Wiki/CMake_Useful_Variables#Environment_Variables

Cheers,

Anton

-- 
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1160959

Title:
  evironment variables are not collected by cmake

Status in Yet Another Dynamic Engine:
  New

Bug description:
  Dear All,

  I'm currently trying to install yade on a cluster. On this machine all
  software is handled through environment modules (see "apt-cache show
  ennvironment-modules"). Therefore I compiled all dependencies of yade
  by hand and put them in such an env-module. To the corressponding
  module I put alle the Variables that cmake is going to interpret when
  building Yade. Unfortunately these four variables are not gathered
  from the users environment:

  LOKI_INCLUDE_DIR=/shared/apps/loki/0.1.7/include
  LOKI_LIBRARY=/shared/apps/loki/0.1.7/lib
  EIGEN3_INCLUDE_DIR=/shared/apps/eigen/3.1.2/include/eigen3
  PYTHON_INCLUDE_DIR=/shared/apps/python/2.6.8/include/python2.6

  If I put these variables in the cmake command with the "-D" option,
  everything works like a charm:

  cmake -DEIGEN3_INCLUDE_DIR=/shared/apps/eigen/3.1.2/include/eigen3
  -DLOKI_INCLUDE_DIR=/shared/apps/loki/0.1.7/include
  -DLOKI_LIBRARY=/shared/apps/loki/0.1.7/lib
  -DPYTHON_INCLUDE_DIR=/shared/apps/python/2.6.8/include/python2.6/
  -DINSTALL_PREFIX=/$HOME/yade/ /$HOME/trunk/

  Is it possible gather these variables from the environment?

To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/1160959/+subscriptions


References