mirror of
https://github.com/Kitware/CMake.git
synced 2026-11-06 05:16:58 +00:00
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.
31 lines
479 B
C++
31 lines
479 B
C++
|
|
#include "framework.h"
|
|
#include "shared.h"
|
|
#include "stdio.h"
|
|
|
|
#if defined(_WIN32)
|
|
# include <windows.h>
|
|
#else
|
|
# include "dlfcn.h"
|
|
#endif
|
|
|
|
int main(int, char**)
|
|
{
|
|
framework();
|
|
shared();
|
|
|
|
#if defined(_WIN32)
|
|
HANDLE lib = LoadLibraryA("module2.dll");
|
|
if (!lib) {
|
|
printf("Failed to open module2\n");
|
|
}
|
|
#else
|
|
void* lib = dlopen("module2.so", RTLD_LAZY);
|
|
if (!lib) {
|
|
printf("Failed to open module2\n%s\n", dlerror());
|
|
}
|
|
#endif
|
|
|
|
return lib == 0 ? 1 : 0;
|
|
}
|