<div dir="ltr">Thank you for your answer, I didn't know the 

CMAKE_CFG_INTDIR variable. It was this variable I needed.<div><br></div><div>Best regards,</div><div><br></div><div>Romain</div></div><br><div class="gmail_quote"><div dir="ltr">Le jeu. 20 déc. 2018 à 12:44, Kai Wolf <<a href="mailto:kai.wolf@gmail.com">kai.wolf@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The CMAKE_BUILD_TYPE variable only makes sense for single-configuration generators (such as Makefile or Ninja) and is not used for IDE type generators.<br>
You should rather look for CMAKE_CONFIGURATION_TYPES as well as CMAKE_CFG_INTDIR.<br>
<br>
Greetings,<br>
<br>
Kai<br>
<br>
<a href="http://kai-wolf.me" rel="noreferrer" target="_blank">http://kai-wolf.me</a><br>
<a href="http://effective-cmake.com" rel="noreferrer" target="_blank">http://effective-cmake.com</a><br>
<br>
<br>
> Am 20.12.2018 um 12:09 schrieb Romain LEGUAY <<a href="mailto:romain.leguay@gmail.com" target="_blank">romain.leguay@gmail.com</a>>:<br>
> <br>
> Hello everyone,<br>
> <br>
> I'm trying to build VTK and ITK along my project.<br>
> <br>
> For now, I use the trick to add an option to build VTK and ITK only once using ExternalProject_Add for all my dependencies and also for my project.<br>
> <br>
> This works great on Unix system but with a VS solution, the dependencies are not rebuilt when I change CMAKE_BUILD_TYPE.<br>
> <br>
> Is it possible to know if CMAKE_BUILD_TYPE is changed? It will permit me to switch on the option to rebuild the dependencies.<br>
> <br>
> Anyone as other better ideas?<br>
> <br>
> Thank you<br>
> --<br>
> <br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
> <br>
> Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
> <br>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
> <br>
> CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
> <br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
> <br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
<br>
</blockquote></div>