summaryrefslogtreecommitdiff
path: root/indra/cmake/LLAddBuildTest.cmake
diff options
context:
space:
mode:
authorRye <rye@alchemyviewer.org>2025-10-23 09:15:38 -0400
committerRye <rye@alchemyviewer.org>2025-10-27 04:59:15 -0400
commit37f89080ba5ce1ddd7848d2029794a5f5aabb7be (patch)
treecba155b6872e4ad40d010c10d59d72c578073360 /indra/cmake/LLAddBuildTest.cmake
parentf33eb2c2d4715607c8821f5d694e94a3b9663826 (diff)
Introduce global precompiled header to accelerate build
Signed-off-by: Rye <rye@alchemyviewer.org>
Diffstat (limited to 'indra/cmake/LLAddBuildTest.cmake')
-rw-r--r--indra/cmake/LLAddBuildTest.cmake14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index 83725ffd1b..4959051617 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -100,6 +100,10 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
)
endif(DARWIN)
+ if (USE_PRECOMPILED_HEADERS)
+ target_precompile_headers(PROJECT_${project}_TEST_${name} REUSE_FROM llprecompiled)
+ endif ()
+
#
# Per-codefile additional / external project dep and lib dep property extraction
#
@@ -122,7 +126,9 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources)
set_target_properties(PROJECT_${project}_TEST_${name}
PROPERTIES
COMPILE_FLAGS "${${name}_test_additional_CFLAGS}"
- COMPILE_DEFINITIONS "LL_TEST=${name};LL_TEST_${name}")
+ COMPILE_DEFINITIONS "LL_TEST=${name};LL_TEST_${name}"
+ FOLDER "Tests"
+ )
if(LL_TEST_VERBOSE)
message("LL_ADD_PROJECT_UNIT_TESTS ${name}_test_additional_CFLAGS ${${name}_test_additional_CFLAGS}")
endif()
@@ -217,6 +223,7 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}"
COMPILE_DEFINITIONS "LL_TEST=${testname};LL_TEST_${testname}"
+ FOLDER "Tests"
)
# The following was copied to llcorehttp/CMakeLists.txt's texture_load target.
@@ -246,6 +253,11 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
target_link_libraries(INTEGRATION_TEST_${testname} ${libraries})
target_include_directories (INTEGRATION_TEST_${testname} PRIVATE ${LIBS_OPEN_DIR}/test )
+ if (USE_PRECOMPILED_HEADERS)
+ target_include_directories (INTEGRATION_TEST_${testname} PRIVATE ${LIBS_OPEN_DIR}/llmath )
+ target_precompile_headers(INTEGRATION_TEST_${testname} REUSE_FROM llprecompiled)
+ endif ()
+
# Create the test running command
set(test_command ${ARGN})
set(TEST_EXE $<TARGET_FILE:INTEGRATION_TEST_${testname}>)