diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2016-12-22 16:12:21 -0500 | 
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2016-12-22 16:12:21 -0500 | 
| commit | eff6bbea5998f3048a6f5a3ce1faf5ae1a6582da (patch) | |
| tree | 285a1f0d3da0176e69edae566f57623ecca92798 | |
| parent | 5bb619da9708c24a40f68be1e6eed1928b4b132c (diff) | |
DRTVWR-418: Emit less confusing error message when LL_BUILD not set.
When LL_BUILD is not in the environment at autobuild configure time, important
macros such as LL_WINDOWS aren't set. That means that platform-dependent
macros such as LL_TYPEOF() aren't defined, which can produce obscure errors
like this:
indra\llcommon\llunittype.h(51): error C2226: syntax error :
unexpected type 'S' (packages\llphysicsextensions\stub\LLPhysicsExtensionsStubImpl.cpp)
10>          indra\llcommon\llunittype.h(52) :
see reference to class template instantiation 'LLResultTypeAdd<S,T>' being compiled
Make the CMake logic fail with a more readily-understood error in that case.
| -rw-r--r-- | indra/cmake/Variables.cmake | 13 | 
1 files changed, 6 insertions, 7 deletions
| diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 99b19ff07a..e8698ace68 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -9,6 +9,12 @@  #   LINUX   - Linux  #   WINDOWS - Windows +# Switches set here and in 00-Common.cmake must agree with +# https://bitbucket.org/lindenlab/viewer-build-variables/src/tip/variables +# Reading $LL_BUILD is an attempt to directly use those switches. +if ("$ENV{LL_BUILD}" STREQUAL "") +  message(FATAL_ERROR "Environment variable LL_BUILD must be set") +endif ()  # Relative and absolute paths to subtrees. @@ -139,13 +145,6 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")  if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")    set(DARWIN 1) -  # The following must agree with -  # https://bitbucket.org/lindenlab/viewer-build-variables/src/tip/variables -  # Reading $LL_BUILD is an attempt to directly use those switches. -  if ("$ENV{LL_BUILD}" STREQUAL "") -    message(FATAL_ERROR "Environment variable LL_BUILD must be set") -  endif () -    string(REGEX MATCH "-mmacosx-version-min=([^ ]+)" scratch "$ENV{LL_BUILD}")    set(CMAKE_OSX_DEPLOYMENT_TARGET "${CMAKE_MATCH_1}")    message(STATUS "CMAKE_OSX_DEPLOYMENT_TARGET = '${CMAKE_OSX_DEPLOYMENT_TARGET}'") | 
