Re: [cmake-developers] Automatic project generation with Visual Studio generators
On 09/14/2016 11:25 AM, Yves Frederix wrote: > replace it by sequentially running two almost identical msbuild > commands: first targeting ZERO_CHECK and then targeting whatever > target the user requested, picking up any changes to the project > files. For `cmake --build` we already need to detect the generator used for the build tree in order to ask it to construct the appropriate command line. For the VS generator we could directly run the same check that ZERO_CHECK would run in order to decide whether to regen the build files first. That would avoid going through msbuild for this step altogether. -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Automatic project generation with Visual Studio generators
Hi Brad, > For `cmake --build` we already need to detect the generator used > for the build tree in order to ask it to construct the appropriate > command line. For the VS generator we could directly run the same > check that ZERO_CHECK would run in order to decide whether to regen > the build files first. That would avoid going through msbuild for > this step altogether. Thanks for your answer. So if I understand correctly, you would avoid msbuild using msbuild for the up-to-date check and instead call something like (taken from ZERO_CHECK.vcxproj): cmake -H... -B.. --check-stamp-list CMakeFiles/generate.stamp.list This would work, but it would make all builds using 'cmake --build' more verbose as before actually starting the msbuild-build, this would always print an often large number of lines like: CMake does not need to re-run because .../CMakeFiles/generate.stamp is up-to-date. When using msbuild to build the zero_check target, you avoid this somehow as you make use of the dependency tracking offered by msbuild. I don't have a strong opinion on whether to use 'cmake -H -B...' or msbuild, but I would like to avoid cluttering normal build output with this information. Assuming we do not want to call msbuild, an option would be to remove the print statement if a stamp file is up to date? Or alternatively I could add an option '--verbose|-V' to cmake that would control whether to print them? Regards, Yves -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Automatic project generation with Visual Studio generators
On 09/16/2016 03:37 AM, Yves Frederix wrote: > This would work, but it would make all builds using 'cmake --build' > more verbose as before actually starting the msbuild-build, this would > always print an often large number of lines like: > > CMake does not need to re-run because .../CMakeFiles/generate.stamp > is up-to-date. [snip] > Or alternatively I could add an option '--verbose|-V' to cmake that > would control whether to print them? We don't need to invoke the `--check-stamp-list` command by executing another process. The `cmake --build` process can just invoke the same APIs internally, and with options to be quiet. After regeneration is complete (or not done) then it can run the normal build command. -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Automatic project generation with Visual Studio generators
Hi Brad, I finally got to creating a pull request for this, see https://gitlab.kitware.com/cmake/cmake/merge_requests/262. Regards, Yves On Fri, Sep 16, 2016 at 2:38 PM, Brad King wrote: > On 09/16/2016 03:37 AM, Yves Frederix wrote: >> This would work, but it would make all builds using 'cmake --build' >> more verbose as before actually starting the msbuild-build, this would >> always print an often large number of lines like: >> >> CMake does not need to re-run because .../CMakeFiles/generate.stamp >> is up-to-date. > [snip] >> Or alternatively I could add an option '--verbose|-V' to cmake that >> would control whether to print them? > > We don't need to invoke the `--check-stamp-list` command by executing > another process. The `cmake --build` process can just invoke the same > APIs internally, and with options to be quiet. After regeneration is > complete (or not done) then it can run the normal build command. > > -Brad > -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers