gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, cmake, updated. a5f1cf2beb31002f3cd35bfe


From: Juergen Kahrs
Subject: [gawk-diffs] [SCM] gawk branch, cmake, updated. a5f1cf2beb31002f3cd35bfef7cb8af8843fc2b5
Date: Sun, 17 Feb 2013 15:31:24 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, cmake has been updated
       via  a5f1cf2beb31002f3cd35bfef7cb8af8843fc2b5 (commit)
      from  08fc54511a406a767652b617f9c8e293e794258a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=a5f1cf2beb31002f3cd35bfef7cb8af8843fc2b5

commit a5f1cf2beb31002f3cd35bfef7cb8af8843fc2b5
Author: Juergen Kahrs <address@hidden>
Date:   Sun Feb 17 16:31:08 2013 +0100

    Moved all configuration stuff into cmake/configure.cmake so that config.h 
contains all settings. All 265 basic test cases pass now with USE_CONFIG_H set 
to ON.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 01c98ac..80c3d50 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,27 +29,8 @@ project (gawk C)
 
 include(cmake/configure.cmake)
 
-find_package(BISON REQUIRED)
-if (${BISON_FOUND} STREQUAL "TRUE")
-  BISON_TARGET(awkgram awkgram.y ${CMAKE_SOURCE_DIR}/awkgram.c)
-endif()
-#http://www.cmake.org/cmake/help/v2.8.10/cmake.html#module:FindGettext
-find_package(Gettext REQUIRED)
-if (GETTEXT_FOUND STREQUAL "TRUE")
-  include_directories(${GETTEXT_INCLUDE_DIR})
-else ()
-  message( FATAL_ERROR "Gettext not found" )
-endif()
-find_package(LATEX)
-include(GNUInstallDirs)
-include(GetPrerequisites)
-
 set (EXTRA_LIBS "")
 
-DefineLibraryIfAvailable(m    sin         "" HAVE_LIBM)
-DefineLibraryIfAvailable(mpfr mpfr_add_si "" HAVE_MPFR)
-DefineLibraryIfAvailable(c    socket      "" HAVE_SOCKETS)
-
 if (${HAVE_MPFR})
   set (EXTRA_LIBS ${EXTRA_LIBS} mpfr gmp)
 endif ()
@@ -57,7 +38,6 @@ if (${DYNAMIC})
   set (EXTRA_LIBS ${EXTRA_LIBS} ${CMAKE_DL_LIBS} )
 endif ()
 
-
 include_directories(${CMAKE_SOURCE_DIR})
 
 if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
diff --git a/cmake/configure.cmake b/cmake/configure.cmake
index b064070..9e89628 100644
--- a/cmake/configure.cmake
+++ b/cmake/configure.cmake
@@ -237,3 +237,37 @@ DefineFunctionIfAvailable(mbrtowc HAVE_MBRTOWC)
 add_definitions(-D HAVE_STRINGIZE)
 add_definitions(-D _Noreturn=)
 
+find_package(BISON REQUIRED)
+if (${BISON_FOUND} STREQUAL "TRUE")
+  BISON_TARGET(awkgram awkgram.y ${CMAKE_SOURCE_DIR}/awkgram.c)
+endif()
+
+#http://www.cmake.org/cmake/help/v2.8.10/cmake.html#module:FindGettext
+find_package(Gettext REQUIRED)
+if (GETTEXT_FOUND STREQUAL "TRUE")
+  include_directories(${GETTEXT_INCLUDE_DIR})
+else ()
+  message( FATAL_ERROR "Gettext not found" )
+endif()
+
+find_package(LATEX)
+include(GNUInstallDirs)
+include(GetPrerequisites)
+
+# For some unknown reason the defines for the extension
+# are written into config.h only if they are implemented
+# here and not in extension/CMakeLists.txt.
+DefineLibraryIfAvailable(m    sin         "" HAVE_LIBM)
+DefineLibraryIfAvailable(mpfr mpfr_add_si "" HAVE_MPFR)
+DefineLibraryIfAvailable(c    socket      "" HAVE_SOCKETS)
+DefineFunctionIfAvailable(fnmatch HAVE_FNMATCH)
+DefineHFileIfAvailable(fnmatch.h HAVE_FNMATCH_H)
+DefineHFileIfAvailable(dirent.h HAVE_DIRENT_H)
+DefineFunctionIfAvailable(getdtablesize HAVE_GETDTABLESIZE)
+DefineFunctionIfAvailable(select HAVE_SELECT)
+DefineFunctionIfAvailable(gettimeofday HAVE_GETTIMEOFDAY)
+DefineHFileIfAvailable(sys/select.h HAVE_SYS_SELECT_H)
+DefineFunctionIfAvailable(nanosleep HAVE_NANOSLEEP)
+DefineHFileIfAvailable(time.h HAVE_TIME_H)
+DefineFunctionIfAvailable(GetSystemTimeAsFileTime HAVE_GETSYSTEMTIMEASFILETIME)
+
diff --git a/extension/CMakeLists.txt b/extension/CMakeLists.txt
index 9013bda..31ae4fa 100644
--- a/extension/CMakeLists.txt
+++ b/extension/CMakeLists.txt
@@ -35,8 +35,6 @@ ENDMACRO(BuildExtension)
 
 BuildExtension(filefuncs filefuncs.c stack.c gawkfts.c)
 
-DefineFunctionIfAvailable(fnmatch HAVE_FNMATCH)
-DefineHFileIfAvailable(fnmatch.h HAVE_FNMATCH_H)
 if (${HAVE_FNMATCH} AND ${HAVE_FNMATCH_H})
   BuildExtension(fnmatch fnmatch.c)
 else()
@@ -44,10 +42,11 @@ else()
 endif()
 
 BuildExtension(fork fork.c)
+
 BuildExtension(inplace inplace.c)
+
 BuildExtension(ordchr ordchr.c)
 
-DefineHFileIfAvailable(dirent.h HAVE_DIRENT_H)
 if (${HAVE_DIRENT_H})
   BuildExtension(readdir readdir.c)
 else()
@@ -55,9 +54,9 @@ else()
 endif()
 
 BuildExtension(readfile readfile.c)
+
 BuildExtension(revoutput revoutput.c)
 
-DefineFunctionIfAvailable(getdtablesize HAVE_GETDTABLESIZE)
 if (${HAVE_GETDTABLESIZE})
   BuildExtension(revtwoway revtwoway.c)
 else()
@@ -66,12 +65,6 @@ endif()
 
 BuildExtension(rwarray rwarray.c)
 
-DefineFunctionIfAvailable(select HAVE_SELECT)
-DefineFunctionIfAvailable(gettimeofday HAVE_GETTIMEOFDAY)
-DefineHFileIfAvailable(sys/select.h HAVE_SYS_SELECT_H)
-DefineFunctionIfAvailable(nanosleep HAVE_NANOSLEEP)
-DefineHFileIfAvailable(time.h HAVE_TIME_H)
-DefineFunctionIfAvailable(GetSystemTimeAsFileTime HAVE_GETSYSTEMTIMEASFILETIME)
 BuildExtension(time time.c)
 
 BuildExtension(testext testext.c)

-----------------------------------------------------------------------

Summary of changes:
 CMakeLists.txt           |   20 --------------------
 cmake/configure.cmake    |   34 ++++++++++++++++++++++++++++++++++
 extension/CMakeLists.txt |   13 +++----------
 3 files changed, 37 insertions(+), 30 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]