Commit 09a58f3c authored by Victor Poughon's avatar Victor Poughon

Merge branch 'merge-6.6' into 'develop'

Merge release-6.6 into develop without the shark revert

Closes #1633

See merge request !160
parents 408f8c63 23c7aecc
......@@ -62,17 +62,11 @@
# either expressed or implied, of the FreeBSD Project.
#=============================================================================
# message( "QWT_INCLUDE_DIR: '${QWT_INCLUDE_DIR}'" )
# message( "QWT_INCLUDE_DIR: '${QT_INCLUDE_DIR}'" )
find_path( QWT_INCLUDE_DIR
NAMES qwt_plot.h
PATH_SUFFIXES qwt
PATH_SUFFIXES qwt-qt5 qwt qwt6
)
# message( "QWT_INCLUDE_DIR: '${QWT_INCLUDE_DIR}'" )
# message( "QWT_INCLUDE_DIR: '${QT_INCLUDE_DIR}'" )
set ( QWT_INCLUDE_DIRS ${QWT_INCLUDE_DIR} )
# version
......@@ -104,8 +98,7 @@ endif ()
find_library ( QWT_LIBRARY
NAMES qwt qwt${QWT_MAJOR_VERSION} qwt-qt5
HINTS ${QT_LIBRARY_DIR}
NAMES qwt-qt5 qwt6-qt5 qwt qwt6
)
set ( QWT_LIBRARIES ${QWT_LIBRARY} )
......
......@@ -97,11 +97,24 @@ if(SHARK_CONFIG_FILE)
"${SHARK_VERSION_MAJOR}.${SHARK_VERSION_MINOR}.${SHARK_VERSION_PATCH}")
endif()
# reset required flags
set(SHARK_REQUIRED_C_FLAGS "")
set(SHARK_REQUIRED_CXX_FLAGS "")
set(SHARK_REQUIRED_LINK_FLAGS "")
# Check if Shark was built with OpenMP, CBLAS, DYNLIB, ...
file(STRINGS "${SHARK_INCLUDE_DIR}/shark/Core/Shark.h" SHARK_H_CONTENTS)
if(SHARK_H_CONTENTS MATCHES "#define.SHARK_USE_OPENMP")
set(SHARK_USE_OPENMP 1)
find_package(OpenMP QUIET)
if(OPENMP_FOUND)
set(SHARK_REQUIRED_C_FLAGS "${SHARK_REQUIRED_C_FLAGS} ${OpenMP_C_FLAGS}")
set(SHARK_REQUIRED_CXX_FLAGS "${SHARK_REQUIRED_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
if(OpenMP_EXE_LINKER_FLAGS)
set(SHARK_REQUIRED_LINK_FLAGS "${SHARK_REQUIRED_LINK_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
endif()
else()
set(SHARK_USE_OPENMP 0)
endif()
......
......@@ -233,7 +233,14 @@ endif()
option(OTB_USE_DEPRECATED "Turn on the use and test of deprecated classes" OFF)
mark_as_advanced(OTB_USE_DEPRECATED)
# Although the OpenMP option looks like a 3rd party module, it is NOT. This option
# is handled with other compilation flags in file OTBSetStandardCompilerFlags.cmake
# before any module is parsed or enabled (see OTBModuleEnablement.cmake later on
# during configure). Trying to modify this option from any module is
# useless. Any 3rd party module dragging OpenMP should append
# the corresponding flags to CMAKE_CXX_FLAGS, CMAKE_EXE_LINKER_FLAGS, and so on.
option(OTB_USE_OPENMP "Add openmp compiler and linker flags" OFF)
option(OTB_USE_SSE_FLAGS "Enable SIMD optimizations (hardware dependent)." ON)
include(OTBSetStandardCompilerFlags)
......
......@@ -143,7 +143,7 @@ private:
"parameter can't be used for other models"); //
MandatoryOff("pcadim");
AddParameter(ParameterType_Choice, "mode", "Writting mode"); //
AddParameter(ParameterType_Choice, "mode", "Writing mode"); //
SetParameterDescription("mode", "This parameter determines if the output "
"file is overwritten or updated [overwrite/update]. If an output file "
"name is given, the original file is copied before creating the new features.");
......@@ -325,7 +325,7 @@ private:
else
{
otbAppLogFATAL(<< "Error when creating the output file" <<
GetParameterString("mode") << " : unsupported writting mode type");
GetParameterString("mode") << " : unsupported writing mode type");
}
}
......
......@@ -179,7 +179,7 @@ private:
itk::Array<double> m_Beta; // Sparsity regularization parameter
double m_InitFactor; // Weight initialization factor (the weights are intialized at m_initfactor/sqrt(inputDimension) )
bool m_WriteLearningCurve; // Flag for writting the learning curve into a txt file
bool m_WriteLearningCurve; // Flag for writing the learning curve into a txt file
std::string m_LearningCurveFileName; // Name of the output learning curve printed after training
bool m_WriteWeights;
};
......
......@@ -20,8 +20,15 @@
find_package ( Shark REQUIRED )
if(SHARK_USE_OPENMP AND NOT OTB_USE_OPENMP)
message(WARNING "Shark library is built with OpenMP and you have OTB_USE_OPENMP set to OFF.")
if ( SHARK_USE_OPENMP AND NOT OTB_USE_OPENMP )
message(WARNING "Shark library is built with OpenMP and you have OTB_USE_OPENMP set to OFF.\
It will be enabled anyway to allow compilation.")
endif()
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SHARK_REQUIRED_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SHARK_REQUIRED_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SHARK_REQUIRED_LINK_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SHARK_REQUIRED_LINK_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${SHARK_REQUIRED_LINK_FLAGS}")
mark_as_advanced( Shark_DIR )
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment