Skip to content

Commit

Permalink
Refs #7363. Fixing conflicts.
Browse files Browse the repository at this point in the history
Merge branch 'master' into feature/7363_vates_paraview_git

Conflicts:
	Code/Mantid/Build/Jenkins/buildscript
	Code/Mantid/Build/Jenkins/buildscript.bat
  • Loading branch information
Michael Reuter committed Sep 3, 2014
2 parents 870cd36 + 24ccf85 commit 73914cd
Show file tree
Hide file tree
Showing 3,952 changed files with 213,092 additions and 83,583 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -4,3 +4,11 @@ The [developer documentation](http://www.mantidproject.org/Category:Development)
2. Make changes as you see fit. Please still follow the guidelines for [running the unit tests](http://www.mantidproject.org/Running_the_unit_tests) and the [build servers](http://www.mantidproject.org/The_automated_build_process).
3. Before submitting pull requests email mantid-help@mantidproject.org, and a developer will set up a branch that you can submit pull requests to.
4. Submit a [pull request](https://help.github.com/articles/using-pull-requests) to this branch.


Hints to make the integration of your changes easy:
- Keep your pull requests small
- Don't forget your unit tests
- All algorithms need documentation, don't forget the .rst file
- Contact us before creating the pull request
- Don't take changes requests to change your code personally
14 changes: 7 additions & 7 deletions Code/Mantid/Build/CMake/CPackLinuxSetup.cmake
Expand Up @@ -11,7 +11,7 @@ set ( CPACK_SOURCE_GENERATOR TGZ )
include (DetermineLinuxDistro)

# define which binary generators to use
if ( ${UNIX_DIST} MATCHES "Ubuntu" )
if ( "${UNIX_DIST}" MATCHES "Ubuntu" )
find_program (DPKG_CMD dpkg)
if ( DPKG_CMD )
set ( CPACK_GENERATOR "DEB" )
Expand All @@ -22,23 +22,23 @@ if ( ${UNIX_DIST} MATCHES "Ubuntu" )
set( CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
endif ( DPKG_CMD )
endif ( ${UNIX_DIST} MATCHES "Ubuntu" )
endif ( "${UNIX_DIST}" MATCHES "Ubuntu" )

#RedHatEnterpriseClient RedHatEnterpriseWorkstation
if ( ${UNIX_DIST} MATCHES "RedHatEnterprise" OR ${UNIX_DIST} MATCHES "Fedora" OR ${UNIX_DIST} MATCHES "SUSE LINUX" )
if ( "${UNIX_DIST}" MATCHES "RedHatEnterprise" OR "${UNIX_DIST}" MATCHES "Fedora" OR "${UNIX_DIST}" MATCHES "SUSE LINUX" )
find_program ( RPMBUILD_CMD rpmbuild )
if ( RPMBUILD_CMD )
set ( CPACK_GENERATOR "RPM" )
set ( CPACK_RPM_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}" )
set ( CPACK_RPM_PACKAGE_URL "http://www.mantidproject.org" )

# reset the release name to include the RHEL version if known
if ( ${UNIX_DIST} MATCHES "RedHatEnterprise" )
if ( "${UNIX_DIST}" MATCHES "RedHatEnterprise" )
string ( REGEX REPLACE "^([0-9])\\.[0-9]+$" "\\1" TEMP ${UNIX_RELEASE} )
set ( CPACK_RPM_PACKAGE_RELEASE "1.el${TEMP}" )
elseif ( ${UNIX_DIST} MATCHES "Fedora" )
elseif ( "${UNIX_DIST}" MATCHES "Fedora" )
set ( CPACK_RPM_PACKAGE_RELEASE "1.fc${UNIX_RELEASE}" )
endif ( ${UNIX_DIST} MATCHES "RedHatEnterprise" )
endif ( "${UNIX_DIST}" MATCHES "RedHatEnterprise" )

# If CPACK_SET_DESTDIR is ON then the Prefix doesn't get put in the spec file
if( CPACK_SET_DESTDIR )
Expand All @@ -50,5 +50,5 @@ if ( ${UNIX_DIST} MATCHES "RedHatEnterprise" OR ${UNIX_DIST} MATCHES "Fedora" OR
set ( CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}.${CPACK_RPM_PACKAGE_ARCHITECTURE}" )
endif ( RPMBUILD_CMD)
endif ( ${UNIX_DIST} MATCHES "RedHatEnterprise" OR ${UNIX_DIST} MATCHES "Fedora" OR ${UNIX_DIST} MATCHES "SUSE LINUX" )
endif ()

5 changes: 5 additions & 0 deletions Code/Mantid/Build/CMake/CommonSetup.cmake
Expand Up @@ -242,6 +242,11 @@ endif ()
###########################################################################
include ( CppCheckSetup )

###########################################################################
# Setup pylint
###########################################################################
include ( PylintSetup )

###########################################################################
# Set up the unit tests target
###########################################################################
Expand Down
45 changes: 30 additions & 15 deletions Code/Mantid/Build/CMake/DarwinSetup.cmake
Expand Up @@ -95,6 +95,7 @@ endif()
set ( CMAKE_INSTALL_PREFIX "" )
set ( CPACK_PACKAGE_EXECUTABLES MantidPlot )
set ( INBUNDLE MantidPlot.app/ )

# We know exactly where this has to be on Darwin
set ( PARAVIEW_APP_DIR "/Applications/${OSX_PARAVIEW_APP}" )
set ( PARAVIEW_APP_BIN_DIR "${PARAVIEW_APP_DIR}/Contents/MacOS" )
Expand All @@ -107,45 +108,59 @@ set ( PLUGINS_DIR MantidPlot.app/plugins )
set ( PVPLUGINS_DIR MantidPlot.app/pvplugins )
set ( PVPLUGINS_SUBDIR pvplugins ) # Need to tidy these things up!

if (OSX_VERSION VERSION_LESS 10.9)
set ( PYQT4_PYTHONPATH /Library/Python/${PY_VER}/site-packages/PyQt4 )
set ( SITEPACKAGES /Library/Python/${PY_VER}/site-packages )
else()
# Assume we are using homebrew for now
set ( PYQT4_PYTHONPATH /usr/local/lib/python${PY_VER}/site-packages/PyQt4 )
set ( SITEPACKAGES /usr/local/lib/python${PY_VER}/site-packages )
endif()

# Python packages

install ( PROGRAMS /Library/Python/${PY_VER}/site-packages/sip.so DESTINATION ${BIN_DIR} )
install ( PROGRAMS ${SITEPACKAGES}/sip.so DESTINATION ${BIN_DIR} )

# Explicitly specify which PyQt libraries we want because just taking the whole
# directory will swell the install kit unnecessarily.
install ( FILES /Library/Python/${PY_VER}/site-packages/PyQt4/Qt.so
/Library/Python/${PY_VER}/site-packages/PyQt4/QtCore.so
/Library/Python/${PY_VER}/site-packages/PyQt4/QtGui.so
/Library/Python/${PY_VER}/site-packages/PyQt4/QtOpenGL.so
/Library/Python/${PY_VER}/site-packages/PyQt4/QtSql.so
/Library/Python/${PY_VER}/site-packages/PyQt4/QtSvg.so
/Library/Python/${PY_VER}/site-packages/PyQt4/QtXml.so
/Library/Python/${PY_VER}/site-packages/PyQt4/__init__.py
install ( FILES ${PYQT4_PYTHONPATH}/Qt.so
${PYQT4_PYTHONPATH}/QtCore.so
${PYQT4_PYTHONPATH}/QtGui.so
${PYQT4_PYTHONPATH}/QtOpenGL.so
${PYQT4_PYTHONPATH}/QtSql.so
${PYQT4_PYTHONPATH}/QtSvg.so
${PYQT4_PYTHONPATH}/QtXml.so
${PYQT4_PYTHONPATH}/__init__.py
DESTINATION ${BIN_DIR}/PyQt4 )
# Newer PyQt versions have a new internal library that we need to take
if ( EXISTS /Library/Python/${PY_VER}/site-packages/PyQt4/_qt.so )
install ( FILES /Library/Python/${PY_VER}/site-packages/PyQt4/_qt.so
if ( EXISTS ${PYQT4_PYTHONPATH}/_qt.so )
install ( FILES ${PYQT4_PYTHONPATH}/_qt.so
DESTINATION ${BIN_DIR}/PyQt4 )
endif ()

install ( DIRECTORY /Library/Python/${PY_VER}/site-packages/PyQt4/uic DESTINATION ${BIN_DIR}/PyQt4 )
install ( DIRECTORY ${PYQT4_PYTHONPATH}/uic DESTINATION ${BIN_DIR}/PyQt4 )

# Python packages in Third_Party need copying to build directory and the final package
file ( GLOB THIRDPARTY_PYTHON_PACKAGES ${CMAKE_LIBRARY_PATH}/Python/* )
foreach ( PYPACKAGE ${THIRDPARTY_PYTHON_PACKAGES} )
install ( DIRECTORY ${PYPACKAGE} DESTINATION ${BIN_DIR} )
if ( IS_DIRECTORY ${PYPACKAGE} )
install ( DIRECTORY ${PYPACKAGE} DESTINATION ${BIN_DIR} )
endif()
file ( COPY ${PYPACKAGE} DESTINATION ${PROJECT_BINARY_DIR}/bin )
endforeach( PYPACKAGE )

install ( DIRECTORY ${QT_PLUGINS_DIR}/imageformats DESTINATION MantidPlot.app/Contents/Frameworks/plugins )
install ( DIRECTORY ${QT_PLUGINS_DIR}/sqldrivers DESTINATION MantidPlot.app/Contents/Frameworks/plugins )

install ( FILES ${CMAKE_SOURCE_DIR}/Images/MantidPlot.icns
${CMAKE_SOURCE_DIR}/Installers/MacInstaller/qt.conf
DESTINATION MantidPlot.app/Contents/Resources/
)

set ( CPACK_DMG_BACKGROUND_IMAGE ${CMAKE_SOURCE_DIR}/Images/osx-bundle-background.png )
set ( CPACK_DMG_DS_STORE ${CMAKE_SOURCE_DIR}/Installers/MacInstaller/osx_DS_Store)
set ( MACOSX_BUNDLE_ICON_FILE MantidPlot.icns )

string (REPLACE " " "" CPACK_SYSTEM_NAME ${OSX_CODENAME})

set ( CPACK_GENERATOR DragNDrop )

7 changes: 7 additions & 0 deletions Code/Mantid/Build/CMake/FindOpenCascade.cmake
Expand Up @@ -60,6 +60,10 @@ find_library ( OPENCASCADE_LIB_TKGEOMBASE
NAMES TKGeomBase
)

find_library ( OPENCASCADE_LIB_TKGEOMAlgo
NAMES TKGeomAlgo
)

set ( OPENCASCADE_LIBRARIES
${OPENCASCADE_LIB_TKERNEL}
${OPENCASCADE_LIB_TKBO}
Expand All @@ -71,6 +75,7 @@ set ( OPENCASCADE_LIBRARIES
${OPENCASCADE_LIB_TKG2D}
${OPENCASCADE_LIB_TKG3D}
${OPENCASCADE_LIB_TKGEOMBASE}
${OPENCASCADE_LIB_TKGEOMALGO}
)

# handle the QUIETLY and REQUIRED arguments and set OPENCASCADE_FOUND to TRUE if
Expand All @@ -83,4 +88,6 @@ mark_as_advanced ( OPENCASCADE_INCLUDE_DIR
OPENCASCADE_LIB_TKPRIM OPENCASCADE_LIB_TKMESH
OPENCASCADE_LIB_TKBREP OPENCASCADE_LIB_TKTOPALGO
OPENCASCADE_LIB_TKMATH OPENCASCADE_LIB_TKG2D
OPENCASCADE_LIB_TKG3D OPENCASCADE_LIB_TKGEOMBASE
OPENCASCADE_LIB_TKGEOMALGO
)
40 changes: 40 additions & 0 deletions Code/Mantid/Build/CMake/FindPylint.cmake
@@ -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 )
27 changes: 27 additions & 0 deletions Code/Mantid/Build/CMake/FindSphinx.cmake
Expand Up @@ -6,12 +6,39 @@
# set:
# SPHINX_FOUND
# SPHINX_EXECUTABLE
#
#=============================================================
# main()
#=============================================================

find_program( SPHINX_EXECUTABLE NAME sphinx-build
PATHS ${CMAKE_LIBRARY_PATH}/Python27/Scripts
PATH_SUFFIXES bin
DOC "Sphinx documentation generator"
)

if (SPHINX_EXECUTABLE)
# run sphinx-build to attempt to get the version
execute_process (COMMAND ${SPHINX_EXECUTABLE} --version
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE version_string
ERROR_VARIABLE version_error_string
ERROR_STRIP_TRAILING_WHITESPACE)

# if it wasn't successful it is hiding in stderr
if (NOT version_string)
if ( version_error_string )
string (REGEX REPLACE "\n" ";" version_string ${version_error_string})
list (GET version_string 0 version_string)
else ( version_error_string )
set ( version_string "1.1.0" )
endif ( version_error_string )
endif (NOT version_string)

# chop out the version number
string (REGEX REPLACE ".*([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1" SPHINX_VERSION ${version_string})
endif (SPHINX_EXECUTABLE)

include(FindPackageHandleStandardArgs)

find_package_handle_standard_args(Sphinx DEFAULT_MSG SPHINX_EXECUTABLE )
Expand Down
6 changes: 3 additions & 3 deletions Code/Mantid/Build/CMake/LinuxSetup.cmake
Expand Up @@ -90,7 +90,7 @@ endif()


# RHEL6 specific stuff (as we need to use software collections)
if ( ${UNIX_DIST} STREQUAL "RedHatEnterprise" )
if ( "${UNIX_DIST}" MATCHES "RedHatEnterprise" )
file ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/rpm_post_install.sh "\n"
"if [ -f $RPM_INSTALL_PREFIX0/${BIN_DIR}/MantidPlot ]; then\n"
" mv $RPM_INSTALL_PREFIX0/${BIN_DIR}/MantidPlot $RPM_INSTALL_PREFIX0/${BIN_DIR}/MantidPlot_exe\n"
Expand All @@ -101,12 +101,12 @@ if ( ${UNIX_DIST} STREQUAL "RedHatEnterprise" )
"scl enable mantidlibs \"${CMAKE_INSTALL_PREFIX}/${BIN_DIR}/MantidPlot_exe $*\" \n"
)

install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/launch_mantidplot.sh
install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/launch_mantidplot.sh
DESTINATION ${BIN_DIR}
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
WORLD_EXECUTE WORLD_READ
)
)

endif()

Expand Down
50 changes: 50 additions & 0 deletions Code/Mantid/Build/CMake/PylintSetup.cmake
@@ -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 ()
2 changes: 1 addition & 1 deletion Code/Mantid/Build/CMake/UseSystemQt4.cmake
Expand Up @@ -74,7 +74,7 @@ SET(QT_QAXSERVER_MODULE_DEPENDS QTGUI QTCORE)
SET(QT_QTSCRIPTTOOLS_MODULE_DEPENDS QTGUI QTCORE)

# Qt modules (in order of dependence)
FOREACH(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN
FOREACH(module QT3SUPPORT QTOPENGL QTDESIGNER QTMOTIF QTNSPLUGIN
QAXSERVER QAXCONTAINER QTSCRIPT QTSVG QTUITOOLS QTHELP
QTWEBKIT PHONON QTSCRIPTTOOLS QTGUI QTTEST QTDBUS QTXML QTSQL
QTXMLPATTERNS QTNETWORK QTCORE)
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/Build/CMake/VersionNumber.cmake
@@ -1,7 +1,7 @@
# Set the version number here for MantidVersion and the package filenames

set ( VERSION_MAJOR 3 )
set ( VERSION_MINOR 1 )
set ( VERSION_MINOR 2 )

# UNCOMMENT the next 'set' line to 'force' the patch version number to
# a value (instead of using the count coming out of 'git describe')
Expand Down
3 changes: 0 additions & 3 deletions Code/Mantid/Build/CMake/WindowsNSIS.cmake
Expand Up @@ -97,9 +97,6 @@
REGEX "^.*d4.dll$" EXCLUDE )
install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/Installers/WinInstaller/qt.conf DESTINATION bin )

# Copy assistant.exe
install ( FILES ${CMAKE_LIBRARY_PATH}/assistant.exe DESTINATION bin )

# Release deployments do modify enviromental variables, other deployments do not.
if(CPACK_PACKAGE_SUFFIX STREQUAL "")
# On install
Expand Down

0 comments on commit 73914cd

Please sign in to comment.