Azure / azure-sdk-for-cpp

This repository is for active development of the Azure SDK for C++. For consumers of the SDK we recommend visiting our versioned developer docs at https://azure.github.io/azure-sdk-for-cpp.
MIT License
181 stars 126 forks source link

Unless necessary for a particular workflow, there should be only one CMakeSettings.json file in the repo (at the root) #4253

Closed ahsonkhan closed 3 months ago

ahsonkhan commented 1 year ago

@gearama Why do we have a CMakeSettings.json in azure-security-keyvault-securities, when no other library/directory, other than the root, required one? Can we remove it? https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/keyvault/azure-security-keyvault-certificates/CMakeSettings.json

Was this an accidental inclusion as part of this PR? https://github.com/Azure/azure-sdk-for-cpp/pull/3180#discussion_r770992447

We already have a CMakeSettings.json at the root of the repo which gets used when the repo is opened within VS.

Here's the diff between the two files: https://www.diffchecker.com/vOAb8ird/

The file contents seem identical to the one in the root (looks like it was copy/pasted), given at the time it was checked-in: https://github.com/Azure/azure-sdk-for-cpp/blob/c0aad414d55d31585381fd001e95b24bf1b072f6/CMakeSettings.json

cc @vhvb1989

antkmsft commented 1 year ago

I think we casually checked in CMakeSettings.json SDK developer convenience. But strictly speaking, it shouldn't be checked in at all, IDE+CMake would generate it.

On the other hand, if we have it checked in, but we also want to support the scenario that you can open any SDK directory individually and not the entire repo, then library directory becomes "root" directory, and therefore CMakeSettings.json get created there.

gearama commented 3 months ago

this is not the case anymore, E:\src\azure-sdk-for-cpp\sdk>dir /s CMakeSettings.json Volume in drive E is devDrive Volume Serial Number is 6A65-DE64 File Not Found