Skip to content

Instantly share code, notes, and snippets.

@Pikachuxxxx
Last active February 2, 2021 15:04
Show Gist options
  • Save Pikachuxxxx/31a4f26ff52017f8df08b8090dfb6706 to your computer and use it in GitHub Desktop.
Save Pikachuxxxx/31a4f26ff52017f8df08b8090dfb6706 to your computer and use it in GitHub Desktop.
How auto-place the ALL_BUILD and ZERO_CHECK and INSTALL projects from CMake into a Visual Studio filter

For anyone else curious I found the answer.

In the CMakeLists.txt add the following commands:

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(PREDEFINED_TARGETS_FOLDER "CustomTargets")

Now the ALL_BUILD, ZERO_CHECK, and even INSTALL projects will all be placed in a Visual Studio Filter called CMakePredefinedTargets

You can assign your name to this folder with:

set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "_CMakePredefinedTargets")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment