From 70a0b52039a75c2c482224c9b4a6c133cac0ae76 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 23 Nov 2019 22:16:39 -0500 Subject: DRTVWR-494: Show copy-paste-friendly env vars and test command. Moderately often I want to copy the (long) integration test program path from build output and rerun the test program by hand. But typically we need environment variables set as well so it can find its dynamic libraries. This has resulted in my copying parts of several lines of build output, then pasting to a command prompt, then hand-tweaking the pasted text so it makes sense as a command. Streamline run_build_test.py output so less hand-tweaking is needed. --- indra/cmake/run_build_test.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py index 210e43b232..ec5d33f902 100755 --- a/indra/cmake/run_build_test.py +++ b/indra/cmake/run_build_test.py @@ -87,7 +87,6 @@ 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 - log.info("%s += %r" % (var, libpath)) for dir in libpath: # append system paths at the end if dir in ('/lib', '/usr/lib'): @@ -105,16 +104,21 @@ 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) - log.info("%s = %r" % (var, os.environ[var])) + # This output format is intended to make it straightforward to copy + # the variable settings and the command itself from the build output + # and paste the whole thing at a command prompt to rerun it manually. + log.info("%s='%s' \\" % (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: - log.info("Setting: %s" % ("\n".join(["%s=%s" % (key, value) for key, value in vars.iteritems()]))) + for key, value in vars.items(): + # As noted a few lines above, facilitate copy-paste rerunning. + log.info("%s='%s' \\" % (key, value)) 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) - log.info("Running: %s" % " ".join(command_list)) + log.info(" ".join((("'%s'" % w) if ' ' in w else w) for w in command_list)) # Make sure we see all relevant output *before* child-process output. sys.stdout.flush() try: @@ -305,8 +309,11 @@ def get_windows_table(): return _windows_table -log=logging.getLogger(__name__) -logging.basicConfig() +# Use this instead of logging.basicConfig() because the latter prefixes +# every line of output with INFO:__main__:... +log=logging.getLogger() +log.setLevel(logging.INFO) +log.addHandler(logging.StreamHandler()) if __name__ == "__main__": import argparse -- cgit v1.2.3 From e849dfb9fa467f0c3e5a3352ec35ba212b9df22f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 22 Oct 2018 14:58:23 -0400 Subject: DRTVWR-476: Update Copy3rdPartyLibs.cmake for VS 2017 version. Also, on Windows, put build output into build-vc$AUTOBUILD_VSVER-$AUTOBUILD_ADDRSIZE instead of hard-coding build-vc120-$AUTOBUILD_ADDRSIZE. --- indra/cmake/Copy3rdPartyLibs.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index c73a1fdb47..a8b353ff33 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -73,7 +73,6 @@ if(WINDOWS) #******************************* # Copy MS C runtime dlls, required for packaging. - # *TODO - Adapt this to support VC9 if (MSVC80) list(APPEND LMSVC_VER 80) list(APPEND LMSVC_VERDOT 8.0) @@ -82,6 +81,9 @@ if(WINDOWS) elseif (MSVC_VERSION EQUAL 1800) # VisualStudio 2013, which is (sigh) VS 12 list(APPEND LMSVC_VER 120) list(APPEND LMSVC_VERDOT 12.0) + elseif (MSVC_VERSION EQUAL 1915) # Visual Studio 2017 + list(APPEND LMSVC_VER 150) + list(APPEND LMSVC_VERDOT 15.0) else (MSVC80) MESSAGE(WARNING "New MSVC_VERSION ${MSVC_VERSION} of MSVC: adapt Copy3rdPartyLibs.cmake") endif (MSVC80) -- cgit v1.2.3 From e335fde00d76b3bb3335253a766f7fc847ff5704 Mon Sep 17 00:00:00 2001 From: Anchor Date: Tue, 16 Apr 2019 19:34:06 -0700 Subject: [DRTVWR-476] - fix msvc version --- 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 a8b353ff33..e121328d64 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -81,7 +81,7 @@ if(WINDOWS) elseif (MSVC_VERSION EQUAL 1800) # VisualStudio 2013, which is (sigh) VS 12 list(APPEND LMSVC_VER 120) list(APPEND LMSVC_VERDOT 12.0) - elseif (MSVC_VERSION EQUAL 1915) # Visual Studio 2017 + elseif (MSVC_VERSION EQUAL 1916) # Visual Studio 2017 list(APPEND LMSVC_VER 150) list(APPEND LMSVC_VERDOT 15.0) else (MSVC80) -- cgit v1.2.3 From 66981fab0b3c8dcc3a031d50710a2b24ec6b0603 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 10 May 2018 21:46:07 -0400 Subject: SL-793: Use Boost.Fiber instead of the "dcoroutine" library. Longtime fans will remember that the "dcoroutine" library is a Google Summer of Code project by Giovanni P. Deretta. He originally called it "Boost.Coroutine," and we originally added it to our 3p-boost autobuild package as such. But when the official Boost.Coroutine library came along (with a very different API), and we still needed the API of the GSoC project, we renamed the unofficial one "dcoroutine" to allow coexistence. The "dcoroutine" library had an internal low-level API more or less analogous to Boost.Context. We later introduced an implementation of that internal API based on Boost.Context, a step towards eliminating the GSoC code in favor of official, supported Boost code. However, recent versions of Boost.Context no longer support the API on which we built the shim for "dcoroutine." We started down the path of reimplementing that shim using the current Boost.Context API -- then realized that it's time to bite the bullet and replace the "dcoroutine" API with the Boost.Fiber API, which we've been itching to do for literally years now. Naturally, most of the heavy lifting is in llcoros.{h,cpp} and lleventcoro.{h,cpp} -- which is good: the LLCoros layer abstracts away most of the differences between "dcoroutine" and Boost.Fiber. The one feature Boost.Fiber does not provide is the ability to forcibly terminate some other fiber. Accordingly, disable LLCoros::kill() and LLCoprocedureManager::shutdown(). The only known shutdown() call was in LLCoprocedurePool's destructor. We also took the opportunity to remove postAndSuspend2() and its associated machinery: FutureListener2, LLErrorEvent, errorException(), errorLog(), LLCoroEventPumps. All that dual-LLEventPump stuff was introduced at a time when the Responder pattern was king, and we assumed we'd want to listen on one LLEventPump with the success handler and on another with the error handler. We have never actually used that in practice. Remove associated tests, of course. There is one other semantic difference that necessitates patching a number of tests: with "dcoroutine," fulfilling a future IMMEDIATELY resumes the waiting coroutine. With Boost.Fiber, fulfilling a future merely marks the fiber as ready to resume next time the scheduler gets around to it. To observe the test side effects, we've inserted a number of llcoro::suspend() calls -- also in the main loop. For a long time we retained a single unit test exercising the raw "dcoroutine" API. Remove that. Eliminate llcoro_get_id.{h,cpp}, which provided llcoro::get_id(), which was a hack to emulate fiber-local variables. Since Boost.Fiber has an actual API for that, remove the hack. In fact, use (new alias) LLCoros::local_ptr for LLSingleton's dependency tracking in place of llcoro::get_id(). In CMake land, replace BOOST_COROUTINE_LIBRARY with BOOST_FIBER_LIBRARY. We don't actually use the Boost.Coroutine for anything (though there exist plausible use cases). --- indra/cmake/Boost.cmake | 20 ++++++++++---------- indra/cmake/LLAddBuildTest.cmake | 4 ++-- indra/cmake/LLAppearance.cmake | 2 +- indra/cmake/LLCommon.cmake | 4 ++-- indra/cmake/LLCoreHttp.cmake | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 180a84dbcf..e05e3ca0e5 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -8,7 +8,7 @@ if (USESYSTEMLIBS) include(FindBoost) set(BOOST_CONTEXT_LIBRARY boost_context-mt) - set(BOOST_COROUTINE_LIBRARY boost_coroutine-mt) + set(BOOST_FIBER_LIBRARY boost_fiber-mt) set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt) set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt) set(BOOST_REGEX_LIBRARY boost_regex-mt) @@ -49,9 +49,9 @@ else (USESYSTEMLIBS) set(BOOST_CONTEXT_LIBRARY optimized libboost_context-mt debug libboost_context-mt-gd) - set(BOOST_COROUTINE_LIBRARY - optimized libboost_coroutine-mt - debug libboost_coroutine-mt-gd) + set(BOOST_FIBER_LIBRARY + optimized libboost_fiber-mt + debug libboost_fiber-mt-gd) set(BOOST_FILESYSTEM_LIBRARY optimized libboost_filesystem-mt debug libboost_filesystem-mt-gd) @@ -75,9 +75,9 @@ else (USESYSTEMLIBS) set(BOOST_CONTEXT_LIBRARY optimized boost_context-mt debug boost_context-mt-d) - set(BOOST_COROUTINE_LIBRARY - optimized boost_coroutine-mt - debug boost_coroutine-mt-d) + set(BOOST_FIBER_LIBRARY + optimized boost_fiber-mt + debug boost_fiber-mt-d) set(BOOST_FILESYSTEM_LIBRARY optimized boost_filesystem-mt debug boost_filesystem-mt-d) @@ -100,9 +100,9 @@ else (USESYSTEMLIBS) set(BOOST_CONTEXT_LIBRARY optimized boost_context-mt debug boost_context-mt-d) - set(BOOST_COROUTINE_LIBRARY - optimized boost_coroutine-mt - debug boost_coroutine-mt-d) + set(BOOST_FIBER_LIBRARY + optimized boost_fiber-mt + debug boost_fiber-mt-d) set(BOOST_FILESYSTEM_LIBRARY optimized boost_filesystem-mt debug boost_filesystem-mt-d) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index b3f42c1a5e..ee6396e473 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -53,7 +53,7 @@ INCLUDE(GoogleMock) ${GOOGLEMOCK_INCLUDE_DIRS} ) SET(alltest_LIBRARIES - ${BOOST_COROUTINE_LIBRARY} + ${BOOST_FIBER_LIBRARY} ${BOOST_CONTEXT_LIBRARY} ${BOOST_SYSTEM_LIBRARY} ${GOOGLEMOCK_LIBRARIES} @@ -201,7 +201,7 @@ FUNCTION(LL_ADD_INTEGRATION_TEST SET(libraries ${library_dependencies} - ${BOOST_COROUTINE_LIBRARY} + ${BOOST_FIBER_LIBRARY} ${BOOST_CONTEXT_LIBRARY} ${BOOST_SYSTEM_LIBRARY} ${GOOGLEMOCK_LIBRARIES} diff --git a/indra/cmake/LLAppearance.cmake b/indra/cmake/LLAppearance.cmake index ae265d07e3..675330ec72 100644 --- a/indra/cmake/LLAppearance.cmake +++ b/indra/cmake/LLAppearance.cmake @@ -18,7 +18,7 @@ endif (BUILD_HEADLESS) set(LLAPPEARANCE_LIBRARIES llappearance llmessage llcorehttp - ${BOOST_COROUTINE_LIBRARY} + ${BOOST_FIBER_LIBRARY} ${BOOST_CONTEXT_LIBRARY} ${BOOST_SYSTEM_LIBRARY} ) diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake index 3e29297c58..8900419f9b 100644 --- a/indra/cmake/LLCommon.cmake +++ b/indra/cmake/LLCommon.cmake @@ -19,7 +19,7 @@ if (LINUX) # specify all libraries that llcommon uses. # llcommon uses `clock_gettime' which is provided by librt on linux. set(LLCOMMON_LIBRARIES llcommon - ${BOOST_COROUTINE_LIBRARY} + ${BOOST_FIBER_LIBRARY} ${BOOST_CONTEXT_LIBRARY} ${BOOST_THREAD_LIBRARY} ${BOOST_SYSTEM_LIBRARY} @@ -27,7 +27,7 @@ if (LINUX) ) else (LINUX) set(LLCOMMON_LIBRARIES llcommon - ${BOOST_COROUTINE_LIBRARY} + ${BOOST_FIBER_LIBRARY} ${BOOST_CONTEXT_LIBRARY} ${BOOST_THREAD_LIBRARY} ${BOOST_SYSTEM_LIBRARY} ) diff --git a/indra/cmake/LLCoreHttp.cmake b/indra/cmake/LLCoreHttp.cmake index 379ae207de..613453ab5d 100644 --- a/indra/cmake/LLCoreHttp.cmake +++ b/indra/cmake/LLCoreHttp.cmake @@ -12,6 +12,6 @@ set(LLCOREHTTP_INCLUDE_DIRS ) set(LLCOREHTTP_LIBRARIES llcorehttp - ${BOOST_COROUTINE_LIBRARY} + ${BOOST_FIBER_LIBRARY} ${BOOST_CONTEXT_LIBRARY} ${BOOST_SYSTEM_LIBRARY}) -- cgit v1.2.3 From 65b268ff861e8decadaee9a70b2d5ce78e571cbc Mon Sep 17 00:00:00 2001 From: Anchor Date: Thu, 18 Apr 2019 11:33:23 -0700 Subject: [DRTVWR-476] - fix openjpeg dll path --- indra/cmake/Copy3rdPartyLibs.cmake | 2 +- indra/cmake/OpenJPEG.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index e121328d64..e2647f6b98 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -37,7 +37,7 @@ if(WINDOWS) set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}") set(release_files - openjpeg.dll + openjp2.dll libapr-1.dll libaprutil-1.dll libapriconv-1.dll diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index bf0bde2ba7..965384f5e0 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -12,8 +12,8 @@ else (USESYSTEMLIBS) if(WINDOWS) # Windows has differently named release and debug openjpeg(d) libs. set(OPENJPEG_LIBRARIES - debug openjpegd - optimized openjpeg) + debug openjp2d + optimized openjp2) else(WINDOWS) set(OPENJPEG_LIBRARIES openjpeg) endif(WINDOWS) -- cgit v1.2.3 From fc09af763c96d0bf13d721e1f74b8535379df766 Mon Sep 17 00:00:00 2001 From: Anchor Date: Thu, 18 Apr 2019 13:24:14 -0700 Subject: [DRTVWR-476] - update openjpeg --- indra/cmake/Copy3rdPartyLibs.cmake | 2 +- indra/cmake/OpenJPEG.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index e2647f6b98..e121328d64 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -37,7 +37,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 diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 965384f5e0..bf0bde2ba7 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -12,8 +12,8 @@ else (USESYSTEMLIBS) if(WINDOWS) # Windows has differently named release and debug openjpeg(d) libs. set(OPENJPEG_LIBRARIES - debug openjp2d - optimized openjp2) + debug openjpegd + optimized openjpeg) else(WINDOWS) set(OPENJPEG_LIBRARIES openjpeg) endif(WINDOWS) -- cgit v1.2.3 From 0ed3724c95eb8d3c1daf50657d53d68641d576df Mon Sep 17 00:00:00 2001 From: Anchor Date: Tue, 7 May 2019 23:58:04 -0600 Subject: [DRTVWR-476] - add legacy_stdio_definitions --- indra/cmake/LLCommon.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/cmake') diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake index 8900419f9b..f56d1811d1 100644 --- a/indra/cmake/LLCommon.cmake +++ b/indra/cmake/LLCommon.cmake @@ -33,6 +33,10 @@ else (LINUX) ${BOOST_SYSTEM_LIBRARY} ) endif (LINUX) +if (WINDOWS) + list(APPEND LLCOMMON_LIBRARIES legacy_stdio_definitions) +endif (WINDOWS) + 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 e039f5e29ee02c37d2febc21b492a0d425661897 Mon Sep 17 00:00:00 2001 From: Anchor Date: Wed, 8 May 2019 17:37:05 -0600 Subject: [DRTVWR-476] - legacy_stdio_definitions shld be the last library linked --- indra/cmake/LLAddBuildTest.cmake | 4 ++++ indra/cmake/LLCommon.cmake | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index ee6396e473..983b0bc3a9 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -208,6 +208,10 @@ FUNCTION(LL_ADD_INTEGRATION_TEST ${PTHREAD_LIBRARY} ) + if (WINDOWS) + list(APPEND libraries legacy_stdio_definitions) + endif (WINDOWS) + # Add test executable build target if(TEST_DEBUG) message(STATUS "ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})") diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake index f56d1811d1..8900419f9b 100644 --- a/indra/cmake/LLCommon.cmake +++ b/indra/cmake/LLCommon.cmake @@ -33,10 +33,6 @@ else (LINUX) ${BOOST_SYSTEM_LIBRARY} ) endif (LINUX) -if (WINDOWS) - list(APPEND LLCOMMON_LIBRARIES legacy_stdio_definitions) -endif (WINDOWS) - 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 761d9aa3bff981d1f322c9fdfe33ac35b30bf338 Mon Sep 17 00:00:00 2001 From: Anchor Date: Wed, 8 May 2019 18:05:49 -0600 Subject: [DRTVWR-476] - test adding at beginiing of list --- indra/cmake/LLAddBuildTest.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 983b0bc3a9..0a20a2c068 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -209,7 +209,7 @@ FUNCTION(LL_ADD_INTEGRATION_TEST ) if (WINDOWS) - list(APPEND libraries legacy_stdio_definitions) + list(INSERT libraries 0 legacy_stdio_definitions) endif (WINDOWS) # Add test executable build target -- cgit v1.2.3 From b5bb0794f0022517c7aeff9a7775864a56488da6 Mon Sep 17 00:00:00 2001 From: Anchor Date: Wed, 8 May 2019 18:57:33 -0600 Subject: [DRTVWR-476] - fix linking --- indra/cmake/LLAddBuildTest.cmake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 0a20a2c068..4932e9044f 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -200,6 +200,7 @@ FUNCTION(LL_ADD_INTEGRATION_TEST ) SET(libraries + ${LEGACY_STDIO_LIBS} ${library_dependencies} ${BOOST_FIBER_LIBRARY} ${BOOST_CONTEXT_LIBRARY} @@ -208,10 +209,6 @@ FUNCTION(LL_ADD_INTEGRATION_TEST ${PTHREAD_LIBRARY} ) - if (WINDOWS) - list(INSERT libraries 0 legacy_stdio_definitions) - endif (WINDOWS) - # Add test executable build target if(TEST_DEBUG) message(STATUS "ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})") -- cgit v1.2.3 From 96639a8d09862eca95c483336d603aeb85694370 Mon Sep 17 00:00:00 2001 From: Brad Kittenbrink Date: Wed, 30 Jan 2019 17:16:06 -0800 Subject: Fix failure when building packages-info.txt when autobuild can't be found in xcode's PATH --- indra/cmake/BuildPackagesInfo.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/BuildPackagesInfo.cmake b/indra/cmake/BuildPackagesInfo.cmake index 4314cca33d..8f8b6b2330 100644 --- a/indra/cmake/BuildPackagesInfo.cmake +++ b/indra/cmake/BuildPackagesInfo.cmake @@ -1,6 +1,7 @@ # -*- cmake -*- # Construct the version and copyright information based on package data. include(Python) +include(FindAutobuild) # packages-formatter.py runs autobuild install --versions, which needs to know # the build_directory, which (on Windows) depends on AUTOBUILD_ADDRSIZE. @@ -13,7 +14,7 @@ add_custom_command(OUTPUT packages-info.txt 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} + ${CMAKE_SOURCE_DIR}/cmake/run_build_test.py -DAUTOBUILD_ADDRSIZE=${ADDRESS_SIZE} -DAUTOBUILD=${AUTOBUILD_EXECUTABLE} ${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 3a7d40136415fbf1897d5240ef4e4d48f79c8a26 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 26 Jun 2019 15:04:16 -0400 Subject: DRTVWR-476: On Mac, copy libhunspell-1.3.0.dylib for test programs. --- indra/cmake/Copy3rdPartyLibs.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index e121328d64..3f669c833a 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -188,6 +188,7 @@ elseif(DARWIN) libexception_handler.dylib ${EXPAT_COPY} libGLOD.dylib + libhunspell-1.3.0.dylib libndofdev.dylib libnghttp2.dylib libnghttp2.14.dylib -- cgit v1.2.3 From d43dcc50c588631f9d55f7d9b959674a87bf9e92 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 17 Oct 2019 13:28:33 -0400 Subject: DRTVWR-476: We've observed a couple different values for VS 2017. --- 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 3f669c833a..7ee13bb056 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -81,7 +81,7 @@ if(WINDOWS) elseif (MSVC_VERSION EQUAL 1800) # VisualStudio 2013, which is (sigh) VS 12 list(APPEND LMSVC_VER 120) list(APPEND LMSVC_VERDOT 12.0) - elseif (MSVC_VERSION EQUAL 1916) # Visual Studio 2017 + elseif (MSVC_VERSION EQUAL 1915 OR MSVC_VERSION EQUAL 1916) # Visual Studio 2017 list(APPEND LMSVC_VER 150) list(APPEND LMSVC_VERDOT 15.0) else (MSVC80) -- cgit v1.2.3 From 5f1140c03c9677753bd4a0ebe60b48e37d28669e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 31 Oct 2019 09:22:07 -0400 Subject: DRTVWR-476: For VS 2017, MSVC_VERSION can be any of a range. Thanks NickyD. --- 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 7ee13bb056..1e33205143 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -81,7 +81,7 @@ if(WINDOWS) elseif (MSVC_VERSION EQUAL 1800) # VisualStudio 2013, which is (sigh) VS 12 list(APPEND LMSVC_VER 120) list(APPEND LMSVC_VERDOT 12.0) - elseif (MSVC_VERSION EQUAL 1915 OR MSVC_VERSION EQUAL 1916) # Visual Studio 2017 + elseif (MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) # Visual Studio 2017 list(APPEND LMSVC_VER 150) list(APPEND LMSVC_VERDOT 15.0) else (MSVC80) -- cgit v1.2.3 From 70a63ca331484575fbd6ffb432e40f6555bb8a51 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 31 Oct 2019 13:54:51 -0400 Subject: DRTVWR-476, SL-12205: Update to glod built with VS 2017 runtime libs. --- indra/cmake/Copy3rdPartyLibs.cmake | 115 ++++++++++++------------------------- 1 file changed, 38 insertions(+), 77 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 1e33205143..c3309b2195 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -74,96 +74,57 @@ if(WINDOWS) #******************************* # Copy MS C runtime dlls, required for packaging. if (MSVC80) - list(APPEND LMSVC_VER 80) - list(APPEND LMSVC_VERDOT 8.0) + set(MSVC_VER 80) elseif (MSVC_VERSION EQUAL 1600) # VisualStudio 2010 MESSAGE(STATUS "MSVC_VERSION ${MSVC_VERSION}") elseif (MSVC_VERSION EQUAL 1800) # VisualStudio 2013, which is (sigh) VS 12 - list(APPEND LMSVC_VER 120) - list(APPEND LMSVC_VERDOT 12.0) + set(MSVC_VER 120) elseif (MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) # Visual Studio 2017 - list(APPEND LMSVC_VER 150) - list(APPEND LMSVC_VERDOT 15.0) + set(MSVC_VER 140) else (MSVC80) MESSAGE(WARNING "New MSVC_VERSION ${MSVC_VERSION} of MSVC: adapt Copy3rdPartyLibs.cmake") endif (MSVC80) - # try to copy VS2010 redist independently of system version - # maint-7360 CP - # list(APPEND LMSVC_VER 100) - # list(APPEND LMSVC_VERDOT 10.0) - - list(LENGTH LMSVC_VER count) - math(EXPR count "${count}-1") - foreach(i RANGE ${count}) - list(GET LMSVC_VER ${i} MSVC_VER) - list(GET LMSVC_VERDOT ${i} MSVC_VERDOT) - MESSAGE(STATUS "Copying redist libs for VC ${MSVC_VERDOT}") - FIND_PATH(debug_msvc_redist_path NAME msvcr${MSVC_VER}d.dll - PATHS - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${MSVC_VERDOT}\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC${MSVC_VER}.DebugCRT - [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64 - [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32 - ${MSVC_DEBUG_REDIST_PATH} - NO_DEFAULT_PATH - ) - - if(EXISTS ${debug_msvc_redist_path}) - set(debug_msvc_files - msvcr${MSVC_VER}d.dll - msvcp${MSVC_VER}d.dll - ) - - copy_if_different( - ${debug_msvc_redist_path} - "${SHARED_LIB_STAGING_DIR_DEBUG}" - out_targets - ${debug_msvc_files} - ) - set(third_party_targets ${third_party_targets} ${out_targets}) + MESSAGE(STATUS "Copying redist libs for VC ${MSVC_VER}") + 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 + ${registry_find_path} + NO_DEFAULT_PATH + ) - unset(debug_msvc_redist_path CACHE) - endif() + if(EXISTS ${release_msvc_redist_path}) + set(release_msvc_files + msvcp${MSVC_VER}.dll + msvcr${MSVC_VER}.dll + vcruntime${MSVC_VER}.dll + ) - 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) + copy_if_different( + ${release_msvc_redist_path} + "${SHARED_LIB_STAGING_DIR_RELEASE}" + out_targets + ${release_msvc_files} + ) + set(third_party_targets ${third_party_targets} ${out_targets}) - FIND_PATH(release_msvc_redist_path NAME msvcr${MSVC_VER}.dll - PATHS - ${registry_find_path} - NO_DEFAULT_PATH + copy_if_different( + ${release_msvc_redist_path} + "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}" + out_targets + ${release_msvc_files} ) + set(third_party_targets ${third_party_targets} ${out_targets}) - if(EXISTS ${release_msvc_redist_path}) - set(release_msvc_files - msvcr${MSVC_VER}.dll - msvcp${MSVC_VER}.dll - ) - - copy_if_different( - ${release_msvc_redist_path} - "${SHARED_LIB_STAGING_DIR_RELEASE}" - out_targets - ${release_msvc_files} - ) - set(third_party_targets ${third_party_targets} ${out_targets}) - - copy_if_different( - ${release_msvc_redist_path} - "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}" - out_targets - ${release_msvc_files} - ) - set(third_party_targets ${third_party_targets} ${out_targets}) - - unset(release_msvc_redist_path CACHE) - endif() - endforeach() + unset(release_msvc_redist_path CACHE) + endif() elseif(DARWIN) set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug/Resources") -- cgit v1.2.3 From 44b9dd2e8076c703ad474a56a4bc1eb2a9d4529b Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 31 Oct 2019 14:46:11 -0400 Subject: DRTVWR-476, SL-12205: Search for msvcp140.dll, not msvcr140.dll Evidently, with VS 2017, what would have been msvcr140.dll has become vcruntime140.dll instead. msvcr140.dll is no longer a good sample DLL for which to search. --- indra/cmake/Copy3rdPartyLibs.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index c3309b2195..d662103ef4 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -94,7 +94,7 @@ if(WINDOWS) 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 + FIND_PATH(release_msvc_redist_path NAME msvcp${MSVC_VER}.dll PATHS ${registry_find_path} NO_DEFAULT_PATH @@ -122,8 +122,11 @@ if(WINDOWS) ${release_msvc_files} ) set(third_party_targets ${third_party_targets} ${out_targets}) + MESSAGE(STATUS "Copied ${third_party_targets}") unset(release_msvc_redist_path CACHE) + else() + MESSAGE(SEND_ERROR "Redist libs for VC ${MSVC_VER} not found!") endif() elseif(DARWIN) -- cgit v1.2.3 From b08c44a0dc701f35f96b7700f56cf7000c254fe3 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 1 Nov 2019 10:33:05 -0400 Subject: DRTVWR-476, SL-12205: Refactor MSVC redist library copying. Specify all of msvcp$VER.dll, msvcr$VER.dll and vcruntime$VER.dll -- but check each of them individually, because any given VS release has only a subset of those. Add messaging to clarify what we're doing. Introduce to_staging_dirs CMake macro to cut down on redundant boilerplate: the idiom in which we use copy_if_different twice, once to the Release staging directory and once to the RelWithDebInfo staging directory, each time appending the target pathnames to third_party_targets. Replace that idiom with calls to to_staging_dirs. --- indra/cmake/Copy3rdPartyLibs.cmake | 108 ++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 62 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index d662103ef4..1365f7b9cc 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -7,6 +7,21 @@ include(CMakeCopyIfDifferent) include(Linking) +# When we copy our dependent libraries, we almost always want to copy them to +# both the Release and the RelWithDebInfo staging directories. This has +# resulted in duplicate (or worse, erroneous attempted duplicate) +# copy_if_different commands. Encapsulate that usage. +# Pass FROM_DIR, TARGETS and the files to copy. TO_DIR is implicit. +# to_staging_dirs diverges from copy_if_different in that it appends to TARGETS. +MACRO(to_staging_dirs from_dir targets) + foreach(staging_dir + "${SHARED_LIB_STAGING_DIR_RELEASE}" + "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}") + copy_if_different("${from_dir}" "${staging_dir}" out_targets ${ARGN}) + list(APPEND "${targets}" "${out_targets}") + endforeach() +ENDMACRO(to_staging_dirs from_dir to_dir targets) + ################################################################### # set up platform specific lists of files that need to be copied ################################################################### @@ -85,7 +100,6 @@ if(WINDOWS) MESSAGE(WARNING "New MSVC_VERSION ${MSVC_VERSION} of MSVC: adapt Copy3rdPartyLibs.cmake") endif (MSVC80) - MESSAGE(STATUS "Copying redist libs for VC ${MSVC_VER}") 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") @@ -94,40 +108,34 @@ if(WINDOWS) 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 msvcp${MSVC_VER}.dll - PATHS - ${registry_find_path} - NO_DEFAULT_PATH - ) + # Having a string containing the system registry path is a start, but to + # get CMake to actually read the registry, we must engage some other + # operation. + get_filename_component(registry_path "${registry_find_path}" ABSOLUTE) - if(EXISTS ${release_msvc_redist_path}) - set(release_msvc_files + # These are candidate DLL names. Empirically, VS versions before 2015 have + # msvcp*.dll and msvcr*.dll. VS 2017 has msvcp*.dll and vcruntime*.dll. + # Check each of them. + foreach(release_msvc_file msvcp${MSVC_VER}.dll msvcr${MSVC_VER}.dll vcruntime${MSVC_VER}.dll ) - - copy_if_different( - ${release_msvc_redist_path} - "${SHARED_LIB_STAGING_DIR_RELEASE}" - out_targets - ${release_msvc_files} - ) - set(third_party_targets ${third_party_targets} ${out_targets}) - - copy_if_different( - ${release_msvc_redist_path} - "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}" - out_targets - ${release_msvc_files} - ) - set(third_party_targets ${third_party_targets} ${out_targets}) - MESSAGE(STATUS "Copied ${third_party_targets}") - - unset(release_msvc_redist_path CACHE) - else() - MESSAGE(SEND_ERROR "Redist libs for VC ${MSVC_VER} not found!") - endif() + if(EXISTS "${registry_path}/${release_msvc_file}") + to_staging_dirs( + ${registry_path} + third_party_targets + ${release_msvc_file}) + else() + # This isn't a WARNING because, as noted above, every VS version + # we've observed has only a subset of the specified DLL names. + MESSAGE(STATUS "Redist lib ${release_msvc_file} not found") + endif() + endforeach() + MESSAGE(STATUS "Will copy redist files for MSVC ${MSVC_VER}:") + foreach(target ${third_party_targets}) + MESSAGE(STATUS "${target}") + endforeach() elseif(DARWIN) set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug/Resources") @@ -239,52 +247,28 @@ endif(WINDOWS) # Done building the file lists, now set up the copy commands. ################################################################ -copy_if_different( - ${vivox_lib_dir} - "${SHARED_LIB_STAGING_DIR_DEBUG}" - out_targets - ${vivox_libs} - ) -set(third_party_targets ${third_party_targets} ${out_targets}) - +# Curiously, slvoice_files are only copied to SHARED_LIB_STAGING_DIR_RELEASE. +# It's unclear whether this is oversight or intentional, but anyway leave the +# single copy_if_different command rather than using to_staging_dirs. copy_if_different( ${slvoice_src_dir} "${SHARED_LIB_STAGING_DIR_RELEASE}" out_targets ${slvoice_files} ) -copy_if_different( - ${vivox_lib_dir} - "${SHARED_LIB_STAGING_DIR_RELEASE}" - out_targets - ${vivox_libs} - ) - -set(third_party_targets ${third_party_targets} ${out_targets}) +list(APPEND third_party_targets ${out_targets}) -copy_if_different( +to_staging_dirs( ${vivox_lib_dir} - "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}" - out_targets + third_party_targets ${vivox_libs} ) -set(third_party_targets ${third_party_targets} ${out_targets}) -copy_if_different( +to_staging_dirs( ${release_src_dir} - "${SHARED_LIB_STAGING_DIR_RELEASE}" - out_targets - ${release_files} - ) -set(third_party_targets ${third_party_targets} ${out_targets}) - -copy_if_different( - ${release_src_dir} - "${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}" - out_targets + third_party_targets ${release_files} ) -set(third_party_targets ${third_party_targets} ${out_targets}) if(NOT USESYSTEMLIBS) add_custom_target( -- cgit v1.2.3 From 56e4a676e9398365561017b2b9b121a2531f2605 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 9 Apr 2020 08:49:08 -0400 Subject: DRTVWR-476: For Boost 1.72, must suffix lib names with -x{32,64} --- indra/cmake/Boost.cmake | 102 +++++++++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 49 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index e05e3ca0e5..06a7ab6d75 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -18,11 +18,15 @@ if (USESYSTEMLIBS) else (USESYSTEMLIBS) use_prebuilt_binary(boost) set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) - set(BOOST_VERSION "1.55") + + # As of sometime between Boost 1.67 and 1.72, Boost libraries are suffixed + # with the address size. + set(addrsfx "-x${ADDRESS_SIZE}") if (WINDOWS) if(MSVC80) # This should be obsolete at this point + set(BOOST_VERSION "1.55") set(BOOST_CONTEXT_LIBRARY optimized libboost_context-vc80-mt-${BOOST_VERSION} debug libboost_context-vc80-mt-gd-${BOOST_VERSION}) @@ -47,80 +51,80 @@ else (USESYSTEMLIBS) else(MSVC80) # MSVC 10.0 config set(BOOST_CONTEXT_LIBRARY - optimized libboost_context-mt - debug libboost_context-mt-gd) + optimized libboost_context-mt${addrsfx} + debug libboost_context-mt${addrsfx}-gd) set(BOOST_FIBER_LIBRARY - optimized libboost_fiber-mt - debug libboost_fiber-mt-gd) + optimized libboost_fiber-mt${addrsfx} + debug libboost_fiber-mt${addrsfx}-gd) set(BOOST_FILESYSTEM_LIBRARY - optimized libboost_filesystem-mt - debug libboost_filesystem-mt-gd) + optimized libboost_filesystem-mt${addrsfx} + debug libboost_filesystem-mt${addrsfx}-gd) set(BOOST_PROGRAM_OPTIONS_LIBRARY - optimized libboost_program_options-mt - debug libboost_program_options-mt-gd) + optimized libboost_program_options-mt${addrsfx} + debug libboost_program_options-mt${addrsfx}-gd) set(BOOST_REGEX_LIBRARY - optimized libboost_regex-mt - debug libboost_regex-mt-gd) + optimized libboost_regex-mt${addrsfx} + debug libboost_regex-mt${addrsfx}-gd) set(BOOST_SIGNALS_LIBRARY - optimized libboost_signals-mt - debug libboost_signals-mt-gd) + optimized libboost_signals-mt${addrsfx} + debug libboost_signals-mt${addrsfx}-gd) set(BOOST_SYSTEM_LIBRARY - optimized libboost_system-mt - debug libboost_system-mt-gd) + optimized libboost_system-mt${addrsfx} + debug libboost_system-mt${addrsfx}-gd) set(BOOST_THREAD_LIBRARY - optimized libboost_thread-mt - debug libboost_thread-mt-gd) + optimized libboost_thread-mt${addrsfx} + debug libboost_thread-mt${addrsfx}-gd) endif (MSVC80) elseif (LINUX) set(BOOST_CONTEXT_LIBRARY - optimized boost_context-mt - debug boost_context-mt-d) + optimized boost_context-mt${addrsfx} + debug boost_context-mt${addrsfx}-d) set(BOOST_FIBER_LIBRARY - optimized boost_fiber-mt - debug boost_fiber-mt-d) + optimized boost_fiber-mt${addrsfx} + debug boost_fiber-mt${addrsfx}-d) set(BOOST_FILESYSTEM_LIBRARY - optimized boost_filesystem-mt - debug boost_filesystem-mt-d) + optimized boost_filesystem-mt${addrsfx} + debug boost_filesystem-mt${addrsfx}-d) set(BOOST_PROGRAM_OPTIONS_LIBRARY - optimized boost_program_options-mt - debug boost_program_options-mt-d) + optimized boost_program_options-mt${addrsfx} + debug boost_program_options-mt${addrsfx}-d) set(BOOST_REGEX_LIBRARY - optimized boost_regex-mt - debug boost_regex-mt-d) + optimized boost_regex-mt${addrsfx} + debug boost_regex-mt${addrsfx}-d) set(BOOST_SIGNALS_LIBRARY - optimized boost_signals-mt - debug boost_signals-mt-d) + optimized boost_signals-mt${addrsfx} + debug boost_signals-mt${addrsfx}-d) set(BOOST_SYSTEM_LIBRARY - optimized boost_system-mt - debug boost_system-mt-d) + optimized boost_system-mt${addrsfx} + debug boost_system-mt${addrsfx}-d) set(BOOST_THREAD_LIBRARY - optimized boost_thread-mt - debug boost_thread-mt-d) + optimized boost_thread-mt${addrsfx} + debug boost_thread-mt${addrsfx}-d) elseif (DARWIN) set(BOOST_CONTEXT_LIBRARY - optimized boost_context-mt - debug boost_context-mt-d) + optimized boost_context-mt${addrsfx} + debug boost_context-mt${addrsfx}-d) set(BOOST_FIBER_LIBRARY - optimized boost_fiber-mt - debug boost_fiber-mt-d) + optimized boost_fiber-mt${addrsfx} + debug boost_fiber-mt${addrsfx}-d) set(BOOST_FILESYSTEM_LIBRARY - optimized boost_filesystem-mt - debug boost_filesystem-mt-d) + optimized boost_filesystem-mt${addrsfx} + debug boost_filesystem-mt${addrsfx}-d) set(BOOST_PROGRAM_OPTIONS_LIBRARY - optimized boost_program_options-mt - debug boost_program_options-mt-d) + optimized boost_program_options-mt${addrsfx} + debug boost_program_options-mt${addrsfx}-d) set(BOOST_REGEX_LIBRARY - optimized boost_regex-mt - debug boost_regex-mt-d) + optimized boost_regex-mt${addrsfx} + debug boost_regex-mt${addrsfx}-d) set(BOOST_SIGNALS_LIBRARY - optimized boost_signals-mt - debug boost_signals-mt-d) + optimized boost_signals-mt${addrsfx} + debug boost_signals-mt${addrsfx}-d) set(BOOST_SYSTEM_LIBRARY - optimized boost_system-mt - debug boost_system-mt-d) + optimized boost_system-mt${addrsfx} + debug boost_system-mt${addrsfx}-d) set(BOOST_THREAD_LIBRARY - optimized boost_thread-mt - debug boost_thread-mt-d) + optimized boost_thread-mt${addrsfx} + debug boost_thread-mt${addrsfx}-d) endif (WINDOWS) endif (USESYSTEMLIBS) -- cgit v1.2.3 From 92c70ff637da5fda06aaeb40914c77499bf2d0ce Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 7 May 2020 16:59:19 -0400 Subject: DRTVWR-476: Help DirectX.cmake cope with multiple SDK versions. First, get rid of ancient cruft in the find_path() calls: on a 64-bit system, "$ENV{PROGRAMFILES}" expands to the 64-bit 'Program Files' directory rather than the 32-bit 'Program Files (x86)' directory, and none of the ancient cruft would be found there anyway. Empirically, find_path(dxdiag.h) is able to find the file using environment variables (INCLUDE from VS variables?), so it doesn't need the specific pathnames coded into that call. Once we find DIRECTX_INCLUDE_DIR, don't immediately insert it into include_directories: we've had troubles with incompatible Windows SDK versions (compile errors in Microsoft header files!) when DIRECTX_INCLUDE_DIR preceded the Windows SDK directory in the include path. The DIRECTX_FIND_QUIETLY logic seemed backwards: the message(STATUS) output was emitted only when DIRECTX_FIND_QUIETLY was false. Reverse that. The ancient cruft in find_path(dxguid.lib) was causing it to find the wrong (very old) DirectX library. Remove ancient cruft. But empirically, without that, even once we've found DIRECTX_INCLUDE_DIR, CMake could not implicitly find dxguid.lib. If the DirectX directory hierarchy were structured as .../version/Include and .../version/Lib, a relative pathname would have been sufficient hint. Unfortunately it's structured as .../Include/version and .../Lib/version, so a relative pathname would have to include the specific version. Instead, replace "/Include/" with "/Lib/". But even then, we have to drill down to the architecture-specific subdirectory based on ADDRESS_SIZE. --- indra/cmake/DirectX.cmake | 52 +++++++++++++++++------------------------------ 1 file changed, 19 insertions(+), 33 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/DirectX.cmake b/indra/cmake/DirectX.cmake index 25163d0322..201b157264 100644 --- a/indra/cmake/DirectX.cmake +++ b/indra/cmake/DirectX.cmake @@ -1,46 +1,32 @@ # -*- cmake -*- if (WINDOWS) - find_path(DIRECTX_INCLUDE_DIR dxdiag.h - "$ENV{DXSDK_DIR}/Include" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Include" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2009)/Include" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Include" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Include" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Include" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Include" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Include" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Include" - "C:/DX90SDK/Include" - "$ENV{PROGRAMFILES}/DX90SDK/Include" - ) + find_path(DIRECTX_INCLUDE_DIR dxdiag.h) if (DIRECTX_INCLUDE_DIR) - include_directories(${DIRECTX_INCLUDE_DIR}) - if (DIRECTX_FIND_QUIETLY) + if (NOT DIRECTX_FIND_QUIETLY) message(STATUS "Found DirectX include: ${DIRECTX_INCLUDE_DIR}") - endif (DIRECTX_FIND_QUIETLY) + endif (NOT DIRECTX_FIND_QUIETLY) else (DIRECTX_INCLUDE_DIR) message(FATAL_ERROR "Could not find DirectX SDK Include") endif (DIRECTX_INCLUDE_DIR) - - find_path(DIRECTX_LIBRARY_DIR dxguid.lib - "$ENV{DXSDK_DIR}/Lib/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2010)/Lib/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2009)/Lib/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Lib/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Lib/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Lib/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Lib/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Lib/x86" - "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Lib/x86" - "C:/DX90SDK/Lib" - "$ENV{PROGRAMFILES}/DX90SDK/Lib" - ) + # dxhint isn't meant to be the hard-coded DIRECTX_LIBRARY_DIR, we're just + # suggesting it as a hint to the next find_path(). The version is embedded + # in the DIRECTX_INCLUDE_DIR path string after Include and Lib, which is why + # we don't just append a relative path: if there are multiple versions + # installed on the host, we need to be sure we're using THE SAME version. + string(REPLACE "/Include/" "/Lib/" dxhint "${DIRECTX_INCLUDE_DIR}") + if (ADDRESS_SIZE EQUAL 32) + set(archdir x86) + else() + set(archdir x64) + endif() + string(APPEND dxhint "/${archdir}") + find_path(DIRECTX_LIBRARY_DIR dxguid.lib HINTS "${dxhint}") if (DIRECTX_LIBRARY_DIR) - if (DIRECTX_FIND_QUIETLY) - message(STATUS "Found DirectX include: ${DIRECTX_LIBRARY_DIR}") - endif (DIRECTX_FIND_QUIETLY) + if (NOT DIRECTX_FIND_QUIETLY) + message(STATUS "Found DirectX library: ${DIRECTX_LIBRARY_DIR}") + endif (NOT DIRECTX_FIND_QUIETLY) else (DIRECTX_LIBRARY_DIR) message(FATAL_ERROR "Could not find DirectX SDK Libraries") endif (DIRECTX_LIBRARY_DIR) -- cgit v1.2.3 From c74810ca3fc7e5a3f6b84a3d3259294aaa9288be Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 11 May 2020 11:39:27 -0400 Subject: DRTVWR-476: Use find_library(dxguid) rather than find_path(). --- indra/cmake/DirectX.cmake | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/DirectX.cmake b/indra/cmake/DirectX.cmake index 201b157264..be9797b575 100644 --- a/indra/cmake/DirectX.cmake +++ b/indra/cmake/DirectX.cmake @@ -11,10 +11,11 @@ if (WINDOWS) endif (DIRECTX_INCLUDE_DIR) # dxhint isn't meant to be the hard-coded DIRECTX_LIBRARY_DIR, we're just - # suggesting it as a hint to the next find_path(). The version is embedded - # in the DIRECTX_INCLUDE_DIR path string after Include and Lib, which is why - # we don't just append a relative path: if there are multiple versions - # installed on the host, we need to be sure we're using THE SAME version. + # suggesting it as a hint to find_library(). The Windows SDK version number + # is embedded in the DIRECTX_INCLUDE_DIR path string after Include and Lib, + # which is why we don't just append a relative path: if there are multiple + # versions installed on the host, we need to be sure we're using THE SAME + # version. string(REPLACE "/Include/" "/Lib/" dxhint "${DIRECTX_INCLUDE_DIR}") if (ADDRESS_SIZE EQUAL 32) set(archdir x86) @@ -22,7 +23,8 @@ if (WINDOWS) set(archdir x64) endif() string(APPEND dxhint "/${archdir}") - find_path(DIRECTX_LIBRARY_DIR dxguid.lib HINTS "${dxhint}") + find_library(DXGUID_LIBRARY dxguid HINTS "${dxhint}") + get_filename_component(DIRECTX_LIBRARY_DIR "${DXGUID_LIBRARY}" DIRECTORY) if (DIRECTX_LIBRARY_DIR) if (NOT DIRECTX_FIND_QUIETLY) message(STATUS "Found DirectX library: ${DIRECTX_LIBRARY_DIR}") -- cgit v1.2.3 From 6148a6443af886f9b71b4c88084db943950e146c Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Tue, 19 May 2020 00:03:19 +0200 Subject: Remove DirectX.cmake. With recent SDKs (dating back to at least VS 2013 and the 8.1 SDK) DirectX is included in the SDK and does not need any special detection logic. --- indra/cmake/CMakeLists.txt | 1 - indra/cmake/DirectX.cmake | 36 ------------------------------------ 2 files changed, 37 deletions(-) delete mode 100644 indra/cmake/DirectX.cmake (limited to 'indra/cmake') diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 84e1c5d6fd..7864271c02 100644 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -22,7 +22,6 @@ set(cmake_SOURCE_FILES Copy3rdPartyLibs.cmake DBusGlib.cmake DeploySharedLibs.cmake - DirectX.cmake DragDrop.cmake EXPAT.cmake FindAPR.cmake diff --git a/indra/cmake/DirectX.cmake b/indra/cmake/DirectX.cmake deleted file mode 100644 index be9797b575..0000000000 --- a/indra/cmake/DirectX.cmake +++ /dev/null @@ -1,36 +0,0 @@ -# -*- cmake -*- - -if (WINDOWS) - find_path(DIRECTX_INCLUDE_DIR dxdiag.h) - if (DIRECTX_INCLUDE_DIR) - if (NOT DIRECTX_FIND_QUIETLY) - message(STATUS "Found DirectX include: ${DIRECTX_INCLUDE_DIR}") - endif (NOT DIRECTX_FIND_QUIETLY) - else (DIRECTX_INCLUDE_DIR) - message(FATAL_ERROR "Could not find DirectX SDK Include") - endif (DIRECTX_INCLUDE_DIR) - - # dxhint isn't meant to be the hard-coded DIRECTX_LIBRARY_DIR, we're just - # suggesting it as a hint to find_library(). The Windows SDK version number - # is embedded in the DIRECTX_INCLUDE_DIR path string after Include and Lib, - # which is why we don't just append a relative path: if there are multiple - # versions installed on the host, we need to be sure we're using THE SAME - # version. - string(REPLACE "/Include/" "/Lib/" dxhint "${DIRECTX_INCLUDE_DIR}") - if (ADDRESS_SIZE EQUAL 32) - set(archdir x86) - else() - set(archdir x64) - endif() - string(APPEND dxhint "/${archdir}") - find_library(DXGUID_LIBRARY dxguid HINTS "${dxhint}") - get_filename_component(DIRECTX_LIBRARY_DIR "${DXGUID_LIBRARY}" DIRECTORY) - if (DIRECTX_LIBRARY_DIR) - if (NOT DIRECTX_FIND_QUIETLY) - message(STATUS "Found DirectX library: ${DIRECTX_LIBRARY_DIR}") - endif (NOT DIRECTX_FIND_QUIETLY) - else (DIRECTX_LIBRARY_DIR) - message(FATAL_ERROR "Could not find DirectX SDK Libraries") - endif (DIRECTX_LIBRARY_DIR) - -endif (WINDOWS) -- cgit v1.2.3 From e7d3b7cc9356dcf76b5f9a1bf4c9c833d180b2f8 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 26 Jun 2020 11:16:38 -0400 Subject: DRTVWR-476: On Windows, request 64-bit compiler to avoid TeamCity build failures due to 32-bit compiler running out of virtual memory for precompiled headers. --- indra/cmake/00-Common.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 03da30649a..865c057e33 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -60,7 +60,10 @@ 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 "${CMAKE_CXX_FLAGS} /MP") + # Without PreferredToolArchitecture=x64, as of 2020-06-26 the 32-bit + # compiler on our TeamCity build hosts has started running out of virtual + # memory for the precompiled header file. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /p:PreferredToolArchitecture=x64") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Zo" -- cgit v1.2.3