On Tue, Dec 23, 2008 at 10:23 AM, Bill Hoffman <span dir="ltr"><<a href="mailto:bill.hoffman@kitware.com">bill.hoffman@kitware.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Robert Dailey wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Why I need this feature is irrelevant, the important thing is that I need the feature. I know a couple of other people who've posted on various other mailing lists that have asked for this as well.<br>
<br>
However, if you must know, I need this mainly because of wxWidgets. wxWidgets has a setup.h file that is located in a directory specific to the configuration in which wxWidgets was built. For the respective configuration, I need to tell the compiler to use a different setup.h, which means I need to specify a different include directory per configuration. There's other ways to solve this problem other than using include directories, but this is the most trivial and simplified way.<br>
<br>
</blockquote>
<br></div>
I still don't see why CMAKE_CFG_INTDIR would not work???<br>
<br>
I just tried this:<br>
<br>
project(foo)<br>
cmake_minimum_required(VERSION 2.6)<br>
include_directories(${foo_SOURCE_DIR}/${CMAKE_CFG_INTDIR})<br>
add_library(foo foo.cxx)<br>
<br>
<br>
In VS, the build line is this:<br>
<br>
Command Lines Creating temporary file "c:\hoffman\foo\src\b\foo.dir\Debug\RSP00000336725368.rsp" with contents<br>
[<br>
/Od /I "C:\hoffman\foo\src\Debug" /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "CMAKE_INTDIR=\"Debug\"" /D "_MBCS" /FD /EHsc /RTC1 /MDd /Fo"foo.dir\Debug\\" /Fd"C:/hoffman/foo/src/b/Debug/foo.pdb" /W3 /c /Zi /TP /Zm1000<br>
<br>
..\foo.cxx<br>
]<br>
<br>
If I do the same project with Unix Makefiles I get this:<br>
<br>
[100%] Building CXX object CMakeFiles/foo.dir/foo.cxx.obj<br>
"C:/Program Files/Microsoft Visual Studio 9.0/VC/bin/cl.exe" /nologo /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 -IC:/hoffman/foo/src/. /TP /FoCMakeFiles/foo.dir/foo.cxx.obj /FdC:/hoffman/foo/src/b2/foo.pdb -c C:/hoffman/foo/src/foo.cxx<br>
foo.cxx<br>
<br>
<br>
So the -I will work for both VS IDE and Unix makefiles correctly.</blockquote></div><br>Hey, you're right! This would work, however I failed to appropriately describe the problem so I've mislead you. I do apologize for this. Basically, the include directories look like this:<br>
<br>For debug: C:\foo\bar-d<br>For release: C:\foo\bar<br><br>Note that the text "Debug" or "Release" is not used in the include path, so simply using CFG_INTDIR would not work I don't think (Unless I'm missing something again). This is why in CMake I need to do something like this:<br>
<br>if( debug )<br> include_directories( C:\foo\bar-d )<br>else()<br> include_directories( C:\foo\bar )<br>endif()<br><br>Thanks again to everyone for their continued help.<br>