From c1d74e58abf75cecb5bb42d80277524166662746 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 22 Aug 2010 03:04:14 +0200 Subject: [PATCH 1/3] [Viewer/Build] --HG-- branch : Viewer-Build --- .hgpatchinfo/Viewer-Build.dep | 1 + 1 file changed, 1 insertion(+) create mode 100644 .hgpatchinfo/Viewer-Build.dep diff --git a/.hgpatchinfo/Viewer-Build.dep b/.hgpatchinfo/Viewer-Build.dep new file mode 100644 index 0000000000..09657997e6 --- /dev/null +++ b/.hgpatchinfo/Viewer-Build.dep @@ -0,0 +1 @@ +685e6455117770dc85f7ac01b9b76d7242d5f7dd \ No newline at end of file From 3ee498c4ed75d4dafc849aeb9dd3ef14f2385ef4 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 22 Aug 2010 05:48:00 +0200 Subject: [PATCH 2/3] [Viewer/Build] - changed: compiler options for "Release with Debug" builds - changed: compiler and linker options for "Release" builds --HG-- branch : Viewer-Build --- .hgpatchinfo/Viewer-Build.desc | 3 +++ indra/cmake/00-Common.cmake | 4 ++-- indra/newview/CMakeLists.txt | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .hgpatchinfo/Viewer-Build.desc diff --git a/.hgpatchinfo/Viewer-Build.desc b/.hgpatchinfo/Viewer-Build.desc new file mode 100644 index 0000000000..949cbb49bf --- /dev/null +++ b/.hgpatchinfo/Viewer-Build.desc @@ -0,0 +1,3 @@ +[Viewer/Build] +- changed: compiler options for "Release with Debug" builds +- changed: compiler and linker options for "Release" builds diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index a114d6e778..2dd65e247d 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -38,10 +38,10 @@ if (WINDOWS) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi /MDd /MP" CACHE STRING "C++ compiler debug options" FORCE) set(CMAKE_CXX_FLAGS_RELWITHDEBINFO - "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /MP" + "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Od /Zi /MD /Gm" CACHE STRING "C++ compiler release-with-debug options" FORCE) set(CMAKE_CXX_FLAGS_RELEASE - "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP" + "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /Oi /Ot /GF /Gy /arch:SSE2" CACHE STRING "C++ compiler release options" FORCE) set(CMAKE_CXX_STANDARD_LIBRARIES "") diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 1ee7586d5f..bfb1674b8a 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1410,7 +1410,7 @@ if (WINDOWS) if(MSVC71) set(release_flags "/MAP:Release/${VIEWER_BINARY_NAME}.map /MAPINFO:LINES") else(MSVC71) - set(release_flags "/MAP:Release/${VIEWER_BINARY_NAME}.map") + set(release_flags "/MAP:Release/${VIEWER_BINARY_NAME}.map /OPT:REF") endif(MSVC71) set_target_properties(${VIEWER_BINARY_NAME} From 5452360c21c19d72f9ab9441afb4f99b56bd3df3 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Sun, 22 Aug 2010 05:57:21 +0200 Subject: [PATCH 3/3] [Viewer/Build] - added: imported SNOW-788 - Fix boost lib detection with Visual Studio to allow multiple VS versions --HG-- branch : Viewer-Build --- indra/cmake/00-Common.cmake | 14 ++++++++++++ indra/cmake/Boost.cmake | 45 ++++++++++++++++++++----------------- 2 files changed, 38 insertions(+), 21 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 2dd65e247d..8ba2d92b3e 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -78,6 +78,20 @@ if (WINDOWS) # configure win32 API for windows XP+ compatibility set(WINVER "0x0501" 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}") + + # Various libs are compiler specific, generate some variables here we can just use + # when we require them instead of reimplementing the test each time. + if (MSVC71) + set(MSVC_DIR 7.1) + set(MSVC_SUFFIX 71) + elseif (MSVC80) + set(MSVC_DIR 8.0) + set(MSVC_SUFFIX 80) + elseif (MSVC90) + set(MSVC_DIR 9.0) + set(MSVC_SUFFIX 90) + endif (MSVC71) + endif (WINDOWS) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index 7ce57a5572..dcbc801663 100644 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -16,27 +16,30 @@ else (STANDALONE) if (WINDOWS) set(BOOST_VERSION 1_39) - if (MSVC71) - set(BOOST_PROGRAM_OPTIONS_LIBRARY - optimized libboost_program_options-vc71-mt-s-${BOOST_VERSION} - debug libboost_program_options-vc71-mt-sgd-${BOOST_VERSION}) - set(BOOST_REGEX_LIBRARY - optimized libboost_regex-vc71-mt-s-${BOOST_VERSION} - debug libboost_regex-vc71-mt-sgd-${BOOST_VERSION}) - set(BOOST_SIGNALS_LIBRARY - optimized libboost_signals-vc71-mt-s-${BOOST_VERSION} - debug libboost_signals-vc71-mt-sgd-${BOOST_VERSION}) - else (MSVC71) - set(BOOST_PROGRAM_OPTIONS_LIBRARY - optimized libboost_program_options-vc80-mt-${BOOST_VERSION} - debug libboost_program_options-vc80-mt-gd-${BOOST_VERSION}) - set(BOOST_REGEX_LIBRARY - optimized libboost_regex-vc80-mt-${BOOST_VERSION} - debug libboost_regex-vc80-mt-gd-${BOOST_VERSION}) - set(BOOST_SIGNALS_LIBRARY - optimized libboost_signals-vc80-mt-${BOOST_VERSION} - debug libboost_signals-vc80-mt-gd-${BOOST_VERSION}) - endif (MSVC71) + + # SNOW-788 + # 00-Common.cmake alreay sets MSVC_SUFFIX to be correct for the VS we are using eg VC71, VC80, VC90 etc + # The precompiled boost libs for VC71 use a different suffix to VS80 and VS90 + # This code should ensure the cmake rules are valid for any VS being used in future as long as the approprate + # boost libs are avaiable - RC. + + if (MSVC71) + set(BOOST_OPTIM_SUFFIX mt-s) + set(BOOST_DEBUG_SUFFIX mt-sgd) + else (MSVC71) + set(BOOST_OPTIM_SUFFIX mt) + set(BOOST_DEBUG_SUFFIX mt-gd) + endif (MSVC71) + + set(BOOST_PROGRAM_OPTIONS_LIBRARY + optimized libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION} + debug libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION}) + set(BOOST_REGEX_LIBRARY + optimized libboost_regex-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION} + debug libboost_regex-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION}) + set(BOOST_SIGNALS_LIBRARY + optimized libboost_signals-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION} + debug libboost_signals-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION}) elseif (DARWIN) set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-xgcc40-mt) set(BOOST_REGEX_LIBRARY boost_regex-xgcc40-mt)