[CMake] INCLUDE_DIRECTORIES and UNIX style separated environment variables

Bill Hoffman bill.hoffman at kitware.com
Thu Sep 20 15:00:11 EDT 2007


BlinkEye wrote:
>
>>
>>     
> Thanks for the reply, but this doesn't work neither.
>
> I wonder if I'm the only one who ran into what appears to be a very basic issue.
>   
Basically, you are using cmake incorrectly.  You should not be using 
environment variables in a cmake
project directly.  You should only use them for place for FIND_* to look 
for things.   You should
not depend on having the environment set before running cmake.  You are 
asking for trouble with
builds.   For example:

1/ setenv .... ; cmake ;   make
2  cvs update
3 start a new shell and forget the setenv
4. make  (this runs cmake because a file changed in the cvs update) , it 
creates new makefiles that
don't work.

CMake should be used to cache variables that store locations of include 
and library paths that
were discovered by cmake.

-Bill



More information about the CMake mailing list