aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/cmake
diff options
context:
space:
mode:
authorAleric Inglewood2010-09-30 15:03:40 +0200
committerMcCabe Maxsted2010-10-01 23:59:35 -0700
commitef180105cb83eb5217a4caf1fdc161dd5e4fe3b5 (patch)
treea9fe93aa43c592ceb949b54a063f124856b5ea72 /linden/indra/cmake
parentVWR-14426: Link step fails on Linux when LDFLAGS is set (diff)
downloadmeta-impy-ef180105cb83eb5217a4caf1fdc161dd5e4fe3b5.zip
meta-impy-ef180105cb83eb5217a4caf1fdc161dd5e4fe3b5.tar.gz
meta-impy-ef180105cb83eb5217a4caf1fdc161dd5e4fe3b5.tar.bz2
meta-impy-ef180105cb83eb5217a4caf1fdc161dd5e4fe3b5.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 '')
-rw-r--r--linden/indra/cmake/FindTut.cmake33
-rw-r--r--linden/indra/cmake/Tut.cmake15
2 files changed, 46 insertions, 2 deletions
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)