From 04963743287ef3e47e5a511853fc4d7e6fe28184 Mon Sep 17 00:00:00 2001 From: Router Gray Date: Fri, 20 Dec 2019 16:19:21 -0600 Subject: [PATCH 1/4] [CMake] Use POSITION_INDEPENDENT_CODE property instead of manually setting -fPIC (Alchemy sync) --- indra/llcommon/CMakeLists.txt | 8 ++------ indra/llplugin/CMakeLists.txt | 10 ++-------- indra/plugins/base_basic/CMakeLists.txt | 10 ++-------- indra/plugins/base_media/CMakeLists.txt | 10 ++-------- indra/plugins/cef/CMakeLists.txt | 8 ++------ indra/plugins/example_basic/CMakeLists.txt | 10 ++-------- indra/plugins/example_media/CMakeLists.txt | 10 ++-------- indra/plugins/filepicker/CMakeLists.txt | 10 ++-------- indra/plugins/gstreamer010/CMakeLists.txt | 2 ++ 9 files changed, 18 insertions(+), 60 deletions(-) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index cae62271d..b6c5e767a 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -269,12 +269,6 @@ list(APPEND llcommon_SOURCE_FILES ${cwdebug_SOURCE_FILES}) list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES}) -if(NOT WORD_SIZE EQUAL 32) - if(NOT WINDOWS) - add_definitions(-fPIC) - endif(NOT WINDOWS) -endif(NOT WORD_SIZE EQUAL 32) - if(LLCOMMON_LINK_SHARED) add_library (llcommon SHARED ${llcommon_SOURCE_FILES}) if(WINDOWS) @@ -286,6 +280,8 @@ else(LLCOMMON_LINK_SHARED) add_library (llcommon ${llcommon_SOURCE_FILES}) endif(LLCOMMON_LINK_SHARED) +set_target_properties(llcommon PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries( llcommon PUBLIC diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt index 3a903080e..e06405049 100644 --- a/indra/llplugin/CMakeLists.txt +++ b/indra/llplugin/CMakeLists.txt @@ -46,14 +46,6 @@ set(llplugin_HEADER_FILES set_source_files_properties(${llplugin_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) -if(NOT WORD_SIZE EQUAL 32) - if(WINDOWS) - # add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) -endif (NOT WORD_SIZE EQUAL 32) - list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES}) add_library (llplugin ${llplugin_SOURCE_FILES}) @@ -67,6 +59,8 @@ else() ) endif() +set_target_properties(llplugin PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + add_subdirectory(slplugin) # # Add tests diff --git a/indra/plugins/base_basic/CMakeLists.txt b/indra/plugins/base_basic/CMakeLists.txt index 33ddced66..acebf8ffe 100644 --- a/indra/plugins/base_basic/CMakeLists.txt +++ b/indra/plugins/base_basic/CMakeLists.txt @@ -15,14 +15,6 @@ include_directories( ### basic_plugin_base -if(NOT WORD_SIZE EQUAL 32) - if(WINDOWS) - # add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) -endif (NOT WORD_SIZE EQUAL 32) - set(basic_plugin_base_SOURCE_FILES basic_plugin_base.cpp ) @@ -42,6 +34,8 @@ add_library(basic_plugin_base ${basic_plugin_base_SOURCE_FILES} ) +set_target_properties(basic_plugin_base PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries(basic_plugin_base PUBLIC llcommon diff --git a/indra/plugins/base_media/CMakeLists.txt b/indra/plugins/base_media/CMakeLists.txt index 3e5c05b8e..6634b9386 100644 --- a/indra/plugins/base_media/CMakeLists.txt +++ b/indra/plugins/base_media/CMakeLists.txt @@ -29,14 +29,6 @@ include_directories( ### media_plugin_base -if(NOT WORD_SIZE EQUAL 32) - if(WINDOWS) - # add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) -endif (NOT WORD_SIZE EQUAL 32) - set(media_plugin_base_SOURCE_FILES media_plugin_base.cpp ) @@ -56,6 +48,8 @@ add_library(media_plugin_base ${media_plugin_base_SOURCE_FILES} ) +set_target_properties(media_plugin_base PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries(media_plugin_base PUBLIC llcommon diff --git a/indra/plugins/cef/CMakeLists.txt b/indra/plugins/cef/CMakeLists.txt index cac5c759c..641535ede 100644 --- a/indra/plugins/cef/CMakeLists.txt +++ b/indra/plugins/cef/CMakeLists.txt @@ -35,12 +35,6 @@ include_directories(SYSTEM ### media_plugin_cef -if(NOT WORD_SIZE EQUAL 32) - if(NOT WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(NOT WINDOWS) -endif(NOT WORD_SIZE EQUAL 32) - set(media_plugin_cef_SOURCE_FILES media_plugin_cef.cpp ) @@ -95,6 +89,8 @@ add_dependencies(media_plugin_cef ${LLCOMMON_LIBRARIES} ) +set_target_properties(media_plugin_cef PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries(media_plugin_cef ${media_plugin_cef_LINK_LIBRARIES} ) diff --git a/indra/plugins/example_basic/CMakeLists.txt b/indra/plugins/example_basic/CMakeLists.txt index 616bda770..1a19e8d01 100644 --- a/indra/plugins/example_basic/CMakeLists.txt +++ b/indra/plugins/example_basic/CMakeLists.txt @@ -17,14 +17,6 @@ include_directories( ### basic_plugin_example -if(NOT WORD_SIZE EQUAL 32) - if(WINDOWS) - # add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) -endif (NOT WORD_SIZE EQUAL 32) - set(basic_plugin_example_SOURCE_FILES basic_plugin_example.cpp ) @@ -34,6 +26,8 @@ add_library(basic_plugin_example ${basic_plugin_example_SOURCE_FILES} ) +set_target_properties(basic_plugin_example PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries(basic_plugin_example ${LLPLUGIN_LIBRARIES} ${LLCOMMON_LIBRARIES} diff --git a/indra/plugins/example_media/CMakeLists.txt b/indra/plugins/example_media/CMakeLists.txt index 7f9def1c9..c3202521d 100644 --- a/indra/plugins/example_media/CMakeLists.txt +++ b/indra/plugins/example_media/CMakeLists.txt @@ -28,14 +28,6 @@ include_directories( ### media_plugin_example -if(NOT WORD_SIZE EQUAL 32) - if(WINDOWS) - # add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) -endif (NOT WORD_SIZE EQUAL 32) - set(media_plugin_example_SOURCE_FILES media_plugin_example.cpp ) @@ -45,6 +37,8 @@ add_library(media_plugin_example ${media_plugin_example_SOURCE_FILES} ) +set_target_properties(media_plugin_example PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries(media_plugin_example ${LLPLUGIN_LIBRARIES} ${MEDIA_PLUGIN_BASE_LIBRARIES} diff --git a/indra/plugins/filepicker/CMakeLists.txt b/indra/plugins/filepicker/CMakeLists.txt index ec896b69c..2f154ff7d 100644 --- a/indra/plugins/filepicker/CMakeLists.txt +++ b/indra/plugins/filepicker/CMakeLists.txt @@ -23,14 +23,6 @@ include_directories( ### basic_plugin_filepicker -if(NOT WORD_SIZE EQUAL 32) - if(WINDOWS) - # add_definitions(/FIXED:NO) - else(WINDOWS) # not windows therefore gcc LINUX and DARWIN - add_definitions(-fPIC) - endif(WINDOWS) -endif (NOT WORD_SIZE EQUAL 32) - set(basic_plugin_filepicker_SOURCE_FILES basic_plugin_filepicker.cpp legacy.cpp @@ -71,6 +63,8 @@ if (DARWIN) set(OSX_FILE_LIBRARIES ${APPKIT_LIBRARY} ${CARBON_LIBRARY} ${IOKIT_LIBRARY}) endif (DARWIN) +set_target_properties(basic_plugin_filepicker PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries(basic_plugin_filepicker ${LLPLUGIN_LIBRARIES} ${LLCOMMON_LIBRARIES} diff --git a/indra/plugins/gstreamer010/CMakeLists.txt b/indra/plugins/gstreamer010/CMakeLists.txt index f8a2a510e..05b432b3d 100644 --- a/indra/plugins/gstreamer010/CMakeLists.txt +++ b/indra/plugins/gstreamer010/CMakeLists.txt @@ -45,6 +45,8 @@ add_library(media_plugin_gstreamer010 ${media_plugin_gstreamer010_SOURCE_FILES} ) +set_target_properties(media_plugin_gstreamer010 PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + target_link_libraries(media_plugin_gstreamer010 ${LLPLUGIN_LIBRARIES} ${MEDIA_PLUGIN_BASE_LIBRARIES} From c68e00730ed252525bca78a91f0962a049bf8cfc Mon Sep 17 00:00:00 2001 From: Router Gray Date: Fri, 20 Dec 2019 16:37:39 -0600 Subject: [PATCH 2/4] [CMake Linux] Only include pthread and rt in target_link_libraries for ld.gold support (Alchemy sync) Fixes CMake warnings on Linux --- indra/cmake/LLCommon.cmake | 10 +--------- indra/cmake/LLPlugin.cmake | 8 +------- indra/llcommon/CMakeLists.txt | 1 + indra/llmessage/CMakeLists.txt | 3 ++- indra/llplugin/slplugin/CMakeLists.txt | 1 + 5 files changed, 6 insertions(+), 17 deletions(-) diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake index 6cc325495..169ba4eb6 100644 --- a/indra/cmake/LLCommon.cmake +++ b/indra/cmake/LLCommon.cmake @@ -10,7 +10,6 @@ if (DARWIN) find_library(CORESERVICES_LIBRARY CoreServices) endif (DARWIN) - set(LLCOMMON_INCLUDE_DIRS ${LIBS_OPEN_DIR}/cwdebug ${LIBS_OPEN_DIR}/llcommon @@ -19,14 +18,7 @@ set(LLCOMMON_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ) -if (LINUX) - # In order to support using ld.gold on linux, we need to explicitely - # specify all libraries that llcommon uses. - # llcommon uses `clock_gettime' which is provided by librt on linux. - set(LLCOMMON_LIBRARIES llcommon rt) -else (LINUX) - set(LLCOMMON_LIBRARIES llcommon) -endif (LINUX) +set(LLCOMMON_LIBRARIES llcommon) set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a shared library.") if(LLCOMMON_LINK_SHARED) diff --git a/indra/cmake/LLPlugin.cmake b/indra/cmake/LLPlugin.cmake index 399cb332d..9722f16c3 100644 --- a/indra/cmake/LLPlugin.cmake +++ b/indra/cmake/LLPlugin.cmake @@ -5,10 +5,4 @@ set(LLPLUGIN_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llplugin ) -if (LINUX) - # In order to support using ld.gold on linux, we need to explicitely - # specify all libraries that llplugin uses. - set(LLPLUGIN_LIBRARIES llplugin pthread) -else (LINUX) - set(LLPLUGIN_LIBRARIES llplugin) -endif (LINUX) +set(LLPLUGIN_LIBRARIES llplugin) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index b6c5e767a..9baf87d9d 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -300,6 +300,7 @@ target_link_libraries( ${Boost_SYSTEM_LIBRARY} ${CORESERVICES_LIBRARY} ${URIPARSER_LIBRARY} + ${RT_LIBRARY} ) if (DARWIN) diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index c131b436c..7ed650e84 100644 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -227,7 +227,8 @@ target_link_libraries( ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARIES} ${XMLRPCEPI_LIBRARIES} - ) + ${PTHREAD_LIBRARY} +) # tests if (LL_TESTS) diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 93a125ea1..7f460eca3 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -69,6 +69,7 @@ target_link_libraries(SLPlugin ${LLCOMMON_LIBRARIES} ${APRUTIL_LIBRARIES} ${PLUGIN_API_WINDOWS_LIBRARIES} + ${PTHREAD_LIBRARY} ) add_dependencies(SLPlugin From cdc35b3c32be757669a0ceb7abc871ca7042ef98 Mon Sep 17 00:00:00 2001 From: Router Gray Date: Fri, 20 Dec 2019 17:28:16 -0600 Subject: [PATCH 3/4] [CMake] Remove add_dependency entries for items listed in target_link_libraries. Superfluous. (Alchemy sync) Fixes Linux build errors. --- indra/llplugin/CMakeLists.txt | 1 + indra/llplugin/slplugin/CMakeLists.txt | 7 ------- indra/plugins/CMakeLists.txt | 2 ++ indra/plugins/cef/CMakeLists.txt | 11 +++-------- indra/plugins/example_basic/CMakeLists.txt | 6 ------ indra/plugins/example_media/CMakeLists.txt | 6 ------ indra/plugins/filepicker/CMakeLists.txt | 6 ------ indra/plugins/gstreamer010/CMakeLists.txt | 7 +------ 8 files changed, 7 insertions(+), 39 deletions(-) diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt index e06405049..7ec2f5c5f 100644 --- a/indra/llplugin/CMakeLists.txt +++ b/indra/llplugin/CMakeLists.txt @@ -7,6 +7,7 @@ include(LLCommon) include(LLMath) include(LLMessage) include(LLRender) +include(Boost) include_directories( ${LLCOMMON_INCLUDE_DIRS} diff --git a/indra/llplugin/slplugin/CMakeLists.txt b/indra/llplugin/slplugin/CMakeLists.txt index 7f460eca3..f8ab56916 100644 --- a/indra/llplugin/slplugin/CMakeLists.txt +++ b/indra/llplugin/slplugin/CMakeLists.txt @@ -1,7 +1,6 @@ project(SLPlugin) include(00-Common) -include(Linking) include(LLCommon) include(LLPlugin) include(Linking) @@ -72,12 +71,6 @@ target_link_libraries(SLPlugin ${PTHREAD_LIBRARY} ) -add_dependencies(SLPlugin - ${LLPLUGIN_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLCOMMON_LIBRARIES} -) - if (DARWIN) # Mac version needs to link against Carbon target_link_libraries(SLPlugin ${CARBON_LIBRARY} ${COCOA_LIBRARY}) diff --git a/indra/plugins/CMakeLists.txt b/indra/plugins/CMakeLists.txt index 441eb4dcf..aa19da9d2 100644 --- a/indra/plugins/CMakeLists.txt +++ b/indra/plugins/CMakeLists.txt @@ -1,5 +1,7 @@ # -*- cmake -*- +include(Variables) + add_subdirectory(base_basic) add_subdirectory(base_media) add_subdirectory(filepicker) diff --git a/indra/plugins/cef/CMakeLists.txt b/indra/plugins/cef/CMakeLists.txt index 641535ede..8c369fe0e 100644 --- a/indra/plugins/cef/CMakeLists.txt +++ b/indra/plugins/cef/CMakeLists.txt @@ -2,6 +2,7 @@ project(media_plugin_cef) +include(Boost) include(00-Common) include(LLCommon) include(LLImage) @@ -14,6 +15,7 @@ include(PluginAPI) include(MediaPluginBase) include(OpenGL) include(PulseAudio) +include(UI) include(CEFPlugin) @@ -46,11 +48,10 @@ set(media_plugin_cef_HEADER_FILES set (media_plugin_cef_LINK_LIBRARIES ${LLPLUGIN_LIBRARIES} ${MEDIA_PLUGIN_BASE_LIBRARIES} - ${LLCOMMON_LIBRARIES} ${CEF_PLUGIN_LIBRARIES} + ${LLCOMMON_LIBRARIES} ${PLUGIN_API_WINDOWS_LIBRARIES}) - # Select which VolumeCatcher implementation to use if (LINUX) if (PULSEAUDIO_FOUND) @@ -83,12 +84,6 @@ add_library(media_plugin_cef ${media_plugin_cef_SOURCE_FILES} ) -add_dependencies(media_plugin_cef - ${LLPLUGIN_LIBRARIES} - ${MEDIA_PLUGIN_BASE_LIBRARIES} - ${LLCOMMON_LIBRARIES} -) - set_target_properties(media_plugin_cef PROPERTIES POSITION_INDEPENDENT_CODE TRUE) target_link_libraries(media_plugin_cef diff --git a/indra/plugins/example_basic/CMakeLists.txt b/indra/plugins/example_basic/CMakeLists.txt index 1a19e8d01..c4a9a2779 100644 --- a/indra/plugins/example_basic/CMakeLists.txt +++ b/indra/plugins/example_basic/CMakeLists.txt @@ -34,12 +34,6 @@ target_link_libraries(basic_plugin_example ${BASIC_PLUGIN_BASE_LIBRARIES} ) -add_dependencies(basic_plugin_example - ${LLPLUGIN_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${BASIC_PLUGIN_BASE_LIBRARIES} -) - if (WINDOWS) set_target_properties( basic_plugin_example diff --git a/indra/plugins/example_media/CMakeLists.txt b/indra/plugins/example_media/CMakeLists.txt index c3202521d..9b3499387 100644 --- a/indra/plugins/example_media/CMakeLists.txt +++ b/indra/plugins/example_media/CMakeLists.txt @@ -47,12 +47,6 @@ target_link_libraries(media_plugin_example ${PLUGIN_API_WINDOWS_LIBRARIES} ) -add_dependencies(media_plugin_example - ${LLPLUGIN_LIBRARIES} - ${MEDIA_PLUGIN_BASE_LIBRARIES} - ${LLCOMMON_LIBRARIES} -) - if (WINDOWS) set_target_properties( media_plugin_example diff --git a/indra/plugins/filepicker/CMakeLists.txt b/indra/plugins/filepicker/CMakeLists.txt index 2f154ff7d..0b07ded9a 100644 --- a/indra/plugins/filepicker/CMakeLists.txt +++ b/indra/plugins/filepicker/CMakeLists.txt @@ -74,12 +74,6 @@ target_link_libraries(basic_plugin_filepicker ${OSX_FILE_LIBRARIES} ) -add_dependencies(basic_plugin_filepicker - ${LLPLUGIN_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${BASIC_PLUGIN_BASE_LIBRARIES} -) - if (WINDOWS) set_target_properties( basic_plugin_filepicker diff --git a/indra/plugins/gstreamer010/CMakeLists.txt b/indra/plugins/gstreamer010/CMakeLists.txt index 05b432b3d..a108e09c3 100644 --- a/indra/plugins/gstreamer010/CMakeLists.txt +++ b/indra/plugins/gstreamer010/CMakeLists.txt @@ -13,6 +13,7 @@ include(Linking) include(PluginAPI) include(MediaPluginBase) include(FindOpenGL) +include(Boost) include(GStreamer010Plugin) @@ -55,9 +56,3 @@ target_link_libraries(media_plugin_gstreamer010 ${GSTREAMER010_LIBRARIES} ) -add_dependencies(media_plugin_gstreamer010 - ${LLPLUGIN_LIBRARIES} - ${MEDIA_PLUGIN_BASE_LIBRARIES} - ${LLCOMMON_LIBRARIES} -) - From c8290b913e23d3202adbf513da642d8277ca6abb Mon Sep 17 00:00:00 2001 From: Router Gray Date: Fri, 27 Dec 2019 06:16:59 -0600 Subject: [PATCH 4/4] [CMake] Change remaining WORD_SIZE references to ADDDRESS_SIZE. --- autobuild.xml | 10 +++++----- indra/cmake/00-Common.cmake | 14 +++++++------- indra/cmake/ConfigurePkgConfig.cmake | 6 +++--- indra/cmake/GooglePerfTools.cmake | 8 ++++---- indra/cmake/NVAPI.cmake | 6 +++--- indra/cmake/Variables.cmake | 1 - indra/newview/CMakeLists.txt | 6 +++--- 7 files changed, 25 insertions(+), 26 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 125c014e5..417691851 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2771,7 +2771,7 @@ options -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo - -DWORD_SIZE:STRING=$AUTOBUILD_ADDRSIZE + -DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE -DROOT_PROJECT_NAME:STRING=Singularity -DINSTALL_PROPRIETARY=FALSE @@ -2792,7 +2792,7 @@ options -DCMAKE_BUILD_TYPE:STRING=Release - -DWORD_SIZE:STRING=$AUTOBUILD_ADDRSIZE + -DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE -DROOT_PROJECT_NAME:STRING=Singularity -DINSTALL_PROPRIETARY=FALSE @@ -2943,7 +2943,7 @@ -G Ninja - -DWORD_SIZE:STRING=64 + -DADDRESS_SIZE:STRING=64 default @@ -2968,7 +2968,7 @@ -G Ninja - -DWORD_SIZE:STRING=64 + -DADDRESS_SIZE:STRING=64 name @@ -3068,7 +3068,7 @@ name - windows64 + windows version_file diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 6dddeed57..653c72412 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -39,9 +39,9 @@ if (WINDOWS) "${CMAKE_C_FLAGS_RELEASE} ${LL_C_FLAGS} /O2 /Zi /MD /MP /fp:fast" CACHE STRING "C compiler release options" FORCE) - if (WORD_SIZE EQUAL 32) + if (ADDRESS_SIZE EQUAL 32) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE") - endif (WORD_SIZE EQUAL 32) + endif (ADDRESS_SIZE EQUAL 32) if (FULL_DEBUG_SYMS OR USE_CRASHPAD) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG:FULL") @@ -103,9 +103,9 @@ if (WINDOWS) ) endif (USE_LTO) - if (WORD_SIZE EQUAL 32) + if (ADDRESS_SIZE EQUAL 32) add_compile_options(/arch:SSE2) - endif (WORD_SIZE EQUAL 32) + endif (ADDRESS_SIZE EQUAL 32) if (NOT DISABLE_FATAL_WARNINGS) add_definitions(/WX) @@ -292,13 +292,13 @@ if (LINUX OR DARWIN) set(CMAKE_C_FLAGS "${UNIX_WARNINGS} ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "${UNIX_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 afbc36d63..a2d5b31e2 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/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/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index 49ff3f5eb..d951bc55e 100644 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -2,16 +2,16 @@ include(Prebuilt) -if(WORD_SIZE EQUAL 64) +if(ADDRESS_SIZE EQUAL 64) set(DISABLE_TCMALLOC TRUE) -endif(WORD_SIZE EQUAL 64) +endif(ADDRESS_SIZE EQUAL 64) if (STANDALONE) include(FindGooglePerfTools) else (STANDALONE) - if (LINUX OR WINDOWS AND NOT WORD_SIZE EQUAL 64) + if (LINUX OR WINDOWS AND NOT ADDRESS_SIZE EQUAL 64) use_prebuilt_binary(gperftools) - endif (LINUX OR WINDOWS AND NOT WORD_SIZE EQUAL 64) + endif (LINUX OR WINDOWS AND NOT ADDRESS_SIZE EQUAL 64) if (WINDOWS AND NOT DISABLE_TCMALLOC) set(TCMALLOC_LIBRARIES libtcmalloc_minimal.lib) set(TCMALLOC_LINKER_FLAGS "/INCLUDE:\"__tcmalloc\"") diff --git a/indra/cmake/NVAPI.cmake b/indra/cmake/NVAPI.cmake index 83d1ef643..3cdf5ca47 100644 --- a/indra/cmake/NVAPI.cmake +++ b/indra/cmake/NVAPI.cmake @@ -5,11 +5,11 @@ include(Variables) if (USE_NVAPI) if (WINDOWS) use_prebuilt_binary(nvapi) - if (WORD_SIZE EQUAL 32) + if (ADDRESS_SIZE EQUAL 32) set(NVAPI_LIBRARY nvapi) - elseif (WORD_SIZE EQUAL 64) + elseif (ADDRESS_SIZE EQUAL 64) set(NVAPI_LIBRARY nvapi64) - endif (WORD_SIZE EQUAL 32) + endif (ADDRESS_SIZE EQUAL 32) else (WINDOWS) set(NVAPI_LIBRARY "") endif (WINDOWS) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index dc0d5a6b0..b1afa31e2 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -119,7 +119,6 @@ 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. -set(ADDRESS_SIZE ${WORD_SIZE}) if (ADDRESS_SIZE EQUAL 32) #message(STATUS "ADDRESS_SIZE is 32") set(ARCH i686) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b8de567a4..54c9329b5 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1532,18 +1532,18 @@ if (WINDOWS) endif (ADDRESS_SIZE EQUAL 64) if (USE_FMODSTUDIO) - if (WORD_SIZE EQUAL 64) + if (ADDRESS_SIZE EQUAL 64) list(APPEND COPY_INPUT_DEPENDENCIES ${SHARED_LIB_STAGING_DIR}/Release/fmod64.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod64.dll ${SHARED_LIB_STAGING_DIR}/Debug/fmodL64.dll ) - else (WORD_SIZE EQUAL 64) + else (ADDRESS_SIZE EQUAL 64) list(APPEND COPY_INPUT_DEPENDENCIES ${SHARED_LIB_STAGING_DIR}/Release/fmod.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/fmod.dll ) - endif (WORD_SIZE EQUAL 64) + endif (ADDRESS_SIZE EQUAL 64) endif (USE_FMODSTUDIO) if(MSVC_IDE)