From a35d911defc912e3d5f1cbbf292493cbcec6f238 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 27 Aug 2003 16:42:01 -0400 Subject: ENH: MinGW build now passes all the tests --- Modules/Platform/Windows-gcc.cmake | 4 ++-- Tests/Complex/Executable/CMakeLists.txt | 4 +++- Tests/Complex/Executable/complex.cxx | 4 +++- Tests/Complex/Library/CMakeLists.txt | 14 ++++++++------ Tests/ComplexOneConfig/Executable/CMakeLists.txt | 4 +++- Tests/ComplexOneConfig/Executable/complex.cxx | 4 +++- Tests/ComplexOneConfig/Library/CMakeLists.txt | 14 ++++++++------ Tests/ComplexRelativePaths/Executable/CMakeLists.txt | 4 +++- Tests/ComplexRelativePaths/Executable/complex.cxx | 4 +++- Tests/ComplexRelativePaths/Library/CMakeLists.txt | 14 ++++++++------ 10 files changed, 44 insertions(+), 26 deletions(-) diff --git a/Modules/Platform/Windows-gcc.cmake b/Modules/Platform/Windows-gcc.cmake index 5b50043..a5a42f7 100644 --- a/Modules/Platform/Windows-gcc.cmake +++ b/Modules/Platform/Windows-gcc.cmake @@ -1,8 +1,8 @@ SET(CMAKE_LINK_LIBRARY_SUFFIX "") SET(CMAKE_STATIC_LIBRARY_PREFIX "lib") SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a") -SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib -SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so +SET(CMAKE_SHARED_LIBRARY_PREFIX "") # lib +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # .so SET(CMAKE_DL_LIBS "") SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt index 5e88795..26626a6 100644 --- a/Tests/Complex/Executable/CMakeLists.txt +++ b/Tests/Complex/Executable/CMakeLists.txt @@ -19,7 +19,9 @@ IF (UNIX) ELSE(UNIX) TARGET_LINK_LIBRARIES(complex CMakeLib cmsys) IF (NOT BORLAND) - TARGET_LINK_LIBRARIES(complex rpcrt4.lib) + IF(NOT MINGW) + TARGET_LINK_LIBRARIES(complex rpcrt4.lib) + ENDIF(NOT MINGW) ENDIF(NOT BORLAND) ENDIF (UNIX) diff --git a/Tests/Complex/Executable/complex.cxx b/Tests/Complex/Executable/complex.cxx index 208e9fd..067bf66 100644 --- a/Tests/Complex/Executable/complex.cxx +++ b/Tests/Complex/Executable/complex.cxx @@ -115,7 +115,9 @@ int main() cmLibHandle handle = cmDynamicLoader::OpenLibrary(lib.c_str()); if(!handle) { - cmFailed("Can not open CMakeTestModule"); + std::string err = "Can not open CMakeTestModule:"; + err += lib; + cmFailed(lib.c_str()); } else { diff --git a/Tests/Complex/Library/CMakeLists.txt b/Tests/Complex/Library/CMakeLists.txt index 0df970b..488f4e7 100644 --- a/Tests/Complex/Library/CMakeLists.txt +++ b/Tests/Complex/Library/CMakeLists.txt @@ -23,12 +23,14 @@ ADD_LIBRARY(CMakeTestLibrary ${LibrarySources}) IF(WIN32) IF(NOT CYGWIN) IF(NOT BORLAND) - TARGET_LINK_LIBRARIES(CMakeTestLibrary - debug - user32.lib) - TARGET_LINK_LIBRARIES(CMakeTestLibrary - optimized - kernel32.lib) + IF(NOT MINGW) + TARGET_LINK_LIBRARIES(CMakeTestLibrary + debug + user32.lib) + TARGET_LINK_LIBRARIES(CMakeTestLibrary + optimized + kernel32.lib) + ENDIF(NOT MINGW) ENDIF(NOT BORLAND) ENDIF(NOT CYGWIN) ENDIF(WIN32) diff --git a/Tests/ComplexOneConfig/Executable/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/CMakeLists.txt index 5e88795..26626a6 100644 --- a/Tests/ComplexOneConfig/Executable/CMakeLists.txt +++ b/Tests/ComplexOneConfig/Executable/CMakeLists.txt @@ -19,7 +19,9 @@ IF (UNIX) ELSE(UNIX) TARGET_LINK_LIBRARIES(complex CMakeLib cmsys) IF (NOT BORLAND) - TARGET_LINK_LIBRARIES(complex rpcrt4.lib) + IF(NOT MINGW) + TARGET_LINK_LIBRARIES(complex rpcrt4.lib) + ENDIF(NOT MINGW) ENDIF(NOT BORLAND) ENDIF (UNIX) diff --git a/Tests/ComplexOneConfig/Executable/complex.cxx b/Tests/ComplexOneConfig/Executable/complex.cxx index 208e9fd..067bf66 100644 --- a/Tests/ComplexOneConfig/Executable/complex.cxx +++ b/Tests/ComplexOneConfig/Executable/complex.cxx @@ -115,7 +115,9 @@ int main() cmLibHandle handle = cmDynamicLoader::OpenLibrary(lib.c_str()); if(!handle) { - cmFailed("Can not open CMakeTestModule"); + std::string err = "Can not open CMakeTestModule:"; + err += lib; + cmFailed(lib.c_str()); } else { diff --git a/Tests/ComplexOneConfig/Library/CMakeLists.txt b/Tests/ComplexOneConfig/Library/CMakeLists.txt index 0df970b..488f4e7 100644 --- a/Tests/ComplexOneConfig/Library/CMakeLists.txt +++ b/Tests/ComplexOneConfig/Library/CMakeLists.txt @@ -23,12 +23,14 @@ ADD_LIBRARY(CMakeTestLibrary ${LibrarySources}) IF(WIN32) IF(NOT CYGWIN) IF(NOT BORLAND) - TARGET_LINK_LIBRARIES(CMakeTestLibrary - debug - user32.lib) - TARGET_LINK_LIBRARIES(CMakeTestLibrary - optimized - kernel32.lib) + IF(NOT MINGW) + TARGET_LINK_LIBRARIES(CMakeTestLibrary + debug + user32.lib) + TARGET_LINK_LIBRARIES(CMakeTestLibrary + optimized + kernel32.lib) + ENDIF(NOT MINGW) ENDIF(NOT BORLAND) ENDIF(NOT CYGWIN) ENDIF(WIN32) diff --git a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt index 5e88795..26626a6 100644 --- a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt @@ -19,7 +19,9 @@ IF (UNIX) ELSE(UNIX) TARGET_LINK_LIBRARIES(complex CMakeLib cmsys) IF (NOT BORLAND) - TARGET_LINK_LIBRARIES(complex rpcrt4.lib) + IF(NOT MINGW) + TARGET_LINK_LIBRARIES(complex rpcrt4.lib) + ENDIF(NOT MINGW) ENDIF(NOT BORLAND) ENDIF (UNIX) diff --git a/Tests/ComplexRelativePaths/Executable/complex.cxx b/Tests/ComplexRelativePaths/Executable/complex.cxx index 208e9fd..067bf66 100644 --- a/Tests/ComplexRelativePaths/Executable/complex.cxx +++ b/Tests/ComplexRelativePaths/Executable/complex.cxx @@ -115,7 +115,9 @@ int main() cmLibHandle handle = cmDynamicLoader::OpenLibrary(lib.c_str()); if(!handle) { - cmFailed("Can not open CMakeTestModule"); + std::string err = "Can not open CMakeTestModule:"; + err += lib; + cmFailed(lib.c_str()); } else { diff --git a/Tests/ComplexRelativePaths/Library/CMakeLists.txt b/Tests/ComplexRelativePaths/Library/CMakeLists.txt index 0df970b..488f4e7 100644 --- a/Tests/ComplexRelativePaths/Library/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/Library/CMakeLists.txt @@ -23,12 +23,14 @@ ADD_LIBRARY(CMakeTestLibrary ${LibrarySources}) IF(WIN32) IF(NOT CYGWIN) IF(NOT BORLAND) - TARGET_LINK_LIBRARIES(CMakeTestLibrary - debug - user32.lib) - TARGET_LINK_LIBRARIES(CMakeTestLibrary - optimized - kernel32.lib) + IF(NOT MINGW) + TARGET_LINK_LIBRARIES(CMakeTestLibrary + debug + user32.lib) + TARGET_LINK_LIBRARIES(CMakeTestLibrary + optimized + kernel32.lib) + ENDIF(NOT MINGW) ENDIF(NOT BORLAND) ENDIF(NOT CYGWIN) ENDIF(WIN32) -- cgit v0.12