Thinking about this some more, I suspect Petr's comments may be on the
right track. What matters is the value of this variable in the scope of the
*directory* being processed. You need the CMAKE_INCLUDE_CURRENT_DIR
variable to be set in that directory scope, if I'm understanding the docs
Hi Tiago.
Yes, Craig's original comment applies. Targets do not have scope, variables
do. Because you're in a function, you'd need to set the variable using
PARENT_SCOPE to have it apply outside the function:
function(AddTest)
#...
set(CMAKE_INCLUDE_CURRENT_DIR ON PARENT_SCOPE)
#...
Are you sure what you want isn't to specify INTERFACE header directories on
whatever is being passed in as the ${TEST_LIBRARIES} libraries? If the
requirement to have the parent directory's source/binary dirs added to the
header search path is coming from those instead of the test's own
Hi Craig,
Maybe my problem description was lacking. Below is the function I have.
Both CMAKE_INCLUDE_CURRENT_DIR and the target are defined on the same
function scope, but this does not seem to work. I need to define
CMAKE_INCLUDE_CURRENT_DIR on the parent CMakeLists file.
function(AddTest)
function() introduces a new scope, so if you want changes you make to
variables inside the function to be visible outside the function, you need
to use set(... PARENT_SCOPE). Alternatively, a macro() does not introduce a
new scope, so replacing your function() with a macro() may also yield the
On Tuesday 20 March 2007 21:45:15 Brandon J. Van Every wrote:
Feel free to improve the docs if you have better wordsmithing. It is a
wiki, after all. I haven't had time + brain cells, and I'm no more
responsible for the maintenance of the docs than you or anyone else. I
just try to improve
On Tuesday 20 March 2007 07:07:35 Kishore, Jonnalagadda (IE10) wrote:
Kishore, Jonnalagadda (IE10) wrote:
This is now a little confusing especially, when the description says
automatically add CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR
to the include directories _in every
On Tuesday 20 March 2007 07:07:35 Kishore, Jonnalagadda (IE10) wrote:
Kishore, Jonnalagadda (IE10) wrote:
This is now a little confusing especially, when the description says
automatically add CMAKE_CURRENT_SOURCE_DIR and
CMAKE_CURRENT_BINARY_DIR
to the include directories _in every
On Tuesday 20 March 2007 10:00:58 Kishore, Jonnalagadda (IE10) wrote:
So by that you mean that every folder where a CMakeLists.txt is
processed, includes itself in the search path but not the other folders
where the other CMakeLists.txt were processed!?
That's my understanding, yes.
I will
Pascal Fleury wrote:
So it will in effect automatically add the current source dir and current
binary dir to the include directories in every directory as the doc says.
However, the *current* directory has a different value when cmake is
processing project/src/CMakeLists.txt than when
Thanks for your reply. I did read the wiki that basically said the
same
thing.
That's 'cuz I wrote it after it was posted here. :-)
That's funny! I am pretty sure I thought of using it after reading about
it on one of the pages... ;-)
I just checked again and confirm that the
Kishore, Jonnalagadda (IE10) wrote:
I just checked again and confirm that the information was already there under the section
Various Options
http://www.cmake.org/Wiki/CMake_Useful_Variables#Various_Options
Now it is also added under Environment Variables
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Filipe Sousa
Sent: Friday, March 16, 2007 2:33 AM
To: cmake@cmake.org
Subject: Re: [CMake] CMAKE_INCLUDE_CURRENT_DIR?
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Kishore, Jonnalagadda (IE10
Kishore, Jonnalagadda (IE10) wrote:
-Original Message-
CMAKE_INCLUDE_CURRENT_DIR is the same as
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}) for all targets.
If you have a project that constantly needs to add the current source
directory and the
On Friday 16 Mar 2007 IST, Brandon J. Van Every wrote:
Kishore, Jonnalagadda (IE10) wrote:
-Original Message-
CMAKE_INCLUDE_CURRENT_DIR is the same as
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}) for all targets.
If you have a project
kitts wrote:
But then, despite setting the value I had to put in
INCLUDE_DIRECTORIES(.)
And I was brief because I don't know if there any caveats on how it can
be used. Maybe you found a bug. Maybe the behavior isn't consistent
across generators. Maybe the value isn't propagated
On Friday 16 March 2007 17:56:46 Brandon J. Van Every wrote:
Kishore, Jonnalagadda (IE10) wrote:
But then, despite setting the value I had to put in
INCLUDE_DIRECTORIES(.)
And I was brief because I don't know if there any caveats on how it can
be used. Maybe you found a bug. Maybe the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Kishore, Jonnalagadda (IE10) wrote:
Can someone explain to me the use of CMAKE_INCLUDE_CURRENT_DIR?
In the root CMakeLists.txt file of my project I tried setting the
variable to ON (tried 1 as well) with:
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
Filipe Sousa wrote:
CMAKE_INCLUDE_CURRENT_DIR is the same as
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}) for all targets.
When explaining a variable, it's good to put it on the wiki. I did it
this time.
Brandon J. Van Every wrote:
When explaining a variable, it's good to put it on the wiki. I did it
this time.
http://www.cmake.org/Wiki/CMake_Useful_Variables#Environment_Variables
Cheers,
Brandon Van Every
Thanks Brandon!
I'm not good at writing documentation and my poor english is as
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Brandon J. Van Every wrote:
When explaining a variable, it's good to put it on the wiki. I did it
this time.
http://www.cmake.org/Wiki/CMake_Useful_Variables#Environment_Variables
Cheers,
Brandon Van Every
Thanks Brandon!
I'm not good at
Alexander Neundorf wrote:
Von: Brad King [EMAIL PROTECTED]
The idea of that option was to make *double-quote* includes look the
same for in-source and out-of-source builds. For angle-bracket
includes only the explicitly given include path should be used.
Note in your example that running
Von: Brad King [EMAIL PROTECTED]
Alexander Neundorf wrote:
Hi,
in cmLocalGenerator.cxx there's the following code:
if(!inSource this-Makefile-IsOn(CMAKE_INCLUDE_CURRENT_DIR))
{
includeSourceDir = true;
includeBinaryDir = true;
}
Why is
23 matches
Mail list logo