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/llmath/CMakeLists.txt | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'indra/llmath/CMakeLists.txt') diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index 552e820127..c385a4cff6 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -107,9 +107,8 @@ list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES}) add_library (llmath ${llmath_SOURCE_FILES}) -target_link_libraries(llmath - ${LLCOMMON_LIBRARIES} - ) +target_link_libraries(llmath llcommon) +set_target_include_dirs( llmath ${CMAKE_CURRENT_SOURCE_DIR}) # Add tests if (LL_TESTS) @@ -124,15 +123,11 @@ if (LL_TESTS) v4color.cpp v4coloru.cpp ) - set_source_files_properties( - ${llmath_TEST_SOURCE_FILES} - PROPERTIES - LL_TEST_ADDITIONAL_LIBRARIES "${BOOST_THREAD_LIBRARY}" - ) + LL_ADD_PROJECT_UNIT_TESTS(llmath "${llmath_TEST_SOURCE_FILES}") # INTEGRATION TESTS - set(test_libs llmath llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES}) + set(test_libs llmath llcommon ${WINDOWS_LIBRARIES}) # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests. LL_ADD_INTEGRATION_TEST(alignment "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llbbox llbbox.cpp "${test_libs}") -- 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/llmath/CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) (limited to 'indra/llmath/CMakeLists.txt') diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index c385a4cff6..fd7b831719 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -7,11 +7,6 @@ include(LLCommon) include(bugsplat) include(Boost) -include_directories( - ${LLCOMMON_INCLUDE_DIRS} - ${LLCOMMON_SYSTEM_INCLUDE_DIRS} - ) - set(llmath_SOURCE_FILES llbbox.cpp llbboxlocal.cpp -- cgit v1.2.3 From 924fa0fa78b41c7e8486c1ed29764afb1e32fd7e Mon Sep 17 00:00:00 2001 From: Nicky Date: Sat, 16 Apr 2022 17:28:26 +0200 Subject: create target ll::uilibraries to have one common target that defines what each operation system needs as dependencies on OS gui libraries. --- indra/llmath/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmath/CMakeLists.txt') diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index fd7b831719..4c4e59811d 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -122,7 +122,7 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llmath "${llmath_TEST_SOURCE_FILES}") # INTEGRATION TESTS - set(test_libs llmath llcommon ${WINDOWS_LIBRARIES}) + set(test_libs llmath llcommon) # TODO: Some of these need refactoring to be proper Unit tests rather than Integration tests. LL_ADD_INTEGRATION_TEST(alignment "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llbbox llbbox.cpp "${test_libs}") -- 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/llmath/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llmath/CMakeLists.txt') diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index 4c4e59811d..9d1b4f07f3 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -103,7 +103,7 @@ list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES}) add_library (llmath ${llmath_SOURCE_FILES}) target_link_libraries(llmath llcommon) -set_target_include_dirs( llmath ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories( llmath INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Add 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/llmath/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/llmath/CMakeLists.txt') diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt index 9d1b4f07f3..dcc7d4fb2e 100644 --- a/indra/llmath/CMakeLists.txt +++ b/indra/llmath/CMakeLists.txt @@ -95,9 +95,6 @@ set(llmath_HEADER_FILES xform.h ) -set_source_files_properties(${llmath_HEADER_FILES} - PROPERTIES HEADER_FILE_ONLY TRUE) - list(APPEND llmath_SOURCE_FILES ${llmath_HEADER_FILES}) add_library (llmath ${llmath_SOURCE_FILES}) -- cgit v1.2.3