From 8849fbbc8a5df67c1d5c154b2dbcf8370042dcb4 Mon Sep 17 00:00:00 2001
From: Olivier Hainque <hainque@adacore.com>
Date: Mon, 8 Oct 2018 09:01:08 +0200
Subject: [PATCH 1/7] Update .gitreview on the 19.0 branch

Part of RA05-019
---
 .gitreview | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitreview b/.gitreview
index a5d94509a..26b252334 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host = git.adacore.com
 port = 29418
 project = gnatcoverage
-defaultbranch = master
+defaultbranch = 19.0
 defaultremote = origin

From 2097d2df4ded4242dd8d4d3465e47ccf5c7c4cfd Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Wed, 17 Oct 2018 16:19:38 +0200
Subject: [PATCH 2/7] .gitreview: set gerrit.default_branch to 19.1 [RA15-037]

---
 .gitreview | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitreview b/.gitreview
index 26b252334..ce6c580ce 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host = git.adacore.com
 port = 29418
 project = gnatcoverage
-defaultbranch = 19.0
+	defaultbranch = 19.1
 defaultremote = origin

From 528328758a74ec7ea722eb06ed298a25773d9367 Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Wed, 7 Nov 2018 16:53:42 +0100
Subject: [PATCH 3/7] .gitreview/gerrit.defaultbranch: remove leading spaces

It confuses git-review.

TN: RA15-037
---
 .gitreview | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitreview b/.gitreview
index ce6c580ce..dbf6ec5d2 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host = git.adacore.com
 port = 29418
 project = gnatcoverage
-	defaultbranch = 19.1
+defaultbranch = 19.1
 defaultremote = origin

From 8aaa5c44feea79513ca39c239d88284d65762c94 Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Tue, 5 Feb 2019 07:32:23 +0400
Subject: [PATCH 4/7] .gitreview: set gerrit.defaultbranch to 19.2 [S204-010]

---
 .gitreview | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitreview b/.gitreview
index dbf6ec5d2..bace9351c 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host = git.adacore.com
 port = 29418
 project = gnatcoverage
-defaultbranch = 19.1
+defaultbranch = 19.2
 defaultremote = origin

From 6cd6e1c0c2e21909b795a2ce313fb8a35c23be6e Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Wed, 13 Nov 2019 06:54:31 -0800
Subject: [PATCH 5/7] .gitreview: set gerrit.defaultbranch to 19-sustained
 [SB13-017]

---
 .gitreview | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitreview b/.gitreview
index bace9351c..b19185f50 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,5 +2,5 @@
 host = git.adacore.com
 port = 29418
 project = gnatcoverage
-defaultbranch = 19.2
+defaultbranch = 19-sustained
 defaultremote = origin

From 2c99b226f2b683fd99abcf965f1605cb54e3fdea Mon Sep 17 00:00:00 2001
From: Liaiss Merzougue <merzougue@adacore.com>
Date: Fri, 4 Jul 2025 10:11:43 +0200
Subject: [PATCH 6/7] Merge branch 'mr/fix_gnatcoverage' into '18-sustained'

Fix GNATCoverage build on Windows

See merge request eng/das/cov/gnatcoverage!878

On 18-sustained, GNATCoverage was previously built with Visual Studio
12. With the Secure control plane transition we have only Visual
Studio 17, take the opportunity to use a newer version of
Visual Studio

Ref: it/org/software-supply-chain/production-pipeline/issues#129


(cherry picked from commit 0513370c64eb236ed68d1e2fefdaba8e70a16cc8)

e99a8739 Fix GNATCoverage build on Windows

Co-authored-by: Liaiss Merzougue <merzougue@adacore.com>
---
 tools/gnatcov/trace_adapters/dynamorio/CMakeLists.txt | 6 ++++--
 tools/gnatcov/trace_adapters/dynamorio/Makefile       | 8 ++++----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/tools/gnatcov/trace_adapters/dynamorio/CMakeLists.txt b/tools/gnatcov/trace_adapters/dynamorio/CMakeLists.txt
index 85a7ad1e5..3c404b138 100644
--- a/tools/gnatcov/trace_adapters/dynamorio/CMakeLists.txt
+++ b/tools/gnatcov/trace_adapters/dynamorio/CMakeLists.txt
@@ -3,10 +3,12 @@
 # cmake -DDynamoRIO_DIR=$PWD/../dynamorio/cmake ../dr-gnatcov
 # make
 # ../dynamorio/bin64/drrun -client libqtrace.so 0 -- /bin/ls
-
-cmake_minimum_required(VERSION 2.6)
+cmake_minimum_required(VERSION 3.15)
+project(qtrace C)
 
 add_library(qtrace SHARED qtrace.c)
+target_link_libraries(qtrace vcruntime libucrt)
+
 find_package(DynamoRIO)
 if (NOT DynamoRIO_FOUND)
   message(FATAL_ERROR "DynamoRIO package required to build")
diff --git a/tools/gnatcov/trace_adapters/dynamorio/Makefile b/tools/gnatcov/trace_adapters/dynamorio/Makefile
index 4f2637050..33b133bfd 100644
--- a/tools/gnatcov/trace_adapters/dynamorio/Makefile
+++ b/tools/gnatcov/trace_adapters/dynamorio/Makefile
@@ -8,9 +8,9 @@ DYNRIO_CLIENT=INVALID
 ifeq ($(HOST_OS), windows)
 DYNRIO_CLIENT=build/$(DYNRIO_CONFIG)/qtrace.dll
 ifeq ($(BITS_ARCH), 32)
-G_OPTION=-G"Visual Studio 12"
+G_OPTION=-G"Visual Studio 17"
 else
-G_OPTION=-G"Visual Studio 12 Win64"
+G_OPTION=-G"Visual Studio 17 Win64"
 endif
 endif
 
@@ -29,8 +29,8 @@ all: $(DYNRIO_CLIENT)
 
 $(DYNRIO_CLIENT):
 	mkdir build || true
-	cd build && cmake -DDynamoRIO_DIR=$(DYNRIO_PREFIX)/cmake $(G_OPTION) ..
-	cd build && cmake --build . --config $(DYNRIO_CONFIG)
+	cd build && cmake -Wno-dev -DDynamoRIO_DIR=$(DYNRIO_PREFIX)/cmake $(G_OPTION) ..
+	cd build && cmake --build . --config $(DYNRIO_CONFIG) -v 
 
 ################
 # Installation #

From 29c13a0c3799d0af79731145aa0f71ea2f4c6b6a Mon Sep 17 00:00:00 2001
From: Liaiss Merzougue <merzougue@adacore.com>
Date: Mon, 7 Jul 2025 08:43:20 +0000
Subject: [PATCH 7/7] Fix Generator selector for Visual Studio 17

The CMake Generator for Visual Studio 17 is 'Visual Studio 17 2022' as detected by this gaia
event: https://gaia.adacore.com/#/e/94844414

```
CMake Error: Could not create named generator Visual Studio 17 Win64

Generators
* Visual Studio 17 2022        = Generates Visual Studio 2022 project files.
                                 Use -A option to specify architecture.
  Visual Studio 16 2019        = Generates Visual Studio 2019 project files.
                                 Use -A option to specify architecture.
  Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
                                 Optional [arch] can be "Win64" or "ARM".
  Visual Studio 12 2013 [arch] = Deprecated.  Generates Visual Studio 2013
                                 project files.  Optional [arch] can be
                                 "Win64" or "ARM".
  Visual Studio 9 2008 [arch]  = Deprecated.  Generates Visual Studio 2008
                                 project files.  Optional [arch] can be
                                 "Win64" or "IA64".
```

Ref: it/org/software-supply-chain/production-pipeline/issues#129
---
 tools/gnatcov/trace_adapters/dynamorio/Makefile | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/tools/gnatcov/trace_adapters/dynamorio/Makefile b/tools/gnatcov/trace_adapters/dynamorio/Makefile
index 33b133bfd..8deb8e04c 100644
--- a/tools/gnatcov/trace_adapters/dynamorio/Makefile
+++ b/tools/gnatcov/trace_adapters/dynamorio/Makefile
@@ -7,11 +7,7 @@ DYNRIO_CLIENT=INVALID
 
 ifeq ($(HOST_OS), windows)
 DYNRIO_CLIENT=build/$(DYNRIO_CONFIG)/qtrace.dll
-ifeq ($(BITS_ARCH), 32)
-G_OPTION=-G"Visual Studio 17"
-else
-G_OPTION=-G"Visual Studio 17 Win64"
-endif
+G_OPTION=-G"Visual Studio 17 2022"
 endif
 
 ifeq ($(HOST_OS), linux)
@@ -20,7 +16,7 @@ G_OPTION=
 endif
 
 #########
-# Build #  
+# Build #
 #########
 
 all: $(DYNRIO_CLIENT)
@@ -30,7 +26,7 @@ all: $(DYNRIO_CLIENT)
 $(DYNRIO_CLIENT):
 	mkdir build || true
 	cd build && cmake -Wno-dev -DDynamoRIO_DIR=$(DYNRIO_PREFIX)/cmake $(G_OPTION) ..
-	cd build && cmake --build . --config $(DYNRIO_CONFIG) -v 
+	cd build && cmake --build . --config $(DYNRIO_CONFIG) -v
 
 ################
 # Installation #
