set MSVC "Output Files -> Object File Name"

What is the property name for setting MSVC Output Files -> Object File Name ? I would like to handle the case where two files of different folders have the same file name. Does cmake offer something of this kind?

Where do I find a list of all available MSVC properties?

I don’t know if CMake has a property for that itself. The list of properties that CMake provides is here. VS_GLOBAL_<variable> may be of interest, but you’d need to know what Visual Studio calls the property you’re interested in.

Cc: @brad.king

CMake’s Visual Studio generator has no way to control the object file location. However, it has logic to automatically choose object file locations that do not conflict. See code here.

This CMake feature ( create non-conflicting OBJ locations) is creating some problems for us. It turns out that if .OBJ files are not being sent to the default $(IntDir) location , then the /MP switch ( parallel builds) gets disabled. At least with VS 2019/2017. Although technically the builds could process in parallel, the build process takes the conservative approach and compiles one file at a time. This is discussed here

CMake is also a bit too conservative, $(IntDir) is unique for each Configuration type( Debug/Release etc), yet CMake will create unique .OBJ outputs for files with the same name, even if only one file is not marked as “exclude from build” for the active configuration.

Why the hell woudn’t you allow me to set ANYTHING I want in MY project? just expose everything, I simply can’t configure my project using tool for CONFIGURING. What did I do to deserve this?