forked from mesonbuild/wrapdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cpputest: fixed wrap (mesonbuild#1398)
* Updated wrap files for cpputest-4.0 * Renamed meson.options to meson_options.txt * Added build options for cpputest * Added extensions to deps in releases.json and fixed build options * Merged extensions into main CppUTest dep + fixed CI config * Removed CppUTestExt from releases.json as it's now a single dependency * Typo fixes * Renamed options + added simple platform autodetection * Removed unnecessary "build_on" from ci_config * Added clang-cl to autodetection * Moved clang-cl to VisualCpp
- Loading branch information
1 parent
82e9b28
commit 9ba2f03
Showing
8 changed files
with
111 additions
and
67 deletions.
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' | ||
cpputest_platform = 'Gcc' | ||
elif compiler_id == 'msvc' or compiler_id == 'clang-cl' | ||
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 |