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/test/CMakeLists.txt | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) (limited to 'indra/test') diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 084aa8d9f7..1e9fdfa003 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -5,11 +5,6 @@ project (lltest) include(00-Common) include(LLCommon) include(LLCoreHttp) -include(LLInventory) -include(LLMath) -include(LLMessage) -include(LLFileSystem) -include(LLXML) include(Linking) include(Tut) include(LLAddBuildTest) @@ -88,27 +83,18 @@ if (USE_BUGSPLAT) endif (USE_BUGSPLAT) target_link_libraries(lltest - ${LEGACY_STDIO_LIBS} - ${LLDATABASE_LIBRARIES} - ${LLINVENTORY_LIBRARIES} - ${LLMESSAGE_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLFILESYSTEM_LIBRARIES} - ${LLXML_LIBRARIES} - ${LSCRIPT_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${LLCOREHTTP_LIBRARIES} - ${EXPAT_LIBRARIES} - ${GOOGLEMOCK_LIBRARIES} - ${PTHREAD_LIBRARY} - ${WINDOWS_LIBRARIES} - ${BOOST_PROGRAM_OPTIONS_LIBRARY} - ${BOOST_REGEX_LIBRARY} - ${BOOST_FIBER_LIBRARY} - ${BOOST_CONTEXT_LIBRARY} - ${BOOST_SYSTEM_LIBRARY} - ${DL_LIBRARY} - ) + ${LEGACY_STDIO_LIBS} + ${LLDATABASE_LIBRARIES} + llinventory + llmessage + llmath + llfilesystem + llxml + llcommon + llcorehttp + ${WINDOWS_LIBRARIES} + ${DL_LIBRARY} + ) if (WINDOWS) set_target_properties(lltest -- cgit v1.2.3 From bed0b80374c3acfc584587a9b0bc02f8bf899876 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 20:23:54 +0200 Subject: Remove obsolete include directives --- indra/test/CMakeLists.txt | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'indra/test') diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 1e9fdfa003..b607980bae 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -11,24 +11,6 @@ include(LLAddBuildTest) include(bugsplat) include(GoogleMock) -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLCOREHTTP_INCLUDE_DIRS} - ${LLDATABASE_INCLUDE_DIRS} - ${LLMATH_INCLUDE_DIRS} - ${LLMESSAGE_INCLUDE_DIRS} - ${LLINVENTORY_INCLUDE_DIRS} - ${LLFILESYSTEM_INCLUDE_DIRS} - ${LLXML_INCLUDE_DIRS} - ${LSCRIPT_INCLUDE_DIRS} - ${GOOGLEMOCK_INCLUDE_DIRS} - ${TUT_INCLUDE_DIR} - ) -include_directories(SYSTEM - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ${LLXML_SYSTEM_INCLUDE_DIRS} - ) - set(test_SOURCE_FILES io.cpp llapp_tut.cpp -- cgit v1.2.3 From d1b6a52fefb483ab75ec60e379d37bfd2e6aff90 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 6 Apr 2022 22:38:38 +0200 Subject: Googlemock target --- indra/test/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/test') diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index b607980bae..6d04c3b76b 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -74,6 +74,7 @@ target_link_libraries(lltest llxml llcommon llcorehttp + googlemock::googlemock ${WINDOWS_LIBRARIES} ${DL_LIBRARY} ) -- cgit v1.2.3 From 241919e7f7986c11586a49bff53cf19c2c0e0ea6 Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 13 Apr 2022 19:21:55 +0200 Subject: Rework cmake, the original plan was to maybe be able to use conan targets with the same name (that's why 3ps had names like apr::apr), but it's safer and saner to put the LL 3ps under the ll:: prefix. This also allows means it is possible to get rid of that bad "if( TRAGET ...) return() endif()" pattern and rather use include_guard(). --- indra/test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/test') diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 6d04c3b76b..1c2961a18a 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -74,7 +74,7 @@ target_link_libraries(lltest llxml llcommon llcorehttp - googlemock::googlemock + ll::googlemock ${WINDOWS_LIBRARIES} ${DL_LIBRARY} ) -- 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/test/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/test') diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 1c2961a18a..822574210f 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -75,8 +75,6 @@ target_link_libraries(lltest llcommon llcorehttp ll::googlemock - ${WINDOWS_LIBRARIES} - ${DL_LIBRARY} ) if (WINDOWS) -- cgit v1.2.3 From b9f94c08977ff76f41a32a2bb9f25883e578eea3 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 15:33:32 +0200 Subject: Now there is a oslibrary target get rid of some more obsolete vars: LEGACY_STDIO_LIBS (was only used for Windows) PTHREAD_LIBRARY (only Linux) LLDATABASE_LIBRARIES (that one was supposed for Linux, but never needed anyway) --- indra/test/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/test') diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 822574210f..23f80d1ef9 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -65,8 +65,6 @@ if (USE_BUGSPLAT) endif (USE_BUGSPLAT) target_link_libraries(lltest - ${LEGACY_STDIO_LIBS} - ${LLDATABASE_LIBRARIES} llinventory llmessage llmath -- cgit v1.2.3 From 3ac18ad9932b4e2fda8e850bd18a524fb1593520 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 22:08:40 +0200 Subject: Streamline bugsplat target: - Fix usage of bugsplat::bugsplat by using ll::bugsplat - Use bugsplat define by importing target not by using hand crafted magic --- indra/test/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/test') diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 23f80d1ef9..aae299e6ca 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -60,10 +60,6 @@ list(APPEND test_SOURCE_FILES ${test_HEADER_FILES}) add_executable(lltest ${test_SOURCE_FILES}) -if (USE_BUGSPLAT) - set_target_properties(lltest PROPERTIES COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}") -endif (USE_BUGSPLAT) - target_link_libraries(lltest llinventory llmessage -- 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/test/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/test') diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index aae299e6ca..2f033616a7 100644 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -53,9 +53,6 @@ if (NOT WINDOWS) ) endif (NOT WINDOWS) -set_source_files_properties(${test_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND test_SOURCE_FILES ${test_HEADER_FILES}) add_executable(lltest ${test_SOURCE_FILES}) -- cgit v1.2.3