mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#687) Moved FileInterface tests into ApplicationCode/UnitTests
This commit is contained in:
parent
e03b6495e8
commit
c72e047b23
@ -1,114 +0,0 @@
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
|
||||
SET (ProjectName FileInterface_UnitTests)
|
||||
project ( ${ProjectName} )
|
||||
|
||||
|
||||
# Qt
|
||||
find_package (Qt4 COMPONENTS QtCore QtGui QtMain QtOpenGl REQUIRED)
|
||||
include (${QT_USE_FILE})
|
||||
|
||||
include_directories(
|
||||
${ResInsight_SOURCE_DIR}/ApplicationCode
|
||||
${ResInsight_SOURCE_DIR}/ApplicationCode/ResultStatisticsCache
|
||||
${ResInsight_SOURCE_DIR}/ApplicationCode/ReservoirDataModel
|
||||
${ResInsight_SOURCE_DIR}/ApplicationCode/FileInterface
|
||||
${ResInsight_SOURCE_DIR}/ApplicationCode/ProjectDataModel
|
||||
${ResInsight_SOURCE_DIR}/ThirdParty
|
||||
|
||||
${ResInsight_SOURCE_DIR}/Fwk/AppFwk/cafProjectDataModel
|
||||
|
||||
${ResInsight_SOURCE_DIR}/Fwk/AppFwk/CommonCode
|
||||
|
||||
#Remove when RigStatistics is out
|
||||
${ResInsight_SOURCE_DIR}/ApplicationCode/ModelVisualization
|
||||
)
|
||||
|
||||
|
||||
# Populate variables from read from CMakeLists_files.cmake
|
||||
set (CODE_SOURCE_FILES )
|
||||
include ("${ResInsight_SOURCE_DIR}/ApplicationCode/FileInterface/CMakeLists_files.cmake")
|
||||
set( CPP_SOURCES
|
||||
${CPP_SOURCES}
|
||||
${CODE_SOURCE_FILES}
|
||||
)
|
||||
source_group( "FileInterface" FILES ${CODE_SOURCE_FILES} )
|
||||
|
||||
|
||||
# Populate variables from read from CMakeLists_files.cmake
|
||||
set (CODE_SOURCE_FILES )
|
||||
include ("${ResInsight_SOURCE_DIR}/ApplicationCode/ReservoirDataModel/CMakeLists_files.cmake")
|
||||
set( CPP_SOURCES
|
||||
${CPP_SOURCES}
|
||||
${CODE_SOURCE_FILES}
|
||||
)
|
||||
source_group( "ReservoirDataModel" FILES ${CODE_SOURCE_FILES} )
|
||||
|
||||
|
||||
set( CPP_SOURCES
|
||||
${CPP_SOURCES}
|
||||
|
||||
${ResInsight_SOURCE_DIR}/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp
|
||||
)
|
||||
|
||||
source_group( "Headers" FILES ${CODE_HEADER_FILES} )
|
||||
|
||||
set( UNIT_TEST_CPP_SOURCES
|
||||
main.cpp
|
||||
RifReaderEclipseOutput-Test.cpp
|
||||
RifEclipseInputFileTools-Test.cpp
|
||||
Ert-Test.cpp
|
||||
)
|
||||
|
||||
set( LINK_LIBRARIES
|
||||
cafProjectDataModel
|
||||
CommonCode
|
||||
|
||||
ResultStatisticsCache
|
||||
|
||||
LibViewing
|
||||
LibRender
|
||||
LibGeometry
|
||||
LibCore
|
||||
|
||||
ecl
|
||||
ert_util
|
||||
ert_geometry
|
||||
ecl_well
|
||||
|
||||
${QT_LIBRARIES}
|
||||
)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(CMAKE_CXX_FLAGS "-DGTEST_USE_OWN_TR1_TUPLE=1")
|
||||
endif()
|
||||
|
||||
add_executable( ${ProjectName}
|
||||
${CODE_HEADER_FILES}
|
||||
|
||||
${CPP_SOURCES}
|
||||
${UNIT_TEST_CPP_SOURCES}
|
||||
|
||||
${ResInsight_SOURCE_DIR}/ThirdParty/gtest/gtest-all.cc
|
||||
|
||||
${ResInsight_SOURCE_DIR}/ApplicationCode/FileInterface/CMakeLists_files.cmake
|
||||
${ResInsight_SOURCE_DIR}/ApplicationCode/ReservoirDataModel/CMakeLists_files.cmake
|
||||
)
|
||||
|
||||
set( EXTERNAL_LINK_LIBRARIES ${ERT_LIBRARY_LIST} )
|
||||
target_link_libraries( ${ProjectName} ${LINK_LIBRARIES} ${EXTERNAL_LINK_LIBRARIES})
|
||||
|
||||
|
||||
# Copy Dlls
|
||||
if (MSVC)
|
||||
|
||||
# Qt DLLs
|
||||
set (QTLIBLIST QtCore QtCored QtGui QtGuid QtOpenGl QtOpenGld QtNetwork QtNetworkd QtScript QtScriptd QtScriptTools QtScriptToolsd)
|
||||
foreach (qtlib ${QTLIBLIST})
|
||||
add_custom_command(TARGET ${ProjectName} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${QT_BINARY_DIR}/${qtlib}4.dll"
|
||||
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>)
|
||||
endforeach( qtlib )
|
||||
|
||||
endif(MSVC)
|
@ -1,44 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2011-2012 Statoil ASA, Ceetron AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaStdInclude.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "cvfTrace.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
cvf::Assert::setReportMode(cvf::Assert::CONSOLE);
|
||||
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
|
||||
int result = RUN_ALL_TESTS();
|
||||
|
||||
std::cout << "Please press <Enter> to close the window.";
|
||||
std::cin.get();
|
||||
|
||||
return result;
|
||||
}
|
@ -18,7 +18,6 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaStdInclude.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include "RigCaseData.h"
|
@ -255,19 +255,6 @@ endif (RESINSIGHT_PRIVATE_INSTALL)
|
||||
add_subdirectory(ApplicationCode)
|
||||
add_subdirectory(OctavePlugin)
|
||||
|
||||
################################################################################
|
||||
# Unit tests
|
||||
################################################################################
|
||||
add_subdirectory(ApplicationCode/ReservoirDataModel/ReservoirDataModel_UnitTests)
|
||||
#add_subdirectory(ApplicationCode/FileInterface/FileInterface_UnitTests)
|
||||
|
||||
set_property(TARGET
|
||||
# FileInterface_UnitTests
|
||||
RigReservoirDataModel_UnitTests
|
||||
PROPERTY FOLDER "UnitTests"
|
||||
)
|
||||
|
||||
|
||||
################################################################################
|
||||
# Code documentation using Doxygen
|
||||
################################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user