From 786b291d9c6b784c7ce6ceef0e38a4ec76ea14db Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 16:32:52 +0200 Subject: Move CMake files to modernized cmake syntax, step 1. Change projects to cmake targetsto get rid of havig to hardcore include directories and link libraries in consumer projects. --- indra/llinventory/CMakeLists.txt | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'indra/llinventory') diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index 04975940aa..ee14f0a46e 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -5,17 +5,6 @@ project(llinventory) include(00-Common) include(LLCommon) include(LLCoreHttp) -include(LLMath) -include(LLMessage) -include(LLFileSystem) -include(LLXML) - -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ) set(llinventory_SOURCE_FILES llcategory.cpp @@ -70,7 +59,8 @@ list(APPEND llinventory_SOURCE_FILES ${llinventory_HEADER_FILES}) add_library (llinventory ${llinventory_SOURCE_FILES}) - +target_link_libraries( llinventory llcommon llmath llmessage llxml ) +set_target_include_dirs( llinventory ${CMAKE_CURRENT_SOURCE_DIR}) #add unit tests if (LL_TESTS) @@ -81,7 +71,7 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llinventory "${llinventory_TEST_SOURCE_FILES}") #set(TEST_DEBUG on) - set(test_libs llinventory ${LLMESSAGE_LIBRARIES} ${LLFILESYSTEM_LIBRARIES} ${LLCOREHTTP_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES}) + set(test_libs llinventory llmath llcorehttp llfilesystem ${WINDOWS_LIBRARIES}) LL_ADD_INTEGRATION_TEST(inventorymisc "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llparcel "" "${test_libs}") endif (LL_TESTS) -- cgit v1.2.3 From bb85651d987a6cb969de7dd7c2b130411de6203c Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 15:29:02 +0200 Subject: Create a new target ll::oslibrary to link against libs specific to the OS compiled on. This gets rid of the a few OS specific set and uses variables (which some even seemed mostly duplicate like WINDOWS_LIBRARIES ans UI_LIBRARIES) and it also solves the problem of having them to tack on every target, as of no they come as a transitive dependency from llcommon --- indra/llinventory/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llinventory') diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index ee14f0a46e..7d193f5512 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -71,7 +71,7 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llinventory "${llinventory_TEST_SOURCE_FILES}") #set(TEST_DEBUG on) - set(test_libs llinventory llmath llcorehttp llfilesystem ${WINDOWS_LIBRARIES}) + set(test_libs llinventory llmath llcorehttp llfilesystem ) LL_ADD_INTEGRATION_TEST(inventorymisc "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llparcel "" "${test_libs}") endif (LL_TESTS) -- cgit v1.2.3 From e0cf0cdfd49e5a946dcd202a083fb23f01e4f1fe Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 17 Apr 2022 18:04:57 +0200 Subject: Switch to target_include_directories All 3Ps include dirs are treated as SYSTEM, this will stop compilers stop emitting warnings from those files and greatly helps having high warning levels and not being swamped by warnings that come from external libraries. --- indra/llinventory/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llinventory') diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index 7d193f5512..16724cca53 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -60,7 +60,7 @@ list(APPEND llinventory_SOURCE_FILES ${llinventory_HEADER_FILES}) add_library (llinventory ${llinventory_SOURCE_FILES}) target_link_libraries( llinventory llcommon llmath llmessage llxml ) -set_target_include_dirs( llinventory ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llinventory INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) #add unit tests if (LL_TESTS) -- cgit v1.2.3 From 283c2a20cc4ef856076d287303c7143332b201fe Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 1 May 2022 00:38:40 +0200 Subject: Remove setting of HEADER_FILE_ONLY on .h* files, cmake automatically sets the property on those. --- indra/llinventory/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/llinventory') diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt index 16724cca53..93a586759f 100644 --- a/indra/llinventory/CMakeLists.txt +++ b/indra/llinventory/CMakeLists.txt @@ -52,9 +52,6 @@ set(llinventory_HEADER_FILES lluserrelations.h ) -set_source_files_properties(${llinventory_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llinventory_SOURCE_FILES ${llinventory_HEADER_FILES}) add_library (llinventory ${llinventory_SOURCE_FILES}) -- cgit v1.2.3 From 2dc4aec9936186eeaa0867745bb94168f569849b Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 26 Aug 2022 17:21:01 -0400 Subject: DRTVWR-568: Eliminate more blockers to C++17 language standard. --- indra/llinventory/llparcel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llinventory') diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index e25dae8a90..8db926fddf 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -1268,5 +1268,5 @@ U32 LLParcel::countExperienceKeyType( U32 type ) return std::count_if( boost::begin(mExperienceKeys | boost::adaptors::map_values), boost::end(mExperienceKeys | boost::adaptors::map_values), - std::bind2nd(std::equal_to(), type)); + [type](U32 key){ return (key == type); }); } -- cgit v1.2.3