[Cmake] FIND_FILE

Andy Cedilnik andy . cedilnik at kitware . com
25 Jun 2003 09:05:01 -0400


Hi Peter,

Ok, so let say I say:
INCLUDE_DIRECTORY(.)

Without thinking too hard about it, I would say, pass -I. to compiler.
But, what does that mean. It is equivalent to:

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})

But is it?

How about Visual Studio? There all object files are in subdirectory
(Debug, Release), which means that . does not mean
${CMAKE_CURRENT_BINARY_DIR}, but
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}.

So, that is not good.

So you are saying it should be CMAKE_CURRENT_SOURCE_DIR? Then it does
not make sense. I mean you will not pass . to the compiler. You will
pass something else. Should LINK_DIRECTORIES also do this? But libraries
should not be in the source tree. 

You see the confusion?

			Andy

On Wed, 2003-06-25 at 08:32, Peter Vanroose wrote:
> All right, I didn't know about those.  Thanks!
> 
> But anyhow, people will probably keep trying to use relative paths
> (especially "current dir") where they will expect this to be
> interpreted as CMAKE_CURRENT_SOURCE_DIR, so why not prefixing
> CMAKE_CURRENT_SOURCE_DIR to all relative paths specified in a
> CMakeLists.txt file?