I apologize, but I don't see how this could possibly work for visual studio output. It seems like you'd have 1 set of visual studio projects for debug and one set for release. You don't know if the build type is debug or release in CMake because the configuration is "dynamically chosen", which basically means the user chooses the configuration *after* the CMake targets have been generated.<br>
<br>Either I'm misunderstanding something or this won't work. I'll test it out later on to see for myself, I'm just expressing my lack of confidence in this. I do apologize if I have not appropriately explained the problem.<br>
<br>Thanks for your help! I'll get back with you on the results of this.<br><br><div class="gmail_quote">On Mon, Dec 22, 2008 at 4:11 AM, Andrey Sploshnov <span dir="ltr"><<a href="mailto:ice.nightcrawler@gmail.com">ice.nightcrawler@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><p>Sorry, I was mistaken. I meant CMAKE_BUILD_TYPE variable. You can find a description here:</p>
<p><a href="http://www.vtk.org/Wiki/CMake_Useful_Variables" target="_blank">http://www.vtk.org/Wiki/CMake_Useful_Variables</a><br></p><p>In my example (if you change CMAKE_BUILD_STATUS with CMAKE_BUILD_TYPE, of cause), CMake adds an appropriate include path for the corresponding configuration. Configuration is selected by mean of CMAKE_BUILD_TYPE variable at generation phase.</p>
<p>For example:</p><p>cmake -G "Visual Studio 8" -DCMAKE_BUILD_TYPE=Debug c:\myproject</p><p></p><p>Or you can add the following snippet to set the build type by default:</p><p>if (NOT CMAKE_BUILD_TYPE)</p><p> set (CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of the build, options are: None Debug Release")</p>
<p>endif (NOT CMAKE_BUILD_TYPE)</p><div><div></div><div class="Wj3C7c"><br><div class="gmail_quote">On Mon, Dec 22, 2008 at 3:45 AM, Robert Dailey <span dir="ltr"><<a href="mailto:rcdailey@gmail.com" target="_blank">rcdailey@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Will this work in Visual Studio? How does CMake know to place the appropriate include directories in the appropriate configuration?<br><br>I also was not able to find CMAKE_BUILD_STATUS in the 2.6 documentation. Where can I read about this variable?<div>
<div><br>
<br>On Sun, Dec 21, 2008 at 1:49 PM, Andrey Sploshnov <span dir="ltr"><<a href="mailto:ice.nightcrawler@gmail.com" target="_blank">ice.nightcrawler@gmail.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;">
<p>May be you need something like this?</p><p>include_directories (C:\includes\foo\all)</p><p>if (CMAKE_BUILD_STATUS STREQUAL "Debug")</p><p> include_directories (C:\includes\foo\debug)</p><p>elseif (CMAKE_BUILD_STATUS STREQUAL "Release")</p>
<p> include_directories (C:\includes\foo\release)</p><p>endif (CMAKE_BUILD_STATUS STREQUAL "Debug")</p><br><div class="gmail_quote"><div><div>On Thu, Dec 18, 2008 at 11:13 PM, Robert Dailey <span dir="ltr"><<a href="mailto:rcdailey@gmail.com" target="_blank">rcdailey@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div>Would it be possible to add configuration support to include_directories()? For example, some include directories I only want to show up in debug, some in release, and some in all configurations. I imagine this would look a lot like target_link_libraries():<br>
<br><span style="font-family: courier new,monospace;">include_directories(<br> C:\includes\foo\all # This include path applies to all configurations<br style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"> debug C:\includes\foo\debug # This include path only shows up in debug configurations</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> release C:\includes\foo\release # This include path only shows up in release configurations<br>)<br></span>
<br></div></div>_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org" target="_blank">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br>No fate, but what we make!<br>
</font><br>_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org" target="_blank">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>No fate, but what we make!<br>
</div></div><br>_______________________________________________<br>
CMake mailing list<br>
<a href="mailto:CMake@cmake.org">CMake@cmake.org</a><br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br>