diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/CMakeLists.txt | 80 | ||||
-rw-r--r-- | indra/newview/llbottomtray.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llbottomtray.h | 3 | ||||
-rw-r--r-- | indra/newview/llselectmgr.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llselectmgr.h | 3 | ||||
-rw-r--r-- | indra/newview/llviewercamera.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llviewercamera.h | 3 | ||||
-rw-r--r-- | indra/newview/llviewerfloaterreg.cpp | 2 |
8 files changed, 59 insertions, 40 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e632cbaaf2..fc6955bc70 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1651,48 +1651,50 @@ if (INSTALL) include(${CMAKE_CURRENT_SOURCE_DIR}/ViewerInstall.cmake) endif (INSTALL) -# To add a viewer unit test, just add the test .cpp file below -# This creates a separate test project per file listed. -include(LLAddBuildTest) -SET(viewer_TEST_SOURCE_FILES - llagentaccess.cpp - lldateutil.cpp - llmediadataclient.cpp - llviewerhelputil.cpp - lllogininstance.cpp - ) -set_source_files_properties( - ${viewer_TEST_SOURCE_FILES} - PROPERTIES - LL_TEST_ADDITIONAL_SOURCE_FILES llviewerprecompiledheaders.cpp - ) -LL_ADD_PROJECT_UNIT_TESTS(${VIEWER_BINARY_NAME} "${viewer_TEST_SOURCE_FILES}") - -#set(TEST_DEBUG on) -set(test_sources llcapabilitylistener.cpp llviewerprecompiledheaders.cpp) -set(test_libs - ${LLMESSAGE_LIBRARIES} - ${WINDOWS_LIBRARIES} - ${LLVFS_LIBRARIES} - ${LLMATH_LIBRARIES} - ${LLCOMMON_LIBRARIES} - ${GOOGLEMOCK_LIBRARIES} +if (LL_TESTS) + # To add a viewer unit test, just add the test .cpp file below + # This creates a separate test project per file listed. + include(LLAddBuildTest) + SET(viewer_TEST_SOURCE_FILES + llagentaccess.cpp + lldateutil.cpp + llmediadataclient.cpp + llviewerhelputil.cpp + lllogininstance.cpp ) + set_source_files_properties( + ${viewer_TEST_SOURCE_FILES} + PROPERTIES + LL_TEST_ADDITIONAL_SOURCE_FILES llviewerprecompiledheaders.cpp + ) + LL_ADD_PROJECT_UNIT_TESTS(${VIEWER_BINARY_NAME} "${viewer_TEST_SOURCE_FILES}") -LL_ADD_INTEGRATION_TEST(llcapabilitylistener - "${test_sources}" - "${test_libs}" - ${PYTHON_EXECUTABLE} - "${CMAKE_SOURCE_DIR}/llmessage/tests/test_llsdmessage_peer.py" - ) + #set(TEST_DEBUG on) + set(test_sources llcapabilitylistener.cpp llviewerprecompiledheaders.cpp) + set(test_libs + ${LLMESSAGE_LIBRARIES} + ${WINDOWS_LIBRARIES} + ${LLVFS_LIBRARIES} + ${LLMATH_LIBRARIES} + ${LLCOMMON_LIBRARIES} + ${GOOGLEMOCK_LIBRARIES} + ) + + LL_ADD_INTEGRATION_TEST(llcapabilitylistener + "${test_sources}" + "${test_libs}" + ${PYTHON_EXECUTABLE} + "${CMAKE_SOURCE_DIR}/llmessage/tests/test_llsdmessage_peer.py" + ) -#ADD_VIEWER_BUILD_TEST(llmemoryview viewer) -#ADD_VIEWER_BUILD_TEST(llagentaccess viewer) -#ADD_VIEWER_BUILD_TEST(llworldmap viewer) -#ADD_VIEWER_BUILD_TEST(llworldmipmap viewer) -#ADD_VIEWER_BUILD_TEST(lltextureinfo viewer) -#ADD_VIEWER_BUILD_TEST(lltextureinfodetails viewer) -#ADD_VIEWER_BUILD_TEST(lltexturestatsuploader viewer) + #ADD_VIEWER_BUILD_TEST(llmemoryview viewer) + #ADD_VIEWER_BUILD_TEST(llagentaccess viewer) + #ADD_VIEWER_BUILD_TEST(llworldmap viewer) + #ADD_VIEWER_BUILD_TEST(llworldmipmap viewer) + #ADD_VIEWER_BUILD_TEST(lltextureinfo viewer) + #ADD_VIEWER_BUILD_TEST(lltextureinfodetails viewer) + #ADD_VIEWER_BUILD_TEST(lltexturestatsuploader viewer) +endif (LL_TESTS) # Don't do these for DARWIN or LINUX here -- they're taken care of by viewer_manifest.py diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 9cc7b8c785..4823932951 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -46,6 +46,9 @@ #include "llsyswellwindow.h" #include "llfloatercamera.h" +// Build time optimization, generate this once in .cpp file +template class LLBottomTray* LLSingleton<class LLBottomTray>::getInstance(); + LLBottomTray::LLBottomTray(const LLSD&) : mChicletPanel(NULL), mSysWell(NULL), diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 7640cdcf9d..3db5184f6b 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -47,6 +47,9 @@ class LLSpeakButton; class LLNearbyChatBar; class LLIMChiclet; +// Build time optimization, generate this once in .cpp file +extern template class LLBottomTray* LLSingleton<class LLBottomTray>::getInstance(); + class LLBottomTray : public LLSingleton<LLBottomTray> , public LLPanel diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 2554f1ccd5..4394271ec4 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -175,6 +175,8 @@ LLObjectSelection *get_null_object_selection() return sNullSelection; } +// Build time optimization, generate this function once here +template class LLSelectMgr* LLSingleton<class LLSelectMgr>::getInstance(); //----------------------------------------------------------------------------- // LLSelectMgr() diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 2050a73f26..7a5c583711 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -323,6 +323,9 @@ private: typedef LLSafeHandle<LLObjectSelection> LLObjectSelectionHandle; +// Build time optimization, generate this once in .cpp file +extern template class LLSelectMgr* LLSingleton<class LLSelectMgr>::getInstance(); + class LLSelectMgr : public LLEditMenuHandler, public LLSingleton<LLSelectMgr> { public: diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index f3c64088c9..221db2defa 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -105,6 +105,9 @@ glh::matrix4f gl_lookat(LLVector3 eye, LLVector3 center, LLVector3 up) } +// Build time optimization, generate this once in .cpp file +template class LLViewerCamera* LLSingleton<class LLViewerCamera>::getInstance(); + LLViewerCamera::LLViewerCamera() : LLCamera() { calcProjection(getFar()); diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h index 2b8a0892bf..01fa86d7c5 100644 --- a/indra/newview/llviewercamera.h +++ b/indra/newview/llviewercamera.h @@ -52,6 +52,9 @@ const F32 OGL_TO_CFR_ROTATION[16] = { 0.f, 0.f, -1.f, 0.f, // -Z becomes X const BOOL FOR_SELECTION = TRUE; const BOOL NOT_FOR_SELECTION = FALSE; +// Build time optimization, generate this once in .cpp file +extern template class LLViewerCamera* LLSingleton<class LLViewerCamera>::getInstance(); + class LLViewerCamera : public LLCamera, public LLSingleton<LLViewerCamera> { public: diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 642df92379..aebc97ab7d 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -224,7 +224,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("telehubs", "floater_telehub.xml",&LLFloaterReg::build<LLFloaterTelehub>); LLFloaterReg::add("test_inspectors", "floater_test_inspectors.xml", &LLFloaterReg::build<LLFloaterTestInspectors>); - LLFloaterReg::add("test_list_view", "floater_test_list_view.xml",&LLFloaterReg::build<LLFloaterTestListView>); + //LLFloaterReg::add("test_list_view", "floater_test_list_view.xml",&LLFloaterReg::build<LLFloaterTestListView>); LLFloaterReg::add("test_widgets", "floater_test_widgets.xml", &LLFloaterReg::build<LLFloater>); LLFloaterReg::add("top_objects", "floater_top_objects.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTopObjects>); |