Skip to content

Commit de62c0e

Browse files
committed
Revert "Remove the 'Set_Default_Target' procedure"
This reverts commit 08e7887.
1 parent dd66b51 commit de62c0e

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

lkql_checker/src/gnatcheck-projects.adb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -797,6 +797,17 @@ package body Gnatcheck.Projects is
797797
GPR2.Project.Registry.Pack.Check_Attributes (+"Check");
798798
end Register_Tool_Attributes;
799799

800+
------------------------
801+
-- Set_Default_Target --
802+
------------------------
803+
804+
procedure Set_Default_Target is
805+
begin
806+
if not Gnatkp_Mode and then Should_Use_Codepeer_Target then
807+
GPR2.KB.Set_Default_Target ("codepeer");
808+
end if;
809+
end Set_Default_Target;
810+
800811
-------------------------
801812
-- Set_External_Values --
802813
-------------------------

lkql_checker/src/gnatcheck-projects.ads

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@ package Gnatcheck.Projects is
324324
-- General project file processing --
325325
-------------------------------------
326326

327+
procedure Set_Default_Target;
328+
-- If codepeer is on PATH, replaces default target with "codepeer",
329+
-- does nothing in gnatkp mode.
330+
327331
procedure Initialize_Environment;
328332
-- Initializes the environment for extracting the information from the
329333
-- project file. This includes setting the parameters specific for the

lkql_checker/src/gnatcheck_main.adb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,8 @@ begin
462462
end if;
463463
end if;
464464

465+
Gnatcheck.Projects.Set_Default_Target;
466+
465467
-- If we have the project file specified as a tool parameter, analyze it.
466468

467469
Gnatcheck.Projects.Process_Project_File (Gnatcheck_Prj);

0 commit comments

Comments
 (0)