mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#687) Moved ReservoirDataModelUnitTests into ApplicationCode/UnitTests
This commit is contained in:
parent
563dd8c04f
commit
e03b6495e8
@ -1,118 +0,0 @@
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
|
||||
SET (ProjectName RigReservoirDataModel_UnitTests)
|
||||
project ( ${ProjectName} )
|
||||
|
||||
# Qt
|
||||
find_package (Qt4 COMPONENTS QtCore QtGui QtMain QtOpenGl REQUIRED)
|
||||
include (${QT_USE_FILE})
|
||||
|
||||
include_directories(
|
||||
${LibCore_SOURCE_DIR}
|
||||
${LibGeometry_SOURCE_DIR}
|
||||
${LibRender_SOURCE_DIR}
|
||||
${LibViewing_SOURCE_DIR}
|
||||
|
||||
${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}/ThirdParty/NRLib/nrlib/well
|
||||
|
||||
#${ResInsight_SOURCE_DIR}/Fwk/AppFwk/cafProjectDataModel
|
||||
|
||||
${cafProjectDataModel_SOURCE_DIR}
|
||||
${cafPdmCore_SOURCE_DIR}
|
||||
|
||||
${ResInsight_SOURCE_DIR}/Fwk/AppFwk/CommonCode
|
||||
|
||||
#Remove when RigStatistics is out
|
||||
#${ResInsight_SOURCE_DIR}/ApplicationCode/ModelVisualization
|
||||
)
|
||||
|
||||
# Populate the filenames into variable lists
|
||||
include ("${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists_files.cmake")
|
||||
|
||||
|
||||
set( UNIT_TEST_CPP_SOURCES
|
||||
|
||||
${ResInsight_SOURCE_DIR}/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp
|
||||
|
||||
main.cpp
|
||||
RigActiveCellInfo-Test.cpp
|
||||
RigReservoir-Test.cpp
|
||||
RigStatisticsMath-Test.cpp
|
||||
cvfGeometryTools-Test.cpp
|
||||
)
|
||||
|
||||
|
||||
#############################################################################
|
||||
# Adds folders for Visual Studio solution explorer (and for Xcode explorer)
|
||||
#############################################################################
|
||||
source_group( "UnitTests" FILES ${UNIT_TEST_CPP_SOURCES} )
|
||||
|
||||
|
||||
|
||||
set( LINK_LIBRARIES
|
||||
CommonCode
|
||||
|
||||
ResultStatisticsCache
|
||||
|
||||
LibViewing
|
||||
LibRender
|
||||
LibGeometry
|
||||
LibCore
|
||||
|
||||
ecl
|
||||
ecl_well
|
||||
ert_util
|
||||
|
||||
NRLib
|
||||
|
||||
${QT_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
add_executable( ${ProjectName}
|
||||
${CODE_SOURCE_FILES}
|
||||
${UNIT_TEST_CPP_SOURCES}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists_files.cmake
|
||||
|
||||
${ResInsight_SOURCE_DIR}/ThirdParty/gtest/gtest-all.cc
|
||||
)
|
||||
|
||||
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set ( LINUX_LINK_LIBRARIES
|
||||
pthread
|
||||
)
|
||||
|
||||
# Linux specific code
|
||||
set(CMAKE_CXX_FLAGS "-DCVF_LINUX -pipe -Wextra -Woverloaded-virtual -Wformat")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG -D_DEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNO_DEBUG")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ")
|
||||
|
||||
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(CMAKE_CXX_FLAGS "-DGTEST_USE_OWN_TR1_TUPLE=1")
|
||||
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
|
||||
|
||||
target_link_libraries( ${ProjectName} ${LINK_LIBRARIES} ${LINUX_LINK_LIBRARIES})
|
||||
|
||||
|
||||
# Copy Qt Dlls
|
||||
if (MSVC)
|
||||
set (QTLIBLIST QtCore QtGui QtOpenGl)
|
||||
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)
|
@ -1,46 +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 "cvfBase.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include "cvfTrace.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
//printf("Running main() from LibCore_UnitTests.cpp\n");
|
||||
//printf("LibCore version: %s.%s-%s (%s) \n\n", CVF_MAJOR_VERSION, CVF_MINOR_VERSION, CVF_BUILD_NUMBER, CVF_SPECIAL_BUILD);
|
||||
|
||||
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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user