[Lemon-commits] Alpar Juttner: Merge bugfixes #274 and #275
Lemon HG
hg at lemon.cs.elte.hu
Tue Apr 28 15:03:35 CEST 2009
details: http://lemon.cs.elte.hu/hg/lemon/rev/4b558ee0d4f5
changeset: 662:4b558ee0d4f5
user: Alpar Juttner <alpar [at] cs.elte.hu>
date: Tue Apr 28 13:42:28 2009 +0100
description:
Merge bugfixes #274 and #275
diffstat:
CMakeLists.txt | 4 +++-
configure.ac | 2 +-
demo/CMakeLists.txt | 5 ++++-
lemon/CMakeLists.txt | 15 ++++++++++++++-
lemon/Makefile.am | 1 +
lemon/bits/default_map.h | 2 +-
lemon/config.h.cmake | 2 +-
lemon/config.h.in | 6 +++---
m4/lx_check_cplex.m4 | 2 +-
m4/lx_check_glpk.m4 | 2 +-
m4/lx_check_soplex.m4 | 2 +-
test/CMakeLists.txt | 5 ++++-
12 files changed, 35 insertions(+), 13 deletions(-)
diffs (158 lines):
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,8 +23,10 @@
INCLUDE(FindDoxygen)
INCLUDE(FindGhostscript)
+ADD_DEFINITIONS(-DHAVE_CONFIG_H)
+
INCLUDE(CheckTypeSize)
-CHECK_TYPE_SIZE("long long" LONG_LONG)
+CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG)
ENABLE_TESTING()
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -27,7 +27,7 @@
dnl Check the existence of long long type.
AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no])
if test x"$long_long_found" = x"yes"; then
- AC_DEFINE([HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
+ AC_DEFINE([LEMON_HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
fi
dnl Checks for programs.
diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt
--- a/demo/CMakeLists.txt
+++ b/demo/CMakeLists.txt
@@ -1,4 +1,7 @@
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
+INCLUDE_DIRECTORIES(
+ ${CMAKE_SOURCE_DIR}
+ ${PROJECT_BINARY_DIR}
+)
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
diff --git a/lemon/CMakeLists.txt b/lemon/CMakeLists.txt
--- a/lemon/CMakeLists.txt
+++ b/lemon/CMakeLists.txt
@@ -1,4 +1,12 @@
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
+INCLUDE_DIRECTORIES(
+ ${CMAKE_SOURCE_DIR}
+ ${PROJECT_BINARY_DIR}
+)
+
+CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/config.h
+)
ADD_LIBRARY(lemon
arg_parser.cc
@@ -18,3 +26,8 @@
DESTINATION include/lemon
COMPONENT headers
FILES_MATCHING PATTERN "*.h")
+
+INSTALL(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
+ DESTINATION include/lemon
+ COMPONENT headers)
diff --git a/lemon/Makefile.am b/lemon/Makefile.am
--- a/lemon/Makefile.am
+++ b/lemon/Makefile.am
@@ -23,6 +23,7 @@
lemon/bin_heap.h \
lemon/color.h \
lemon/concept_check.h \
+ lemon/config.h \
lemon/counter.h \
lemon/core.h \
lemon/dfs.h \
diff --git a/lemon/bits/default_map.h b/lemon/bits/default_map.h
--- a/lemon/bits/default_map.h
+++ b/lemon/bits/default_map.h
@@ -97,7 +97,7 @@
};
-#if defined HAVE_LONG_LONG
+#if defined LEMON_HAVE_LONG_LONG
// long long
template <typename _Graph, typename _Item>
diff --git a/lemon/config.h.cmake b/lemon/config.h.cmake
--- a/lemon/config.h.cmake
+++ b/lemon/config.h.cmake
@@ -1,1 +1,1 @@
-#cmakedefine HAVE_LONG_LONG 1
\ No newline at end of file
+#cmakedefine LEMON_HAVE_LONG_LONG 1
diff --git a/lemon/config.h.in b/lemon/config.h.in
--- a/lemon/config.h.in
+++ b/lemon/config.h.in
@@ -1,8 +1,8 @@
/* Define to 1 if you have CPLEX. */
-#undef HAVE_CPLEX
+#undef LEMON_HAVE_CPLEX
/* Define to 1 if you have GLPK. */
-#undef HAVE_GLPK
+#undef LEMON_HAVE_GLPK
/* Define to 1 if you have long long */
-#undef HAVE_LONG_LONG
+#undef LEMON_HAVE_LONG_LONG
diff --git a/m4/lx_check_cplex.m4 b/m4/lx_check_cplex.m4
--- a/m4/lx_check_cplex.m4
+++ b/m4/lx_check_cplex.m4
@@ -61,7 +61,7 @@
LIBS="$lx_save_libs"
if test x"$lx_cplex_found" = x"yes"; then
- AC_DEFINE([HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
+ AC_DEFINE([LEMON_HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
AC_MSG_RESULT([yes])
else
CPLEX_CFLAGS=""
diff --git a/m4/lx_check_glpk.m4 b/m4/lx_check_glpk.m4
--- a/m4/lx_check_glpk.m4
+++ b/m4/lx_check_glpk.m4
@@ -59,7 +59,7 @@
LIBS="$lx_save_libs"
if test x"$lx_glpk_found" = x"yes"; then
- AC_DEFINE([HAVE_GLPK], [1], [Define to 1 if you have GLPK.])
+ AC_DEFINE([LEMON_HAVE_GLPK], [1], [Define to 1 if you have GLPK.])
AC_MSG_RESULT([yes])
else
GLPK_CFLAGS=""
diff --git a/m4/lx_check_soplex.m4 b/m4/lx_check_soplex.m4
--- a/m4/lx_check_soplex.m4
+++ b/m4/lx_check_soplex.m4
@@ -55,7 +55,7 @@
LIBS="$lx_save_libs"
if test x"$lx_soplex_found" = x"yes"; then
- AC_DEFINE([HAVE_SOPLEX], [1], [Define to 1 if you have SOPLEX.])
+ AC_DEFINE([LEMON_HAVE_SOPLEX], [1], [Define to 1 if you have SOPLEX.])
AC_MSG_RESULT([yes])
else
SOPLEX_CXXFLAGS=""
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,4 +1,7 @@
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
+INCLUDE_DIRECTORIES(
+ ${CMAKE_SOURCE_DIR}
+ ${PROJECT_BINARY_DIR}
+)
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
More information about the Lemon-commits
mailing list