aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAleric Inglewood2010-09-30 15:55:13 +0200
committerAleric Inglewood2010-09-30 16:28:32 +0200
commita74fe93ffdb4f821cbf8189ba473d8df795f57a9 (patch)
tree528b877822706910c995ab9778777969d9976510
parentRED-578: SNOW-744: scripts/install.py --uninstall does not remove symbolic li... (diff)
downloadmeta-impy-a74fe93ffdb4f821cbf8189ba473d8df795f57a9.zip
meta-impy-a74fe93ffdb4f821cbf8189ba473d8df795f57a9.tar.gz
meta-impy-a74fe93ffdb4f821cbf8189ba473d8df795f57a9.tar.bz2
meta-impy-a74fe93ffdb4f821cbf8189ba473d8df795f57a9.tar.xz
RED-579: SNOW-751: 'configure' with cmake 2.8 is extremely slow.
Note that indra/cmake/CMakeLists.txt is missing on imprudence, so I couldn't add 'FindZLIB.cmake' to the list of source files (see http://svn.secondlife.com/trac/linden/browser/projects/2009/snowglobe/trunk/indra/cmake/CMakeLists.txt) I added a comment to http://github.com/mccabe/imprudence/commit/39f625963e408ec5dd394e202506700259b9b508 that adds an empty indra/cmake/CMakeLists.txt If Jacek follows up and copies snowglobe's CMakeLists.txt then she'll have to remove the FindZLIB.cmake from it if she tests it before merging with THIS commit. In that case it has to be added back when merging that commit with this one. Tested on imprudence with cmake 2.8.2: * Without patch, 'configure' takes 100 seconds. * With patch, 'configure' takes 4 seconds.
-rw-r--r--linden/doc/contributions.txt2
-rw-r--r--linden/indra/cmake/FindZLIB.cmake46
2 files changed, 48 insertions, 0 deletions
diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt
index eee1774..cff6863 100644
--- a/linden/doc/contributions.txt
+++ b/linden/doc/contributions.txt
@@ -58,6 +58,7 @@ Aleric Inglewood
58 SNOW-479 58 SNOW-479
59 SNOW-626 59 SNOW-626
60 SNOW-744 60 SNOW-744
61 SNOW-751
61 SNOW-766 62 SNOW-766
62 SNOW-800 63 SNOW-800
63 RED-552 64 RED-552
@@ -75,6 +76,7 @@ Aleric Inglewood
75 RED-576 76 RED-576
76 RED-577 77 RED-577
77 RED-578 78 RED-578
79 RED-579
78Alissa Sabre 80Alissa Sabre
79 VWR-81 81 VWR-81
80 VWR-83 82 VWR-83
diff --git a/linden/indra/cmake/FindZLIB.cmake b/linden/indra/cmake/FindZLIB.cmake
new file mode 100644
index 0000000..6d630f1
--- /dev/null
+++ b/linden/indra/cmake/FindZLIB.cmake
@@ -0,0 +1,46 @@
1# -*- cmake -*-
2
3# - Find zlib
4# Find the ZLIB includes and library
5# This module defines
6# ZLIB_INCLUDE_DIRS, where to find zlib.h, etc.
7# ZLIB_LIBRARIES, the libraries needed to use zlib.
8# ZLIB_FOUND, If false, do not try to use zlib.
9#
10# This FindZLIB is about 43 times as fast the one provided with cmake (2.8.x),
11# because it doesn't look up the version of zlib, resulting in a dramatic
12# speed up for configure (from 4 minutes 22 seconds to 6 seconds).
13#
14# Note: Since this file is only used for standalone, the windows
15# specific parts were left out.
16
17FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
18 NO_SYSTEM_ENVIRONMENT_PATH
19 )
20
21FIND_LIBRARY(ZLIB_LIBRARY z)
22
23if (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
24 SET(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
25 SET(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
26 SET(ZLIB_FOUND "YES")
27else (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
28 SET(ZLIB_FOUND "NO")
29endif (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
30
31if (ZLIB_FOUND)
32 if (NOT ZLIB_FIND_QUIETLY)
33 message(STATUS "Found ZLIB: ${ZLIB_LIBRARIES}")
34 SET(ZLIB_FIND_QUIETLY TRUE)
35 endif (NOT ZLIB_FIND_QUIETLY)
36else (ZLIB_FOUND)
37 if (ZLIB_FIND_REQUIRED)
38 message(FATAL_ERROR "Could not find ZLIB library")
39 endif (ZLIB_FIND_REQUIRED)
40endif (ZLIB_FOUND)
41
42mark_as_advanced(
43 ZLIB_LIBRARY
44 ZLIB_INCLUDE_DIR
45 )
46