aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorAleric Inglewood2010-09-30 15:03:40 +0200
committerAleric Inglewood2010-09-30 15:03:40 +0200
commitd2e914c92e851ce3e0cc349dd3d707751d3abfc1 (patch)
tree27c9de509d7cdf1e267235b837c3d13ee6645ee6 /linden
parentVWR-14426: Link step fails on Linux when LDFLAGS is set (diff)
downloadmeta-impy-d2e914c92e851ce3e0cc349dd3d707751d3abfc1.zip
meta-impy-d2e914c92e851ce3e0cc349dd3d707751d3abfc1.tar.gz
meta-impy-d2e914c92e851ce3e0cc349dd3d707751d3abfc1.tar.bz2
meta-impy-d2e914c92e851ce3e0cc349dd3d707751d3abfc1.tar.xz
RED-573: FindTut.cmake is missing: tut.h is not searched for.
This patch only affects --standalone. It was basically ported from Snowglobe with the following change: If LL_TESTS is not set, then tut.h is not required (this is an improvement, because if LL_TESTS is not set no tests should be created or run). I tested it with -DLL_TESTS:BOOL=ON, -DLL_TESTS:BOOL=OFF and no -DLL_TESTS* at all, with and without tut installed, internally and externally. Things worked as expected. Most notably, with tut.h installed in libraries/include/, it is NOT found. This is necessary because using -Ilibraries/include for standalone is a no no: prebuilt stuff might be downloaded, but we don't want to use it! That directory contains potentially many other libraries.
Diffstat (limited to 'linden')
-rw-r--r--linden/doc/contributions.txt1
-rw-r--r--linden/indra/cmake/FindTut.cmake33
-rw-r--r--linden/indra/cmake/Tut.cmake15
3 files changed, 47 insertions, 2 deletions
diff --git a/linden/doc/contributions.txt b/linden/doc/contributions.txt
index c1c3ec3..49ea94b 100644
--- a/linden/doc/contributions.txt
+++ b/linden/doc/contributions.txt
@@ -66,6 +66,7 @@ Aleric Inglewood
66 RED-565 66 RED-565
67 RED-566 67 RED-566
68 RED-567 68 RED-567
69 RED-573
69Alissa Sabre 70Alissa Sabre
70 VWR-81 71 VWR-81
71 VWR-83 72 VWR-83
diff --git a/linden/indra/cmake/FindTut.cmake b/linden/indra/cmake/FindTut.cmake
new file mode 100644
index 0000000..5ac7ec0
--- /dev/null
+++ b/linden/indra/cmake/FindTut.cmake
@@ -0,0 +1,33 @@
1# -*- cmake -*-
2
3# - Find Tut
4# Find the Tut unit test framework includes and library
5# This module defines
6# TUT_INCLUDE_DIR, where to find tut/tut.hpp, etc.
7# TUT_FOUND, If false, do not try to use Tut.
8
9find_path(TUT_INCLUDE_DIR tut/tut.hpp
10 NO_SYSTEM_ENVIRONMENT_PATH
11)
12
13IF (TUT_INCLUDE_DIR)
14 SET(TUT_FOUND "YES")
15ELSE (TUT_INCLUDE_DIR)
16 SET(TUT_FOUND "NO")
17ENDIF (TUT_INCLUDE_DIR)
18
19IF (TUT_FOUND)
20 IF (NOT TUT_FIND_QUIETLY)
21 MESSAGE(STATUS "Found Tut: ${TUT_INCLUDE_DIR}")
22 SET(TUT_FIND_QUIETLY TRUE) # Only alert us the first time
23 ENDIF (NOT TUT_FIND_QUIETLY)
24ELSE (TUT_FOUND)
25 IF (TUT_FIND_REQUIRED)
26 MESSAGE(FATAL_ERROR "Could not find Tut")
27 ENDIF (TUT_FIND_REQUIRED)
28ENDIF (TUT_FOUND)
29
30MARK_AS_ADVANCED(
31 TUT_INCLUDE_DIR
32)
33
diff --git a/linden/indra/cmake/Tut.cmake b/linden/indra/cmake/Tut.cmake
index 7488e9d..118c72e 100644
--- a/linden/indra/cmake/Tut.cmake
+++ b/linden/indra/cmake/Tut.cmake
@@ -1,6 +1,17 @@
1# -*- cmake -*- 1# -*- cmake -*-
2include(Prebuilt) 2include(Prebuilt)
3 3
4if (NOT STANDALONE) 4SET(TUT_FIND_REQUIRED FALSE)
5SET(TUT_FIND_QUIETLY TRUE)
6
7if (STANDALONE)
8 if (LL_TESTS)
9 SET(TUT_FIND_REQUIRED TRUE)
10 endif (LL_TESTS)
11 include(FindTut)
12 if (TUT_FOUND)
13 include_directories(${TUT_INCLUDE_DIR})
14 endif (TUT_FOUND)
15else (STANDALONE)
5 use_prebuilt_binary(tut) 16 use_prebuilt_binary(tut)
6endif(NOT STANDALONE) 17endif(STANDALONE)