Skip to content

Commit

Permalink
Refs #10656 Solving merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonPiccardoSelg committed Feb 24, 2015
2 parents a85e69a + 223af41 commit 8160a71
Show file tree
Hide file tree
Showing 1,732 changed files with 64,043 additions and 303,412 deletions.
11 changes: 5 additions & 6 deletions CONTRIBUTING.md
@@ -1,14 +1,13 @@
The [developer documentation](http://www.mantidproject.org/Category:Development) has information on how to participate in the mantid project as a developer. This document is meant to outline the steps for contributing to mantid without becomming a developer.
The [developer documentation](http://www.mantidproject.org/Category:Development) has information on how to participate in the mantid project as a developer. This document is meant to outline the steps for contributing to mantid without becomming a developer. We aspire to have similar guidelines as [github](https://github.com/blog/1943-how-to-write-the-perfect-pull-request).

1. [Fork](https://help.github.com/articles/fork-a-repo) the repository.
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.
4. Submit a [pull request](https://help.github.com/articles/using-pull-requests) to this branch. This is a start to the conversation.
3. (Optional) email mantid-help@mantidproject.org requests to.


Hints to make the integration of your changes easy:
Hints to make the integration of your changes easy (and happen faster):
- Keep your pull requests small
- Some comments are part of the build server infrastructure (e.g. 'test this please')
- 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
31 changes: 30 additions & 1 deletion Code/Mantid/Build/CMake/CommonSetup.cmake
Expand Up @@ -54,7 +54,7 @@ add_definitions ( -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG )
find_package ( Poco 1.4.2 REQUIRED )
include_directories( SYSTEM ${POCO_INCLUDE_DIRS} )

find_package ( Nexus 4.3.0 REQUIRED )
find_package ( Nexus 4.3.1 REQUIRED )
include_directories ( SYSTEM ${NEXUS_INCLUDE_DIR} )

find_package ( MuParser REQUIRED )
Expand Down 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
4 changes: 2 additions & 2 deletions Code/Mantid/Build/CMake/CppCheck_Suppressions.txt
Expand Up @@ -4,6 +4,6 @@

// suppress in all files - BE CAREFULL not to leave trailing spaces after the rule id. or empty lines
// For a library this is not a problem per se
unusedFunction
// unusedFunction
// cppcheck has problems handling the number of pre-processor definitions used in the DLL_EXPORTs
class_X_Y
class_X_Y
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
2 changes: 1 addition & 1 deletion Code/Mantid/Build/CMake/FindOpenCascade.cmake
Expand Up @@ -60,7 +60,7 @@ find_library ( OPENCASCADE_LIB_TKGEOMBASE
NAMES TKGeomBase
)

find_library ( OPENCASCADE_LIB_TKGEOMAlgo
find_library ( OPENCASCADE_LIB_TKGEOMALGO
NAMES TKGeomAlgo
)

Expand Down
8 changes: 4 additions & 4 deletions Code/Mantid/Build/CMake/FindPoco.cmake
Expand Up @@ -61,14 +61,14 @@ if( POCO_INCLUDE_DIR )
file ( STRINGS ${VERSION_FILE} POCO_VERSION REGEX ${VERS_REGEX} )
# pull out just the part after the 0x
string( REGEX REPLACE ${VERS_REGEX} "\\1" POCO_VERSION ${POCO_VERSION} )

# Pretty format
string( SUBSTRING ${POCO_VERSION} 0 2 POCO_VERSION_MAJOR )
string( REGEX REPLACE "^0" "" POCO_VERSION_MAJOR ${POCO_VERSION_MAJOR} )
string( REGEX REPLACE "^0\(.\)" "\\1" POCO_VERSION_MAJOR ${POCO_VERSION_MAJOR} )
string( SUBSTRING ${POCO_VERSION} 2 2 POCO_VERSION_MINOR )
string( REGEX REPLACE "^0" "" POCO_VERSION_MINOR ${POCO_VERSION_MINOR} )
string( REGEX REPLACE "^0\(.\)" "\\1" POCO_VERSION_MINOR ${POCO_VERSION_MINOR} )
string( SUBSTRING ${POCO_VERSION} 4 2 POCO_VERSION_PATCH )
string( REGEX REPLACE "^0" "" POCO_VERSION_PATCH ${POCO_VERSION_PATCH} )

string( REGEX REPLACE "^0\(.\)" "\\1" POCO_VERSION_PATCH ${POCO_VERSION_PATCH} )
set ( POCO_VERSION "${POCO_VERSION_MAJOR}.${POCO_VERSION_MINOR}.${POCO_VERSION_PATCH}" )
endif()

Expand Down
30 changes: 24 additions & 6 deletions Code/Mantid/Build/CMake/LinuxPackageScripts.cmake
Expand Up @@ -22,10 +22,24 @@ endif()

set ( CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${LIB_DIR};${CMAKE_INSTALL_PREFIX}/${PLUGINS_DIR};${CMAKE_INSTALL_PREFIX}/${PVPLUGINS_DIR} )

# Tell rpm that this package does not own /opt /usr/share/{applications,pixmaps}
# Required for Fedora >= 18 and RHEL >= 7
set ( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION /opt /usr/share/applications /usr/share/pixmaps )

###########################################################################
# LD_PRELOAD libraries
# LD_PRELOAD TCMalloc
###########################################################################
set ( EXTRA_LDPRELOAD_LIBS "${TCMALLOC_LIBRARIES}" )
# User systems will only have the libraries and not the symbolic link
# so we must set the preload to the versioned library. We will assume it is
# in the same location as the system that the package was built on
if ( TCMALLOC_LIBRARIES )
execute_process ( COMMAND readlink --no-newline --canonicalize-existing ${TCMALLOC_LIBRARIES}
OUTPUT_VARIABLE TCMALLOC_PRELOAD
RESULT_VARIABLE READLINK_RESULT )
if ( READLINK_RESULT EQUAL 1 )
message ( FATAL_ERROR "Unable to find real file that tcmalloc symlink, ${TCMALLOC_LIBRARIES}, points to." )
endif()
endif()

###########################################################################
# Environment scripts (profile.d)
Expand Down Expand Up @@ -83,11 +97,14 @@ set ( PRE_UNINSTALL_FILE ${CMAKE_CURRENT_BINARY_DIR}/prerm )
set ( POST_UNINSTALL_FILE ${CMAKE_CURRENT_BINARY_DIR}/postrm )

if ( "${UNIX_DIST}" MATCHES "RedHatEnterprise" OR "${UNIX_DIST}" MATCHES "^Fedora" ) # RHEL/Fedora
if ( "${UNIX_CODENAME}" MATCHES "Santiago" ) # el6
set ( WRAPPER_COMMAND "scl enable mantidlibs" )
if ( "${UNIX_CODENAME}" MATCHES "Santiago" OR
"${UNIX_CODENAME}" MATCHES "Maipo" )
set ( WRAPPER_PREFIX "scl enable mantidlibs \"" )
set ( WRAPPER_POSTFIX "\"" )
set ( EXTRA_LDPATH "/usr/lib64/paraview" )
else()
set ( WRAPPER_COMMAND "eval" )
set ( WRAPPER_PREFIX "" )
set ( WRAPPER_POSTFIX "" )
endif()

if ( NOT MPI_BUILD )
Expand All @@ -106,7 +123,8 @@ if ( "${UNIX_DIST}" MATCHES "RedHatEnterprise" OR "${UNIX_DIST}" MATCHES "^Fedor
set ( CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE ${POST_UNINSTALL_FILE} )
endif()
elseif ( "${UNIX_DIST}" MATCHES "Ubuntu" )
set ( WRAPPER_COMMAND "eval" )
set ( WRAPPER_PREFIX "" )
set ( WRAPPER_POSTFIX "" )

if ( NOT MPI_BUILD )
configure_file ( ${CMAKE_MODULE_PATH}/Packaging/deb/scripts/deb_pre_inst.in
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)"
)

4 changes: 2 additions & 2 deletions Code/Mantid/Build/CMake/Packaging/launch_mantidplot.sh.in
Expand Up @@ -9,7 +9,7 @@ SCRIPTFILE=$(readlink -f "$0")
INSTALLDIR=$(echo $SCRIPTFILE | sed -r -e 's|^(.*)/(.*)$|\1|g') #.* is greedy and eats up until the final slash

# Define extra libraries and load paths
LOCAL_PRELOAD=$(readlink -f @EXTRA_LDPRELOAD_LIBS@)
LOCAL_PRELOAD=@TCMALLOC_PRELOAD@
if [ -n "${LD_PRELOAD}" ]; then
LOCAL_PRELOAD=${LOCAL_PRELOAD}:${LD_PRELOAD}
fi
Expand All @@ -21,4 +21,4 @@ else
fi

# Launch
LD_PRELOAD=${LOCAL_PRELOAD} TCMALLOC_RELEASE_RATE=${TCM_RELEASE} LD_LIBRARY_PATH=${LOCAL_LDPATH} @WRAPPER_COMMAND@ "$INSTALLDIR/@MANTIDPLOT_EXEC@ $*"
LD_PRELOAD=${LOCAL_PRELOAD} TCMALLOC_RELEASE_RATE=${TCM_RELEASE} LD_LIBRARY_PATH=${LOCAL_LDPATH} QT_API=pyqt @WRAPPER_PREFIX@$INSTALLDIR/@MANTIDPLOT_EXEC@ $*@WRAPPER_POSTFIX@
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 2 )
set ( VERSION_MINOR 3 )

# 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
File renamed without changes.

0 comments on commit 8160a71

Please sign in to comment.