Skip to content

Commit

Permalink
Merge branch 'master' into feature/10513_calibration_show_pre_post_sm…
Browse files Browse the repository at this point in the history
…ooth

Conflicts:
	Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectCalibration.cpp

Refs #10513
  • Loading branch information
DanNixon committed Feb 13, 2015
2 parents 995ce4a + 7a7e29f commit 1cfcd0b
Show file tree
Hide file tree
Showing 862 changed files with 14,244 additions and 275,560 deletions.
29 changes: 29 additions & 0 deletions Code/Mantid/Build/CMake/CommonSetup.cmake
Expand Up @@ -301,6 +301,35 @@ else()
message ( STATUS "Could not find Squish - GUI testing not available. Try specifying your SQUISH_INSTALL_DIR cmake variable." )
endif()

###########################################################################
# External Data for testing
###########################################################################
if ( CXXTEST_FOUND OR PYUNITTEST_FOUND )
include ( MantidExternalData )

# None of our tests reference files directly as arguments so we have to manually
# call ExternalData_Expand_Arguments to register the files with the ExternalData
# mechanism
get_filename_component ( EXTERNALDATATEST_SOURCE_DIR ${PROJECT_SOURCE_DIR} ABSOLUTE )
file( GLOB_RECURSE doctest_content_links
RELATIVE "${EXTERNALDATATEST_SOURCE_DIR}" "Testing/Data/DocTest/*.md5" )
file( GLOB_RECURSE unittest_content_links
RELATIVE "${EXTERNALDATATEST_SOURCE_DIR}" "Testing/Data/UnitTest/*.md5" )
set ( content_links "${doctest_content_links};${unittest_content_links}" )
foreach(link ${content_links})
string( REGEX REPLACE "\\.md5$" "" link ${link} )
ExternalData_Expand_Arguments( StandardTestData
link_location
DATA{${link}}
)
endforeach()

# Create target to download data from the StandardTestData group. This must come after
# all tests have been added that reference the group, so we put it last.
ExternalData_Add_Target(StandardTestData)
set_target_properties(StandardTestData PROPERTIES EXCLUDE_FROM_ALL TRUE)
endif()

###########################################################################
# Set a flag to indicate that this script has been called
###########################################################################
Expand Down
57 changes: 42 additions & 15 deletions Code/Mantid/Build/CMake/DarwinSetup.cmake
Expand Up @@ -102,6 +102,7 @@ endif()
###########################################################################
# Mac-specific installation setup
###########################################################################

set ( CMAKE_INSTALL_PREFIX "" )
set ( CPACK_PACKAGE_EXECUTABLES MantidPlot )
set ( INBUNDLE MantidPlot.app/ )
Expand All @@ -119,27 +120,50 @@ set ( PVPLUGINS_DIR MantidPlot.app/pvplugins )
set ( PVPLUGINS_SUBDIR pvplugins ) # Need to tidy these things up!

if (OSX_VERSION VERSION_LESS 10.9)
set ( CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${LIB_DIR};${CMAKE_INSTALL_PREFIX}/${PLUGINS_DIR};${CMAKE_INSTALL_PREFIX}/${PVPLUGINS_DIR} )
set ( PYQT4_PYTHONPATH /Library/Python/${PY_VER}/site-packages/PyQt4 )
set ( SITEPACKAGES /Library/Python/${PY_VER}/site-packages )
else()
set(CMAKE_MACOSX_RPATH 1)
# Assume we are using homebrew for now
# set Deployment target to 10.8
set ( CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk )
set ( CMAKE_OSX_ARCHITECTURES x86_64 )
set ( CMAKE_OSX_DEPLOYMENT_TARGET 10.8 )
set ( PYQT4_PYTHONPATH /usr/local/lib/python${PY_VER}/site-packages/PyQt4 )
set ( SITEPACKAGES /usr/local/lib/python${PY_VER}/site-packages )
# Follow symlinks so cmake copies the file
# PYQT4_PATH, SITEPACKAGES_PATH, OPENSSL_ROOT_DIR may be defined externally (cmake -D)
# it would be good do not overwrite them (important for the compilation with macports)
if (NOT PYQT4_PATH)
set ( PYQT4_PATH /usr/local/lib/python${PY_VER}/site-packages/PyQt4 )
endif(NOT PYQT4_PATH)
execute_process(COMMAND readlink ${PYQT4_PATH}/Qt.so OUTPUT_VARIABLE PYQT4_SYMLINK_Qtso)
string(FIND "${PYQT4_SYMLINK_Qtso}" "Qt.so" STOPPOS)
string(SUBSTRING "${PYQT4_SYMLINK_Qtso}" 0 ${STOPPOS} PYQT4_SYMLINK)
set ( PYQT4_PYTHONPATH ${PYQT4_PATH}/${PYQT4_SYMLINK} )
string(REGEX REPLACE "/$" "" PYQT4_PYTHONPATH "${PYQT4_PYTHONPATH}")

if (NOT SITEPACKAGES_PATH)
set ( SITEPACKAGES_PATH /usr/local/lib/python${PY_VER}/site-packages )
endif(NOT SITEPACKAGES_PATH)
execute_process(COMMAND readlink ${SITEPACKAGES_PATH}/sip.so OUTPUT_VARIABLE SITEPACKAGES_SYMLINK_sipso)
string(FIND "${SITEPACKAGES_SYMLINK_sipso}" "sip.so" STOPPOS)
string(SUBSTRING "${SITEPACKAGES_SYMLINK_sipso}" 0 ${STOPPOS} SITEPACKAGES_SYMLINK)
set ( SITEPACKAGES ${SITEPACKAGES_PATH}/${SITEPACKAGES_SYMLINK} )
string(REGEX REPLACE "/$" "" SITEPACKAGES "${SITEPACKAGES}")

# use homebrew OpenSSL package
set ( OPENSSL_ROOT_DIR /usr/local/opt/openssl )
if (NOT OPENSSL_ROOT_DIR)
set ( OPENSSL_ROOT_DIR /usr/local/opt/openssl )
endif(NOT OPENSSL_ROOT_DIR)
endif()

# Python packages

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 ${PYQT4_PYTHONPATH}/Qt.so
#directory will swell the install kit unnecessarily.
install ( FILES ${PYQT4_PYTHONPATH}/Qt.so
${PYQT4_PYTHONPATH}/QtCore.so
${PYQT4_PYTHONPATH}/QtGui.so
${PYQT4_PYTHONPATH}/QtOpenGL.so
Expand All @@ -156,16 +180,19 @@ endif ()

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} )
if ( IS_DIRECTORY ${PYPACKAGE} )
install ( DIRECTORY ${PYPACKAGE} DESTINATION ${BIN_DIR} USE_SOURCE_PERMISSIONS )
else()
install ( FILES ${PYPACKAGE} DESTINATION ${BIN_DIR} )
endif()
file ( COPY ${PYPACKAGE} DESTINATION ${PROJECT_BINARY_DIR}/bin )
endforeach( PYPACKAGE )
# done as part of packaging step in 10.9+ builds.
if (OSX_VERSION VERSION_LESS 10.9)
# 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} )
if ( IS_DIRECTORY ${PYPACKAGE} )
install ( DIRECTORY ${PYPACKAGE} DESTINATION ${BIN_DIR} USE_SOURCE_PERMISSIONS )
else()
install ( FILES ${PYPACKAGE} DESTINATION ${BIN_DIR} )
endif()
file ( COPY ${PYPACKAGE} DESTINATION ${PROJECT_BINARY_DIR}/bin )
endforeach( PYPACKAGE )
endif ()

install ( DIRECTORY ${QT_PLUGINS_DIR}/imageformats DESTINATION MantidPlot.app/Contents/Frameworks/plugins )
install ( DIRECTORY ${QT_PLUGINS_DIR}/sqldrivers DESTINATION MantidPlot.app/Contents/Frameworks/plugins )
Expand Down
38 changes: 38 additions & 0 deletions Code/Mantid/Build/CMake/MantidExternalData.cmake
@@ -0,0 +1,38 @@
################################################################################
# Setup the ExternalData variables for the project
################################################################################
include(ExternalData)

if(NOT MANTID_DATA_STORE)
# Select a default in the home directory
set(MANTID_DATA_STORE_DEFAULT "$ENV{HOME}/MantidExternalData")
endif()

# Provide users with an option to select a local object store,
# starting with the above-selected default.
set(MANTID_DATA_STORE "${MANTID_DATA_STORE_DEFAULT}" CACHE PATH
"Local directory holding ExternalData objects in the layout %(algo)/%(hash).")
mark_as_advanced(MANTID_DATA_STORE)

if(NOT MANTID_DATA_STORE)
message(FATAL_ERROR "MANTID_DATA_STORE not set. It is required for external data")
endif()

# Tell ExternalData module about selected object stores.
list(APPEND ExternalData_OBJECT_STORES
# Store selected by Mantid-specific configuration above.
${MANTID_DATA_STORE}
)

# Default binary root to build directory
set(ExternalData_BINARY_ROOT ${CMAKE_BINARY_DIR}/ExternalData CACHE STRING
"A directory holding the links (copies on windows) to the real content files.")

set(ExternalData_URL_TEMPLATES "" CACHE STRING
"Additional URL templates for the ExternalData CMake script to look for testing data. E.g.
file:///var/bigharddrive/%(algo)/%(hash)")
mark_as_advanced(ExternalData_URL_TEMPLATES)
list(APPEND ExternalData_URL_TEMPLATES
"http://198.74.56.37/ftp/external-data/%(algo)/%(hash)"
)

File renamed without changes.
12 changes: 11 additions & 1 deletion Code/Mantid/Build/Jenkins/buildscript
Expand Up @@ -50,6 +50,16 @@ if [[ $(uname) == 'Darwin' ]] && [[ ${JOB_NAME} != *clang* ]]; then
icpc --version
fi

###############################################################################
# Set up the location for the local object store outside of the build and
# source tree, which can be shared by multiple builds.
# It defaults to the parent directory of the workspace but can be overridden
# by setting the MANTID_DATA_STORE environment variable.
###############################################################################
if [ -z "$MANTID_DATA_STORE" ]; then
export MANTID_DATA_STORE=$(dirname $WORKSPACE)
fi

###############################################################################
# Check whether this is a clean build (must have 'clean' in the job name)
###############################################################################
Expand Down Expand Up @@ -104,7 +114,7 @@ fi
###############################################################################
# CMake configuration
###############################################################################
$SCL_ON_RHEL6 "cmake -DCMAKE_BUILD_TYPE=${BUILD_CONFIG} -DENABLE_CPACK=ON -DMAKE_VATES=ON -DParaView_DIR=${PARAVIEW_DIR} -DDOCS_HTML=ON ${PACKAGINGVARS} ../Code/Mantid"
$SCL_ON_RHEL6 "cmake -DCMAKE_BUILD_TYPE=${BUILD_CONFIG} -DENABLE_CPACK=ON -DMAKE_VATES=ON -DParaView_DIR=${PARAVIEW_DIR} -DMANTID_DATA_STORE=${MANTID_DATA_STORE} -DDOCS_HTML=ON ${PACKAGINGVARS} ../Code/Mantid"

###############################################################################
# Coverity build should exit early
Expand Down
12 changes: 11 additions & 1 deletion Code/Mantid/Build/Jenkins/buildscript.bat
Expand Up @@ -32,6 +32,16 @@ cd %WORKSPACE%

set PATH=%WORKSPACE%\Code\Third_Party\lib\win64;%WORKSPACE%\Code\Third_Party\lib\win64\Python27;%PARAVIEW_DIR%\bin\%BUILD_CONFIG%;%PATH%

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Set up the location for local object store outside of the build and source
:: tree, which can be shared by multiple builds.
:: It defaults to the parent directory of the workspace but can be overridden
:: by setting the MANTID_DATA_STORE environment variable.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if NOT DEFINED MANTID_DATA_STORE (
for %%F in ("%WORKSPACE%") do set MANTID_DATA_STORE=%%~dpF
)

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Check whether this is a clean build (must have 'clean' in the job name)
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Expand All @@ -53,7 +63,7 @@ cd %WORKSPACE%\build
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: CMake configuration
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -G "Visual Studio 11 Win64" -DCONSOLE=OFF -DENABLE_CPACK=ON -DMAKE_VATES=ON -DParaView_DIR=%PARAVIEW_DIR% -DUSE_PRECOMPILED_HEADERS=ON %PACKAGE_DOCS% ..\Code\Mantid
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -G "Visual Studio 11 Win64" -DCONSOLE=OFF -DENABLE_CPACK=ON -DMAKE_VATES=ON -DParaView_DIR=%PARAVIEW_DIR% -DMANTID_DATA_STORE=%MANTID_DATA_STORE% -DUSE_PRECOMPILED_HEADERS=ON %PACKAGE_DOCS% ..\Code\Mantid
if ERRORLEVEL 1 exit /B %ERRORLEVEL%

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Expand Down
82 changes: 82 additions & 0 deletions Code/Mantid/Build/Jenkins/jenkins-slave.sh
@@ -0,0 +1,82 @@
#!/bin/sh
#####################################################################
# Starts the Jenkins slave process if it is not already running.
# It also downloads the slave.jar to /tmp if it does not already
# exist.
#
# The settings at the top must be filled in for each slave.
#####################################################################
# Crontab setting should be something like
# 0,30 * * * * /home/builder/jenkins-linode nodename secret
#####################################################################
# User configuration
#####################################################################
# Main url for Jenkins
JENKINS_URL=http://builds.mantidproject.org
# URL for proxy (if required)
PROXY_HOST=${3}
# Port for proxy (if required)
PROXY_PORT=${4}
# Name of the node as it appears on jenkins
NODE_NAME=${1}
# Copy the secret from the command line given at the above URL
SECRET=${2}

#####################################################################
# Constants
#####################################################################
# URL of jnlp file for slave
SLAVE_AGENT_URL="${JENKINS_URL}/computer/${NODE_NAME}/slave-agent.jnlp"
# name of the slave jar - full path is determined later
JAR_FILE=slave.jar

#####################################################################
# Script
#####################################################################
# exit if it is already running
RUNNING=$(ps aux | grep java | grep ${JAR_FILE})
if [ ! -z "${RUNNING}" ]; then
echo "Slave process is already running"
exit 0
else
echo "Slave process is not running"
fi

# error out if there isn't a node name and secret
if [ "$#" -lt 2 ]; then
echo "Usage: `basename ${0}` <NODE_NAME> <SECRET> [PROXY_HOST] [PROXY_PORT]"
exit -1
fi

# setup the proxy
if [ ! -z "${PROXY_HOST}" ]; then
PROXY_ARGS="-Dhttp.proxyHost=${PROXY_HOST} -Dhttp.proxyPort=${PROXY_PORT}"
echo "using proxy ${PROXY_HOST} ${PROXY_PORT}"
# For curl
export http_proxy=http://$PROXY_HOST:$PROXY_PORT
fi

# find the jar file if it exists
if [ -f ${HOME}/jenkins-linode/${JAR_FILE} ]; then
JAR_FILE=${HOME}/jenkins-linode/${JAR_FILE}
elif [ -f ${HOME}/Jenkins/${JAR_FILE} ]; then
JAR_FILE=${HOME}/Jenkins/${JAR_FILE}
else
JAR_FILE=/tmp/${JAR_FILE}
if [ ! -f ${JAR_FILE} ]; then
echo "Downloading slave jar file to ${JAR_FILE}"
if [ $(command -v curl) ]; then
echo "curl -o ${JAR_FILE} ${JENKINS_URL}/jnlpJars/slave.jar"
curl -o ${JAR_FILE} ${JENKINS_URL}/jnlpJars/slave.jar
else
echo "Need curl to download ${JENKINS_URL}/jnlpJars/slave.jar"
exit -1
fi
fi
fi

echo "starting ..."
JAVA=`which java`
JAVA_ARGS="${PROXY_ARGS} -jar ${JAR_FILE} -jnlpUrl ${SLAVE_AGENT_URL} -secret ${SECRET}"
echo "${JAVA} ${JAVA_ARGS}"
${JAVA} ${JAVA_ARGS}
4 changes: 2 additions & 2 deletions Code/Mantid/Build/dev-packages/deb/mantid-developer/README
Expand Up @@ -2,5 +2,5 @@ This directory contains the structure required to build the simple mantid-develo

To build the package:
* Switch to the directory containing this file
* Run "dpkg --build mantid-developer-1.2.3"
* A file called mantid-developer-1.2.3.deb will appear in the current directory.
* Run "dpkg --build mantid-developer-1.2.4"
* A file called mantid-developer-1.2.4.deb will appear in the current directory.
@@ -0,0 +1,13 @@
Package: mantid-developer
Version: 1.2.4
Section: main
Priority: optional
Architecture: all
Depends: git, clang, cmake-qt-gui(>=2.8.12), qt4-qmake, qt4-dev-tools, libqt4-dbg, libpoco-dev(>=1.4.2), libboost-all-dev, libboost-dbg, libnexus0-dev, libgoogle-perftools-dev, libqwt5-qt4-dev, libqwtplot3d-qt4-dev, python-qt4-dev, libgsl0-dev, liboce-visualization-dev, libmuparser-dev, python-numpy, libssl-dev, libqscintilla2-dev, texlive,texlive-latex-extra, dvipng, libhdf4-dev, doxygen, python-sphinx, python-scipy, ipython-qtconsole (>=1.2.0), libhdf5-dev, libhdf4-dev, libpococrypto11-dbg, libpocodata11-dbg, libpocofoundation11-dbg, libpocomysql11-dbg, libpoconet11-dbg, libpoconetssl11-dbg, libpocoodbc11-dbg, libpocosqlite11-dbg, libpocoutil11-dbg, libpocoxml11-dbg, libpocozip11-dbg, python-qt4-dbg, qt4-default, ninja-build, libjsoncpp-dev, python-dateutil, graphviz
Installed-Size: 0
Maintainer: Mantid Project <mantid-help@mantidproject.org>
Description: Installs all packages required for a Mantid developer
A metapackage which requires all the dependencies and tools that are
required for Mantid development. It works for Ubuntu version 14.04, 14.10
Some packages (poco) must be newer than those in the Ubuntu repository. Please
follow instructions at http://www.mantidproject.org/Mantid_Prerequisites#Repositories
@@ -1,5 +1,5 @@
Name: mantid-developer
Version: 1.7
Version: 1.9
Release: 1%{?dist}
Summary: Meta Package to install dependencies for Mantid Development

Expand Down Expand Up @@ -64,6 +64,7 @@ Requires: scl-utils
Requires: qt-devel
Requires: qtwebkit-devel
%endif
Requires: graphviz

BuildArch: noarch

Expand All @@ -86,6 +87,9 @@ required for Mantid development.
%files

%changelog
* Thu Feb 12 2015 Harry Jeffery <henry.jeffery@stfc.ac.uk>
- Added graphviz dependency

* Wed Aug 13 2014 Peter Peterson <petersonpf@ornl.gov>
- Merged all three distribution spec files into one

Expand Down
6 changes: 5 additions & 1 deletion Code/Mantid/Framework/API/CMakeLists.txt
Expand Up @@ -272,7 +272,6 @@ set ( INC_FILES
inc/MantidAPI/ScriptRepositoryFactory.h
inc/MantidAPI/SingleValueParameter.h
inc/MantidAPI/SingleValueParameterParser.h
inc/MantidAPI/SpecialCoordinateSystem.h
inc/MantidAPI/SpectraAxis.h
inc/MantidAPI/SpectrumDetectorMapping.h
inc/MantidAPI/TableRow.h
Expand Down Expand Up @@ -398,6 +397,11 @@ add_library ( API ${SRC_FILES} ${INC_FILES})
# Set the name of the generated library
set_target_properties ( API PROPERTIES OUTPUT_NAME MantidAPI
COMPILE_DEFINITIONS IN_MANTID_API )

if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( API PROPERTIES INSTALL_RPATH "@loader_path/../MacOS")
endif ()

# Add to the 'Framework' group in VS
set_property ( TARGET API PROPERTY FOLDER "MantidFramework" )

Expand Down
Expand Up @@ -83,7 +83,7 @@ class MANTID_API_DLL IMDEventWorkspace : public API::IMDWorkspace,
virtual bool threadSafe() const;

virtual void setCoordinateSystem(
const Mantid::API::SpecialCoordinateSystem coordinateSystem) = 0;
const Mantid::Kernel::SpecialCoordinateSystem coordinateSystem) = 0;

protected:
virtual const std::string toString() const;
Expand Down
Expand Up @@ -89,7 +89,7 @@ class DLLExport IMDHistoWorkspace : public IMDWorkspace,
virtual double &operator[](const size_t &index) = 0;

virtual void setCoordinateSystem(
const Mantid::API::SpecialCoordinateSystem coordinateSystem) = 0;
const Mantid::Kernel::SpecialCoordinateSystem coordinateSystem) = 0;

virtual boost::shared_ptr<IMDHistoWorkspace> clone() const = 0;

Expand Down

0 comments on commit 1cfcd0b

Please sign in to comment.