[Cmake] FIND_FILE

Peter Vanroose Peter . Vanroose at esat . kuleuven . ac . be
Wed, 25 Jun 2003 15:12:15 +0200 (CEST)


> 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})

Since the file containing "INCLUDE_DIRECTORY(.)" is in directory
${CMAKE_CURRENT_SOURCE_DIR} , I would never translate that to
${CMAKE_CURRENT_BINARY_DIR}.
"." means "The directory where I am", where "I" refers to the one speaking,
in this case the CMakeLists.txt file.


> 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.

No, indeed.  It probably makes little sense to pass "." to
INCLUDE_DIRECTORIES (although it could), but it could make a lot of sense
to e.g. pass it to ADD_TEST, i.e., as command line argument to executables.
Or as part of the argument of an INCLUDE.


--	Peter.