mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 20:49:41 +00:00
ENH: fix for compilers that need _
This commit is contained in:
parent
51acf333cc
commit
fedf21722a
@ -112,7 +112,6 @@ int main()
|
||||
lib += cmDynamicLoader::LibPrefix();
|
||||
lib += "CMakeTestModule";
|
||||
lib += cmDynamicLoader::LibExtension();
|
||||
|
||||
cmLibHandle handle = cmDynamicLoader::OpenLibrary(lib.c_str());
|
||||
if(!handle)
|
||||
{
|
||||
@ -121,17 +120,27 @@ int main()
|
||||
else
|
||||
{
|
||||
cmDynamicLoaderFunction fun =
|
||||
cmDynamicLoader::GetSymbolAddress(handle, "ModuleFunction");
|
||||
cmDynamicLoader::GetSymbolAddress(handle, "ModuleFunction");
|
||||
if(!fun)
|
||||
{
|
||||
fun = cmDynamicLoader::GetSymbolAddress(handle, "_ModuleFunction");
|
||||
}
|
||||
typedef int (*TEST_FUNCTION)();
|
||||
TEST_FUNCTION testFun = (TEST_FUNCTION)fun;
|
||||
int ret = (*testFun)();
|
||||
if(!ret)
|
||||
if(!testFun)
|
||||
{
|
||||
cmFailed("ModuleFunction called from module did not return valid return");
|
||||
cmFailed("Could not find symbol ModuleFunction in library ");
|
||||
}
|
||||
else
|
||||
{
|
||||
int ret = (*testFun)();
|
||||
if(!ret)
|
||||
{
|
||||
cmFailed("ModuleFunction call did not return valid return.");
|
||||
}
|
||||
cmPassed("Module loaded and ModuleFunction called correctly.");
|
||||
}
|
||||
cmPassed("Module loaded and ModuleFunction called correctly");
|
||||
}
|
||||
|
||||
if(sharedFunction() != 1)
|
||||
{
|
||||
cmFailed("Call to sharedFunction from shared library failed.");
|
||||
|
@ -112,7 +112,6 @@ int main()
|
||||
lib += cmDynamicLoader::LibPrefix();
|
||||
lib += "CMakeTestModule";
|
||||
lib += cmDynamicLoader::LibExtension();
|
||||
|
||||
cmLibHandle handle = cmDynamicLoader::OpenLibrary(lib.c_str());
|
||||
if(!handle)
|
||||
{
|
||||
@ -121,17 +120,27 @@ int main()
|
||||
else
|
||||
{
|
||||
cmDynamicLoaderFunction fun =
|
||||
cmDynamicLoader::GetSymbolAddress(handle, "ModuleFunction");
|
||||
cmDynamicLoader::GetSymbolAddress(handle, "ModuleFunction");
|
||||
if(!fun)
|
||||
{
|
||||
fun = cmDynamicLoader::GetSymbolAddress(handle, "_ModuleFunction");
|
||||
}
|
||||
typedef int (*TEST_FUNCTION)();
|
||||
TEST_FUNCTION testFun = (TEST_FUNCTION)fun;
|
||||
int ret = (*testFun)();
|
||||
if(!ret)
|
||||
if(!testFun)
|
||||
{
|
||||
cmFailed("ModuleFunction called from module did not return valid return");
|
||||
cmFailed("Could not find symbol ModuleFunction in library ");
|
||||
}
|
||||
else
|
||||
{
|
||||
int ret = (*testFun)();
|
||||
if(!ret)
|
||||
{
|
||||
cmFailed("ModuleFunction call did not return valid return.");
|
||||
}
|
||||
cmPassed("Module loaded and ModuleFunction called correctly.");
|
||||
}
|
||||
cmPassed("Module loaded and ModuleFunction called correctly");
|
||||
}
|
||||
|
||||
if(sharedFunction() != 1)
|
||||
{
|
||||
cmFailed("Call to sharedFunction from shared library failed.");
|
||||
|
@ -112,7 +112,6 @@ int main()
|
||||
lib += cmDynamicLoader::LibPrefix();
|
||||
lib += "CMakeTestModule";
|
||||
lib += cmDynamicLoader::LibExtension();
|
||||
|
||||
cmLibHandle handle = cmDynamicLoader::OpenLibrary(lib.c_str());
|
||||
if(!handle)
|
||||
{
|
||||
@ -121,17 +120,27 @@ int main()
|
||||
else
|
||||
{
|
||||
cmDynamicLoaderFunction fun =
|
||||
cmDynamicLoader::GetSymbolAddress(handle, "ModuleFunction");
|
||||
cmDynamicLoader::GetSymbolAddress(handle, "ModuleFunction");
|
||||
if(!fun)
|
||||
{
|
||||
fun = cmDynamicLoader::GetSymbolAddress(handle, "_ModuleFunction");
|
||||
}
|
||||
typedef int (*TEST_FUNCTION)();
|
||||
TEST_FUNCTION testFun = (TEST_FUNCTION)fun;
|
||||
int ret = (*testFun)();
|
||||
if(!ret)
|
||||
if(!testFun)
|
||||
{
|
||||
cmFailed("ModuleFunction called from module did not return valid return");
|
||||
cmFailed("Could not find symbol ModuleFunction in library ");
|
||||
}
|
||||
else
|
||||
{
|
||||
int ret = (*testFun)();
|
||||
if(!ret)
|
||||
{
|
||||
cmFailed("ModuleFunction call did not return valid return.");
|
||||
}
|
||||
cmPassed("Module loaded and ModuleFunction called correctly.");
|
||||
}
|
||||
cmPassed("Module loaded and ModuleFunction called correctly");
|
||||
}
|
||||
|
||||
if(sharedFunction() != 1)
|
||||
{
|
||||
cmFailed("Call to sharedFunction from shared library failed.");
|
||||
|
Loading…
Reference in New Issue
Block a user