mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#566) Major rewrite of how to build and update PdmUiTreeOrdering items
Removed findChildItemIndex() which caused performance issues for large models. Replaced with a new algorithm using std::map. Added unit tests
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
|
||||
find_package ( Qt4 COMPONENTS QtCore QtGui QtMain )
|
||||
include (${QT_USE_FILE})
|
||||
|
||||
project ( cafUserInterface_UnitTests )
|
||||
|
||||
include_directories (
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
|
||||
${cafProjectDataModel_SOURCE_DIR}
|
||||
${cafPdmCore_SOURCE_DIR}
|
||||
${cafPdmUiCore_SOURCE_DIR}
|
||||
${cafPdmXml_SOURCE_DIR}
|
||||
|
||||
${cafUserInterface_SOURCE_DIR}
|
||||
|
||||
)
|
||||
|
||||
|
||||
set( PROJECT_FILES
|
||||
|
||||
cafUserInterface_UnitTests.cpp
|
||||
|
||||
cafPdmUiTreeViewModelTest.cpp
|
||||
|
||||
gtest/gtest-all.cpp
|
||||
)
|
||||
|
||||
# add the executable
|
||||
add_executable (${PROJECT_NAME}
|
||||
${PROJECT_FILES}
|
||||
)
|
||||
|
||||
source_group("" FILES ${PROJECT_FILES})
|
||||
|
||||
message(STATUS ${PROJECT_NAME}" - Qt includes : " ${QT_LIBRARIES})
|
||||
|
||||
target_link_libraries ( ${PROJECT_NAME}
|
||||
cafProjectDataModel
|
||||
cafPdmUiCore
|
||||
cafPdmCore
|
||||
cafPdmXml
|
||||
cafUserInterface
|
||||
${QT_LIBRARIES}
|
||||
)
|
||||
|
||||
# Copy Qt Dlls
|
||||
if (MSVC)
|
||||
set (QTLIBLIST QtCore QtGui)
|
||||
foreach (qtlib ${QTLIBLIST})
|
||||
|
||||
# Debug
|
||||
execute_process(COMMAND cmake -E copy_if_different ${QT_BINARY_DIR}/${qtlib}d4.dll ${CMAKE_CURRENT_BINARY_DIR}/Debug/${qtlib}d4.dll)
|
||||
|
||||
# Release
|
||||
execute_process(COMMAND cmake -E copy_if_different ${QT_BINARY_DIR}/${qtlib}4.dll ${CMAKE_CURRENT_BINARY_DIR}/Release/${qtlib}4.dll)
|
||||
endforeach( qtlib )
|
||||
endif(MSVC)
|
||||
|
||||
Reference in New Issue
Block a user