mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-30 21:55:31 +02:00
Bug 408545 - Added single checkbox to enable gcov. (edit commit msg)
I added a checkbox to enable gCov via a single checkbox to enable gcov in the compiler. It then uses the applicability calculator to automatically enable the linker if the compiler option is set. Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com> Change-Id: I561d7263d578a7807e890fce5518e6fc2ebb2bb2 Reviewed-on: https://git.eclipse.org/r/29403 Reviewed-by: Elena Laskavaia <elaskavaia.cdt@gmail.com> Tested-by: Elena Laskavaia <elaskavaia.cdt@gmail.com>
This commit is contained in:
parent
4ec3cdbbe7
commit
29b783155f
3 changed files with 58 additions and 0 deletions
|
@ -160,6 +160,8 @@ Option.Posix.Verbose=Verbose (-v)
|
|||
Option.OtherFlags=Other flags
|
||||
Option.Posix.Ansi=Support ANSI programs (-ansi)
|
||||
Option.PIC=Position Independent Code (-fPIC)
|
||||
Option.codecov=Generate gcov information (-ftest-coverage -fprofile-arcs)
|
||||
Option.codecovTip="Check this flag if you want to enable Profile Code Coverage in your application. Remember to enable this option in both the Compiler-> Miscellaneous and Linker -> General. Then rebuild your project and run Code Coverage again."
|
||||
|
||||
Option.Posix.Linker.NoStartFiles=Do not use standard start files (-nostartfiles)
|
||||
Option.Posix.Linker.NoDefLibs=Do not use default libraries (-nodefaultlibs)
|
||||
|
|
|
@ -220,6 +220,14 @@
|
|||
name="%Option.Posix.Debug.gprof"
|
||||
valueType="boolean">
|
||||
</option>
|
||||
<option
|
||||
applicabilityCalculator="org.eclipse.cdt.managedbuilder.gnu.ui.GcovAppCalculator"
|
||||
command="-ftest-coverage -fprofile-arcs"
|
||||
defaultValue="false"
|
||||
id="gnu.c.link.option.debugging.codecov"
|
||||
name="%Option.codecov"
|
||||
valueType="boolean">
|
||||
</option>
|
||||
</tool>
|
||||
<tool
|
||||
natureFilter="ccnature"
|
||||
|
@ -421,6 +429,14 @@
|
|||
name="%Option.Posix.Debug.gprof"
|
||||
valueType="boolean">
|
||||
</option>
|
||||
<option
|
||||
applicabilityCalculator="org.eclipse.cdt.managedbuilder.gnu.ui.GcovAppCalculator"
|
||||
command="-ftest-coverage -fprofile-arcs"
|
||||
defaultValue="false"
|
||||
id="gnu.cpp.link.option.debugging.codecov"
|
||||
name="%Option.codecov"
|
||||
valueType="boolean">
|
||||
</option>
|
||||
</tool>
|
||||
<tool
|
||||
natureFilter="both"
|
||||
|
@ -1197,6 +1213,15 @@
|
|||
id="gnu.c.compiler.option.debugging.gprof"
|
||||
valueType="boolean">
|
||||
</option>
|
||||
<option
|
||||
category="gnu.c.compiler.category.debug"
|
||||
command="-ftest-coverage -fprofile-arcs"
|
||||
defaultValue="false"
|
||||
id="gnu.c.compiler.option.debugging.codecov"
|
||||
name="%Option.codecov"
|
||||
tip="%Option.codecovTip"
|
||||
valueType="boolean">
|
||||
</option>
|
||||
<optionCategory
|
||||
owner="cdt.managedbuild.tool.gnu.c.compiler"
|
||||
name="%OptionCategory.Warn"
|
||||
|
@ -1566,6 +1591,15 @@
|
|||
id="gnu.cpp.compiler.option.debugging.gprof"
|
||||
valueType="boolean">
|
||||
</option>
|
||||
<option
|
||||
defaultValue="false"
|
||||
name="%Option.codecov"
|
||||
category="gnu.cpp.compiler.category.debug"
|
||||
command="-ftest-coverage -fprofile-arcs"
|
||||
id="gnu.cpp.compiler.option.debugging.codecov"
|
||||
tip="%Option.codecovTip"
|
||||
valueType="boolean">
|
||||
</option>
|
||||
<optionCategory
|
||||
owner="cdt.managedbuild.tool.gnu.cpp.compiler"
|
||||
name="%OptionCategory.Warn"
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2014 Red Hat, Inc.
|
||||
*
|
||||
* *Based on implementation of GprofAppCalculator*
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* lufimtse : Leo Ufimtsev lufimtse@redhat.com
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.managedbuilder.gnu.ui;
|
||||
|
||||
public class GcovAppCalculator extends ProfAppCalculator {
|
||||
@Override
|
||||
protected String getOptionIdPattern() {
|
||||
return ".compiler.option.debugging.codecov"; //$NON-NLS-1$
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue