From 51095a9d7d7fb4a6f8c4e026d89b784faba3fff9 Mon Sep 17 00:00:00 2001 From: flithm Date: Tue, 28 Aug 2007 18:29:14 +0000 Subject: [PATCH] Phobos dmd linux fixes Added check that if a stdlib isn't found and the project needs it an error message is printed --- cmaked/CMakeDInformation.cmake | 2 +- cmaked/CMakeTestDCompiler.cmake | 9 +++++++++ samples/minwin_gtk/minwin/gtk.d | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cmaked/CMakeDInformation.cmake b/cmaked/CMakeDInformation.cmake index b1a1d87..954b3e5 100644 --- a/cmaked/CMakeDInformation.cmake +++ b/cmaked/CMakeDInformation.cmake @@ -158,7 +158,7 @@ IF(CMAKE_D_USE_PHOBOS) SET(DSTDLIB_FLAGS "-lgphobos") ELSE(CMAKE_COMPILER_IS_GDC) SET(DSTDLIB_TYPE "-version=Phobos") - SET(DSTDLIB_FLAGS "-L${D_PATH}/lib -ltango -lphobos") + SET(DSTDLIB_FLAGS "-L${D_PATH}/lib -lphobos") ENDIF(CMAKE_COMPILER_IS_GDC) ENDIF(CMAKE_D_USE_PHOBOS) diff --git a/cmaked/CMakeTestDCompiler.cmake b/cmaked/CMakeTestDCompiler.cmake index bc49958..5f3115a 100644 --- a/cmaked/CMakeTestDCompiler.cmake +++ b/cmaked/CMakeTestDCompiler.cmake @@ -158,3 +158,12 @@ ELSE(NOT CMAKE_D_TANGO_WORKS) ENDIF(C_TEST_WAS_RUN) SET(CMAKE_D_TANGO_WORKS 1 CACHE INTERNAL "") ENDIF(NOT CMAKE_D_TANGO_WORKS) +# ensure the user has the appropriate std lib available +IF(CMAKE_D_USE_TANGO AND NOT CMAKE_D_TANGO_WORKS) + MESSAGE(FATAL_ERROR "Tango is required for this project, but it is not available!") +ENDIF(CMAKE_D_USE_TANGO AND NOT CMAKE_D_TANGO_WORKS) + +IF(CMAKE_D_USE_PHOBOS AND NOT CMAKE_D_PHOBOS_WORKS) + MESSAGE(FATAL_ERROR "Phobos is required for this project, but it is not available!") +ENDIF(CMAKE_D_USE_PHOBOS AND NOT CMAKE_D_PHOBOS_WORKS) + diff --git a/samples/minwin_gtk/minwin/gtk.d b/samples/minwin_gtk/minwin/gtk.d index 4509bc4..7d84365 100644 --- a/samples/minwin_gtk/minwin/gtk.d +++ b/samples/minwin_gtk/minwin/gtk.d @@ -1470,7 +1470,7 @@ extern (C) { } struct _GSourceCallbackFuncs { - void (*ref) (gpointer cb_data); + void (*theRef) (gpointer cb_data); void (*unref) (gpointer cb_data); void (*get) (gpointer cb_data, GSource *source,