-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpputest: fixed wrap #1398
Merged
Merged
cpputest: fixed wrap #1398
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
21e5061
Updated wrap files for cpputest-4.0
SteelPh0enix f09f1b9
Renamed meson.options to meson_options.txt
SteelPh0enix 9cee674
Added build options for cpputest
SteelPh0enix 8d92bee
Added extensions to deps in releases.json and fixed build options
SteelPh0enix 4902c42
Merged extensions into main CppUTest dep + fixed CI config
SteelPh0enix e1478e3
Removed CppUTestExt from releases.json as it's now a single dependency
SteelPh0enix 523ffbd
Typo fixes
SteelPh0enix e94fe13
Renamed options + added simple platform autodetection
SteelPh0enix a83b5d8
Removed unnecessary "build_on" from ci_config
SteelPh0enix 93058dc
Added clang-cl to autodetection
SteelPh0enix cde009a
Moved clang-cl to VisualCpp
SteelPh0enix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -425,6 +425,7 @@ | |
"cpputest" | ||
], | ||
"versions": [ | ||
"4.0-3", | ||
"4.0-2", | ||
"4.0-1" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
project('cpputest', 'cpp', | ||
version : '4.0', | ||
license : 'BSD-3') | ||
project('cpputest', 'cpp', | ||
license: 'BSD-3', | ||
version: '4.0', | ||
) | ||
|
||
cpputest_dirs = include_directories('include') | ||
cpputest_includes = include_directories('include') | ||
subdir('src') | ||
|
||
cpputest_dep = declare_dependency( | ||
link_with : cpputest_lib, | ||
version : meson.project_version(), | ||
include_directories : cpputest_dirs) | ||
cpputest_libs = [cpputest_lib] | ||
|
||
if get_option('extinctions') | ||
cpputest_dep = declare_dependency( | ||
link_with : cpputest_ext_lib, | ||
version : meson.project_version(), | ||
include_directories : cpputest_dirs) | ||
if get_option('enable_cpputest_extensions') | ||
cpputest_libs += cpputest_ext_lib | ||
endif | ||
|
||
cpputest_dep = declare_dependency( | ||
link_with : cpputest_libs, | ||
version : meson.project_version(), | ||
include_directories : cpputest_includes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
option('extinctions', | ||
type : 'boolean', | ||
value : true, | ||
description : 'Use the CppUTest extension library' | ||
option( | ||
'enable_cpputest_extensions', | ||
type: 'boolean', | ||
value: false, | ||
description: 'Build and provide CppUTest extensions' | ||
) | ||
|
||
option( | ||
'cpputest_platform', | ||
type: 'combo', | ||
choices: ['autodetect', 'armcc', 'C2000', 'Dos', 'Gcc', 'GccNoStdC', 'Iar', 'Keil', 'none', 'Symbian', 'VisualCpp'], | ||
value: 'autodetect', | ||
description: 'Which UtestPlatform.cpp file should be used for the build.\n' + | ||
'"autodetect" tries to provide one that\'s compatible with your C++ compiler.\n' + | ||
'Currently it supports only GCC, Clang and MSVC.\n' + | ||
'"none" allows You to provide your own.' | ||
) |
52 changes: 29 additions & 23 deletions
52
subprojects/packagefiles/cpputest/src/CppUTest/meson.build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,31 @@ | ||
cpputest_src = files( | ||
'CommandLineArguments.cpp', | ||
'CommandLineTestRunner.cpp', | ||
'JUnitTestOutput.cpp', | ||
'MemoryLeakDetector.cpp', | ||
'MemoryLeakWarningPlugin.cpp', | ||
'SimpleMutex.cpp', | ||
'SimpleString.cpp', | ||
'SimpleStringInternalCache.cpp', | ||
'TeamCityTestOutput.cpp', | ||
'TestFailure.cpp', | ||
'TestFilter.cpp', | ||
'TestHarness_c.cpp', | ||
'TestMemoryAllocator.cpp', | ||
'TestOutput.cpp', | ||
'TestPlugin.cpp', | ||
'TestRegistry.cpp', | ||
'TestResult.cpp', | ||
'TestTestingFixture.cpp', | ||
'Utest.cpp' | ||
cpputest_sources = files( | ||
'CommandLineArguments.cpp', | ||
'CommandLineTestRunner.cpp', | ||
'JUnitTestOutput.cpp', | ||
'MemoryLeakDetector.cpp', | ||
'MemoryLeakWarningPlugin.cpp', | ||
'SimpleMutex.cpp', | ||
'SimpleString.cpp', | ||
'SimpleStringInternalCache.cpp', | ||
'TeamCityTestOutput.cpp', | ||
'TestFailure.cpp', | ||
'TestFilter.cpp', | ||
'TestHarness_c.cpp', | ||
'TestMemoryAllocator.cpp', | ||
'TestOutput.cpp', | ||
'TestPlugin.cpp', | ||
'TestRegistry.cpp', | ||
'TestResult.cpp', | ||
'TestTestingFixture.cpp', | ||
'Utest.cpp', | ||
) | ||
|
||
cpputest_lib = static_library('CppUTest', | ||
cpputest_src, | ||
include_directories : cpputest_dirs) | ||
if get_option('cpputest_platform') != 'none' | ||
cpputest_sources += platform_source_file | ||
endif | ||
|
||
cpputest_lib = library( | ||
'CppUTest', | ||
cpputest_sources, | ||
include_directories: cpputest_includes | ||
) |
44 changes: 23 additions & 21 deletions
44
subprojects/packagefiles/cpputest/src/CppUTestExt/meson.build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
cpputest_ext_src = files( | ||
'CodeMemoryReportFormatter.cpp', | ||
'GTest.cpp', | ||
'IEEE754ExceptionsPlugin.cpp', | ||
'MemoryReportAllocator.cpp', | ||
'MemoryReporterPlugin.cpp', | ||
'MemoryReportFormatter.cpp', | ||
'MockActualCall.cpp', | ||
'MockExpectedCall.cpp', | ||
'MockExpectedCallsList.cpp', | ||
'MockFailure.cpp', | ||
'MockNamedValue.cpp', | ||
'MockSupport_c.cpp', | ||
'MockSupport.cpp', | ||
'MockSupportPlugin.cpp', | ||
'OrderedTest.cpp' | ||
) | ||
|
||
cpputest_ext_lib = static_library('CppUTestExt', | ||
cpputest_ext_src, | ||
include_directories : cpputest_dirs) | ||
cpputest_ext_sources = files( | ||
'CodeMemoryReportFormatter.cpp', | ||
'GTest.cpp', | ||
'IEEE754ExceptionsPlugin.cpp', | ||
'MemoryReportAllocator.cpp', | ||
'MemoryReporterPlugin.cpp', | ||
'MemoryReportFormatter.cpp', | ||
'MockActualCall.cpp', | ||
'MockExpectedCall.cpp', | ||
'MockExpectedCallsList.cpp', | ||
'MockFailure.cpp', | ||
'MockNamedValue.cpp', | ||
'MockSupport.cpp', | ||
'MockSupport_c.cpp', | ||
'MockSupportPlugin.cpp', | ||
'OrderedTest.cpp', | ||
) | ||
|
||
cpputest_ext_lib = library( | ||
'CppUTest', | ||
cpputest_ext_sources, | ||
include_directories: cpputest_includes | ||
) |
17 changes: 17 additions & 0 deletions
17
subprojects/packagefiles/cpputest/src/Platforms/meson.build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
cpputest_platform = get_option('cpputest_platform') | ||
|
||
if cpputest_platform != 'none' | ||
if cpputest_platform == 'autodetect' | ||
compiler_id = meson.get_compiler('cpp').get_id() | ||
if compiler_id == 'gcc' or compiler_id == 'clang' or compiler_id == 'clang-cl' | ||
cpputest_platform = 'Gcc' | ||
elif compiler_id == 'msvc' | ||
cpputest_platform = 'VisualCpp' | ||
else | ||
error(f'Unknown compiler ID @compiler_id@, cannot autodetect the platform.\n' + | ||
'Define the platform manually or provide your own implementation.') | ||
endif | ||
endif | ||
|
||
platform_source_file = files(cpputest_platform / 'UtestPlatform.cpp') | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
if get_option('extinctions') | ||
cpputest_ext_src = [] | ||
subdir('CppUTestExt') | ||
endif | ||
|
||
cpputest_src = [] | ||
# platform should be first, as cpputest depends on it's output | ||
subdir('Platforms') | ||
subdir('CppUTest') | ||
|
||
if get_option('enable_cpputest_extensions') | ||
subdir('CppUTestExt') | ||
endif |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be treated as GCC or VisualCpp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it passes here so I'm not sure if it's just a funky compatibility layer, or intended behaviour.
I'll throw it to VisualCpp and let's see what happens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After quick read, yeah, this should definitely be treated as VisualCpp