COIN-OR::LEMON - Graph Library

Ticket #395: 395.patches

File 395.patches, 5.8 KB (added by alpar, 8 years ago)
Line 
1# HG changeset patch
2# User Alpar Juttner <alpar@cs.elte.hu>
3# Date 1285510653 -7200
4# Node ID 10242c6111900376d7d913923eaf94f61b13d05c
5# Parent  1937b6455b7d0cff4f1e21bdd7c5a66b4c1af1cf
6Create and install lemon.pc (#393)
7
8diff --git a/lemon/CMakeLists.txt b/lemon/CMakeLists.txt
9--- a/lemon/CMakeLists.txt
10+++ b/lemon/CMakeLists.txt
11@@ -8,6 +8,12 @@
12   ${CMAKE_CURRENT_BINARY_DIR}/config.h
13 )
14 
15+CONFIGURE_FILE(
16+  ${CMAKE_CURRENT_SOURCE_DIR}/lemon.pc.cmake
17+  ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
18+  @ONLY
19+)
20+
21 SET(LEMON_SOURCES
22   arg_parser.cc
23   base.cc
24@@ -66,3 +72,9 @@
25   DESTINATION include/lemon
26   COMPONENT headers
27 )
28+
29+INSTALL(
30+  FILES ${CMAKE_CURRENT_BINARY_DIR}/lemon.pc
31+  DESTINATION lib/pkgconfig
32+)
33+
34diff --git a/lemon/lemon.pc.cmake b/lemon/lemon.pc.cmake
35new file mode 100644
36--- /dev/null
37+++ b/lemon/lemon.pc.cmake
38@@ -0,0 +1,10 @@
39+prefix=@CMAKE_INSTALL_PREFIX@
40+exec_prefix=@CMAKE_INSTALL_PREFIX@/bin
41+libdir=@CMAKE_INSTALL_PREFIX@/lib
42+includedir=@CMAKE_INSTALL_PREFIX@/include
43+
44+Name: @PROJECT_NAME@
45+Description: Library for Efficient Modeling and Optimization in Networks
46+Version: @PROJECT_VERSION@
47+Libs: -L${libdir} -lemon @GLPK_LIBS@ @CPLEX_LIBS@ @SOPLEX_LIBS@ @CLP_LIBS@ @CBC_LIBS@
48+Cflags: -I${includedir}
49# HG changeset patch
50# User Alpar Juttner <alpar@cs.elte.hu>
51# Date 1288175459 -7200
52# Node ID 48e29534cf032c7fa16bbddbe6123034b43fefec
53# Parent  10242c6111900376d7d913923eaf94f61b13d05c
54The deafult target doesn't build lp_test and mip_test (#388)
55
56diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
57--- a/test/CMakeLists.txt
58+++ b/test/CMakeLists.txt
59@@ -46,7 +46,12 @@
60 )
61 
62 IF(LEMON_HAVE_LP)
63-  ADD_EXECUTABLE(lp_test lp_test.cc)
64+  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
65+    ADD_EXECUTABLE(lp_test lp_test.cc)
66+  ELSE()
67+    ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc)
68+  ENDIF()
69+
70   SET(LP_TEST_LIBS lemon)
71 
72   IF(LEMON_HAVE_GLPK)
73@@ -82,7 +87,12 @@
74 ENDIF()
75 
76 IF(LEMON_HAVE_MIP)
77-  ADD_EXECUTABLE(mip_test mip_test.cc)
78+  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
79+    ADD_EXECUTABLE(mip_test mip_test.cc)
80+  ELSE()
81+    ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc)
82+  ENDIF()
83+
84   SET(MIP_TEST_LIBS lemon)
85 
86   IF(LEMON_HAVE_GLPK)
87# HG changeset patch
88# User Alpar Juttner <alpar@cs.elte.hu>
89# Date 1288006626 -7200
90# Node ID 0fbbdd578c06bcf42a4157c161ded1fd4e31b802
91# Parent  48e29534cf032c7fa16bbddbe6123034b43fefec
92Full path for DoxygenLayout.xml in Doxyfile.in (#395)
93
94diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
95--- a/doc/Doxyfile.in
96+++ b/doc/Doxyfile.in
97@@ -70,7 +70,7 @@
98 SHOW_FILES             = YES
99 SHOW_NAMESPACES        = YES
100 FILE_VERSION_FILTER    =
101-LAYOUT_FILE            = DoxygenLayout.xml
102+LAYOUT_FILE            = "@abs_top_srcdir@/doc/DoxygenLayout.xml"
103 #---------------------------------------------------------------------------
104 # configuration options related to warning and progress messages
105 #---------------------------------------------------------------------------
106# HG changeset patch
107# User Alpar Juttner <alpar@cs.elte.hu>
108# Date 1288013637 -7200
109# Node ID 481496e6d71f8098513b2b29664d7b03a92e7a3a
110# Parent  0fbbdd578c06bcf42a4157c161ded1fd4e31b802
111SOURCE_BROWSER Doxygen switch is configurable from CMAKE (#395)
112
113diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
114--- a/doc/CMakeLists.txt
115+++ b/doc/CMakeLists.txt
116@@ -3,6 +3,8 @@
117 SET(abs_top_srcdir ${PROJECT_SOURCE_DIR})
118 SET(abs_top_builddir ${PROJECT_BINARY_DIR})
119 
120+SET(LEMON_DOC_SOURCE_BROWSER "NO" CACHE STRING "Include source into the doc (YES/NO).")
121+
122 CONFIGURE_FILE(
123   ${PROJECT_SOURCE_DIR}/doc/Doxyfile.in
124   ${PROJECT_BINARY_DIR}/doc/Doxyfile
125diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
126--- a/doc/Doxyfile.in
127+++ b/doc/Doxyfile.in
128@@ -114,7 +114,7 @@
129 #---------------------------------------------------------------------------
130 # configuration options related to source browsing
131 #---------------------------------------------------------------------------
132-SOURCE_BROWSER         = NO
133+SOURCE_BROWSER         = @LEMON_DOC_SOURCE_BROWSER@
134 INLINE_SOURCES         = NO
135 STRIP_CODE_COMMENTS    = YES
136 REFERENCED_BY_RELATION = NO
137# HG changeset patch
138# User Alpar Juttner <alpar@cs.elte.hu>
139# Date 1288018179 -7200
140# Node ID 09282720100bd14422a1d617a32aae9b76c29265
141# Parent  481496e6d71f8098513b2b29664d7b03a92e7a3a
142update-external-tags CMAKE target (#395)
143
144diff --git a/CMakeLists.txt b/CMakeLists.txt
145--- a/CMakeLists.txt
146+++ b/CMakeLists.txt
147@@ -4,6 +4,7 @@
148 PROJECT(${PROJECT_NAME})
149 
150 INCLUDE(FindPythonInterp)
151+INCLUDE(FindWget)
152 
153 IF(EXISTS ${PROJECT_SOURCE_DIR}/cmake/version.cmake)
154   INCLUDE(${PROJECT_SOURCE_DIR}/cmake/version.cmake)
155diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
156--- a/doc/CMakeLists.txt
157+++ b/doc/CMakeLists.txt
158@@ -54,3 +54,15 @@
159   ENDIF()
160 
161 ENDIF()
162+
163+IF(WGET_FOUND)
164+ADD_CUSTOM_TARGET(update-external-tags
165+  COMMAND ${CMAKE_COMMAND} -E make_directory dl
166+  # COMMAND ${CMAKE_COMMAND} -E copy libstdc++.tag dl
167+  COMMAND ${WGET_EXECUTABLE} wget -P dl -N libstdc++.tag.tmp http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag
168+  COMMAND ${CMAKE_COMMAND} -E rename dl/libstdc++.tag libstdc++.tag
169+  COMMAND ${CMAKE_COMMAND} -E remove dl/libstdc++.tag
170+  COMMAND ${CMAKE_COMMAND} -E remove_directory dl
171+  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
172+  )
173+ENDIF()
174diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
175--- a/doc/Doxyfile.in
176+++ b/doc/Doxyfile.in
177@@ -225,7 +225,7 @@
178 #---------------------------------------------------------------------------
179 # Options related to the search engine   
180 #---------------------------------------------------------------------------
181-TAGFILES               = "@abs_top_srcdir@/doc/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/  "
182+TAGFILES               = "@abs_top_builddir@/doc/libstdc++.tag = http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/  "
183 GENERATE_TAGFILE       = html/lemon.tag
184 ALLEXTERNALS           = NO
185 EXTERNAL_GROUPS        = NO