From 5b69845c86cf18c0a6d32c68fbbc47a64f6c5e12 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Thu, 21 Apr 2016 11:50:55 -0700 Subject: DRTVWR-418 remove references (and files) for QuickTime --- indra/cmake/CMakeLists.txt | 1 - indra/cmake/QuickTimePlugin.cmake | 48 --------------------------------------- 2 files changed, 49 deletions(-) delete mode 100755 indra/cmake/QuickTimePlugin.cmake (limited to 'indra/cmake') diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 04a2a16c27..a10a5a7895 100755 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -91,7 +91,6 @@ set(cmake_SOURCE_FILES Prebuilt.cmake PulseAudio.cmake Python.cmake - QuickTimePlugin.cmake TemplateCheck.cmake Tut.cmake UI.cmake diff --git a/indra/cmake/QuickTimePlugin.cmake b/indra/cmake/QuickTimePlugin.cmake deleted file mode 100755 index c08e153ee3..0000000000 --- a/indra/cmake/QuickTimePlugin.cmake +++ /dev/null @@ -1,48 +0,0 @@ -# -*- cmake -*- - -if(INSTALL_PROPRIETARY) - include(Prebuilt) - if (WINDOWS) - use_prebuilt_binary(quicktime) - endif (WINDOWS) -endif(INSTALL_PROPRIETARY) - -if (DARWIN) - include(CMakeFindFrameworks) - find_library(QUICKTIME_LIBRARY QuickTime) -elseif (WINDOWS) - set(QUICKTIME_SDK_DIR "$ENV{PROGRAMFILES}/QuickTime SDK" - CACHE PATH "Location of the QuickTime SDK.") - - find_library(DEBUG_QUICKTIME_LIBRARY qtmlclient.lib - PATHS - ${ARCH_PREBUILT_DIRS_DEBUG} - "${QUICKTIME_SDK_DIR}\\libraries" - ) - - find_library(RELEASE_QUICKTIME_LIBRARY qtmlclient.lib - PATHS - ${ARCH_PREBUILT_DIRS_RELEASE} - "${QUICKTIME_SDK_DIR}\\libraries" - ) - - if (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY) - set(QUICKTIME_LIBRARY - optimized ${RELEASE_QUICKTIME_LIBRARY} - debug ${DEBUG_QUICKTIME_LIBRARY} - ) - - endif (DEBUG_QUICKTIME_LIBRARY AND RELEASE_QUICKTIME_LIBRARY) - - include_directories( - ${LIBS_PREBUILT_DIR}/include/quicktime - "${QUICKTIME_SDK_DIR}\\CIncludes" - ) -endif (DARWIN) - -mark_as_advanced(QUICKTIME_LIBRARY) - -if (QUICKTIME_LIBRARY) - set(QUICKTIME ON CACHE BOOL "Build with QuickTime streaming media support.") -endif (QUICKTIME_LIBRARY) - -- cgit v1.2.3 From cfba9a9dca8e31da2a792a2e70944a47359c9a21 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Thu, 21 Apr 2016 11:58:01 -0700 Subject: DRTVWR-418 remove references to some misc files I missed --- indra/cmake/CMakeLists.txt | 3 -- indra/cmake/Glui.cmake | 28 ------------------ indra/cmake/Glut.cmake | 19 ------------ indra/cmake/GooglePerfTools.cmake | 61 --------------------------------------- 4 files changed, 111 deletions(-) delete mode 100755 indra/cmake/Glui.cmake delete mode 100755 indra/cmake/Glut.cmake delete mode 100755 indra/cmake/GooglePerfTools.cmake (limited to 'indra/cmake') diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index a10a5a7895..a7ee0f1866 100755 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -23,7 +23,6 @@ set(cmake_SOURCE_FILES DirectX.cmake DragDrop.cmake EXPAT.cmake -## ExamplePlugin.cmake FindAPR.cmake FindAutobuild.cmake FindBerkeleyDB.cmake @@ -46,8 +45,6 @@ set(cmake_SOURCE_FILES GLOD.cmake ## GStreamer010Plugin.cmake GetPrerequisites_2_8.cmake -## Glui.cmake - Glut.cmake GoogleBreakpad.cmake GoogleMock.cmake GooglePerfTools.cmake diff --git a/indra/cmake/Glui.cmake b/indra/cmake/Glui.cmake deleted file mode 100755 index db353a91ec..0000000000 --- a/indra/cmake/Glui.cmake +++ /dev/null @@ -1,28 +0,0 @@ -# -*- cmake -*- -include(Linking) -include(Prebuilt) - -if (USESYSTEMLIBS) - set(GLUI OFF CACHE BOOL - "GLUI support for the llplugin/llmedia test apps.") -else (USESYSTEMLIBS) - use_prebuilt_binary(glui) - set(GLUI ON CACHE BOOL - "GLUI support for the llplugin/llmedia test apps.") -endif (USESYSTEMLIBS) - -if (LINUX) - set(GLUI ON CACHE BOOL - "llplugin media apps HACK for Linux.") -endif (LINUX) - -if (DARWIN OR LINUX) - set(GLUI_LIBRARY - glui) -endif (DARWIN OR LINUX) - -if (WINDOWS) - set(GLUI_LIBRARY - debug glui32.lib - optimized glui32.lib) -endif (WINDOWS) diff --git a/indra/cmake/Glut.cmake b/indra/cmake/Glut.cmake deleted file mode 100755 index 314da30652..0000000000 --- a/indra/cmake/Glut.cmake +++ /dev/null @@ -1,19 +0,0 @@ -# -*- cmake -*- -include(Linking) -include(Prebuilt) - -if (WINDOWS) - use_prebuilt_binary(freeglut) - set(GLUT_LIBRARY - debug freeglut_static.lib - optimized freeglut_static.lib) -endif (WINDOWS) - -if (LINUX) - FIND_LIBRARY(GLUT_LIBRARY glut) -endif (LINUX) - -if (DARWIN) - include(CMakeFindFrameworks) - find_library(GLUT_LIBRARY GLUT) -endif (DARWIN) diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake deleted file mode 100755 index c1faeb9325..0000000000 --- a/indra/cmake/GooglePerfTools.cmake +++ /dev/null @@ -1,61 +0,0 @@ -# -*- cmake -*- -include(Prebuilt) - -# If you want to enable or disable TCMALLOC in viewer builds, this is the place. -# set ON or OFF as desired. -set (USE_TCMALLOC OFF) - -if (USESYSTEMLIBS) - include(FindGooglePerfTools) -else (USESYSTEMLIBS) - if (WINDOWS) - if (USE_TCMALLOC) - use_prebuilt_binary(gperftools) - set(TCMALLOC_LIBRARIES - debug libtcmalloc_minimal-debug - optimized libtcmalloc_minimal) - set(TCMALLOC_LINK_FLAGS "/INCLUDE:__tcmalloc") - else (USE_TCMALLOC) - set(TCMALLOC_LIBRARIES) - set(TCMALLOC_LINK_FLAGS) - endif (USE_TCMALLOC) - set(GOOGLE_PERFTOOLS_FOUND "YES") - endif (WINDOWS) - if (LINUX) - if (USE_TCMALLOC) - use_prebuilt_binary(gperftools) - set(TCMALLOC_LIBRARIES - tcmalloc) - else (USE_TCMALLOC) - set(TCMALLOC_LIBRARIES) - endif (USE_TCMALLOC) - set(PROFILER_LIBRARIES profiler) - set(GOOGLE_PERFTOOLS_INCLUDE_DIR - ${LIBS_PREBUILT_DIR}/include) - set(GOOGLE_PERFTOOLS_FOUND "YES") - endif (LINUX) -endif (USESYSTEMLIBS) - -if (GOOGLE_PERFTOOLS_FOUND) - # XXX Disable temporarily, until we have compilation issues on 64-bit - # Etch sorted. - set(USE_GOOGLE_PERFTOOLS OFF CACHE BOOL "Build with Google PerfTools support.") -endif (GOOGLE_PERFTOOLS_FOUND) - -if (WINDOWS) - set(USE_GOOGLE_PERFTOOLS ON) -endif (WINDOWS) - -if (USE_GOOGLE_PERFTOOLS) - if (USE_TCMALLOC) - set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1) - else (USE_TCMALLOC) - set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) - endif (USE_TCMALLOC) -endif (USE_GOOGLE_PERFTOOLS) - -if (USE_GOOGLE_PERFTOOLS) - include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR}) - set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES} ${PROFILER_LIBRARIES}) -else (USE_GOOGLE_PERFTOOLS) -endif (USE_GOOGLE_PERFTOOLS) -- cgit v1.2.3 From b50df60aa180e904aa0733bb60cef91cf9df6ff6 Mon Sep 17 00:00:00 2001 From: callum_linden Date: Thu, 21 Apr 2016 16:13:39 -0700 Subject: DRTVWR-418 remove vestiges of TCMALLOC and GooglePerfTools from the viewer --- indra/cmake/CMakeLists.txt | 2 -- indra/cmake/Copy3rdPartyLibs.cmake | 48 +++++++++++++++----------------------- indra/cmake/LLCommon.cmake | 3 --- 3 files changed, 19 insertions(+), 34 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index a7ee0f1866..8d3eb4832e 100755 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -29,7 +29,6 @@ set(cmake_SOURCE_FILES FindFMODEX.cmake FindGLH.cmake FindGoogleBreakpad.cmake - FindGooglePerfTools.cmake FindHUNSPELL.cmake FindJsonCpp.cmake FindNDOF.cmake @@ -47,7 +46,6 @@ set(cmake_SOURCE_FILES GetPrerequisites_2_8.cmake GoogleBreakpad.cmake GoogleMock.cmake - GooglePerfTools.cmake Havok.cmake Hunspell.cmake JPEG.cmake diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 70d85b864c..4c1fb087e7 100755 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -30,21 +30,20 @@ if(WINDOWS) #******************************* # Misc shared libs - set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}") - set(debug_files - openjpegd.dll - libapr-1.dll - libaprutil-1.dll - libapriconv-1.dll - ssleay32.dll - libeay32.dll - glod.dll - libhunspell.dll - ) +# set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}") +# set(debug_files +# libapr-1.dll +# libaprutil-1.dll +# libapriconv-1.dll +# ssleay32.dll +# libeay32.dll +# glod.dll +# libhunspell.dll +# ) set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}") set(release_files - openjpeg.dll + openjp2.dll libapr-1.dll libaprutil-1.dll libapriconv-1.dll @@ -54,13 +53,8 @@ if(WINDOWS) libhunspell.dll ) - if(USE_TCMALLOC) - set(debug_files ${debug_files} libtcmalloc_minimal-debug.dll) - set(release_files ${release_files} libtcmalloc_minimal.dll) - endif(USE_TCMALLOC) - if (FMODEX) - set(debug_files ${debug_files} fmodexL.dll) +# set(debug_files ${debug_files} fmodexL.dll) set(release_files ${release_files} fmodex.dll) endif (FMODEX) @@ -234,10 +228,6 @@ elseif(LINUX) libfontconfig.so.1 ) - if (USE_TCMALLOC) - set(release_files ${release_files} "libtcmalloc_minimal.so") - endif (USE_TCMALLOC) - if (FMODEX) set(debug_files ${debug_files} "libfmodexL.so") set(release_files ${release_files} "libfmodex.so") @@ -294,13 +284,13 @@ set(third_party_targets ${third_party_targets} ${out_targets}) -copy_if_different( - ${debug_src_dir} - "${SHARED_LIB_STAGING_DIR_DEBUG}" - out_targets - ${debug_files} - ) -set(third_party_targets ${third_party_targets} ${out_targets}) +#copy_if_different( +# ${debug_src_dir} +# "${SHARED_LIB_STAGING_DIR_DEBUG}" +# out_targets +# ${debug_files} +# ) +#set(third_party_targets ${third_party_targets} ${out_targets}) copy_if_different( ${release_src_dir} diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake index b50b4bcdb2..3e29297c58 100755 --- a/indra/cmake/LLCommon.cmake +++ b/indra/cmake/LLCommon.cmake @@ -4,7 +4,6 @@ include(APR) include(Boost) include(EXPAT) include(ZLIB) -include(GooglePerfTools) set(LLCOMMON_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llcommon @@ -34,8 +33,6 @@ else (LINUX) ${BOOST_SYSTEM_LIBRARY} ) endif (LINUX) -# add_definitions(${TCMALLOC_FLAG}) - set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a static library.") if(LLCOMMON_LINK_SHARED) add_definitions(-DLL_COMMON_LINK_SHARED=1) -- cgit v1.2.3 From d75a6ecbe533fb115d8130122df710790ba9610b Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 22 Apr 2016 12:58:20 +0200 Subject: Windows x64: Disable warning 4267 (it causes too much noise) and do not enable /arch:SSE2 (x64 implies SSE2 and setting the flag causes warnings). (transplanted from 5a7cc3874065b13a83b8c7aa044fb07f38edd283) --- indra/cmake/00-Common.cmake | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 86fc2dfff5..84d70bd7b1 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -74,9 +74,18 @@ if (WINDOWS) /nologo /Oy- /Zc:wchar_t- - /arch:SSE2 +# /arch:SSE2 /fp:fast ) + + # Nicky: x64 implies SSE2 + if( NOT LL_64BIT_BUILD ) + add_definitions( /arch:SSE2 ) + else() + # Otherwise disable 4267 ('var' : conversion from 'size_t' to 'type', possible loss of data) + # This warning alas is all over the place and fixing it will touch a lot of code. + add_definitions("/wd4267 /DLL_64BIT_BUILD" ) + endif() # Are we using the crummy Visual Studio KDU build workaround? if (NOT VS_DISABLE_FATAL_WARNINGS) -- cgit v1.2.3 From 6b9ceb561c9754c2974e92c66ba15596d490754b Mon Sep 17 00:00:00 2001 From: callum_linden Date: Fri, 22 Apr 2016 14:34:42 -0700 Subject: DRTVWR-418 Remove references to gtk-atk-pango-glib from Windows build since it's not used there --- indra/cmake/UI.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index 31174209a3..77fd505df3 100755 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -32,9 +32,9 @@ if (USESYSTEMLIBS) add_definitions(${${pkg}_CFLAGS_OTHERS}) endforeach(pkg) else (USESYSTEMLIBS) - if (LINUX OR WINDOWS) + if (LINUX) use_prebuilt_binary(gtk-atk-pango-glib) - endif (LINUX OR WINDOWS) + endif (LINUX) if (LINUX) set(UI_LIBRARIES -- cgit v1.2.3 From a590d1c63ae4c1434da600d60b5c32c9b8a7a1de Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 24 Apr 2016 12:51:26 +0200 Subject: Windows z64: Disable warning 4267 via llpreprocessor rather than cmake files (transplanted from 165fa5852652a1da005cf3b2201c192f028efd43) --- indra/cmake/00-Common.cmake | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 84d70bd7b1..69d00afda3 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -81,10 +81,6 @@ if (WINDOWS) # Nicky: x64 implies SSE2 if( NOT LL_64BIT_BUILD ) add_definitions( /arch:SSE2 ) - else() - # Otherwise disable 4267 ('var' : conversion from 'size_t' to 'type', possible loss of data) - # This warning alas is all over the place and fixing it will touch a lot of code. - add_definitions("/wd4267 /DLL_64BIT_BUILD" ) endif() # Are we using the crummy Visual Studio KDU build workaround? -- cgit v1.2.3 From 6c7a97286113b1d3335d585d0d7cbc047baae021 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 15 Nov 2016 15:53:24 -0500 Subject: DRTVWR-418: Fold windows64 into windows platform with new autobuild. autobuild 1.1 now supports expanding $variables within a config file -- support that was explicitly added to address this very problem. So now the windows platform in autobuild.xml uses $AUTOBUILD_ADDRSIZE, $AUTOBUILD_WIN_VSPLATFORM and $AUTOBUILD_WIN_CMAKE_GEN, which should handle most of the deltas between the windows platform and windows64. This permits removing the windows64 platform definition from autobuild.xml. The one remaining delta between the windows64 and windows platform definitions was -DLL_64BIT_BUILD=TRUE. But we can handle that instead by checking ADDRESS_SIZE. Change all existing references to WORD_SIZE to ADDRESS_SIZE instead, and set ADDRESS_SIZE to $AUTOBUILD_ADDRSIZE. Change the one existing LL_64BIT_BUILD reference to test (ADDRESS_SIZE EQUAL 64) instead. --- indra/cmake/00-Common.cmake | 12 ++++++------ indra/cmake/ConfigurePkgConfig.cmake | 6 +++--- indra/cmake/Variables.cmake | 28 ++++++++++++++-------------- 3 files changed, 23 insertions(+), 23 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 69d00afda3..e270a43006 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -79,7 +79,7 @@ if (WINDOWS) ) # Nicky: x64 implies SSE2 - if( NOT LL_64BIT_BUILD ) + if( ADDRESS_SIZE EQUAL 64 ) add_definitions( /arch:SSE2 ) endif() @@ -178,9 +178,9 @@ if (LINUX) add_definitions(-fvisibility=hidden) # don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The viewer doesn't need to catch SIGCHLD anyway. add_definitions(-DLL_IGNORE_SIGCHLD) - if (WORD_SIZE EQUAL 32) + if (ADDRESS_SIZE EQUAL 32) add_definitions(-march=pentium4) - endif (WORD_SIZE EQUAL 32) + endif (ADDRESS_SIZE EQUAL 32) add_definitions(-mfpmath=sse) #add_definitions(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2 if (NOT USESYSTEMLIBS) @@ -231,13 +231,13 @@ if (LINUX OR DARWIN) set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}") - if (WORD_SIZE EQUAL 32) + if (ADDRESS_SIZE EQUAL 32) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") - elseif (WORD_SIZE EQUAL 64) + elseif (ADDRESS_SIZE EQUAL 64) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64") - endif (WORD_SIZE EQUAL 32) + endif (ADDRESS_SIZE EQUAL 32) endif (LINUX OR DARWIN) diff --git a/indra/cmake/ConfigurePkgConfig.cmake b/indra/cmake/ConfigurePkgConfig.cmake index 82ee3e7a5b..55d865392e 100644 --- a/indra/cmake/ConfigurePkgConfig.cmake +++ b/indra/cmake/ConfigurePkgConfig.cmake @@ -6,17 +6,17 @@ SET(DEBUG_PKG_CONFIG "YES") IF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "") # Guess at architecture-specific system library paths. - if (WORD_SIZE EQUAL 32) + if (ADDRESS_SIZE EQUAL 32) SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib32 /usr/lib) SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib32 /usr/local/lib) SET(PKG_CONFIG_MULTI_GUESS /usr/lib/i386-linux-gnu) SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/i386-linux-gnu) - else (WORD_SIZE EQUAL 32) + else (ADDRESS_SIZE EQUAL 32) SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib64 /usr/lib) SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib64 /usr/local/lib) SET(PKG_CONFIG_MULTI_GUESS /usr/local/lib/x86_64-linux-gnu) SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/x86_64-linux-gnu) - endif (WORD_SIZE EQUAL 32) + endif (ADDRESS_SIZE EQUAL 32) # Use DPKG architecture, if available. IF (${DPKG_ARCH}) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 63e296b556..464b4c402c 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -65,7 +65,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(ARCH i686) set(LL_ARCH ${ARCH}_win32) set(LL_ARCH_DIR ${ARCH}-win32) - set(WORD_SIZE 32) + set(ADDRESS_SIZE 32) endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") @@ -73,33 +73,33 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") # If someone has specified a word size, use that to determine the # architecture. Otherwise, let the architecture specify the word size. - if (WORD_SIZE EQUAL 32) - #message(STATUS "WORD_SIZE is 32") + if (ADDRESS_SIZE EQUAL 32) + #message(STATUS "ADDRESS_SIZE is 32") set(ARCH i686) - elseif (WORD_SIZE EQUAL 64) - #message(STATUS "WORD_SIZE is 64") + elseif (ADDRESS_SIZE EQUAL 64) + #message(STATUS "ADDRESS_SIZE is 64") set(ARCH x86_64) - else (WORD_SIZE EQUAL 32) - #message(STATUS "WORD_SIZE is UNDEFINED") + else (ADDRESS_SIZE EQUAL 32) + #message(STATUS "ADDRESS_SIZE is UNDEFINED") execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/ OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) if (ARCH STREQUAL x86_64) #message(STATUS "ARCH is detected as 64; ARCH is ${ARCH}") - set(WORD_SIZE 64) + set(ADDRESS_SIZE 64) else (ARCH STREQUAL x86_64) #message(STATUS "ARCH is detected as 32; ARCH is ${ARCH}") - set(WORD_SIZE 32) + set(ADDRESS_SIZE 32) endif (ARCH STREQUAL x86_64) - endif (WORD_SIZE EQUAL 32) + endif (ADDRESS_SIZE EQUAL 32) - if (WORD_SIZE EQUAL 32) + if (ADDRESS_SIZE EQUAL 32) set(DEB_ARCHITECTURE i386) set(FIND_LIBRARY_USE_LIB64_PATHS OFF) set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib32 ${CMAKE_SYSTEM_LIBRARY_PATH}) - else (WORD_SIZE EQUAL 32) + else (ADDRESS_SIZE EQUAL 32) set(DEB_ARCHITECTURE amd64) set(FIND_LIBRARY_USE_LIB64_PATHS ON) - endif (WORD_SIZE EQUAL 32) + endif (ADDRESS_SIZE EQUAL 32) execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH RESULT_VARIABLE DPKG_RESULT @@ -151,7 +151,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(ARCH ${CMAKE_OSX_ARCHITECTURES}) set(LL_ARCH ${ARCH}_darwin) set(LL_ARCH_DIR universal-darwin) - set(WORD_SIZE 32) + set(ADDRESS_SIZE 32) endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # Default deploy grid -- cgit v1.2.3 From 0c8556921d05a356afd4014b966ee8c0e1002e36 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 15 Nov 2016 16:02:39 -0500 Subject: DRTVWR-418: Mistakenly inverted the sense of the LL_64BIT_BUILD test. --- indra/cmake/00-Common.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index e270a43006..8fc05659f6 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -79,7 +79,7 @@ if (WINDOWS) ) # Nicky: x64 implies SSE2 - if( ADDRESS_SIZE EQUAL 64 ) + if( ADDRESS_SIZE EQUAL 32 ) add_definitions( /arch:SSE2 ) endif() -- cgit v1.2.3 From 8c061ab184201df3afa4dbe690bb48621ae01ef1 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 16 Nov 2016 15:27:36 -0500 Subject: DRTVWR-418: Compute ADDRESS_SIZE from arch if not specified. Migrate the logic formerly used only for LINUX to detect whether ADDRESS_SIZE is set to 32 or 64, and if not, detect a default for the platform. But instead of using uname -m, use python's platform.machine(). On Windows, stop forcing ARCH to i686 and ADDRESS_SIZE to 32. On Mac, reset default to x86_64 instead of i386; stop forcing ADDRESS_SIZE to 32. --- indra/cmake/Variables.cmake | 60 +++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 26 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 464b4c402c..783d76e063 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -60,38 +60,47 @@ if (NOT CMAKE_BUILD_TYPE) "Build type. One of: Debug Release RelWithDebInfo" FORCE) endif (NOT CMAKE_BUILD_TYPE) +# If someone has specified an address size, use that to determine the +# architecture. Otherwise, let the architecture specify the address size. +if (ADDRESS_SIZE EQUAL 32) + #message(STATUS "ADDRESS_SIZE is 32") + set(ARCH i686) +elseif (ADDRESS_SIZE EQUAL 64) + #message(STATUS "ADDRESS_SIZE is 64") + set(ARCH x86_64) +else (ADDRESS_SIZE EQUAL 32) + #message(STATUS "ADDRESS_SIZE is UNRECOGNIZED: '${ADDRESS_SIZE}'") + # Use Python's platform.machine() since uname -m isn't available everywhere. + # Even if you can assume cygwin uname -m, the answer depends on whether + # you're running 32-bit cygwin or 64-bit cygwin! But even 32-bit Python will + # report a 64-bit processor. + execute_process(COMMAND + "${PYTHON_EXECUTABLE}" "-c" + "import platform; print platform.machine()" + OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) + # We expect values of the form i386, i686, x86_64, AMD64. + # In CMake, expressing ARCH.endswith('64') is awkward: + string(LENGTH "${ARCH}" ARCH_LENGTH) + math(EXPR ARCH_LEN_2 "${ARCH_LENGTH} - 2") + string(SUBSTRING "${ARCH}" ${ARCH_LEN_2} 2 ARCH_LAST_2) + if (ARCH_LAST_2 STREQUAL 64) + #message(STATUS "ARCH is detected as 64; ARCH is ${ARCH}") + set(ADDRESS_SIZE 64) + else () + #message(STATUS "ARCH is detected as 32; ARCH is ${ARCH}") + set(ADDRESS_SIZE 32) + endif () +endif (ADDRESS_SIZE EQUAL 32) + if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(WINDOWS ON BOOL FORCE) - set(ARCH i686) set(LL_ARCH ${ARCH}_win32) set(LL_ARCH_DIR ${ARCH}-win32) - set(ADDRESS_SIZE 32) endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(LINUX ON BOOl FORCE) - # If someone has specified a word size, use that to determine the - # architecture. Otherwise, let the architecture specify the word size. - if (ADDRESS_SIZE EQUAL 32) - #message(STATUS "ADDRESS_SIZE is 32") - set(ARCH i686) - elseif (ADDRESS_SIZE EQUAL 64) - #message(STATUS "ADDRESS_SIZE is 64") - set(ARCH x86_64) - else (ADDRESS_SIZE EQUAL 32) - #message(STATUS "ADDRESS_SIZE is UNDEFINED") - execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/ - OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) - if (ARCH STREQUAL x86_64) - #message(STATUS "ARCH is detected as 64; ARCH is ${ARCH}") - set(ADDRESS_SIZE 64) - else (ARCH STREQUAL x86_64) - #message(STATUS "ARCH is detected as 32; ARCH is ${ARCH}") - set(ADDRESS_SIZE 32) - endif (ARCH STREQUAL x86_64) - endif (ADDRESS_SIZE EQUAL 32) - if (ADDRESS_SIZE EQUAL 32) set(DEB_ARCHITECTURE i386) set(FIND_LIBRARY_USE_LIB64_PATHS OFF) @@ -143,15 +152,14 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libstdc++") set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym) - # Build only for i386 by default, system default on MacOSX 10.6+ is x86_64 + # Build only for x86_64 by default if (NOT CMAKE_OSX_ARCHITECTURES) - set(CMAKE_OSX_ARCHITECTURES "i386") + set(CMAKE_OSX_ARCHITECTURES "x86_64") endif (NOT CMAKE_OSX_ARCHITECTURES) set(ARCH ${CMAKE_OSX_ARCHITECTURES}) set(LL_ARCH ${ARCH}_darwin) set(LL_ARCH_DIR universal-darwin) - set(ADDRESS_SIZE 32) endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # Default deploy grid -- cgit v1.2.3 From d833e45c28a5d3e3605b161a1b6bcf7c06093d25 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 16 Nov 2016 15:32:01 -0500 Subject: DRTVWR-418: Pass ADDRESS_SIZE down into C++ compilation by adding -DADDRESS_SIZE= to the compile switches. Remove hack to work around limitations of gcc 4.1 build hosts. Streamline a bit of logic to specify correct -m32 or -m64 switch. Use ADDRESS_SIZE instead of ARCH to control -march=pentiumpro. --- indra/cmake/00-Common.cmake | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 4f335b50ec..ec30db685d 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -2,16 +2,28 @@ # # Compilation options shared by all Second Life components. +#***************************************************************************** +# It's important to realize that CMake implicitly concatenates +# CMAKE_CXX_FLAGS with (e.g.) CMAKE_CXX_FLAGS_RELEASE for Release builds. So +# set switches in CMAKE_CXX_FLAGS that should affect all builds, but in +# CMAKE_CXX_FLAGS_RELEASE or CMAKE_CXX_FLAGS_RELWITHDEBINFO for switches +# that should affect only that build variant. +# +# Also realize that CMAKE_CXX_FLAGS may already be partially populated on +# entry to this file. +#***************************************************************************** + if(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") include(Variables) # Portable compilation flags. +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DADDRESS_SIZE=${ADDRESS_SIZE}") + set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1") set(CMAKE_CXX_FLAGS_RELEASE "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -DNDEBUG") - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DLL_RELEASE=1 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1") @@ -138,13 +150,6 @@ if (LINUX) # Let's actually get a numerical version of gxx's version STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION_NUMBER ${CXX_VERSION}) - # Hacks to work around gcc 4.1 TC build pool machines which can't process pragma warning disables - # This is pure rubbish; I wish there was another way. - # - if(${CXX_VERSION_NUMBER} LESS 420) - set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-uninitialized -Wno-unused-variable -Wno-unused-function ${CMAKE_CXX_FLAGS}") - endif (${CXX_VERSION_NUMBER} LESS 420) - if(${CXX_VERSION_NUMBER} GREATER 459) set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-unused-but-set-variable -Wno-unused-variable ${CMAKE_CXX_FLAGS}") endif (${CXX_VERSION_NUMBER} GREATER 459) @@ -231,22 +236,17 @@ if (LINUX OR DARWIN) set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}") - if (ADDRESS_SIZE EQUAL 32) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") - elseif (ADDRESS_SIZE EQUAL 64) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64") - endif (ADDRESS_SIZE EQUAL 32) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m${ADDRESS_SIZE}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m${ADDRESS_SIZE}") endif (LINUX OR DARWIN) if (USESYSTEMLIBS) add_definitions(-DLL_USESYSTEMLIBS=1) - if (LINUX AND ${ARCH} STREQUAL "i686") + if (LINUX AND ADDRESS_SIZE EQUAL 32) add_definitions(-march=pentiumpro) - endif (LINUX AND ${ARCH} STREQUAL "i686") + endif (LINUX AND ADDRESS_SIZE EQUAL 32) else (USESYSTEMLIBS) set(${ARCH}_linux_INCLUDES -- cgit v1.2.3 From 0c43e4e856538be40c80174e4d44c75748df5128 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 16 Nov 2016 16:05:16 -0500 Subject: DRTVWR-418: Disable unconditional signing for Mac builds. There Must Be A Better Way. --- indra/cmake/00-Common.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index ec30db685d..96ff9a645e 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -211,8 +211,9 @@ if (DARWIN) # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered. set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}") - set(ENABLE_SIGNING TRUE) - set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.") +## Really?? On developer machines too? +##set(ENABLE_SIGNING TRUE) +##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.") endif (DARWIN) -- cgit v1.2.3 From bc7d8d3a943db0a562b982ddb9cf2c795f547d5e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 16 Nov 2016 16:06:32 -0500 Subject: DRTVWR-418: Try to make the OSX architecture match computed ARCH which in turn depends on ADDRESS_SIZE. --- indra/cmake/Variables.cmake | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 783d76e063..74666be9cb 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -152,12 +152,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libstdc++") set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym) - # Build only for x86_64 by default - if (NOT CMAKE_OSX_ARCHITECTURES) - set(CMAKE_OSX_ARCHITECTURES "x86_64") - endif (NOT CMAKE_OSX_ARCHITECTURES) + set(CMAKE_OSX_ARCHITECTURES "${ARCH}") + string(REPLACE "i686" "i386" CMAKE_OSX_ARCHITECTURES "${CMAKE_OSX_ARCHITECTURES}") + string(REPLACE "AMD64" "x86_64" CMAKE_OSX_ARCHITECTURES "${CMAKE_OSX_ARCHITECTURES}") - set(ARCH ${CMAKE_OSX_ARCHITECTURES}) set(LL_ARCH ${ARCH}_darwin) set(LL_ARCH_DIR universal-darwin) endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") -- cgit v1.2.3 From c5770cd1afa5859a68fdebc7712650ec4781ac8b Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 17 Nov 2016 08:57:11 -0500 Subject: DRTVWR-418: Add warning about changing to libc++ on Mac. --- indra/cmake/Variables.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/cmake') diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 74666be9cb..969726e6e1 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -149,6 +149,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_XCODE_ATTRIBUTE_GCC_STRICT_ALIASING NO) set(CMAKE_XCODE_ATTRIBUTE_GCC_FAST_MATH NO) set(CMAKE_XCODE_ATTRIBUTE_CLANG_X86_VECTOR_INSTRUCTIONS ssse3) + message(WARNING "Change Variables.cmake to specify libc++ when updating with p64 3p libraries") set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libstdc++") set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym) -- cgit v1.2.3 From 8b61d4f2770e44cc74997c98491edc0107c8527a Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 19 Nov 2016 08:51:29 -0500 Subject: DRTVWR-418: Change to libc++ on Mac, remove reminder warning. --- indra/cmake/Variables.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 969726e6e1..3d0cb0a3c9 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -149,8 +149,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(CMAKE_XCODE_ATTRIBUTE_GCC_STRICT_ALIASING NO) set(CMAKE_XCODE_ATTRIBUTE_GCC_FAST_MATH NO) set(CMAKE_XCODE_ATTRIBUTE_CLANG_X86_VECTOR_INSTRUCTIONS ssse3) - message(WARNING "Change Variables.cmake to specify libc++ when updating with p64 3p libraries") - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libstdc++") + set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym) set(CMAKE_OSX_ARCHITECTURES "${ARCH}") -- cgit v1.2.3 From e7324c8956e0785645f42f739c221ed7167ad6f0 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 22 Nov 2016 08:39:31 -0500 Subject: DRTVWR-418: Use correct spelling for glh_linear package. --- indra/cmake/GLEXT.cmake | 2 +- indra/cmake/GLH.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake index 2a08c8fbae..9fd3923bfd 100644 --- a/indra/cmake/GLEXT.cmake +++ b/indra/cmake/GLEXT.cmake @@ -5,6 +5,6 @@ if (NOT USESYSTEMLIBS) if (WINDOWS OR LINUX) use_prebuilt_binary(glext) endif (WINDOWS OR LINUX) - use_prebuilt_binary(glh-linear) + use_prebuilt_binary(glh_linear) set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) endif (NOT USESYSTEMLIBS) diff --git a/indra/cmake/GLH.cmake b/indra/cmake/GLH.cmake index d0992f57b8..d5262f2efa 100644 --- a/indra/cmake/GLH.cmake +++ b/indra/cmake/GLH.cmake @@ -7,5 +7,5 @@ set(GLH_FIND_QUIETLY TRUE) if (USESYSTEMLIBS) include(FindGLH) else (USESYSTEMLIBS) - use_prebuilt_binary(glh-linear) + use_prebuilt_binary(glh_linear) endif (USESYSTEMLIBS) -- cgit v1.2.3 From 6979fc56679d4a86451e46d511b133ac02152184 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 28 Nov 2016 15:45:58 -0500 Subject: DRTVWR-418: Revert one more openjp2.dll reference to openjpeg.dll. --- indra/cmake/Copy3rdPartyLibs.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 4c1fb087e7..5b59666796 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -43,7 +43,7 @@ if(WINDOWS) set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}") set(release_files - openjp2.dll + openjpeg.dll libapr-1.dll libaprutil-1.dll libapriconv-1.dll -- cgit v1.2.3 From 3a8aa2d13d4d362847ce2ec16376907e7f562500 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 2 Dec 2016 10:59:06 -0500 Subject: add viewer channel and version to the beginning of the About box Licenses information --- indra/cmake/BuildPackagesInfo.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/BuildPackagesInfo.cmake b/indra/cmake/BuildPackagesInfo.cmake index 0f574ee39a..4e9baa61fe 100644 --- a/indra/cmake/BuildPackagesInfo.cmake +++ b/indra/cmake/BuildPackagesInfo.cmake @@ -6,5 +6,5 @@ add_custom_command(OUTPUT packages-info.txt COMMENT Generating packages-info.txt for the about box MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/../autobuild.xml DEPENDS ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py > packages-info.txt + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py "${VIEWER_CHANNEL}" "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}" > packages-info.txt ) -- cgit v1.2.3 From b5f4af3263eb601f705521492a270a7c62789fbd Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 5 Dec 2016 12:49:14 -0500 Subject: suppress VS linker warning about unfound pdb files --- indra/cmake/00-Common.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 96ff9a645e..6734f9585c 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -67,7 +67,7 @@ if (WINDOWS) "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /Zo /MD /MP /Ob2 -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0" CACHE STRING "C++ compiler release options" FORCE) # 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_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE /SAFESEH:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099") set(CMAKE_CXX_STANDARD_LIBRARIES "") set(CMAKE_C_STANDARD_LIBRARIES "") -- cgit v1.2.3 From 004cd151ff068d348a24127dbeb33696d00d2748 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Mon, 5 Dec 2016 12:24:00 -0800 Subject: update copying of fmodex{64}.dll to right place for 32/64 bit builds --- indra/cmake/Copy3rdPartyLibs.cmake | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 5b59666796..4630246d06 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -30,17 +30,6 @@ if(WINDOWS) #******************************* # Misc shared libs -# set(debug_src_dir "${ARCH_PREBUILT_DIRS_DEBUG}") -# set(debug_files -# libapr-1.dll -# libaprutil-1.dll -# libapriconv-1.dll -# ssleay32.dll -# libeay32.dll -# glod.dll -# libhunspell.dll -# ) - set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}") set(release_files openjpeg.dll @@ -54,8 +43,12 @@ if(WINDOWS) ) if (FMODEX) -# set(debug_files ${debug_files} fmodexL.dll) - set(release_files ${release_files} fmodex.dll) + + if(ADDRESS_SIZE EQUAL 32) + set(release_files ${release_files} fmodex.dll) + else(ADDRESS_SIZE EQUAL 32) + set(release_files ${release_files} fmodex64.dll) + endif(ADDRESS_SIZE EQUAL 32) endif (FMODEX) #******************************* -- cgit v1.2.3 From bae76ec8df0fbc8d883413de250c6a93baa31448 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 6 Dec 2016 11:48:43 -0500 Subject: DRTVWR-418: Set AUTOBUILD_ADDRSIZE for packages-formatter.py. This handles the case of building within an IDE, in which AUTOBUILD_ADDRSIZE isn't already set. --- indra/cmake/BuildPackagesInfo.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/BuildPackagesInfo.cmake b/indra/cmake/BuildPackagesInfo.cmake index 0f574ee39a..367511bfb7 100644 --- a/indra/cmake/BuildPackagesInfo.cmake +++ b/indra/cmake/BuildPackagesInfo.cmake @@ -2,9 +2,16 @@ # Construct the version and copyright information based on package data. include(Python) +# packages-formatter.py runs autobuild install --versions, which needs to know +# the build_directory, which (on Windows) depends on AUTOBUILD_ADDRSIZE. +# Within an autobuild build, AUTOBUILD_ADDRSIZE is already set. But when +# building in an IDE, it probably isn't. Set it explicitly using +# run_build_test.py. add_custom_command(OUTPUT packages-info.txt COMMENT Generating packages-info.txt for the about box MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/../autobuild.xml DEPENDS ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py > packages-info.txt + COMMAND ${PYTHON_EXECUTABLE} + ${CMAKE_SOURCE_DIR}/cmake/run_build_test.py -DAUTOBUILD_ADDRSIZE=${ADDRESS_SIZE} + ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py > packages-info.txt ) -- cgit v1.2.3 From 199d3c5675b4acd00e50b0fb0a2ebe01985e668d Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 6 Dec 2016 13:25:53 -0500 Subject: DRTVWR-418: Run packages-formatter via Python interpreter for Windows. --- indra/cmake/BuildPackagesInfo.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/cmake') diff --git a/indra/cmake/BuildPackagesInfo.cmake b/indra/cmake/BuildPackagesInfo.cmake index 367511bfb7..d22c64349a 100644 --- a/indra/cmake/BuildPackagesInfo.cmake +++ b/indra/cmake/BuildPackagesInfo.cmake @@ -13,5 +13,6 @@ add_custom_command(OUTPUT packages-info.txt DEPENDS ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/cmake/run_build_test.py -DAUTOBUILD_ADDRSIZE=${ADDRESS_SIZE} + ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py > packages-info.txt ) -- cgit v1.2.3 From 84ba2a8797303eb85a253b9c786bead38457fda5 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 9 Dec 2016 09:23:32 -0500 Subject: move some cmake messages that are not warnings from stderr to stdout --- indra/cmake/DeploySharedLibs.cmake | 8 ++++---- indra/cmake/Prebuilt.cmake | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/DeploySharedLibs.cmake b/indra/cmake/DeploySharedLibs.cmake index 663c272e50..e57fd5eee3 100644 --- a/indra/cmake/DeploySharedLibs.cmake +++ b/indra/cmake/DeploySharedLibs.cmake @@ -12,7 +12,7 @@ get_filename_component(current_dir ${CMAKE_CURRENT_LIST_FILE} PATH) include(${current_dir}/GetPrerequisites_2_8.cmake) -message("Getting recursive dependencies for file: ${BIN_NAME}") +message(STATUS "Getting recursive dependencies for file: ${BIN_NAME}") set(EXCLUDE_SYSTEM 1) set(RECURSE 1) @@ -21,7 +21,7 @@ get_filename_component(EXE_PATH ${BIN_NAME} PATH) get_prerequisites( ${BIN_NAME} RESULTS ${EXCLUDE_SYSTEM} ${RECURSE} "${EXE_PATH}" "${SEARCH_DIRS}" ) foreach(DEP ${RESULTS}) - Message("Processing dependency: ${DEP}") + Message(STATUS "Processing dependency: ${DEP}") get_filename_component(DEP_FILE ${DEP} NAME) set(DEP_FILES ${DEP_FILES} ${DEP_FILE}) endforeach(DEP) @@ -64,10 +64,10 @@ if(FOUND_FILES) foreach(FILE ${FOUND_FILES}) get_filename_component(DST_FILE ${FILE} NAME) set(DST_FILE "${DST_PATH}/${DST_FILE}") - message("Copying ${FILE} to ${DST_FILE}") + message(STATUS "Copying ${FILE} to ${DST_FILE}") execute_process( COMMAND ${CMAKE_COMMAND} -E copy_if_different ${FILE} ${DST_FILE} ) endforeach(FILE ${FOUND_FILES}) endif(FOUND_FILES) -message("Success!") + diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 98013da2f2..33a6d76916 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -39,7 +39,7 @@ macro (use_prebuilt_binary _binary) if(${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0) if(DEBUG_PREBUILT) - message("cd ${CMAKE_SOURCE_DIR} && ${AUTOBUILD_EXECUTABLE} install + message(STATUS "cd ${CMAKE_SOURCE_DIR} && ${AUTOBUILD_EXECUTABLE} install --install-dir=${AUTOBUILD_INSTALL_DIR} ${_binary} ") endif(DEBUG_PREBUILT) -- cgit v1.2.3 From 771c7dd3c00e2eecfaa7382e41abb3b643cda84a Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 10 Dec 2016 12:12:51 -0500 Subject: DRTVWR-418: Update some copy commands for 3p library versions. --- indra/cmake/Copy3rdPartyLibs.cmake | 7 ++----- indra/cmake/EXPAT.cmake | 6 ++++++ 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 4630246d06..14510d654f 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -162,10 +162,8 @@ elseif(DARWIN) libaprutil-1.0.dylib libaprutil-1.dylib libexception_handler.dylib - libexpat.1.5.2.dylib - libexpat.dylib + ${EXPAT_COPY} libGLOD.dylib - libhunspell-1.3.0.dylib libndofdev.dylib ) @@ -205,8 +203,7 @@ elseif(LINUX) libaprutil-1.so.0 libatk-1.0.so libdb-5.1.so - libexpat.so - libexpat.so.1 + ${EXPAT_COPY} libfreetype.so.6.6.2 libfreetype.so.6 libGLOD.so diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake index c1155531ff..cddc71b227 100644 --- a/indra/cmake/EXPAT.cmake +++ b/indra/cmake/EXPAT.cmake @@ -10,8 +10,14 @@ else (USESYSTEMLIBS) use_prebuilt_binary(expat) if (WINDOWS) set(EXPAT_LIBRARIES libexpatMT) + set(EXPAT_COPY libexpatMT.dll) else (WINDOWS) set(EXPAT_LIBRARIES expat) + if (DARWIN) + set(EXPAT_COPY libexpat.1.dylib libexpat.dylib) + else () + set(EXPAT_COPY libexpat.so.1 libexpat.so) + endif () endif (WINDOWS) set(EXPAT_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) endif (USESYSTEMLIBS) -- cgit v1.2.3 From 45a32ed14d8172a2df3e01bdcf820072d7532bc0 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 12 Dec 2016 11:50:25 -0500 Subject: DRTVWR-418: Align minimum OS X version with viewer-build-variables. --- indra/cmake/Variables.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 3d0cb0a3c9..0ff37dedad 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -138,10 +138,11 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(DARWIN 1) - - # now we only support Xcode 7.0 using 10.11 (El Capitan), minimum OS 10.7 (Lion) + + # The following must agree with + # https://bitbucket.org/lindenlab/viewer-build-variables/src/tip/variables set(XCODE_VERSION 7.0) - set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7) + set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9) set(CMAKE_OSX_SYSROOT macosx10.11) set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0") -- cgit v1.2.3 From 3b34cfd93a5d6c1de7065f7688f80d3e5f879046 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 14 Dec 2016 09:12:33 -0500 Subject: DRTVWR-418: Derive certain CMAKE_XCODE_etc. vars from LL_BUILD. --- indra/cmake/Variables.cmake | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 0ff37dedad..99b19ff07a 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -141,17 +141,42 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # 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}'") + + string(REGEX MATCH "-stdlib=([^ ]+)" scratch "$ENV{LL_BUILD}") + set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "${CMAKE_MATCH_1}") + message(STATUS "CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY = '${CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY}'") + + string(REGEX MATCH " -g([^ ]*)" scratch "$ENV{LL_BUILD}") + set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "${CMAKE_MATCH_1}") + message(STATUS "CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT = '${CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT}'") + + string(REGEX MATCH "-O([^ ]*)" scratch "$ENV{LL_BUILD}") + set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL "${CMAKE_MATCH_1}") + message(STATUS "CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL = '${CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL}'") + + string(REGEX MATCHALL "[^ ]+" LL_BUILD_LIST "$ENV{LL_BUILD}") + list(FIND LL_BUILD_LIST "-iwithsysroot" sysroot_idx) + if ("${sysroot_idx}" LESS 0) + message(FATAL_ERROR "Environment variable LL_BUILD must contain '-iwithsysroot'") + endif () + math(EXPR sysroot_idx "${sysroot_idx} + 1") + list(GET LL_BUILD_LIST "${sysroot_idx}" CMAKE_OSX_SYSROOT) + message(STATUS "CMAKE_OSX_SYSROOT = '${CMAKE_OSX_SYSROOT}'") + set(XCODE_VERSION 7.0) - set(CMAKE_OSX_DEPLOYMENT_TARGET 10.9) - set(CMAKE_OSX_SYSROOT macosx10.11) set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0") - set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL 3) set(CMAKE_XCODE_ATTRIBUTE_GCC_STRICT_ALIASING NO) set(CMAKE_XCODE_ATTRIBUTE_GCC_FAST_MATH NO) set(CMAKE_XCODE_ATTRIBUTE_CLANG_X86_VECTOR_INSTRUCTIONS ssse3) - set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") - set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym) set(CMAKE_OSX_ARCHITECTURES "${ARCH}") string(REPLACE "i686" "i386" CMAKE_OSX_ARCHITECTURES "${CMAKE_OSX_ARCHITECTURES}") -- cgit v1.2.3 From 89cd49f60f87852d94b3c21ef70e3fa2ed990e51 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 15 Dec 2016 16:41:30 -0500 Subject: DRTVWR-418: -Wl,-no_compact_unwind switch breaks exception catching! In a clang 64-bit compile, with that switch set in CMAKE_CXX_LINK_FLAGS, we cannot catch any user exception. This shows up right away because TUT relies on internal exceptions to walk through test() test methods, but of course being unable to catch any exceptions in the viewer would be just as bad. A quick Google search turned up lots of people mentioning -no_compact_unwind without finding any documentation about what it's supposed to be good for. But since no tests work with it, whereas they work without it -- kill it. --- indra/cmake/00-Common.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 6734f9585c..46dd8739bc 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -202,7 +202,7 @@ endif (LINUX) if (DARWIN) add_definitions(-DLL_DARWIN=1) - set(CMAKE_CXX_LINK_FLAGS "-Wl,-no_compact_unwind -Wl,-headerpad_max_install_names,-search_paths_first") + set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}") set(DARWIN_extra_cstar_flags "-g -Wno-unused-local-typedef -Wno-deprecated-declarations") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}") -- cgit v1.2.3 From f130b648b4856663481f124711afc285babd5614 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 19 Dec 2016 18:55:31 -0500 Subject: DRTVWR-418: Use $LL_BUILD to set most switches in 00-Common.cmake. Going forward, the intention is to set in 00-Common.cmake only switches not already set for ALL viewer-related libraries in https://bitbucket.org/lindenlab/viewer-build-variables/src/tip/variables. To that end, remove all switches redundant with settings from that file. Remove redundancies within 00-Common.cmake. Remove cruft testing for gcc versions older than 4.3. --- indra/cmake/00-COMPILE-LINK-RUN.txt | 4 +- indra/cmake/00-Common.cmake | 109 +++++++++--------------------------- 2 files changed, 30 insertions(+), 83 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-COMPILE-LINK-RUN.txt b/indra/cmake/00-COMPILE-LINK-RUN.txt index 162b22865c..1933072a6d 100644 --- a/indra/cmake/00-COMPILE-LINK-RUN.txt +++ b/indra/cmake/00-COMPILE-LINK-RUN.txt @@ -48,8 +48,8 @@ Compilation LL_WINDOWS=1 " " UNICODE " " _UNICODE " " - WINVER=0x0501 " " - _WIN32_WINNT=0x0501 " " + WINVER=0x0600 " " + _WIN32_WINNT=0x0600 " " LL_OS_DRAGDROP_ENABLED=1 " " LIB_NDOF=1 " " diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 46dd8739bc..f925fdda5d 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -18,15 +18,17 @@ set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") include(Variables) +# We go to some trouble to set LL_BUILD to the set of relevant compiler flags. +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{LL_BUILD}") +# Given that, all the flags you see added below are flags NOT present in +# https://bitbucket.org/lindenlab/viewer-build-variables/src/tip/variables. +# Before adding new ones here, it's important to ask: can this flag really be +# applied to the viewer only, or should/must it be applied to all 3p libraries +# as well? + # Portable compilation flags. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DADDRESS_SIZE=${ADDRESS_SIZE}") -set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1") -set(CMAKE_CXX_FLAGS_RELEASE - "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -DNDEBUG") -set(CMAKE_CXX_FLAGS_RELWITHDEBINFO - "-DLL_RELEASE=1 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1") - # Configure crash reporting set(RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in release builds") set(NON_RELEASE_CRASH_REPORTING OFF CACHE BOOL "Enable use of crash reporting in developer builds") @@ -58,13 +60,13 @@ if (WINDOWS) # http://www.cmake.org/pipermail/cmake/2009-September/032143.html string(REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) - set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd /MP -D_SCL_SECURE_NO_WARNINGS=1" - CACHE STRING "C++ compiler debug options" FORCE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO - "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /Zo /MD /MP /Ob0 -D_SECURE_STL=0" + "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Zo" CACHE STRING "C++ compiler release-with-debug options" FORCE) set(CMAKE_CXX_FLAGS_RELEASE - "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /Zo /MD /MP /Ob2 -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0" + "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /Zo" CACHE STRING "C++ compiler release options" FORCE) # zlib has assembly-language object files incompatible with SAFESEH set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE /SAFESEH:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099") @@ -73,11 +75,10 @@ if (WINDOWS) set(CMAKE_C_STANDARD_LIBRARIES "") add_definitions( - /DLL_WINDOWS=1 /DNOMINMAX # /DDOM_DYNAMIC # For shared library colladadom - /DUNICODE - /D_UNICODE + ) + add_compile_options( /GS /TP /W3 @@ -85,7 +86,6 @@ if (WINDOWS) /Zc:forScope /nologo /Oy- - /Zc:wchar_t- # /arch:SSE2 /fp:fast ) @@ -99,78 +99,28 @@ if (WINDOWS) if (NOT VS_DISABLE_FATAL_WARNINGS) add_definitions(/WX) endif (NOT VS_DISABLE_FATAL_WARNINGS) - - # configure Win32 API for Windows Vista+ compatibility - set(WINVER "0x0600" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)") - add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}") endif (WINDOWS) if (LINUX) set(CMAKE_SKIP_RPATH TRUE) - # Here's a giant hack for Fedora 8, where we can't use - # _FORTIFY_SOURCE if we're using a compiler older than gcc 4.1. - - find_program(GXX g++) - mark_as_advanced(GXX) - - if (GXX) - execute_process( - COMMAND ${GXX} --version - COMMAND sed "s/^[gc+ ]*//" - COMMAND head -1 - OUTPUT_VARIABLE GXX_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - else (GXX) - set(GXX_VERSION x) - endif (GXX) - - # The quoting hack here is necessary in case we're using distcc or - # ccache as our compiler. CMake doesn't pass the command line - # through the shell by default, so we end up trying to run "distcc" - # " g++" - notice the leading space. Ugh. - - execute_process( - COMMAND sh -c "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} --version" - COMMAND sed "s/^[gc+ ]*//" - COMMAND head -1 - OUTPUT_VARIABLE CXX_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE) - - if (${GXX_VERSION} STREQUAL ${CXX_VERSION}) - add_definitions(-D_FORTIFY_SOURCE=2) - else (${GXX_VERSION} STREQUAL ${CXX_VERSION}) - if (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat") - add_definitions(-D_FORTIFY_SOURCE=2) - endif (NOT ${GXX_VERSION} MATCHES " 4.1.*Red Hat") - endif (${GXX_VERSION} STREQUAL ${CXX_VERSION}) - - # Let's actually get a numerical version of gxx's version - STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1\\2\\3" CXX_VERSION_NUMBER ${CXX_VERSION}) - - if(${CXX_VERSION_NUMBER} GREATER 459) - set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-unused-but-set-variable -Wno-unused-variable ${CMAKE_CXX_FLAGS}") - endif (${CXX_VERSION_NUMBER} GREATER 459) + add_definitions(-D_FORTIFY_SOURCE=2) + + set(CMAKE_CXX_FLAGS "-Wno-deprecated -Wno-unused-but-set-variable -Wno-unused-variable ${CMAKE_CXX_FLAGS}") # gcc 4.3 and above don't like the LL boost and also # cause warnings due to our use of deprecated headers - if(${CXX_VERSION_NUMBER} GREATER 429) - add_definitions(-Wno-parentheses) - set(CMAKE_CXX_FLAGS "-Wno-deprecated ${CMAKE_CXX_FLAGS}") - endif (${CXX_VERSION_NUMBER} GREATER 429) - - # End of hacks. + add_definitions(-Wno-parentheses) add_definitions( - -DLL_LINUX=1 -D_REENTRANT + ) + add_compile_options( -fexceptions -fno-math-errno -fno-strict-aliasing -fsigned-char - -g -msse2 -mfpmath=sse -pthread @@ -180,37 +130,34 @@ if (LINUX) add_definitions(-DEXTERNAL_TOS) add_definitions(-DAPPID=secondlife) - add_definitions(-fvisibility=hidden) - # don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The viewer doesn't need to catch SIGCHLD anyway. + add_compile_options(-fvisibility=hidden) + # don't catch SIGCHLD in our base application class for the viewer - some of + # our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The + # viewer doesn't need to catch SIGCHLD anyway. add_definitions(-DLL_IGNORE_SIGCHLD) if (ADDRESS_SIZE EQUAL 32) - add_definitions(-march=pentium4) + add_compile_options(-march=pentium4) endif (ADDRESS_SIZE EQUAL 32) - add_definitions(-mfpmath=sse) - #add_definitions(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2 + #add_compile_options(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2 if (NOT USESYSTEMLIBS) # this stops us requiring a really recent glibc at runtime - add_definitions(-fno-stack-protector) + add_compile_options(-fno-stack-protector) # linking can be very memory-hungry, especially the final viewer link set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory") endif (NOT USESYSTEMLIBS) set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}") - set(CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE}") endif (LINUX) if (DARWIN) - add_definitions(-DLL_DARWIN=1) set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}") - set(DARWIN_extra_cstar_flags "-g -Wno-unused-local-typedef -Wno-deprecated-declarations") + set(DARWIN_extra_cstar_flags "-Wno-unused-local-typedef -Wno-deprecated-declarations") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}") # NOTE: it's critical that the optimization flag is put in front. # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered. - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") - set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}") ## Really?? On developer machines too? ##set(ENABLE_SIGNING TRUE) ##set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.") -- cgit v1.2.3 From be3e3fca324f03f228851ef24d34a050c3f3a92f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 20 Dec 2016 15:05:02 -0500 Subject: DRTVWR-418: Fix libhunspell references to reflect current package. --- indra/cmake/FindHUNSPELL.cmake | 2 +- indra/cmake/Hunspell.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/FindHUNSPELL.cmake b/indra/cmake/FindHUNSPELL.cmake index 6faf22959c..d411bdb9e5 100644 --- a/indra/cmake/FindHUNSPELL.cmake +++ b/indra/cmake/FindHUNSPELL.cmake @@ -10,7 +10,7 @@ find_path(HUNSPELL_INCLUDE_DIR hunspell.h PATH_SUFFIXES hunspell ) -set(HUNSPELL_NAMES ${HUNSPELL_NAMES} libhunspell-1.3.0 libhunspell) +set(HUNSPELL_NAMES ${HUNSPELL_NAMES} libhunspell-1.3 libhunspell) find_library(HUNSPELL_LIBRARY NAMES ${HUNSPELL_NAMES} ) diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake index ef74d95b2a..06227b3fe2 100644 --- a/indra/cmake/Hunspell.cmake +++ b/indra/cmake/Hunspell.cmake @@ -11,7 +11,7 @@ else (USESYSTEMLIBS) if (WINDOWS) set(HUNSPELL_LIBRARY libhunspell) elseif(DARWIN) - set(HUNSPELL_LIBRARY hunspell-1.3.0) + set(HUNSPELL_LIBRARY hunspell-1.3) elseif(LINUX) set(HUNSPELL_LIBRARY hunspell-1.3) else() -- cgit v1.2.3 From 725ba32d08a513580a87368d986918dd892c4c37 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 20 Dec 2016 17:18:56 -0500 Subject: don't add llcorehttp to all tests --- indra/cmake/LLAddBuildTest.cmake | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index db8b95dbe2..96d3e39a06 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -35,7 +35,6 @@ INCLUDE(GoogleMock) ${APRUTIL_LIBRARIES} ${APR_LIBRARIES} llcommon - llcorehttp ) IF(NOT "${project}" STREQUAL "llmath") # add llmath as a dep unless the tested module *is* llmath! -- cgit v1.2.3 From eff6bbea5998f3048a6f5a3ce1faf5ae1a6582da Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 22 Dec 2016 16:12:21 -0500 Subject: 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' being compiled Make the CMake logic fail with a more readily-understood error in that case. --- indra/cmake/Variables.cmake | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'indra/cmake') 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}'") -- cgit v1.2.3 From 1fe8d04a46ba3414ddbb16cc3bc5de206d9490b0 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 5 Jan 2017 18:49:56 -0500 Subject: DRTVWR-418, MAINT-7038: Don't add double quotes to channel name. The CMake directive that passes VIEWER_CHANNEL to the C++ compiler as LL_VIEWER_CHANNEL was enclosing the VIEWER_CHANNEL value in double quotes. At this point in history, those double quotes literally become part of the LL_VIEWER_CHANNEL value, causing the viewer to construct a bad Viewer Version Manager query containing those double quotes. Removing them fixes the query. --- indra/cmake/BuildVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index 6ffa698a1c..321aecf073 100644 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -54,7 +54,7 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n endif ("${VIEWER_VERSION_REVISION}" STREQUAL "") set(VIEWER_CHANNEL_VERSION_DEFINES - "LL_VIEWER_CHANNEL=\"${VIEWER_CHANNEL}\"" + "LL_VIEWER_CHANNEL=${VIEWER_CHANNEL}" "LL_VIEWER_VERSION_MAJOR=${VIEWER_VERSION_MAJOR}" "LL_VIEWER_VERSION_MINOR=${VIEWER_VERSION_MINOR}" "LL_VIEWER_VERSION_PATCH=${VIEWER_VERSION_PATCH}" -- cgit v1.2.3 From dcae92c0a306aaf6447089b340913d4a678855ac Mon Sep 17 00:00:00 2001 From: Callum Linden Date: Fri, 27 Jan 2017 15:47:16 -0800 Subject: First batch of changes to add LibVLC media plugin to macOS viewer. Plugin fails to start because of an as-yet undiagnosed issue with VLC plugin files related to their extyended attributes --- indra/cmake/LibVLCPlugin.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/cmake') diff --git a/indra/cmake/LibVLCPlugin.cmake b/indra/cmake/LibVLCPlugin.cmake index 4472676fb4..df829b615a 100644 --- a/indra/cmake/LibVLCPlugin.cmake +++ b/indra/cmake/LibVLCPlugin.cmake @@ -18,6 +18,10 @@ if (WINDOWS) libvlccore.lib ) elseif (DARWIN) + set(VLC_PLUGIN_LIBRARIES + libvlc.dylib + libvlccore.dylib + ) elseif (LINUX) # Specify a full path to make sure we get a static link set(VLC_PLUGIN_LIBRARIES -- cgit v1.2.3 From 83f2f43e36e04b6f7a8581d6957369bbeb029efc Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 15 Feb 2017 12:14:30 -0500 Subject: convert run_build_tests to use argparse rather than optparse --- indra/cmake/run_build_test.py | 44 +++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py index fdbb0a75f7..5f71a0dbf6 100755 --- a/indra/cmake/run_build_test.py +++ b/indra/cmake/run_build_test.py @@ -52,10 +52,11 @@ import re import signal import subprocess -def main(command, libpath=[], vars={}): +def main(command, arguments=[], libpath=[], vars={}): """Pass: - command is a sequence (e.g. a list) of strings. The first item in the list - must be the command name, the rest are its arguments. + command is the command to be executed + + argument is a sequence (e.g. a list) of strings to be passed to command libpath is a sequence of directory pathnames. These will be appended to the platform-specific dynamic library search path environment variable. @@ -112,11 +113,13 @@ def main(command, libpath=[], vars={}): print "%s=%s" % (key, value) os.environ.update(dict([(str(key), str(value)) for key, value in vars.iteritems()])) # Run the child process. - print "Running: %s" % " ".join(command) + command_list = [command] + command_list.extend(arguments) + print "Running: %s" % " ".join(command_list) # Make sure we see all relevant output *before* child-process output. sys.stdout.flush() try: - return subprocess.call(command) + return subprocess.call(command_list) 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 @@ -304,21 +307,18 @@ def get_windows_table(): return _windows_table if __name__ == "__main__": - from optparse import OptionParser - parser = OptionParser(usage="usage: %prog [options] command args...") - # We want optparse support for the options we ourselves handle -- but we - # DO NOT want it looking at options for the executable we intend to run, - # rejecting them as invalid because we don't define them. So configure the - # parser to stop looking for options as soon as it sees the first - # positional argument (traditional Unix syntax). - parser.disable_interspersed_args() - parser.add_option("-D", "--define", dest="vars", default=[], action="append", - metavar="VAR=value", - help="Add VAR=value to the env variables defined") - parser.add_option("-l", "--libpath", dest="libpath", default=[], action="append", - metavar="DIR", - help="Add DIR to the platform-dependent DLL search path") - opts, args = parser.parse_args() + import argparse + parser = argparse.ArgumentParser() + parser.add_argument("-D", "--define", dest="vars", default=[], action="append", + metavar="VAR=value", + help="Add VAR=value to the env variables defined") + parser.add_argument("-l", "--libpath", dest="libpath", default=[], action="append", + metavar="DIR", + help="Add DIR to the platform-dependent DLL search path") + parser.add_argument("command") + parser.add_argument('args', nargs=argparse.REMAINDER) + args = parser.parse_args() + # What we have in opts.vars is a list of strings of the form "VAR=value" # or possibly just "VAR". What we want is a dict. We can build that dict by # constructing a list of ["VAR", "value"] pairs -- so split each @@ -326,8 +326,8 @@ if __name__ == "__main__": # "VAR=some=user=string"). To handle the case of just "VAR", append "" to # the list returned by split(), then slice off anything after the pair we # want. - rc = main(command=args, libpath=opts.libpath, - vars=dict([(pair.split('=', 1) + [""])[:2] for pair in opts.vars])) + rc = main(command=args.command, arguments=args.args, libpath=args.libpath, + vars=dict([(pair.split('=', 1) + [""])[:2] for pair in args.vars])) if rc not in (None, 0): print >>sys.stderr, "Failure running: %s" % " ".join(args) print >>sys.stderr, "Error %s: %s" % (rc, translate_rc(rc)) -- cgit v1.2.3 From b6cdeb2271c3a75dc72b7cfb8c70e0b66c8e246e Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 15 Feb 2017 13:00:20 -0500 Subject: MAINT-7130: suppress stdout from run_build_tests by converting to logging so that stdout from its command can be captured cleanly Make the default be to not print anything --- indra/cmake/run_build_test.py | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py index 5f71a0dbf6..f02c5e98b4 100755 --- a/indra/cmake/run_build_test.py +++ b/indra/cmake/run_build_test.py @@ -51,6 +51,7 @@ import HTMLParser import re import signal import subprocess +import logging def main(command, arguments=[], libpath=[], vars={}): """Pass: @@ -86,7 +87,7 @@ def main(command, arguments=[], libpath=[], vars={}): # might not exist; instead of KeyError, just use an empty string. dirs = os.environ.get(var, "").split(os.pathsep) # Append the sequence in libpath - print "%s += %r" % (var, libpath) + log.info("%s += %r" % (var, libpath)) for dir in libpath: # append system paths at the end if dir in ('/lib', '/usr/lib'): @@ -104,18 +105,16 @@ def main(command, arguments=[], libpath=[], vars={}): # Now rebuild the path string. This way we use a minimum of separators # -- and we avoid adding a pointless separator when libpath is empty. os.environ[var] = os.pathsep.join(clean_dirs) - print "%s = %r" % (var, os.environ[var]) + log.info("%s = %r" % (var, os.environ[var])) # Now handle arbitrary environment variables. The tricky part is ensuring # that all the keys and values we try to pass are actually strings. if vars: - print "Setting:" - for key, value in vars.iteritems(): - print "%s=%s" % (key, value) + log.info("Setting: %s" % ("\n".join(["%s=%s" % (key, value) for key, value in vars.iteritems()]))) os.environ.update(dict([(str(key), str(value)) for key, value in vars.iteritems()])) # Run the child process. command_list = [command] command_list.extend(arguments) - print "Running: %s" % " ".join(command_list) + log.info("Running: %s" % " ".join(command_list)) # Make sure we see all relevant output *before* child-process output. sys.stdout.flush() try: @@ -129,9 +128,9 @@ def main(command, arguments=[], libpath=[], vars={}): 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]) + # obscure the name of the test program. Just log its basename. + log.warn("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 @@ -175,10 +174,10 @@ def translate_rc(rc): table = get_windows_table() symbol, desc = table[hexrc] except Exception, err: - print >>sys.stderr, "(%s -- carrying on)" % err - return "terminated with rc %s (%s)" % (rc, hexrc) + log.error("(%s -- carrying on)" % err) + log.error("terminated with rc %s (%s)" % (rc, hexrc)) else: - return "terminated with rc %s: %s: %s" % (hexrc, symbol, desc) + log.info("terminated with rc %s: %s: %s" % (hexrc, symbol, desc)) else: # On Posix, negative rc means the child was terminated by signal -rc. @@ -306,9 +305,14 @@ def get_windows_table(): return _windows_table +log=logging.getLogger(__name__) +logging.basicConfig() + if __name__ == "__main__": import argparse parser = argparse.ArgumentParser() + parser.add_argument("-d", "--debug", dest="loglevel", action="store_const", + const=logging.DEBUG, default=logging.WARNING) parser.add_argument("-D", "--define", dest="vars", default=[], action="append", metavar="VAR=value", help="Add VAR=value to the env variables defined") @@ -319,6 +323,8 @@ if __name__ == "__main__": parser.add_argument('args', nargs=argparse.REMAINDER) args = parser.parse_args() + log.setLevel(args.loglevel) + # What we have in opts.vars is a list of strings of the form "VAR=value" # or possibly just "VAR". What we want is a dict. We can build that dict by # constructing a list of ["VAR", "value"] pairs -- so split each @@ -329,6 +335,6 @@ if __name__ == "__main__": rc = main(command=args.command, arguments=args.args, libpath=args.libpath, vars=dict([(pair.split('=', 1) + [""])[:2] for pair in args.vars])) if rc not in (None, 0): - print >>sys.stderr, "Failure running: %s" % " ".join(args) - print >>sys.stderr, "Error %s: %s" % (rc, translate_rc(rc)) + log.error("Failure running: %s" % " ".join([args.command] + args.args)) + log.error("Error %s: %s" % (rc, translate_rc(rc))) sys.exit((rc < 0) and 255 or rc) -- cgit v1.2.3 From 9472098e81b3381803237d2a87a4c5de6164b48d Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 15 Feb 2017 15:27:05 -0500 Subject: improve dependency declarations for packages-info and other settings files --- indra/cmake/BuildPackagesInfo.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/cmake') diff --git a/indra/cmake/BuildPackagesInfo.cmake b/indra/cmake/BuildPackagesInfo.cmake index 133ee9797a..93461cea95 100644 --- a/indra/cmake/BuildPackagesInfo.cmake +++ b/indra/cmake/BuildPackagesInfo.cmake @@ -11,6 +11,7 @@ add_custom_command(OUTPUT packages-info.txt COMMENT Generating packages-info.txt for the about box MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/../autobuild.xml DEPENDS ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py + ${CMAKE_SOURCE_DIR}/../autobuild.xml COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/cmake/run_build_test.py -DAUTOBUILD_ADDRSIZE=${ADDRESS_SIZE} ${PYTHON_EXECUTABLE} -- cgit v1.2.3 From 2428b484e3a6ce23eaf29bd93579252e8e303f69 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 17 Feb 2017 15:56:42 -0500 Subject: DRTVWR-418: Attempt to make sense of Havok.cmake Linux logic. Aside from crazy indentation, much of Havok.cmake is redundant testing of DEBUG_PREBUILT and conditional MESSAGE(STATUS ...) output, not to mention repeating stanzas for each of debug_dir, release_dir and relwithdebinfo_dir. Use local functions and foreach() to try to manage redundancy so the details of what it's actually trying to do don't get lost in the noise. --- indra/cmake/Havok.cmake | 124 +++++++++++++++++++++--------------------------- 1 file changed, 55 insertions(+), 69 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake index 99e7334118..d67d3df9f3 100644 --- a/indra/cmake/Havok.cmake +++ b/indra/cmake/Havok.cmake @@ -49,89 +49,75 @@ unset(HK_DEBUG_LIBRARIES) unset(HK_RELEASE_LIBRARIES) unset(HK_RELWITHDEBINFO_LIBRARIES) +if (DEBUG_PREBUILT) + # DEBUG_EXEC() reports each execute_process() before invoking + function(DEBUG_EXEC) + message(STATUS ARGN) + execute_process(ARGN) + endfunction(DEBUG_EXEC) + # DEBUG_MESSAGE() displays debugging message + function(DEBUG_MESSAGE) + message(STATUS ARGN) + endfunction(DEBUG_MESSAGE) +else (DEBUG_PREBUILT) + # without DEBUG_PREBUILT, DEBUG_EXEC() is just execute_process() + function(DEBUG_EXEC) + execute_process(ARGN) + endfunction(DEBUG_EXEC) + # without DEBUG_PREBUILT, DEBUG_MESSAGE() is a no-op + function(DEBUG_MESSAGE) + endfunction(DEBUG_MESSAGE) +endif (DEBUG_PREBUILT) + # *TODO: Figure out why we need to extract like this... foreach(HAVOK_LIB ${HAVOK_LIBS}) - find_library(HAVOK_DEBUG_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_DEBUG_LIBRARY_PATH}) - find_library(HAVOK_RELEASE_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELEASE_LIBRARY_PATH}) - find_library(HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELWITHDEBINFO_LIBRARY_PATH}) - - if(LINUX) - set(debug_dir "${HAVOK_DEBUG_LIBRARY_PATH}/${HAVOK_LIB}") - set(release_dir "${HAVOK_RELEASE_LIBRARY_PATH}/${HAVOK_LIB}") - set(relwithdebinfo_dir "${HAVOK_RELWITHDEBINFO_LIBRARY_PATH}/${HAVOK_LIB}") + find_library(HAVOK_DEBUG_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_DEBUG_LIBRARY_PATH}) + find_library(HAVOK_RELEASE_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELEASE_LIBRARY_PATH}) + find_library(HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_RELWITHDEBINFO_LIBRARY_PATH}) + + if(LINUX) + set(debug_dir "${HAVOK_DEBUG_LIBRARY_PATH}/${HAVOK_LIB}") + set(release_dir "${HAVOK_RELEASE_LIBRARY_PATH}/${HAVOK_LIB}") + set(relwithdebinfo_dir "${HAVOK_RELWITHDEBINFO_LIBRARY_PATH}/${HAVOK_LIB}") # Try to avoid extracting havok library each time we run cmake. if("${havok_${HAVOK_LIB}_extracted}" STREQUAL "" AND EXISTS "${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted") file(READ ${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted "havok_${HAVOK_LIB}_extracted") - if(DEBUG_PREBUILT) - message(STATUS "havok_${HAVOK_LIB}_extracted: \"${havok_${HAVOK_LIB}_extracted}\"") - endif(DEBUG_PREBUILT) + DEBUG_MESSAGE("havok_${HAVOK_LIB}_extracted: \"${havok_${HAVOK_LIB}_extracted}\"") endif("${havok_${HAVOK_LIB}_extracted}" STREQUAL "" AND EXISTS "${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted") if(${PREBUILD_TRACKING_DIR}/havok_source_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0) - if(DEBUG_PREBUILT) - MESSAGE(STATUS "Extracting ${HAVOK_LIB}...") - endif(DEBUG_PREBUILT) - set(cmd "mkdir") - - if(DEBUG_PREBUILT) - MESSAGE(STATUS "${cmd} ${debug_dir}") - endif(DEBUG_PREBUILT) - exec_program( ${cmd} ${HAVOK_DEBUG_LIBRARY_PATH} ARGS ${debug_dir} OUTPUT_VARIABLE rv) - - if(DEBUG_PREBUILT) - MESSAGE(STATUS "${cmd} ${release_dir}") - endif(DEBUG_PREBUILT) - exec_program( ${cmd} ${HAVOK_RELEASE_LIBRARY_PATH} ARGS ${release_dir} OUTPUT_VARIABLE rv) - - if(DEBUG_PREBUILT) - MESSAGE(STATUS "${cmd} ${relwithdebinfo_dir}") - endif(DEBUG_PREBUILT) - exec_program( ${cmd} ${HAVOK_RELWITHDEBINFO_LIBRARY_PATH} ARGS ${relwithdebinfo_dir} OUTPUT_VARIABLE rv) - - set(cmd "ar") - set(arg " -xv") - set(arg "${arg} ../lib${HAVOK_LIB}.a") - if(DEBUG_PREBUILT) - MESSAGE(STATUS "cd ${debug_dir} && ${cmd} ${arg}") - endif(DEBUG_PREBUILT) - exec_program( ${cmd} ${debug_dir} ARGS ${arg} OUTPUT_VARIABLE rv) - - if(DEBUG_PREBUILT) - MESSAGE(STATUS "cd ${release_dir} && ${cmd} ${arg}") - endif(DEBUG_PREBUILT) - exec_program( ${cmd} ${release_dir} ARGS ${arg} OUTPUT_VARIABLE rv) - - if(DEBUG_PREBUILT) - MESSAGE(STATUS "cd ${relwithdebinfo_dir} && ${cmd} ${arg}") - endif(DEBUG_PREBUILT) - exec_program( ${cmd} ${relwithdebinfo_dir} ARGS ${arg} OUTPUT_VARIABLE rv) + DEBUG_MESSAGE("Extracting ${HAVOK_LIB}...") + + foreach(lib debug_dir release_dir relwithdebinfo_dir) + DEBUG_EXEC("mkdir" lib) + DEBUG_EXEC("ar" "-xv" "../lib${HAVOK_LIB}.a" + WORKING_DIRECTORY lib) + endforeach(lib) # Just assume success for now. set(havok_${HAVOK_LIB}_extracted 0) file(WRITE ${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted "${havok_${HAVOK_LIB}_extracted}") - endif(${PREBUILD_TRACKING_DIR}/havok_source_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/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") - file(GLOB extracted_relwithdebinfo "${relwithdebinfo_dir}/*.o") - - if(DEBUG_PREBUILT) - MESSAGE(STATUS "extracted_debug ${debug_dir}/*.o") - MESSAGE(STATUS "extracted_release ${release_dir}/*.o") - MESSAGE(STATUS "extracted_relwithdebinfo ${relwithdebinfo_dir}/*.o") - endif(DEBUG_PREBUILT) - - list(APPEND HK_DEBUG_LIBRARIES ${extracted_debug}) - list(APPEND HK_RELEASE_LIBRARIES ${extracted_release}) - list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${extracted_relwithdebinfo}) - else(LINUX) - # Win32 - list(APPEND HK_DEBUG_LIBRARIES ${HAVOK_DEBUG_LIB_${HAVOK_LIB}}) - list(APPEND HK_RELEASE_LIBRARIES ${HAVOK_RELEASE_LIB_${HAVOK_LIB}}) - list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB}}) - endif (LINUX) + endif() + + file(GLOB extracted_debug "${debug_dir}/*.o") + file(GLOB extracted_release "${release_dir}/*.o") + file(GLOB extracted_relwithdebinfo "${relwithdebinfo_dir}/*.o") + + DEBUG_MESSAGE("extracted_debug ${debug_dir}/*.o") + DEBUG_MESSAGE("extracted_release ${release_dir}/*.o") + DEBUG_MESSAGE("extracted_relwithdebinfo ${relwithdebinfo_dir}/*.o") + + list(APPEND HK_DEBUG_LIBRARIES ${extracted_debug}) + list(APPEND HK_RELEASE_LIBRARIES ${extracted_release}) + list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${extracted_relwithdebinfo}) + else(LINUX) + # Win32 + list(APPEND HK_DEBUG_LIBRARIES ${HAVOK_DEBUG_LIB_${HAVOK_LIB}}) + list(APPEND HK_RELEASE_LIBRARIES ${HAVOK_RELEASE_LIB_${HAVOK_LIB}}) + list(APPEND HK_RELWITHDEBINFO_LIBRARIES ${HAVOK_RELWITHDEBINFO_LIB_${HAVOK_LIB}}) + endif (LINUX) endforeach(HAVOK_LIB) endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) -- cgit v1.2.3 From 56d04963d46bda05d118764e3914740c318b09cf Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 17 Feb 2017 16:44:47 -0500 Subject: DRTVWR-418: Fix CMake syntax for Havok.cmake refactoring. --- indra/cmake/Havok.cmake | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake index d67d3df9f3..243b9f5e34 100644 --- a/indra/cmake/Havok.cmake +++ b/indra/cmake/Havok.cmake @@ -50,25 +50,24 @@ unset(HK_RELEASE_LIBRARIES) unset(HK_RELWITHDEBINFO_LIBRARIES) if (DEBUG_PREBUILT) - # DEBUG_EXEC() reports each execute_process() before invoking - function(DEBUG_EXEC) - message(STATUS ARGN) - execute_process(ARGN) - endfunction(DEBUG_EXEC) # DEBUG_MESSAGE() displays debugging message function(DEBUG_MESSAGE) - message(STATUS ARGN) + # prints message args separated by semicolons rather than spaces, + # but making it pretty is a lot more work + message(STATUS "${ARGN}") endfunction(DEBUG_MESSAGE) else (DEBUG_PREBUILT) - # without DEBUG_PREBUILT, DEBUG_EXEC() is just execute_process() - function(DEBUG_EXEC) - execute_process(ARGN) - endfunction(DEBUG_EXEC) # without DEBUG_PREBUILT, DEBUG_MESSAGE() is a no-op function(DEBUG_MESSAGE) endfunction(DEBUG_MESSAGE) endif (DEBUG_PREBUILT) +# DEBUG_EXEC() reports each execute_process() before invoking +function(DEBUG_EXEC) + DEBUG_MESSAGE(${ARGN}) + execute_process(COMMAND ${ARGN}) +endfunction(DEBUG_EXEC) + # *TODO: Figure out why we need to extract like this... foreach(HAVOK_LIB ${HAVOK_LIBS}) find_library(HAVOK_DEBUG_LIB_${HAVOK_LIB} ${HAVOK_LIB} PATHS ${HAVOK_DEBUG_LIBRARY_PATH}) @@ -89,10 +88,10 @@ foreach(HAVOK_LIB ${HAVOK_LIBS}) if(${PREBUILD_TRACKING_DIR}/havok_source_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/havok_${HAVOK_LIB}_extracted OR NOT ${havok_${HAVOK_LIB}_extracted} EQUAL 0) DEBUG_MESSAGE("Extracting ${HAVOK_LIB}...") - foreach(lib debug_dir release_dir relwithdebinfo_dir) - DEBUG_EXEC("mkdir" lib) + foreach(lib ${debug_dir} ${release_dir} ${relwithdebinfo_dir}) + DEBUG_EXEC("mkdir" ${lib}) DEBUG_EXEC("ar" "-xv" "../lib${HAVOK_LIB}.a" - WORKING_DIRECTORY lib) + WORKING_DIRECTORY ${lib}) endforeach(lib) # Just assume success for now. -- cgit v1.2.3 From 038c555fc4254de62a477d1c83a2131970b0b2b5 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 21 Feb 2017 17:12:27 -0500 Subject: DRTVWR-418: In viewer64-mac-havok fork, turn on Xcode 8 Havok. This is known not to work yet: the relevant Havok libraries are not being bundled with llphysicsextensions, therefore the viewer can't link with any Havok symbols. --- indra/cmake/Havok.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/cmake') diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake index 243b9f5e34..811a126b8f 100644 --- a/indra/cmake/Havok.cmake +++ b/indra/cmake/Havok.cmake @@ -8,6 +8,11 @@ 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) +# HK_DISABLE_IMPLICIT_VVECTOR3_CONVERSION suppresses an intended conversion +# function which Xcode scolds us will unconditionally enter infinite +# recursion if called. This hides that function. +add_definitions("-DHK_DISABLE_IMPLICIT_VVECTOR3_CONVERSION") + set(HAVOK_DEBUG_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-fulldebug) set(HAVOK_RELEASE_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/release/havok) -- cgit v1.2.3 From 5534ab4e182b8403cf0ed514059e346d55f18162 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Tue, 21 Feb 2017 15:06:21 -0800 Subject: First round of changes to replace LLCEFLib with Dullahan. Mostly Windows changes in this batch since I'm working on Windows box but some speculative macOS ones too although they are quite untested --- indra/cmake/CEFPlugin.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/CEFPlugin.cmake b/indra/cmake/CEFPlugin.cmake index 9cfb7d14c7..b8e569d3a8 100644 --- a/indra/cmake/CEFPlugin.cmake +++ b/indra/cmake/CEFPlugin.cmake @@ -6,7 +6,7 @@ if (USESYSTEMLIBS) set(CEFPLUGIN OFF CACHE BOOL "CEFPLUGIN support for the llplugin/llmedia test apps.") else (USESYSTEMLIBS) - use_prebuilt_binary(llceflib) + use_prebuilt_binary(dullahan) set(CEFPLUGIN ON CACHE BOOL "CEFPLUGIN support for the llplugin/llmedia test apps.") set(CEF_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/cef) @@ -16,7 +16,7 @@ if (WINDOWS) set(CEF_PLUGIN_LIBRARIES libcef.lib libcef_dll_wrapper.lib - llceflib.lib + dullahan.lib ) elseif (DARWIN) FIND_LIBRARY(APPKIT_LIBRARY AppKit) @@ -31,7 +31,7 @@ elseif (DARWIN) set(CEF_PLUGIN_LIBRARIES ${ARCH_PREBUILT_DIRS_RELEASE}/libcef_dll_wrapper.a - ${ARCH_PREBUILT_DIRS_RELEASE}/libLLCefLib.a + ${ARCH_PREBUILT_DIRS_RELEASE}/libdullahan.a ${APPKIT_LIBRARY} ${CEF_LIBRARY} ) -- cgit v1.2.3 From f77af9df438e0f955a4cf5c550f5eb3d3c919519 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 22 Feb 2017 17:03:00 -0500 Subject: use AUTOBUILD_BUILD_ID value for revision if available (requires autobuild 1.1.4) --- indra/cmake/BuildVersion.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/cmake') diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index 321aecf073..9ee055b59a 100644 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -14,6 +14,10 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n set(VIEWER_VERSION_REVISION $ENV{revision}) message(STATUS "Revision (from environment): ${VIEWER_VERSION_REVISION}") + elif (DEFINED ENV{AUTOBUILD_BUILD_ID}) + set(VIEWER_VERSION_REVISION $ENV{AUTOBUILD_BUILD_ID}) + message(STATUS "Revision (from autobuild environment): ${VIEWER_VERSION_REVISION}") + else (DEFINED ENV{revision}) find_program(MERCURIAL NAMES hg -- cgit v1.2.3 From f0b256b1cb6c96aed81ee456e505247fd2169c5f Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 22 Feb 2017 17:34:46 -0500 Subject: correct merge error in BuildVersion.cmake --- indra/cmake/BuildVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/BuildVersion.cmake b/indra/cmake/BuildVersion.cmake index 9ee055b59a..157fdd07e4 100644 --- a/indra/cmake/BuildVersion.cmake +++ b/indra/cmake/BuildVersion.cmake @@ -14,7 +14,7 @@ if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/n set(VIEWER_VERSION_REVISION $ENV{revision}) message(STATUS "Revision (from environment): ${VIEWER_VERSION_REVISION}") - elif (DEFINED ENV{AUTOBUILD_BUILD_ID}) + elseif (DEFINED ENV{AUTOBUILD_BUILD_ID}) set(VIEWER_VERSION_REVISION $ENV{AUTOBUILD_BUILD_ID}) message(STATUS "Revision (from autobuild environment): ${VIEWER_VERSION_REVISION}") -- cgit v1.2.3 From cb07ca3510b74ba04b3346cb675fed1845b84dab Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Mon, 27 Mar 2017 17:11:00 -0700 Subject: Fix for MAINT-7131 Unable to start the x64 Viewer on Windows 8.1 x64. This appears to be because two of the MS DLLs we ship with the 64 bit viewer are 32bit. Manually replacing them with their 64 bit equivalents allowed the viewer to start on Windows 8.1. The change forces the cmake file which copies the DLLs to look in C:\windows\SysWOW64 for 32 bit versions and C:\windows\system32 for 64 bit versions. (yes really). --- indra/cmake/Copy3rdPartyLibs.cmake | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 14510d654f..c7fb7a5301 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -102,12 +102,17 @@ if(WINDOWS) unset(debug_msvc_redist_path CACHE) endif() + if(ADDRESS_SIZE EQUAL 32) + # this folder contains the 32bit DLLs.. (yes really!) + set(registry_find_path "[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64") + else(ADDRESS_SIZE EQUAL 32) + # this folder contains the 64bit DLLs.. (yes really!) + set(registry_find_path "[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32") + endif(ADDRESS_SIZE EQUAL 32) + FIND_PATH(release_msvc_redist_path NAME msvcr${MSVC_VER}.dll PATHS - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${MSVC_VERDOT}\\Setup\\VC;ProductDir]/redist/x86/Microsoft.VC${MSVC_VER}.CRT - [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64 - [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32 - ${MSVC_REDIST_PATH} + ${registry_find_path} NO_DEFAULT_PATH ) -- cgit v1.2.3 From 7005310541b9b9b002b2bd52cb1f28c0d25a8281 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Mon, 1 May 2017 12:42:12 -0700 Subject: Fix MAINT-7360 Investigate removal of MSVCR100.DLL and MSVCP100.DLL --- indra/cmake/Copy3rdPartyLibs.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index c7fb7a5301..43188673eb 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -67,8 +67,9 @@ if(WINDOWS) endif (MSVC80) # try to copy VS2010 redist independently of system version - list(APPEND LMSVC_VER 100) - list(APPEND LMSVC_VERDOT 10.0) + # maint-7360 CP + # list(APPEND LMSVC_VER 100) + # list(APPEND LMSVC_VERDOT 10.0) list(LENGTH LMSVC_VER count) math(EXPR count "${count}-1") -- cgit v1.2.3 From 614c75e1107c9b06b2e2c663e2c6411d1fcd21f2 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 3 May 2017 15:58:21 -0400 Subject: DRTVWR-418: Silence some Mac build warnings. Whatever we were trying to do with LLSharedLibs.cmake hasn't worked on the Mac for a long time, and trying to fix it only digs up more problems. Skip it: we've already worked around it. Update the media_plugins_example CMakeLists.txt to eliminate some CMake non-existent dependency warnings. --- indra/cmake/LLSharedLibs.cmake | 59 ++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 28 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/LLSharedLibs.cmake b/indra/cmake/LLSharedLibs.cmake index a3c1c871aa..f69b45cd92 100644 --- a/indra/cmake/LLSharedLibs.cmake +++ b/indra/cmake/LLSharedLibs.cmake @@ -3,35 +3,38 @@ macro(ll_deploy_sharedlibs_command target_exe) set(TARGET_LOCATION $) get_filename_component(OUTPUT_PATH ${TARGET_LOCATION} PATH) - - if(DARWIN) - SET_TEST_PATH(SEARCH_DIRS) - get_target_property(IS_BUNDLE ${target_exe} MACOSX_BUNDLE) - if(IS_BUNDLE) - # If its a bundle the exe is not in the target location, this should find it. - get_filename_component(TARGET_FILE ${TARGET_LOCATION} NAME) - set(OUTPUT_PATH ${TARGET_LOCATION}.app/Contents/MacOS) - set(TARGET_LOCATION ${OUTPUT_PATH}/${TARGET_FILE}) - set(OUTPUT_PATH ${OUTPUT_PATH}/../Resources) - endif(IS_BUNDLE) - elseif(WINDOWS) - SET_TEST_PATH(SEARCH_DIRS) - LIST(APPEND SEARCH_DIRS "$ENV{SystemRoot}/system32") - elseif(LINUX) - SET_TEST_PATH(SEARCH_DIRS) - set(OUTPUT_PATH ${OUTPUT_PATH}/lib) - endif(DARWIN) - add_custom_command( - TARGET ${target_exe} POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS - "-DBIN_NAME=\"${TARGET_LOCATION}\"" - "-DSEARCH_DIRS=\"${SEARCH_DIRS}\"" - "-DDST_PATH=\"${OUTPUT_PATH}\"" - "-P" - "${CMAKE_SOURCE_DIR}/cmake/DeploySharedLibs.cmake" - ) + # It's not clear that this does anything useful for us on Darwin. It has + # been broken for some time now; the BIN_NAME was being constructed as a + # ridiculous nonexistent path with duplicated segments. Fixing that only + # produces ominous spammy warnings: at the time the command below is run, we + # have not yet populated the nested mac-crash-logger.app/Contents/Resources + # with the .dylibs with which it was linked. Moreover, the form of the + # embedded @executable_path/../Resources/mumble.dylib pathname confuses the + # GetPrerequisites.cmake tool invoked by DeploySharedLibs.cmake. It seems + # clear that we have long since accomplished by other means what this was + # originally supposed to do. Skipping it only eliminates an annoying + # non-fatal error. + if(NOT DARWIN) + if(WINDOWS) + SET_TEST_PATH(SEARCH_DIRS) + LIST(APPEND SEARCH_DIRS "$ENV{SystemRoot}/system32") + elseif(LINUX) + SET_TEST_PATH(SEARCH_DIRS) + set(OUTPUT_PATH ${OUTPUT_PATH}/lib) + endif(WINDOWS) + + add_custom_command( + TARGET ${target_exe} POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS + "-DBIN_NAME=\"${TARGET_LOCATION}\"" + "-DSEARCH_DIRS=\"${SEARCH_DIRS}\"" + "-DDST_PATH=\"${OUTPUT_PATH}\"" + "-P" + "${CMAKE_SOURCE_DIR}/cmake/DeploySharedLibs.cmake" + ) + endif(NOT DARWIN) endmacro(ll_deploy_sharedlibs_command) -- cgit v1.2.3 From 0288e5e8cfaf66c8a8b6407ec05193238987002a Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Thu, 4 May 2017 16:05:59 -0700 Subject: Expand the way we set C++ flags in cmake to call out each build type explicitly --- indra/cmake/00-Common.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index f925fdda5d..f792280654 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -19,7 +19,9 @@ set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") include(Variables) # We go to some trouble to set LL_BUILD to the set of relevant compiler flags. -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} $ENV{LL_BUILD}") +set(CMAKE_CXX_FLAGS_RELEASE "$ENV{LL_BUILD_RELEASE}") +set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "$ENV{LL_BUILD_RELWITHDEBINFO}") +set(CMAKE_CXX_FLAGS_DEBUG "$ENV{LL_BUILD_DEBUG}") # Given that, all the flags you see added below are flags NOT present in # https://bitbucket.org/lindenlab/viewer-build-variables/src/tip/variables. # Before adding new ones here, it's important to ask: can this flag really be -- cgit v1.2.3 From 322c4c6bec54b4968d0105cf1bb28bb62c6dfcbc Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 8 May 2017 09:09:22 -0400 Subject: DRTVWR-418: Fix -std=c++11 llinstancetracker_test crash. LLInstanceTracker performs validation in ~LLInstanceTracker(). Normally validation failure logs an error and terminates the program, which is fine. In the test executable, though, we want validation failure to throw an exception instead so we can catch it and continue testing other failure conditions. But since destructors in C++11 are implicitly noexcept(true), that exception never made it out of ~LLInstanceTracker(): it crashed the test program instead. Declaring ~LLInstanceTracker() noexcept(false) solves that, allowing the test program to catch the exception and continue. However, if we unconditionally declare that, then every destructor anywhere in the inheritance hierarchy for any LLInstanceTracker subclass must also be noexcept(false)! That's way too pervasive, especially for functionality we only need (or want) in a specific test executable. Instead, make the CMake macros LL_ADD_PROJECT_UNIT_TESTS() and LL_ADD_INTEGRATION_TEST() -- with which we define all viewer build-time tests -- define two new command-line macros: LL_TEST=testname and LL_TEST_testname. That way, preprocessor logic in a header file can detect whether it's being compiled for production code or for a test executable. (While at it, encapsulate in a new GET_OPT_SOURCE_FILE_PROPERTY() CMake macro an ugly repetitive pattern. The builtin GET_SOURCE_FILE_PROPERTY() sets the target variable to "NOTFOUND" -- rather than an empty string -- if the specified property wasn't set. Every call to GET_SOURCE_FILE_PROPERTY() in LL_ADD_PROJECT_UNIT_TESTS() was followed by a test for NOTFOUND and an assignment to "". Wrap all that in a macro whose 'unset' value is "".) Now llinstancetracker.h can detect when we're building the LLInstanceTracker unit test executable, and *only then* declare ~LLInstanceTracker() as noexcept(false). We #define LLINSTANCETRACKER_DTOR_NOEXCEPT to expand either empty or noexcept(false), also detecting clang in C++11 mode. (It all works fine without noexcept(false) until we turn on C++11 mode.) We also use that macro for the StatBase class in lltrace.h. Turns out some of the infrastructure headers required for tests in general, including the LLInstanceTracker test, use LLInstanceTracker. Fortunately that appears to be the only other class we must annotate this way for the LLInstanceTracker tests. --- indra/cmake/LLAddBuildTest.cmake | 73 +++++++++++++++++++++++----------------- 1 file changed, 43 insertions(+), 30 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 96d3e39a06..024bfe14a1 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -3,6 +3,9 @@ include(LLTestCommand) include(GoogleMock) include(Tut) +#***************************************************************************** +# LL_ADD_PROJECT_UNIT_TESTS +#***************************************************************************** MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources) # Given a project name and a list of sourcefiles (with optional properties on each), # add targets to build and run the tests specified. @@ -74,19 +77,17 @@ INCLUDE(GoogleMock) # Per-codefile additional / external source, header, and include dir property extraction # # Source - GET_SOURCE_FILE_PROPERTY(${name}_test_additional_SOURCE_FILES ${source} LL_TEST_ADDITIONAL_SOURCE_FILES) - IF(${name}_test_additional_SOURCE_FILES MATCHES NOTFOUND) - SET(${name}_test_additional_SOURCE_FILES "") - ENDIF(${name}_test_additional_SOURCE_FILES MATCHES NOTFOUND) - SET(${name}_test_SOURCE_FILES ${source} tests/${name}_test.${extension} ${alltest_SOURCE_FILES} ${${name}_test_additional_SOURCE_FILES} ) + GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_SOURCE_FILES ${source} LL_TEST_ADDITIONAL_SOURCE_FILES) + SET(${name}_test_SOURCE_FILES + ${source} + tests/${name}_test.${extension} + ${alltest_SOURCE_FILES} + ${${name}_test_additional_SOURCE_FILES} ) IF(LL_TEST_VERBOSE) MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_SOURCE_FILES ${${name}_test_SOURCE_FILES}") ENDIF(LL_TEST_VERBOSE) # Headers - GET_SOURCE_FILE_PROPERTY(${name}_test_additional_HEADER_FILES ${source} LL_TEST_ADDITIONAL_HEADER_FILES) - IF(${name}_test_additional_HEADER_FILES MATCHES NOTFOUND) - SET(${name}_test_additional_HEADER_FILES "") - ENDIF(${name}_test_additional_HEADER_FILES MATCHES NOTFOUND) + GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_HEADER_FILES ${source} LL_TEST_ADDITIONAL_HEADER_FILES) SET(${name}_test_HEADER_FILES ${name}.h ${${name}_test_additional_HEADER_FILES}) set_source_files_properties(${${name}_test_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) LIST(APPEND ${name}_test_SOURCE_FILES ${${name}_test_HEADER_FILES}) @@ -94,10 +95,7 @@ INCLUDE(GoogleMock) MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_HEADER_FILES ${${name}_test_HEADER_FILES}") ENDIF(LL_TEST_VERBOSE) # Include dirs - GET_SOURCE_FILE_PROPERTY(${name}_test_additional_INCLUDE_DIRS ${source} LL_TEST_ADDITIONAL_INCLUDE_DIRS) - IF(${name}_test_additional_INCLUDE_DIRS MATCHES NOTFOUND) - SET(${name}_test_additional_INCLUDE_DIRS "") - ENDIF(${name}_test_additional_INCLUDE_DIRS MATCHES NOTFOUND) + GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_INCLUDE_DIRS ${source} LL_TEST_ADDITIONAL_INCLUDE_DIRS) INCLUDE_DIRECTORIES(${alltest_INCLUDE_DIRS} ${${name}_test_additional_INCLUDE_DIRS} ) IF(LL_TEST_VERBOSE) MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_INCLUDE_DIRS ${${name}_test_additional_INCLUDE_DIRS}") @@ -113,15 +111,9 @@ INCLUDE(GoogleMock) # # WARNING: it's REALLY IMPORTANT to not mix these. I guarantee it will not work in the future. + poppy 2009-04-19 # Projects - GET_SOURCE_FILE_PROPERTY(${name}_test_additional_PROJECTS ${source} LL_TEST_ADDITIONAL_PROJECTS) - IF(${name}_test_additional_PROJECTS MATCHES NOTFOUND) - SET(${name}_test_additional_PROJECTS "") - ENDIF(${name}_test_additional_PROJECTS MATCHES NOTFOUND) + GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_PROJECTS ${source} LL_TEST_ADDITIONAL_PROJECTS) # Libraries - GET_SOURCE_FILE_PROPERTY(${name}_test_additional_LIBRARIES ${source} LL_TEST_ADDITIONAL_LIBRARIES) - IF(${name}_test_additional_LIBRARIES MATCHES NOTFOUND) - SET(${name}_test_additional_LIBRARIES "") - ENDIF(${name}_test_additional_LIBRARIES MATCHES NOTFOUND) + GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_LIBRARIES ${source} LL_TEST_ADDITIONAL_LIBRARIES) IF(LL_TEST_VERBOSE) MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_PROJECTS ${${name}_test_additional_PROJECTS}") MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_LIBRARIES ${${name}_test_additional_LIBRARIES}") @@ -129,13 +121,14 @@ INCLUDE(GoogleMock) # Add to project TARGET_LINK_LIBRARIES(PROJECT_${project}_TEST_${name} ${alltest_LIBRARIES} ${alltest_DEP_TARGETS} ${${name}_test_additional_PROJECTS} ${${name}_test_additional_LIBRARIES} ) # Compile-time Definitions - GET_SOURCE_FILE_PROPERTY(${name}_test_additional_CFLAGS ${source} LL_TEST_ADDITIONAL_CFLAGS) - IF(NOT ${name}_test_additional_CFLAGS MATCHES NOTFOUND) - SET_TARGET_PROPERTIES(PROJECT_${project}_TEST_${name} PROPERTIES COMPILE_FLAGS ${${name}_test_additional_CFLAGS} ) - IF(LL_TEST_VERBOSE) - MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_CFLAGS ${${name}_test_additional_CFLAGS}") - ENDIF(LL_TEST_VERBOSE) - ENDIF(NOT ${name}_test_additional_CFLAGS MATCHES NOTFOUND) + GET_OPT_SOURCE_FILE_PROPERTY(${name}_test_additional_CFLAGS ${source} LL_TEST_ADDITIONAL_CFLAGS) + SET_TARGET_PROPERTIES(PROJECT_${project}_TEST_${name} + PROPERTIES + COMPILE_FLAGS "${${name}_test_additional_CFLAGS}" + COMPILE_DEFINITIONS "LL_TEST=${name};LL_TEST_${name}") + IF(LL_TEST_VERBOSE) + MESSAGE("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_CFLAGS ${${name}_test_additional_CFLAGS}") + ENDIF(LL_TEST_VERBOSE) # # Setup test targets @@ -175,6 +168,19 @@ INCLUDE(GoogleMock) ADD_DEPENDENCIES(${project} ${project}_tests) ENDMACRO(LL_ADD_PROJECT_UNIT_TESTS) +#***************************************************************************** +# GET_OPT_SOURCE_FILE_PROPERTY +#***************************************************************************** +MACRO(GET_OPT_SOURCE_FILE_PROPERTY var filename property) + GET_SOURCE_FILE_PROPERTY(${var} "${filename}" "${property}") + IF("${${var}}" MATCHES NOTFOUND) + SET(${var} "") + ENDIF("${${var}}" MATCHES NOTFOUND) +ENDMACRO(GET_OPT_SOURCE_FILE_PROPERTY) + +#***************************************************************************** +# LL_ADD_INTEGRATION_TEST +#***************************************************************************** FUNCTION(LL_ADD_INTEGRATION_TEST testname additional_source_files @@ -184,7 +190,7 @@ FUNCTION(LL_ADD_INTEGRATION_TEST if(TEST_DEBUG) message(STATUS "Adding INTEGRATION_TEST_${testname} - debug output is on") endif(TEST_DEBUG) - + SET(source_files tests/${testname}_test.cpp ${CMAKE_SOURCE_DIR}/test/test.cpp @@ -206,7 +212,11 @@ FUNCTION(LL_ADD_INTEGRATION_TEST message(STATUS "ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})") endif(TEST_DEBUG) ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files}) - SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}") + SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}" + COMPILE_DEFINITIONS "LL_TEST=${testname};LL_TEST_${testname}" + ) if(USESYSTEMLIBS) SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}") @@ -268,6 +278,9 @@ FUNCTION(LL_ADD_INTEGRATION_TEST ENDFUNCTION(LL_ADD_INTEGRATION_TEST) +#***************************************************************************** +# SET_TEST_PATH +#***************************************************************************** MACRO(SET_TEST_PATH LISTVAR) IF(WINDOWS) # We typically build/package only Release variants of third-party -- cgit v1.2.3 From 22eb4cf7727238becfa5a862c9b317d703c194a3 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 9 May 2017 14:21:35 -0400 Subject: DRTVWR-418: Set -std=c++14 for Mac even before viewer-build-variables. --- indra/cmake/00-Common.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index f792280654..b582b47f15 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -156,7 +156,13 @@ if (DARWIN) set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}") set(DARWIN_extra_cstar_flags "-Wno-unused-local-typedef -Wno-deprecated-declarations") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}") + # The viewer code base can now be successfully compiled with -std=c++14. But + # turning that on in the generic viewer-build-variables/variables file would + # potentially require tweaking each of our ~50 third-party library builds. + # Until we decide to set -std=c++14 in viewer-build-variables/variables, set + # it locally here: we want to at least prevent inadvertently reintroducing + # viewer code that would fail with C++14. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags} -std=c++14") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}") # NOTE: it's critical that the optimization flag is put in front. # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered. -- cgit v1.2.3