ENH: MinGW build now passes all the tests
This commit is contained in:
parent
f9064ee91a
commit
a35d911def
|
@ -1,8 +1,8 @@
|
||||||
SET(CMAKE_LINK_LIBRARY_SUFFIX "")
|
SET(CMAKE_LINK_LIBRARY_SUFFIX "")
|
||||||
SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
|
SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
|
||||||
SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
|
SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
|
||||||
SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
|
SET(CMAKE_SHARED_LIBRARY_PREFIX "") # lib
|
||||||
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
|
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # .so
|
||||||
SET(CMAKE_DL_LIBS "")
|
SET(CMAKE_DL_LIBS "")
|
||||||
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
|
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
|
||||||
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
|
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
|
||||||
|
|
|
@ -19,7 +19,9 @@ IF (UNIX)
|
||||||
ELSE(UNIX)
|
ELSE(UNIX)
|
||||||
TARGET_LINK_LIBRARIES(complex CMakeLib cmsys)
|
TARGET_LINK_LIBRARIES(complex CMakeLib cmsys)
|
||||||
IF (NOT BORLAND)
|
IF (NOT BORLAND)
|
||||||
|
IF(NOT MINGW)
|
||||||
TARGET_LINK_LIBRARIES(complex rpcrt4.lib)
|
TARGET_LINK_LIBRARIES(complex rpcrt4.lib)
|
||||||
|
ENDIF(NOT MINGW)
|
||||||
ENDIF(NOT BORLAND)
|
ENDIF(NOT BORLAND)
|
||||||
ENDIF (UNIX)
|
ENDIF (UNIX)
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,9 @@ int main()
|
||||||
cmLibHandle handle = cmDynamicLoader::OpenLibrary(lib.c_str());
|
cmLibHandle handle = cmDynamicLoader::OpenLibrary(lib.c_str());
|
||||||
if(!handle)
|
if(!handle)
|
||||||
{
|
{
|
||||||
cmFailed("Can not open CMakeTestModule");
|
std::string err = "Can not open CMakeTestModule:";
|
||||||
|
err += lib;
|
||||||
|
cmFailed(lib.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,12 +23,14 @@ ADD_LIBRARY(CMakeTestLibrary ${LibrarySources})
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
IF(NOT CYGWIN)
|
IF(NOT CYGWIN)
|
||||||
IF(NOT BORLAND)
|
IF(NOT BORLAND)
|
||||||
|
IF(NOT MINGW)
|
||||||
TARGET_LINK_LIBRARIES(CMakeTestLibrary
|
TARGET_LINK_LIBRARIES(CMakeTestLibrary
|
||||||
debug
|
debug
|
||||||
user32.lib)
|
user32.lib)
|
||||||
TARGET_LINK_LIBRARIES(CMakeTestLibrary
|
TARGET_LINK_LIBRARIES(CMakeTestLibrary
|
||||||
optimized
|
optimized
|
||||||
kernel32.lib)
|
kernel32.lib)
|
||||||
|
ENDIF(NOT MINGW)
|
||||||
ENDIF(NOT BORLAND)
|
ENDIF(NOT BORLAND)
|
||||||
ENDIF(NOT CYGWIN)
|
ENDIF(NOT CYGWIN)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
|
@ -19,7 +19,9 @@ IF (UNIX)
|
||||||
ELSE(UNIX)
|
ELSE(UNIX)
|
||||||
TARGET_LINK_LIBRARIES(complex CMakeLib cmsys)
|
TARGET_LINK_LIBRARIES(complex CMakeLib cmsys)
|
||||||
IF (NOT BORLAND)
|
IF (NOT BORLAND)
|
||||||
|
IF(NOT MINGW)
|
||||||
TARGET_LINK_LIBRARIES(complex rpcrt4.lib)
|
TARGET_LINK_LIBRARIES(complex rpcrt4.lib)
|
||||||
|
ENDIF(NOT MINGW)
|
||||||
ENDIF(NOT BORLAND)
|
ENDIF(NOT BORLAND)
|
||||||
ENDIF (UNIX)
|
ENDIF (UNIX)
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,9 @@ int main()
|
||||||
cmLibHandle handle = cmDynamicLoader::OpenLibrary(lib.c_str());
|
cmLibHandle handle = cmDynamicLoader::OpenLibrary(lib.c_str());
|
||||||
if(!handle)
|
if(!handle)
|
||||||
{
|
{
|
||||||
cmFailed("Can not open CMakeTestModule");
|
std::string err = "Can not open CMakeTestModule:";
|
||||||
|
err += lib;
|
||||||
|
cmFailed(lib.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,12 +23,14 @@ ADD_LIBRARY(CMakeTestLibrary ${LibrarySources})
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
IF(NOT CYGWIN)
|
IF(NOT CYGWIN)
|
||||||
IF(NOT BORLAND)
|
IF(NOT BORLAND)
|
||||||
|
IF(NOT MINGW)
|
||||||
TARGET_LINK_LIBRARIES(CMakeTestLibrary
|
TARGET_LINK_LIBRARIES(CMakeTestLibrary
|
||||||
debug
|
debug
|
||||||
user32.lib)
|
user32.lib)
|
||||||
TARGET_LINK_LIBRARIES(CMakeTestLibrary
|
TARGET_LINK_LIBRARIES(CMakeTestLibrary
|
||||||
optimized
|
optimized
|
||||||
kernel32.lib)
|
kernel32.lib)
|
||||||
|
ENDIF(NOT MINGW)
|
||||||
ENDIF(NOT BORLAND)
|
ENDIF(NOT BORLAND)
|
||||||
ENDIF(NOT CYGWIN)
|
ENDIF(NOT CYGWIN)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
|
@ -19,7 +19,9 @@ IF (UNIX)
|
||||||
ELSE(UNIX)
|
ELSE(UNIX)
|
||||||
TARGET_LINK_LIBRARIES(complex CMakeLib cmsys)
|
TARGET_LINK_LIBRARIES(complex CMakeLib cmsys)
|
||||||
IF (NOT BORLAND)
|
IF (NOT BORLAND)
|
||||||
|
IF(NOT MINGW)
|
||||||
TARGET_LINK_LIBRARIES(complex rpcrt4.lib)
|
TARGET_LINK_LIBRARIES(complex rpcrt4.lib)
|
||||||
|
ENDIF(NOT MINGW)
|
||||||
ENDIF(NOT BORLAND)
|
ENDIF(NOT BORLAND)
|
||||||
ENDIF (UNIX)
|
ENDIF (UNIX)
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,9 @@ int main()
|
||||||
cmLibHandle handle = cmDynamicLoader::OpenLibrary(lib.c_str());
|
cmLibHandle handle = cmDynamicLoader::OpenLibrary(lib.c_str());
|
||||||
if(!handle)
|
if(!handle)
|
||||||
{
|
{
|
||||||
cmFailed("Can not open CMakeTestModule");
|
std::string err = "Can not open CMakeTestModule:";
|
||||||
|
err += lib;
|
||||||
|
cmFailed(lib.c_str());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,12 +23,14 @@ ADD_LIBRARY(CMakeTestLibrary ${LibrarySources})
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
IF(NOT CYGWIN)
|
IF(NOT CYGWIN)
|
||||||
IF(NOT BORLAND)
|
IF(NOT BORLAND)
|
||||||
|
IF(NOT MINGW)
|
||||||
TARGET_LINK_LIBRARIES(CMakeTestLibrary
|
TARGET_LINK_LIBRARIES(CMakeTestLibrary
|
||||||
debug
|
debug
|
||||||
user32.lib)
|
user32.lib)
|
||||||
TARGET_LINK_LIBRARIES(CMakeTestLibrary
|
TARGET_LINK_LIBRARIES(CMakeTestLibrary
|
||||||
optimized
|
optimized
|
||||||
kernel32.lib)
|
kernel32.lib)
|
||||||
|
ENDIF(NOT MINGW)
|
||||||
ENDIF(NOT BORLAND)
|
ENDIF(NOT BORLAND)
|
||||||
ENDIF(NOT CYGWIN)
|
ENDIF(NOT CYGWIN)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
Loading…
Reference in New Issue