From 21e506168e732c3e3ae61a352f1516a25313a05b Mon Sep 17 00:00:00 2001 From: SteelPh0enix Date: Wed, 7 Feb 2024 21:04:44 +0100 Subject: [PATCH 01/11] Updated wrap files for cpputest-4.0 --- releases.json | 1 + subprojects/cpputest.wrap | 1 + subprojects/packagefiles/cpputest/meson.build | 37 ++++++------ .../packagefiles/cpputest/meson.options | 13 +++++ .../packagefiles/cpputest/meson_options.txt | 5 -- .../cpputest/src/CppUTest/meson.build | 56 ++++++++++--------- .../cpputest/src/CppUTestExt/meson.build | 44 ++++++++------- .../cpputest/src/Platforms/meson.build | 5 ++ .../packagefiles/cpputest/src/meson.build | 13 ++--- 9 files changed, 99 insertions(+), 76 deletions(-) create mode 100644 subprojects/packagefiles/cpputest/meson.options delete mode 100644 subprojects/packagefiles/cpputest/meson_options.txt create mode 100644 subprojects/packagefiles/cpputest/src/Platforms/meson.build diff --git a/releases.json b/releases.json index 305cc2aa3..71dfd337d 100644 --- a/releases.json +++ b/releases.json @@ -425,6 +425,7 @@ "cpputest" ], "versions": [ + "4.0-3", "4.0-2", "4.0-1" ] diff --git a/subprojects/cpputest.wrap b/subprojects/cpputest.wrap index f31526bd0..0a0cc8277 100644 --- a/subprojects/cpputest.wrap +++ b/subprojects/cpputest.wrap @@ -7,3 +7,4 @@ patch_directory = cpputest [provide] cpputest = cpputest_dep +cpputest_ext = cpputest_ext_dep diff --git a/subprojects/packagefiles/cpputest/meson.build b/subprojects/packagefiles/cpputest/meson.build index c52411090..70d9bf8eb 100644 --- a/subprojects/packagefiles/cpputest/meson.build +++ b/subprojects/packagefiles/cpputest/meson.build @@ -1,18 +1,19 @@ - project('cpputest', 'cpp', - version : '4.0', - license : 'BSD-3') - -cpputest_dirs = include_directories('include') -subdir('src') - -cpputest_dep = declare_dependency( - link_with : cpputest_lib, - version : meson.project_version(), - include_directories : cpputest_dirs) - -if get_option('extinctions') - cpputest_dep = declare_dependency( - link_with : cpputest_ext_lib, - version : meson.project_version(), - include_directories : cpputest_dirs) -endif +project('cpputest', 'cpp', + license: 'BSD-3', + version: '4.0', +) + +cpputest_includes = include_directories('include') +subdir('src') + +cpputest_dep = declare_dependency( + link_with : cpputest_lib, + version : meson.project_version(), + include_directories : cpputest_includes) + +if get_option('provide_extensions') + cpputest_ext_dep = declare_dependency( + link_with : cpputest_ext_lib, + version : meson.project_version(), + include_directories : cpputest_includes) +endif diff --git a/subprojects/packagefiles/cpputest/meson.options b/subprojects/packagefiles/cpputest/meson.options new file mode 100644 index 000000000..d60ade32c --- /dev/null +++ b/subprojects/packagefiles/cpputest/meson.options @@ -0,0 +1,13 @@ +option( + 'provide_extensions', + type: 'boolean', + value: false, + description: 'Build and provide CppUTest extensiona' +) + +option( + 'cpputest_platform', + type: 'combo', + choices: ['armcc', 'C2000', 'Dos', 'Gcc', 'GccNoStdC', 'Iar', 'Keil', 'Symbian', 'VisualCpp', 'Custom'], + description: 'Which UtestPlatform.cpp file should be used for the build. "Custom" forces You to provide it yourself.' +) diff --git a/subprojects/packagefiles/cpputest/meson_options.txt b/subprojects/packagefiles/cpputest/meson_options.txt deleted file mode 100644 index 6b63b8ca0..000000000 --- a/subprojects/packagefiles/cpputest/meson_options.txt +++ /dev/null @@ -1,5 +0,0 @@ -option('extinctions', - type : 'boolean', - value : true, - description : 'Use the CppUTest extension library' -) diff --git a/subprojects/packagefiles/cpputest/src/CppUTest/meson.build b/subprojects/packagefiles/cpputest/src/CppUTest/meson.build index 5dcbd1c6b..b6e4d5643 100644 --- a/subprojects/packagefiles/cpputest/src/CppUTest/meson.build +++ b/subprojects/packagefiles/cpputest/src/CppUTest/meson.build @@ -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_lib = static_library('CppUTest', - cpputest_src, - include_directories : cpputest_dirs) \ No newline at end of file +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', +) + +if get_option('cpputest_platform') != 'Custom' + cpputest_sources += platform_source_file +endif + +cpputest_lib = library( + 'CppUTest', + cpputest_sources, + include_directories: cpputest_includes +) diff --git a/subprojects/packagefiles/cpputest/src/CppUTestExt/meson.build b/subprojects/packagefiles/cpputest/src/CppUTestExt/meson.build index 782e42f8a..4881d7725 100644 --- a/subprojects/packagefiles/cpputest/src/CppUTestExt/meson.build +++ b/subprojects/packagefiles/cpputest/src/CppUTestExt/meson.build @@ -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) \ No newline at end of file +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 +) diff --git a/subprojects/packagefiles/cpputest/src/Platforms/meson.build b/subprojects/packagefiles/cpputest/src/Platforms/meson.build new file mode 100644 index 000000000..f3a829922 --- /dev/null +++ b/subprojects/packagefiles/cpputest/src/Platforms/meson.build @@ -0,0 +1,5 @@ +cpputest_platform = get_option('cpputest_platform') + +if cpputest_platform != 'Custom' + platform_source_file = files(cpputest_platform / 'UtestPlatform.cpp') +endif diff --git a/subprojects/packagefiles/cpputest/src/meson.build b/subprojects/packagefiles/cpputest/src/meson.build index 49a666189..af938349b 100644 --- a/subprojects/packagefiles/cpputest/src/meson.build +++ b/subprojects/packagefiles/cpputest/src/meson.build @@ -1,7 +1,6 @@ -if get_option('extinctions') - cpputest_ext_src = [] - subdir('CppUTestExt') -endif - -cpputest_src = [] -subdir('CppUTest') +subdir('Platforms') +subdir('CppUTest') + +if get_option('provide_extensions') + subdir('CppUTestExt') +endif From f09f1b92b7575311105ff65e99b9d88cc66a89ac Mon Sep 17 00:00:00 2001 From: SteelPh0enix Date: Thu, 8 Feb 2024 22:40:03 +0100 Subject: [PATCH 02/11] Renamed meson.options to meson_options.txt --- .../{meson.options => meson_options.txt} | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename subprojects/packagefiles/cpputest/{meson.options => meson_options.txt} (96%) diff --git a/subprojects/packagefiles/cpputest/meson.options b/subprojects/packagefiles/cpputest/meson_options.txt similarity index 96% rename from subprojects/packagefiles/cpputest/meson.options rename to subprojects/packagefiles/cpputest/meson_options.txt index d60ade32c..dde8bba73 100644 --- a/subprojects/packagefiles/cpputest/meson.options +++ b/subprojects/packagefiles/cpputest/meson_options.txt @@ -1,13 +1,13 @@ -option( - 'provide_extensions', - type: 'boolean', - value: false, - description: 'Build and provide CppUTest extensiona' -) - -option( - 'cpputest_platform', - type: 'combo', - choices: ['armcc', 'C2000', 'Dos', 'Gcc', 'GccNoStdC', 'Iar', 'Keil', 'Symbian', 'VisualCpp', 'Custom'], - description: 'Which UtestPlatform.cpp file should be used for the build. "Custom" forces You to provide it yourself.' -) +option( + 'provide_extensions', + type: 'boolean', + value: false, + description: 'Build and provide CppUTest extensiona' +) + +option( + 'cpputest_platform', + type: 'combo', + choices: ['armcc', 'C2000', 'Dos', 'Gcc', 'GccNoStdC', 'Iar', 'Keil', 'Symbian', 'VisualCpp', 'Custom'], + description: 'Which UtestPlatform.cpp file should be used for the build. "Custom" forces You to provide it yourself.' +) From 9cee674655fdf188d041a5a98fd8df907700ddb1 Mon Sep 17 00:00:00 2001 From: SteelPh0enix Date: Thu, 8 Feb 2024 22:40:22 +0100 Subject: [PATCH 03/11] Added build options for cpputest --- ci_config.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ci_config.json b/ci_config.json index c393a2b0a..34d96b1e3 100644 --- a/ci_config.json +++ b/ci_config.json @@ -61,6 +61,12 @@ "cpp_std=c++14" ] }, + "cpputest": { + "build_options": [ + "provide_extensions=true", + "cpputest_platform=Custom" + ] + }, "cppzmq": { "alpine_packages": [ "zeromq-dev" From 8d92beec0172f1ee797d3e41cc42b651f4d236f7 Mon Sep 17 00:00:00 2001 From: SteelPh0enix Date: Thu, 8 Feb 2024 23:34:52 +0100 Subject: [PATCH 04/11] Added extensions to deps in releases.json and fixed build options --- ci_config.json | 4 ++-- releases.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ci_config.json b/ci_config.json index 34d96b1e3..f1684652f 100644 --- a/ci_config.json +++ b/ci_config.json @@ -63,8 +63,8 @@ }, "cpputest": { "build_options": [ - "provide_extensions=true", - "cpputest_platform=Custom" + "cpputest:provide_extensions=true", + "cpputest:cpputest_platform=Custom" ] }, "cppzmq": { diff --git a/releases.json b/releases.json index 71dfd337d..b4ed75312 100644 --- a/releases.json +++ b/releases.json @@ -422,7 +422,8 @@ }, "cpputest": { "dependency_names": [ - "cpputest" + "cpputest", + "cpputest_ext" ], "versions": [ "4.0-3", From 4902c42736f4c60eee7a459f1e7c23c3c8aa01b6 Mon Sep 17 00:00:00 2001 From: SteelPh0enix Date: Fri, 9 Feb 2024 00:09:23 +0100 Subject: [PATCH 05/11] Merged extensions into main CppUTest dep + fixed CI config --- ci_config.json | 17 +++++++-- subprojects/cpputest.wrap | 1 - subprojects/packagefiles/cpputest/meson.build | 37 +++++++++---------- 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/ci_config.json b/ci_config.json index f1684652f..e322cee40 100644 --- a/ci_config.json +++ b/ci_config.json @@ -62,10 +62,19 @@ ] }, "cpputest": { - "build_options": [ - "cpputest:provide_extensions=true", - "cpputest:cpputest_platform=Custom" - ] + "build_options": [ + "cpputest:cpputest_platform=Gcc", + "cpputest:provide_extensions=true", + "cpputest:default_library=static" + ], + "_comment": [ + "CppUTest must be provided with platform-specific implementation of some core functions, ", + "and it seems like it's not possible to change this flag depending on CI runner here, ", + "so for the sake of CI this should only be run on platforms with GCC (and compatible) toolchains." + ], + "build_on": { + "windows": false + } }, "cppzmq": { "alpine_packages": [ diff --git a/subprojects/cpputest.wrap b/subprojects/cpputest.wrap index 0a0cc8277..f31526bd0 100644 --- a/subprojects/cpputest.wrap +++ b/subprojects/cpputest.wrap @@ -7,4 +7,3 @@ patch_directory = cpputest [provide] cpputest = cpputest_dep -cpputest_ext = cpputest_ext_dep diff --git a/subprojects/packagefiles/cpputest/meson.build b/subprojects/packagefiles/cpputest/meson.build index 70d9bf8eb..bc99a7701 100644 --- a/subprojects/packagefiles/cpputest/meson.build +++ b/subprojects/packagefiles/cpputest/meson.build @@ -1,19 +1,18 @@ -project('cpputest', 'cpp', - license: 'BSD-3', - version: '4.0', -) - -cpputest_includes = include_directories('include') -subdir('src') - -cpputest_dep = declare_dependency( - link_with : cpputest_lib, - version : meson.project_version(), - include_directories : cpputest_includes) - -if get_option('provide_extensions') - cpputest_ext_dep = declare_dependency( - link_with : cpputest_ext_lib, - version : meson.project_version(), - include_directories : cpputest_includes) -endif +project('cpputest', 'cpp', + license: 'BSD-3', + version: '4.0', +) + +cpputest_includes = include_directories('include') +subdir('src') + +cpputest_libs = [cpputest_lib] + +if get_option('provide_extensions') + cpputest_libs += cpputest_ext_lib +endif + +cpputest_dep = declare_dependency( + link_with : cpputest_libs, + version : meson.project_version(), + include_directories : cpputest_includes) From e1478e3757bfbcabf60fa31991d78adcaab8efd9 Mon Sep 17 00:00:00 2001 From: SteelPh0enix Date: Fri, 9 Feb 2024 00:12:24 +0100 Subject: [PATCH 06/11] Removed CppUTestExt from releases.json as it's now a single dependency --- releases.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/releases.json b/releases.json index b4ed75312..71dfd337d 100644 --- a/releases.json +++ b/releases.json @@ -422,8 +422,7 @@ }, "cpputest": { "dependency_names": [ - "cpputest", - "cpputest_ext" + "cpputest" ], "versions": [ "4.0-3", From 523ffbd6f2b3ffbcc375c4738c963d00874486d6 Mon Sep 17 00:00:00 2001 From: SteelPh0enix Date: Fri, 9 Feb 2024 00:57:38 +0100 Subject: [PATCH 07/11] Typo fixes --- subprojects/packagefiles/cpputest/meson_options.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/packagefiles/cpputest/meson_options.txt b/subprojects/packagefiles/cpputest/meson_options.txt index dde8bba73..35c3e1074 100644 --- a/subprojects/packagefiles/cpputest/meson_options.txt +++ b/subprojects/packagefiles/cpputest/meson_options.txt @@ -2,12 +2,12 @@ option( 'provide_extensions', type: 'boolean', value: false, - description: 'Build and provide CppUTest extensiona' + description: 'Build and provide CppUTest extensions' ) option( 'cpputest_platform', type: 'combo', choices: ['armcc', 'C2000', 'Dos', 'Gcc', 'GccNoStdC', 'Iar', 'Keil', 'Symbian', 'VisualCpp', 'Custom'], - description: 'Which UtestPlatform.cpp file should be used for the build. "Custom" forces You to provide it yourself.' + description: 'Which UtestPlatform.cpp file should be used for the build. "Custom" forces You to provide it yourself' ) From e94fe138368d40945346685800517d2d1a8656e9 Mon Sep 17 00:00:00 2001 From: SteelPh0enix Date: Fri, 9 Feb 2024 01:26:12 +0100 Subject: [PATCH 08/11] Renamed options + added simple platform autodetection --- ci_config.json | 3 +- subprojects/packagefiles/cpputest/meson.build | 2 +- .../packagefiles/cpputest/meson_options.txt | 10 ++- .../cpputest/src/CppUTest/meson.build | 62 +++++++++---------- .../cpputest/src/Platforms/meson.build | 22 +++++-- .../packagefiles/cpputest/src/meson.build | 13 ++-- 6 files changed, 64 insertions(+), 48 deletions(-) diff --git a/ci_config.json b/ci_config.json index e322cee40..2c9118693 100644 --- a/ci_config.json +++ b/ci_config.json @@ -63,8 +63,7 @@ }, "cpputest": { "build_options": [ - "cpputest:cpputest_platform=Gcc", - "cpputest:provide_extensions=true", + "cpputest:enable_cpputest_extensions=true", "cpputest:default_library=static" ], "_comment": [ diff --git a/subprojects/packagefiles/cpputest/meson.build b/subprojects/packagefiles/cpputest/meson.build index bc99a7701..88d1e75d4 100644 --- a/subprojects/packagefiles/cpputest/meson.build +++ b/subprojects/packagefiles/cpputest/meson.build @@ -8,7 +8,7 @@ subdir('src') cpputest_libs = [cpputest_lib] -if get_option('provide_extensions') +if get_option('enable_cpputest_extensions') cpputest_libs += cpputest_ext_lib endif diff --git a/subprojects/packagefiles/cpputest/meson_options.txt b/subprojects/packagefiles/cpputest/meson_options.txt index 35c3e1074..f1a193f48 100644 --- a/subprojects/packagefiles/cpputest/meson_options.txt +++ b/subprojects/packagefiles/cpputest/meson_options.txt @@ -1,5 +1,5 @@ option( - 'provide_extensions', + 'enable_cpputest_extensions', type: 'boolean', value: false, description: 'Build and provide CppUTest extensions' @@ -8,6 +8,10 @@ option( option( 'cpputest_platform', type: 'combo', - choices: ['armcc', 'C2000', 'Dos', 'Gcc', 'GccNoStdC', 'Iar', 'Keil', 'Symbian', 'VisualCpp', 'Custom'], - description: 'Which UtestPlatform.cpp file should be used for the build. "Custom" forces You to provide it yourself' + 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.' ) diff --git a/subprojects/packagefiles/cpputest/src/CppUTest/meson.build b/subprojects/packagefiles/cpputest/src/CppUTest/meson.build index b6e4d5643..61ee0e62f 100644 --- a/subprojects/packagefiles/cpputest/src/CppUTest/meson.build +++ b/subprojects/packagefiles/cpputest/src/CppUTest/meson.build @@ -1,31 +1,31 @@ -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', -) - -if get_option('cpputest_platform') != 'Custom' - cpputest_sources += platform_source_file -endif - -cpputest_lib = library( - 'CppUTest', - cpputest_sources, - include_directories: cpputest_includes -) +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', +) + +if get_option('cpputest_platform') != 'none' + cpputest_sources += platform_source_file +endif + +cpputest_lib = library( + 'CppUTest', + cpputest_sources, + include_directories: cpputest_includes +) diff --git a/subprojects/packagefiles/cpputest/src/Platforms/meson.build b/subprojects/packagefiles/cpputest/src/Platforms/meson.build index f3a829922..4bcf75269 100644 --- a/subprojects/packagefiles/cpputest/src/Platforms/meson.build +++ b/subprojects/packagefiles/cpputest/src/Platforms/meson.build @@ -1,5 +1,17 @@ -cpputest_platform = get_option('cpputest_platform') - -if cpputest_platform != 'Custom' - platform_source_file = files(cpputest_platform / 'UtestPlatform.cpp') -endif +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 == 'clang' or compiler_id == 'gcc' + 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 diff --git a/subprojects/packagefiles/cpputest/src/meson.build b/subprojects/packagefiles/cpputest/src/meson.build index af938349b..b0f99276d 100644 --- a/subprojects/packagefiles/cpputest/src/meson.build +++ b/subprojects/packagefiles/cpputest/src/meson.build @@ -1,6 +1,7 @@ -subdir('Platforms') -subdir('CppUTest') - -if get_option('provide_extensions') - subdir('CppUTestExt') -endif +# platform should be first, as cpputest depends on it's output +subdir('Platforms') +subdir('CppUTest') + +if get_option('enable_cpputest_extensions') + subdir('CppUTestExt') +endif From a83b5d88394d3d827ed0b7d306488e4dfff8d901 Mon Sep 17 00:00:00 2001 From: SteelPh0enix Date: Fri, 9 Feb 2024 01:27:13 +0100 Subject: [PATCH 09/11] Removed unnecessary "build_on" from ci_config --- ci_config.json | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/ci_config.json b/ci_config.json index 2c9118693..e597ddf3c 100644 --- a/ci_config.json +++ b/ci_config.json @@ -65,15 +65,7 @@ "build_options": [ "cpputest:enable_cpputest_extensions=true", "cpputest:default_library=static" - ], - "_comment": [ - "CppUTest must be provided with platform-specific implementation of some core functions, ", - "and it seems like it's not possible to change this flag depending on CI runner here, ", - "so for the sake of CI this should only be run on platforms with GCC (and compatible) toolchains." - ], - "build_on": { - "windows": false - } + ] }, "cppzmq": { "alpine_packages": [ From 93058dc9d713a0eae4b049dd94f84d0665770e41 Mon Sep 17 00:00:00 2001 From: SteelPh0enix Date: Fri, 9 Feb 2024 01:31:56 +0100 Subject: [PATCH 10/11] Added clang-cl to autodetection --- subprojects/packagefiles/cpputest/src/Platforms/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/packagefiles/cpputest/src/Platforms/meson.build b/subprojects/packagefiles/cpputest/src/Platforms/meson.build index 4bcf75269..d4eb3c718 100644 --- a/subprojects/packagefiles/cpputest/src/Platforms/meson.build +++ b/subprojects/packagefiles/cpputest/src/Platforms/meson.build @@ -3,7 +3,7 @@ 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 == 'clang' or compiler_id == 'gcc' + if compiler_id == 'gcc' or compiler_id == 'clang' or compiler_id == 'clang-cl' cpputest_platform = 'Gcc' elif compiler_id == 'msvc' cpputest_platform = 'VisualCpp' From cde009acce2f9b43a9866afb8d1f2eab80b8836d Mon Sep 17 00:00:00 2001 From: SteelPh0enix Date: Fri, 9 Feb 2024 01:41:31 +0100 Subject: [PATCH 11/11] Moved clang-cl to VisualCpp --- subprojects/packagefiles/cpputest/src/Platforms/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/packagefiles/cpputest/src/Platforms/meson.build b/subprojects/packagefiles/cpputest/src/Platforms/meson.build index d4eb3c718..1f0d81bad 100644 --- a/subprojects/packagefiles/cpputest/src/Platforms/meson.build +++ b/subprojects/packagefiles/cpputest/src/Platforms/meson.build @@ -3,9 +3,9 @@ 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' + if compiler_id == 'gcc' or compiler_id == 'clang' cpputest_platform = 'Gcc' - elif compiler_id == 'msvc' + 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' +