summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2014-12-17 14:28:58 -0500
committerOz Linden <oz@lindenlab.com>2014-12-17 14:28:58 -0500
commit4666497507b2489004a4ebcf77c0e33723291bcd (patch)
tree677050cb13533b17e2c5e170a8438aef221b85ca /indra/cmake
parent11ecd9a2d97f2daeba932bcda557d3ae17956ed8 (diff)
parentf8ed44f8ec80916e684c2783da02f89474710de6 (diff)
merge up to latest changes from callum and nat
Diffstat (limited to 'indra/cmake')
-rwxr-xr-xindra/cmake/00-Common.cmake3
-rw-r--r--indra/cmake/GLEXT.cmake4
-rwxr-xr-xindra/cmake/Havok.cmake6
-rwxr-xr-xindra/cmake/JsonCpp.cmake4
-rwxr-xr-xindra/cmake/Variables.cmake1
-rwxr-xr-xindra/cmake/run_build_test.py19
6 files changed, 28 insertions, 9 deletions
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index d2faa2d8c5..ec076837f4 100755
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -54,7 +54,8 @@ if (WINDOWS)
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /Ob2 -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
CACHE STRING "C++ compiler release options" FORCE)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
+ # zlib has assembly-language object files incompatible with SAFESEH
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE /SAFESEH:NO /NODEFAULTLIB:LIBCMT")
set(CMAKE_CXX_STANDARD_LIBRARIES "")
set(CMAKE_C_STANDARD_LIBRARIES "")
diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake
index 15f7e1f2d5..2a08c8fbae 100644
--- a/indra/cmake/GLEXT.cmake
+++ b/indra/cmake/GLEXT.cmake
@@ -2,9 +2,9 @@
include(Prebuilt)
if (NOT USESYSTEMLIBS)
- if (LINUX OR WINDOWS)
+ if (WINDOWS OR LINUX)
use_prebuilt_binary(glext)
- endif (LINUX OR WINDOWS)
+ endif (WINDOWS OR LINUX)
use_prebuilt_binary(glh-linear)
set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
endif (NOT USESYSTEMLIBS)
diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake
index 8b7f01d20b..798e59a679 100755
--- a/indra/cmake/Havok.cmake
+++ b/indra/cmake/Havok.cmake
@@ -3,7 +3,7 @@
if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)
set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES")
-use_prebuilt_binary(havok-source)
+use_prebuilt_binary(havok_source)
set(Havok_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/havok/Source)
list(APPEND Havok_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/havok/Demo)
@@ -68,7 +68,7 @@ foreach(HAVOK_LIB ${HAVOK_LIBS})
endif(DEBUG_PREBUILT)
endif("${havok_${HAVOK_LIB}_extracted}" STREQUAL "" AND EXISTS "${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted")
- if(${CMAKE_BINARY_DIR}/temp/havok-source_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0)
+ if(${CMAKE_BINARY_DIR}/temp/havok_source_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0)
if(DEBUG_PREBUILT)
MESSAGE(STATUS "Extracting ${HAVOK_LIB}...")
endif(DEBUG_PREBUILT)
@@ -111,7 +111,7 @@ foreach(HAVOK_LIB ${HAVOK_LIBS})
set(havok_${HAVOK_LIB}_extracted 0)
file(WRITE ${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted "${havok_${HAVOK_LIB}_extracted}")
- endif(${CMAKE_BINARY_DIR}/temp/havok-source_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0)
+ endif(${CMAKE_BINARY_DIR}/temp/havok_source_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0)
file(GLOB extracted_debug "${debug_dir}/*.o")
file(GLOB extracted_release "${release_dir}/*.o")
diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake
index d6d05af315..bf2d470269 100755
--- a/indra/cmake/JsonCpp.cmake
+++ b/indra/cmake/JsonCpp.cmake
@@ -11,8 +11,8 @@ else (USESYSTEMLIBS)
use_prebuilt_binary(jsoncpp)
if (WINDOWS)
set(JSONCPP_LIBRARIES
- debug json_vc100debug_libmt.lib
- optimized json_vc100_libmt)
+ debug json_libmtd.lib
+ optimized json_libmt)
elseif (DARWIN)
set(JSONCPP_LIBRARIES libjson_darwin_libmt.a)
elseif (LINUX)
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index 8e220162ce..faca12c347 100755
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -26,6 +26,7 @@ set(VIEWER_PREFIX)
set(INTEGRATION_TESTS_PREFIX)
set(LL_TESTS ON CACHE BOOL "Build and run unit and integration tests (disable for build timing runs to reduce variation")
set(INCREMENTAL_LINK OFF CACHE BOOL "Use incremental linking on win32 builds (enable for faster links on some machines)")
+set(ENABLE_MEDIA_PLUGINS OFF CACHE BOOL "Turn off building media plugins if they are imported by third-party library mechanism")
if(LIBS_CLOSED_DIR)
file(TO_CMAKE_PATH "${LIBS_CLOSED_DIR}" LIBS_CLOSED_DIR)
diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py
index a2ef61c8fd..582185e5ab 100755
--- a/indra/cmake/run_build_test.py
+++ b/indra/cmake/run_build_test.py
@@ -46,6 +46,7 @@ $/LicenseInfo$
import os
import sys
+import errno
import signal
import subprocess
@@ -112,7 +113,23 @@ def main(command, libpath=[], vars={}):
print "Running: %s" % " ".join(command)
# Make sure we see all relevant output *before* child-process output.
sys.stdout.flush()
- return subprocess.call(command)
+ try:
+ return subprocess.call(command)
+ except OSError as err:
+ # If the caller is trying to execute a test program that doesn't
+ # exist, we want to produce a reasonable error message rather than a
+ # traceback. This happens when the build is halted by errors, but
+ # CMake tries to proceed with testing anyway <eyeroll/>. However, do
+ # NOT attempt to handle any error but "doesn't exist."
+ if err.errno != errno.ENOENT:
+ raise
+ # In practice, the pathnames into CMake's build tree are so long as to
+ # obscure the name of the test program. Just print its basename.
+ print "No such program %s; check for preceding build errors" % \
+ os.path.basename(command[0])
+ # What rc should we simulate for missing executable? Windows produces
+ # 9009.
+ return 9009
# swiped from vita, sigh, seems like a Bad Idea to introduce dependency
def translate_rc(rc):