mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor issues
* Use horizontalAdvance * Remove unused code * Hide some warnings from Qt code * Remove message for _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING * Use CMP0077 NEW * Move roff libraries to folder Thirdparty * avoid operator()== * Remove cmake_minimum_required and set version to 3.15
This commit is contained in:
parent
c8dbf3d125
commit
583c248cf9
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(ApplicationExeCode)
|
||||
|
||||
# set packaging dir
|
||||
@ -597,7 +595,6 @@ if(RESINSIGHT_PRIVATE_INSTALL)
|
||||
TARGET "Boost::filesystem"
|
||||
PROPERTY LOCATION_RELEASE
|
||||
)
|
||||
message("_filepath: ${_filepath}")
|
||||
|
||||
# The location of Boost is based on the file structure as installed by vcpkg
|
||||
# The DLLs are located in the /bin folder
|
||||
@ -607,8 +604,6 @@ if(RESINSIGHT_PRIVATE_INSTALL)
|
||||
# Use file clobbing, as the dlls are decorated with local compiler info
|
||||
file(GLOB RI_BOOST_DLLS ${_dir}/boost_filesystem*.dll)
|
||||
|
||||
message("RI_BOOST_DLLS : ${RI_BOOST_DLLS}")
|
||||
|
||||
install(
|
||||
FILES ${RI_BOOST_DLLS}
|
||||
DESTINATION ${RESINSIGHT_INSTALL_FOLDER}
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(ApplicationLibCode)
|
||||
|
||||
# set packaging dir
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(Commands)
|
||||
|
||||
# Unity Build
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(RigGeoMechDataModel)
|
||||
|
||||
# Unity Build
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(RifOdbReader)
|
||||
|
||||
# Unity Build
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(ResultStatisticsCache)
|
||||
|
||||
include_directories(${LibCore_SOURCE_DIR})
|
||||
|
@ -7,7 +7,7 @@ set(VIZ_MODULES_FOLDER_NAME Fwk/VizFwk)
|
||||
|
||||
cmake_policy(SET CMP0020 NEW)
|
||||
if(POLICY CMP0077)
|
||||
cmake_policy(SET CMP0077 OLD)
|
||||
cmake_policy(SET CMP0077 NEW)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
@ -504,6 +504,7 @@ list(APPEND THIRD_PARTY_LIBRARIES clipper)
|
||||
|
||||
add_subdirectory(ThirdParty/roffcpp)
|
||||
list(APPEND THIRD_PARTY_LIBRARIES roffcpp)
|
||||
set_property(TARGET roffcpp-tests gtest gtest_main PROPERTY FOLDER "Thirdparty")
|
||||
|
||||
# ##############################################################################
|
||||
# Thirdparty libraries are put in ThirdParty solution folder
|
||||
@ -615,11 +616,16 @@ add_subdirectory(Fwk/AppFwk/cafTensor)
|
||||
add_subdirectory(Fwk/AppFwk/cafHexInterpolator)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(cafViewer PRIVATE /wd4996)
|
||||
target_compile_options(cafPdmCore PRIVATE /wd4996)
|
||||
target_compile_options(cafAnimControl PRIVATE /wd5054)
|
||||
target_compile_options(cafViewer PRIVATE /wd4996 /wd5054)
|
||||
target_compile_options(cafPdmCore PRIVATE /wd4996)
|
||||
target_compile_options(cafPdmUiCore PRIVATE /wd5054)
|
||||
target_compile_options(cafCommandFeatures PRIVATE /wd4996 /wd5054)
|
||||
target_compile_options(cafCommand PRIVATE /wd5054)
|
||||
target_compile_options(cafPdmXml PRIVATE /wd4996)
|
||||
target_compile_options(cafUserInterface PRIVATE /wd4996)
|
||||
target_compile_options(cafUserInterface PRIVATE /wd4996 /wd5054)
|
||||
target_compile_options(qwt PRIVATE /wd5055)
|
||||
target_compile_options(CommonCode PRIVATE /wd5054)
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(CommonCode)
|
||||
|
||||
# Unity Build
|
||||
|
@ -217,7 +217,6 @@ std::vector<caf::ContourLines::ListOfLineSegments> caf::ContourLines::create( co
|
||||
const std::vector<double>& yPositions,
|
||||
const std::vector<double>& contourLevels )
|
||||
{
|
||||
const double eps = 1.0e-4;
|
||||
std::vector<std::vector<cvf::Vec2d>> contourLineSegments;
|
||||
caf::ContourLines::create( dataXY, xPositions, yPositions, contourLevels, &contourLineSegments );
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(cafAnimControl)
|
||||
|
||||
# Unity Build
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(cafCommand)
|
||||
|
||||
# Unity Build
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(cafCommandFeatures)
|
||||
|
||||
# Unity Build
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(cafPdmCvf)
|
||||
|
||||
# Unity Build
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(cafPdmScripting)
|
||||
|
||||
option(CAF_CVF_SCRIPTING "Enable CVF-data support in Scripting" OFF)
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
project(cafPdmScripting_UnitTests)
|
||||
|
||||
find_package(
|
||||
@ -13,10 +11,6 @@ if(MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11))
|
||||
# VS 2017 : Disable warnings from from gtest code, using deprecated code
|
||||
# related to TR1
|
||||
add_definitions(-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
|
||||
message(
|
||||
STATUS
|
||||
"Add flag to disable warings from gtest - _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING"
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(cafProjectDataModel)
|
||||
|
||||
# Unity Build
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(cafPdmCore)
|
||||
|
||||
# Unity Build
|
||||
|
@ -108,9 +108,6 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
bool operator==( T value ) const { return m_value == value; }
|
||||
bool operator!=( T value ) const { return m_value != value; }
|
||||
|
||||
operator T() const { return m_value; }
|
||||
|
||||
T value() const { return m_value; }
|
||||
@ -346,22 +343,6 @@ private:
|
||||
|
||||
} // namespace caf
|
||||
|
||||
//==================================================================================================
|
||||
/// Cant remember why we need those comparison operators...
|
||||
//==================================================================================================
|
||||
|
||||
template <class T>
|
||||
bool operator==( T value, const caf::AppEnum<T>& appEnum )
|
||||
{
|
||||
return ( appEnum == value );
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool operator!=( T value, const caf::AppEnum<T>& appEnum )
|
||||
{
|
||||
return ( appEnum != value );
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
/// Implementation of stream operators to make PdmField<AppEnum<> > work smoothly
|
||||
/// Assumes that the stream ends at the end of the enum text
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
project(cafPdmCore_UnitTests)
|
||||
|
||||
@ -14,10 +14,6 @@ if(MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11))
|
||||
# VS 2017 : Disable warnings from from gtest code, using deprecated code
|
||||
# related to TR1
|
||||
add_definitions(-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
|
||||
message(
|
||||
STATUS
|
||||
"Add flag to disable warings from gtest - _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING"
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(cafPdmUiCore)
|
||||
|
||||
# Unity Build
|
||||
|
@ -84,7 +84,7 @@ QSize QShortenedLabel::minimumSizeHint() const
|
||||
QFontMetrics fontMetrics = QApplication::fontMetrics();
|
||||
QString fullLabelText = fullText();
|
||||
QString shortenedText = fullLabelText.left( minimumNumberOfCharacters );
|
||||
int minimumWidth = fontMetrics.width( shortenedText );
|
||||
int minimumWidth = fontMetrics.horizontalAdvance( shortenedText );
|
||||
|
||||
if ( !fullLabelText.isEmpty() )
|
||||
{
|
||||
@ -94,12 +94,12 @@ QSize QShortenedLabel::minimumSizeHint() const
|
||||
QStringList labelLines = fullLabelText.split( "\n" );
|
||||
for ( QString line : labelLines )
|
||||
{
|
||||
int lineWidth = fontMetrics.width( line );
|
||||
int lineWidth = fontMetrics.horizontalAdvance( line );
|
||||
maxLineWidth = std::max( maxLineWidth, lineWidth );
|
||||
QStringList words = line.split( " " );
|
||||
if ( !words.empty() )
|
||||
{
|
||||
int wordWidth = fontMetrics.width( words.front() + "..." );
|
||||
int wordWidth = fontMetrics.horizontalAdvance( words.front() + "..." );
|
||||
maxFirstWordWidth = std::max( maxFirstWordWidth, wordWidth );
|
||||
}
|
||||
}
|
||||
@ -127,7 +127,7 @@ QSize QShortenedLabel::sizeHint() const
|
||||
int maxLineWidth = 0;
|
||||
for ( const QString& line : labelLines )
|
||||
{
|
||||
maxLineWidth = std::max( maxLineWidth, fontMetrics.width( line ) );
|
||||
maxLineWidth = std::max( maxLineWidth, fontMetrics.horizontalAdvance( line ) );
|
||||
}
|
||||
|
||||
// increase size hint with a few pixels to avoid linux gui issues
|
||||
@ -156,7 +156,7 @@ void caf::QShortenedLabel::resizeText( QSize paintSize )
|
||||
int maxLineWidth = 0;
|
||||
for ( const QString& line : labelLines )
|
||||
{
|
||||
maxLineWidth += fontMetrics.width( line );
|
||||
maxLineWidth += fontMetrics.horizontalAdvance( line );
|
||||
}
|
||||
|
||||
if ( maxLineWidth < paintSize.width() )
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(cafPdmXml)
|
||||
|
||||
# Unity Build
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
project(cafPdmXml_UnitTests)
|
||||
|
||||
@ -13,10 +13,6 @@ if(MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11))
|
||||
# VS 2017 : Disable warnings from from gtest code, using deprecated code
|
||||
# related to TR1
|
||||
add_definitions(-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
|
||||
message(
|
||||
STATUS
|
||||
"Add flag to disable warings from gtest - _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING"
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
project(cafProjectDataModel_UnitTests)
|
||||
|
||||
@ -14,10 +14,6 @@ if(MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11))
|
||||
# VS 2017 : Disable warnings from from gtest code, using deprecated code
|
||||
# related to TR1
|
||||
add_definitions(-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
|
||||
message(
|
||||
STATUS
|
||||
"Add flag to disable warings from gtest - _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING"
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(cafTensor)
|
||||
|
||||
set(PROJECT_FILES cafTensor3.cpp cafTensor3.h cafTensor3.inl)
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
project(cafTestApplication)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
project(cafTestCvfApplication)
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(cafUserInterface)
|
||||
|
||||
# Unity Build
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
project(cafUserInterface_UnitTests)
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(cafViewer)
|
||||
|
||||
# Unity Build
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(cafVizExtensions)
|
||||
|
||||
# Unity Build
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(LibCore)
|
||||
|
||||
# CMake Unity Build
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(LibGeometry)
|
||||
|
||||
# CMake Unity Build
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(LibGuiQt)
|
||||
|
||||
# CMake Unity Build
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(LibRender)
|
||||
|
||||
# Unity Build
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(LibViewing)
|
||||
|
||||
# CMake Unity Build
|
||||
|
@ -1,5 +1,3 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(GrpcInterface)
|
||||
|
||||
message(STATUS "GRPC enabled")
|
||||
|
2
ThirdParty/custom-opm-common/CMakeLists.txt
vendored
2
ThirdParty/custom-opm-common/CMakeLists.txt
vendored
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
cmake_minimum_required (VERSION 2.8.12)
|
||||
|
||||
# Languages and global compiler settings
|
||||
if(CMAKE_VERSION VERSION_LESS 3.8)
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
cmake_minimum_required (VERSION 2.8.12)
|
||||
|
||||
project ( opm-parser-tests )
|
||||
|
||||
@ -15,7 +15,6 @@ endif()
|
||||
if (MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11))
|
||||
# VS 2017 : Disable warnings from from gtest code, using deprecated code related to TR1
|
||||
add_definitions(-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
|
||||
message(STATUS "Add flag to disable warings from gtest - _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING")
|
||||
endif()
|
||||
|
||||
CONFIGURE_FILE( ${CMAKE_CURRENT_LIST_DIR}/OpmTestDataDirectory.h.cmake
|
||||
|
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
cmake_minimum_required (VERSION 2.8.12)
|
||||
|
||||
project (custom-opm-flowdiagnostics)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user