From d7ef9cd2ba32ab0fd7a39a1c0dac70352bc8b700 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Wed, 16 Mar 2022 12:29:42 +0000 Subject: [PATCH] Make it easier to follow cmake/README.md instructions When following the instructions directly (for developing on Windows) we should end up with a generator that's easy to run for csharp/generate_protos.sh, and we shouldn't end up trying to stage the build output. --- .gitignore | 4 ++++ csharp/generate_protos.sh | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8afb522dae..8b764964d4 100644 --- a/.gitignore +++ b/.gitignore @@ -89,6 +89,10 @@ java/**/*.iml # Windows native output. cmake/build build_msvc +# Directories suggested by cmake/README.md +/debug/ +/solution/ +/release/ # NuGet packages: we want the repository configuration, but not the # packages themselves. diff --git a/csharp/generate_protos.sh b/csharp/generate_protos.sh index b663138d10..b021de2aca 100755 --- a/csharp/generate_protos.sh +++ b/csharp/generate_protos.sh @@ -13,7 +13,9 @@ pushd $(dirname $0)/.. # Windows and Unix. if [ -z "$PROTOC" ]; then # TODO(jonskeet): Use an array and a for loop instead? - if [ -x cmake/build/Debug/protoc.exe ]; then + if [ -x solution/Debug/protoc.exe ]; then + PROTOC=solution/Debug/protoc.exe + elif [ -x cmake/build/Debug/protoc.exe ]; then PROTOC=cmake/build/Debug/protoc.exe elif [ -x cmake/build/Release/protoc.exe ]; then PROTOC=cmake/build/Release/protoc.exe