Edit : PREDEFINED_TARGETS_FOLDER
at the CMake code, I was sure that you can set PREDEFINED_TARGETS_FOLDER
to ""
. I tested it with both CMake 3.3.2 and VS2015 using
set_property(GLOBAL PROPERTY USE_FOLDERS ON) set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "")
predefined goals are again at the root level.
And yes, if the global property is USE_FOLDERS
, if it is ON
, then the predefined goals are rigidly bound to always be grouped into PREDEFINED_TARGETS_FOLDER
. Thus, setting the FOLDER
property, for example. INSTALL
will not help.
See cmGlobalVisualStudioGenerator.cxx
a reference, where this behavior has been explicitly deactivated for the purpose of ALL_BUILD
:
#if 0 // Can't activate this code because we want ALL_BUILD // selected as the default "startup project" when first // opened in Visual Studio... And if it nested in a // folder, then that doesn't happen. // // Organize in the "predefined targets" folder: // if (this->UseFolderProperty()) { allBuild->SetProperty("FOLDER", this->GetPredefinedTargetsFolder()); }
source share