Tests/BundleUtilities: Fix test with Clang-based MinGW toolchains

The test sources check WIN32, which not every Windows toolchain defines:
bcc64x defaults to a strict standard mode and does not.  Check _WIN32.

The test scripts use GetPrerequisites, which looks for objdump on the
PATH when dumpbin is not found and CMAKE_OBJDUMP is not set.  The objdump
in llvm-mingw is a shell script, and bcc64x provides only llvm-objdump.
Pass the project's CMAKE_OBJDUMP to the scripts.
This commit is contained in:
Lee Cantey authored and Brad King committed 2026-10-28 14:58:31 -04:00
1 parent c5986881ab
commit ab4d0130ed
7 files changed
+11 -9

No files matched your search

+2
View File
@@ -51,6 +51,7 @@ add_custom_target(testbundleutils1_test ALL
"-DMODULE=$<TARGET_FILE:module1>"
"-DINPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
"-DOUTPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/testdir1"
"-DCMAKE_OBJDUMP=${CMAKE_OBJDUMP}"
-P "${CMAKE_CURRENT_SOURCE_DIR}/bundleutils.cmake"
DEPENDS testbundleutils1 module1
)
@@ -82,6 +83,7 @@ add_custom_target(testbundleutils2_test ALL
"-DMODULE=$<TARGET_FILE:module2>"
"-DINPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
"-DOUTPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/testdir2"
"-DCMAKE_OBJDUMP=${CMAKE_OBJDUMP}"
-P "${CMAKE_CURRENT_SOURCE_DIR}/bundleutils.cmake"
DEPENDS testbundleutils1 module2
)
+1 -1
View File
@@ -2,7 +2,7 @@
#ifndef framework_h
#define framework_h
#ifdef WIN32
#ifdef _WIN32
# ifdef framework_EXPORTS
# define FRAMEWORK_EXPORT __declspec(dllexport)
# else
+1 -1
View File
@@ -2,7 +2,7 @@
#ifndef shared_h
#define shared_h
#ifdef WIN32
#ifdef _WIN32
# ifdef shared_EXPORTS
# define SHARED_EXPORT __declspec(dllexport)
# else
+1 -1
View File
@@ -2,7 +2,7 @@
#ifndef shared2_h
#define shared2_h
#ifdef WIN32
#ifdef _WIN32
# ifdef shared2_EXPORTS
# define SHARED2_EXPORT __declspec(dllexport)
# else
+2 -2
View File
@@ -3,7 +3,7 @@
#include "shared.h"
#include "stdio.h"
#if defined(WIN32)
#if defined(_WIN32)
# include <windows.h>
#else
# include "dlfcn.h"
@@ -14,7 +14,7 @@ int main(int, char**)
framework();
shared();
#if defined(WIN32)
#if defined(_WIN32)
HANDLE lib = LoadLibraryA("module1.dll");
if (!lib) {
printf("Failed to open module1\n");
+2 -2
View File
@@ -3,7 +3,7 @@
#include "shared.h"
#include "stdio.h"
#if defined(WIN32)
#if defined(_WIN32)
# include <windows.h>
#else
# include "dlfcn.h"
@@ -14,7 +14,7 @@ int main(int, char**)
framework();
shared();
#if defined(WIN32)
#if defined(_WIN32)
HANDLE lib = LoadLibraryA("module2.dll");
if (!lib) {
printf("Failed to open module2\n");
+2 -2
View File
@@ -3,7 +3,7 @@
#include "shared.h"
#include "stdio.h"
#if defined(WIN32)
#if defined(_WIN32)
# include <windows.h>
#else
# include "dlfcn.h"
@@ -14,7 +14,7 @@ int main(int, char**)
framework();
shared();
#if defined(WIN32)
#if defined(_WIN32)
HANDLE lib = LoadLibraryA("module3.dll");
if (!lib) {
printf("Failed to open module3\n");