-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/9782_add_autodiff_function
- Loading branch information
Showing
1,637 changed files
with
220,837 additions
and
113,234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# - Find Pylint | ||
# Find the Pylint executable and extract the version number | ||
# | ||
# OUTPUT Variables | ||
# | ||
# PYLINT_FOUND | ||
# True if the pylint package was found | ||
# PYLINT_EXECUTABLE | ||
# The pylint executable location | ||
# PYLINT_VERSION | ||
# A string denoting the version of pylint that has been found | ||
# PYLINT_RUNNER_SCRIPT | ||
# Location of python script that will actually run pylint | ||
# PYLINT_CFG_FILE | ||
# Location of configuration file | ||
# | ||
|
||
#============================================================= | ||
# main() | ||
#============================================================= | ||
|
||
find_program ( PYLINT_EXECUTABLE pylint PATHS /usr/bin ) | ||
|
||
if ( PYLINT_EXECUTABLE ) | ||
execute_process ( COMMAND ${PYLINT_EXECUTABLE} --version OUTPUT_VARIABLE PYLINT_VERSION_RAW ERROR_QUIET ) | ||
if (PYLINT_VERSION_RAW) | ||
string ( REGEX REPLACE "^pylint ([0-9]+.[0-9]+.[0-9]+),.*" "\\1" PYLINT_VERSION ${PYLINT_VERSION_RAW}) | ||
else () | ||
set ( PYLINT_VERSION "unknown" ) | ||
endif() | ||
# Script to find all .py files and execute pylint | ||
set ( PYLINT_RUNNER_SCRIPT ${CMAKE_SOURCE_DIR}/../Tools/Pylint/run_pylint.py ) | ||
# Configuration file | ||
set ( PYLINT_CFG_FILE ${CMAKE_SOURCE_DIR}/../Tools/Pylint/pylint.cfg ) | ||
endif () | ||
|
||
include(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS ( Pylint DEFAULT_MSG PYLINT_EXECUTABLE ) | ||
|
||
mark_as_advanced ( PYLINT_EXECUTABLE PYLINT_VERSION ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,36 @@ | ||
############################################################################### | ||
# - Attempt to find Qwt libraries and include files. | ||
# QWT_INCLUDE_DIR where to find qwt_plot.h, etc. | ||
# QWT_LIBRARIES libraries to link against | ||
# QWT_FOUND If false, do not try to use Qwt | ||
# QWT_VERSION Sets a string containing the version number parsed from | ||
# qwt_global.h | ||
# Attempt to find Qwt libraries and include files. | ||
# Set | ||
# QWT_INCLUDE_DIR: where to find qwt_plot.h, etc. | ||
# QWT_LIBRARIES: libraries to link against | ||
# QWT_VERSION: a string containing the version number | ||
############################################################################### | ||
|
||
find_path ( QWT_INCLUDE_DIR qwt.h PATHS | ||
/usr/local/include | ||
/usr/include/qwt-qt4 | ||
/usr/include/qwt | ||
/usr/include/qwt5 | ||
/usr/include/qwt5-qt4 | ||
${CMAKE_INCLUDE_PATH}/qwt | ||
) | ||
find_library ( QWT_LIBRARY NAMES qwt-qt4 qwt qwt5-qt4 ) | ||
find_path ( QWT_INCLUDE_DIR qwt.h | ||
PATHS /opt/include /usr/local/include /usr/include ${CMAKE_INCLUDE_PATH} | ||
PATH_SUFFIXES qwt5 qwt5-qt4 qwt-qt4 qwt ) | ||
find_library ( QWT_LIBRARY NAMES qwt5-qt4 qwt-qt4 qwt ) | ||
find_library ( QWT_LIBRARY_DEBUG qwtd ) | ||
|
||
# handle the QUIETLY and REQUIRED arguments and set QWT_FOUND to TRUE if | ||
# all listed variables are TRUE | ||
# in REQUIRED mode: terminate if one of the above find commands failed | ||
include ( FindPackageHandleStandardArgs ) | ||
find_package_handle_standard_args( Qwt DEFAULT_MSG QWT_LIBRARY QWT_INCLUDE_DIR ) | ||
|
||
if ( QWT_INCLUDE_DIR ) | ||
# Look for line in qwt_global.h containing version string | ||
file ( STRINGS ${QWT_INCLUDE_DIR}/qwt_global.h QWT_VERSION | ||
REGEX "^#define[ \t]+QWT_VERSION_STR[ \t]+\"[0-9]+.[0-9]+.[0-9]+\"$" ) | ||
if ( NOT QWT_VERSION ) | ||
message ( WARNING "Unrecognized Qwt version, cannot find QWT_VERSION_STR in qwt_global.h" ) | ||
set ( QWT_VERSION "0.0.0" ) | ||
else() | ||
# Hack off the portion up to and including the first double quote | ||
string( REGEX REPLACE "^#define[ \t]+QWT_VERSION_STR[ \t]+\"" "" QWT_VERSION ${QWT_VERSION} ) | ||
# Hack off the portion from the second double quote to the end of the line | ||
string( REGEX REPLACE "\"$" "" QWT_VERSION ${QWT_VERSION} ) | ||
endif() | ||
|
||
if ( QWT_LIBRARY_DEBUG ) | ||
set( QWT_LIBRARIES optimized ${QWT_LIBRARY} debug ${QWT_LIBRARY_DEBUG} ) | ||
else () | ||
set( QWT_LIBRARIES ${QWT_LIBRARY} ) | ||
endif () | ||
# Parse version string from qwt_global.h | ||
file ( STRINGS ${QWT_INCLUDE_DIR}/qwt_global.h QWT_VERSION | ||
REGEX "^#define[ \t]+QWT_VERSION_STR[ \t]+\"[0-9]+.[0-9]+.[0-9]+\"$" ) | ||
if ( NOT QWT_VERSION ) | ||
message ( FATAL_ERROR "Unrecognized Qwt version (cannot find QWT_VERSION_STR in qwt_global.h)" ) | ||
endif() | ||
# hack off the portion up to and including the first double quote | ||
string( REGEX REPLACE "^#define[ \t]+QWT_VERSION_STR[ \t]+\"" "" QWT_VERSION ${QWT_VERSION} ) | ||
# hack off the portion from the second double quote to the end of the line | ||
string( REGEX REPLACE "\"$" "" QWT_VERSION ${QWT_VERSION} ) | ||
|
||
if ( QWT_LIBRARY_DEBUG ) | ||
set( QWT_LIBRARIES optimized ${QWT_LIBRARY} debug ${QWT_LIBRARY_DEBUG} ) | ||
else () | ||
set( QWT_LIBRARIES ${QWT_LIBRARY} ) | ||
endif () | ||
|
||
mark_as_advanced ( QWT_INCLUDE_DIR QWT_LIBRARY QWT_LIBRARY_DEBUG ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
######################################################## | ||
# Setup target to run pylint checking if it is available | ||
######################################################## | ||
find_package ( Pylint ) | ||
|
||
if ( PYLINT_FOUND AND PYLINT_VERSION VERSION_LESS "1.0.0" ) | ||
message ( STATUS "pylint found but version is < 1.0.0 (${PYLINT_VERSION}): no target generated." ) | ||
set ( PYLINT_FOUND FALSE ) | ||
endif() | ||
|
||
if ( PYLINT_FOUND ) | ||
message ( STATUS "pylint version: ${PYLINT_VERSION}" ) | ||
|
||
# Output format options | ||
if ( NOT PYLINT_OUTPUT_FORMAT ) | ||
# Use msvs for MSVC generator, colorized for everything else. The buildservers can | ||
# set it to parseable for Jenkins | ||
if ( MSVC ) | ||
set ( DEFAULT_FORMAT "msvs" ) | ||
else () | ||
set ( DEFAULT_FORMAT "colorized" ) | ||
endif () | ||
set ( PYLINT_OUTPUT_FORMAT ${DEFAULT_FORMAT} CACHE STRING "Desired pylint output format" ) | ||
|
||
# There are a limited set of allowed options | ||
set_property( CACHE PYLINT_OUTPUT_FORMAT PROPERTY STRINGS "text" "html" "msvs" "parseable" "colorized" ) | ||
endif() | ||
|
||
# add a pylint-check target to run pylint on the required files and directories | ||
# relative to the root source directory | ||
set ( BASE_DIR ${CMAKE_SOURCE_DIR} ) | ||
set ( PYLINT_INCLUDES | ||
Framework/PythonInterface/plugins | ||
scripts | ||
) | ||
set ( PYLINT_EXCLUDES | ||
scripts/lib1to2 | ||
scripts/test | ||
) | ||
add_custom_target ( pylintcheck | ||
COMMAND ${PYTHON_EXECUTABLE} ${PYLINT_RUNNER_SCRIPT} --format=${PYLINT_OUTPUT_FORMAT} | ||
--rcfile=${PYLINT_CFG_FILE} | ||
--mantidpath=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR} | ||
--basedir=${BASE_DIR} --nofail | ||
--exclude="${PYLINT_EXCLUDES}" | ||
${PYLINT_INCLUDES} | ||
COMMENT "Running pylint on selected python files" | ||
) | ||
set_target_properties ( pylintcheck PROPERTIES EXCLUDE_FROM_ALL TRUE ) | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.