Skip to content

Commit

Permalink
Merge branch 'master' into 11617_calculate_chi_squared_over_dof
Browse files Browse the repository at this point in the history
  • Loading branch information
mantid-roman committed May 21, 2015
2 parents e3f0280 + 01814ae commit 25c34a2
Show file tree
Hide file tree
Showing 357 changed files with 7,149 additions and 8,931 deletions.
10 changes: 10 additions & 0 deletions Code/Mantid/Build/CMake/GNUSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,19 @@ endif()
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fno-omit-frame-pointer" )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer" )

option(WITH_ASAN "Enable address sanitizer" OFF)
if(WITH_ASAN)
message(STATUS "enabling address sanitizer")
add_compile_options(-fno-omit-frame-pointer -fno-common -fsanitize=address)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=address -lasan" )
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address -lasan" )
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address -lasan" )
endif()

# Set the options for gcc and g++
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GNUFLAGS}" )
# -Wno-overloaded-virtual is down here because it's not applicable to the C_FLAGS
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GNUFLAGS} -Woverloaded-virtual -fno-operator-names -std=c++0x" )

# Cleanup
set ( GNUFLAGS )
2 changes: 1 addition & 1 deletion Code/Mantid/Build/CMake/VersionNumber.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Set the version number here for MantidVersion and the package filenames

set ( VERSION_MAJOR 3 )
set ( VERSION_MINOR 3 )
set ( VERSION_MINOR 4 )

# 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
189 changes: 92 additions & 97 deletions Code/Mantid/Build/class_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ def write_header(subproject, classname, filename, args):

# Create an Algorithm header; will not use it if not an algo
algorithm_header = """
virtual const std::string name() const;
virtual int version() const;
virtual const std::string category() const;
virtual const std::string summary() const;
private:
void init();
void exec();
virtual const std::string name() const;
virtual int version() const;
virtual const std::string category() const;
virtual const std::string summary() const;
private:
void init();
void exec();
"""

# ---- Find the author, default to blank string ----
Expand All @@ -59,47 +58,42 @@ def write_header(subproject, classname, filename, args):
#include "MantidKernel/System.h"
%s
namespace Mantid {
namespace %s {
namespace Mantid
{
namespace %s
{
/** %s : TODO: DESCRIPTION
Copyright © %s ISIS Rutherford Appleton Laboratory, NScD Oak Ridge National Laboratory & European Spallation Source
/** %s : TODO: DESCRIPTION
This file is part of Mantid.
Copyright © %s ISIS Rutherford Appleton Laboratory, NScD Oak Ridge
National Laboratory & European Spallation Source
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This file is part of Mantid.
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport %s %s
{
public:
%s();
virtual ~%s();
%s
};
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class DLLExport %s%s {
public:
%s();
virtual ~%s();
%s};
} // namespace %s
} // namespace Mantid
#endif /* %s */""" % (guard, guard,
#endif /* %s */""" % (guard, guard,
alg_include, subproject, classname,
datetime.datetime.now().date().year, classname, alg_class_declare,
classname, classname, algorithm_header, subproject, guard)
Expand All @@ -118,46 +112,50 @@ def write_source(subproject, classname, filename, args):
f = open(filename, 'w')

algorithm_top = """
using Mantid::Kernel::Direction;
using Mantid::API::WorkspaceProperty;
// Register the algorithm into the AlgorithmFactory
DECLARE_ALGORITHM(%s)
using Mantid::Kernel::Direction;
using Mantid::API::WorkspaceProperty;
// Register the algorithm into the AlgorithmFactory
DECLARE_ALGORITHM(%s)
""" % (classname)

algorithm_source = """
//----------------------------------------------------------------------------------------------
/// Algorithms name for identification. @see Algorithm::name
const std::string %s::name() const { return "%s"; }
/// Algorithm's version for identification. @see Algorithm::version
int %s::version() const { return 1;};
/// Algorithm's category for identification. @see Algorithm::category
const std::string %s::category() const { return TODO: FILL IN A CATEGORY;}
/// Algorithm's summary for use in the GUI and help. @see Algorithm::summary
const std::string %s::summary() const { return TODO: FILL IN A SUMMARY;};
//----------------------------------------------------------------------------------------------
/** Initialize the algorithm's properties.
*/
void %s::init()
{
declareProperty(new WorkspaceProperty<>("InputWorkspace","",Direction::Input), "An input workspace.");
declareProperty(new WorkspaceProperty<>("OutputWorkspace","",Direction::Output), "An output workspace.");
}
//----------------------------------------------------------------------------------------------
/** Execute the algorithm.
*/
void %s::exec()
{
// TODO Auto-generated execute stub
}
//----------------------------------------------------------------------------------------------
/// Algorithms name for identification. @see Algorithm::name
const std::string %s::name() const { return "%s"; }
/// Algorithm's version for identification. @see Algorithm::version
int %s::version() const { return 1; }
/// Algorithm's category for identification. @see Algorithm::category
const std::string %s::category() const {
return "TODO: FILL IN A CATEGORY";
}
/// Algorithm's summary for use in the GUI and help. @see Algorithm::summary
const std::string %s::summary() const {
return "TODO: FILL IN A SUMMARY";
}
//----------------------------------------------------------------------------------------------
/** Initialize the algorithm's properties.
*/
void %s::init() {
declareProperty(
new WorkspaceProperty<>("InputWorkspace", "", Direction::Input),
"An input workspace.");
declareProperty(
new WorkspaceProperty<>("OutputWorkspace", "", Direction::Output),
"An output workspace.");
}
//----------------------------------------------------------------------------------------------
/** Execute the algorithm.
*/
void %s::exec() {
// TODO Auto-generated execute stub
}
""" % (classname, classname, classname, classname, classname, classname, classname)

if not args.alg:
Expand All @@ -167,28 +165,19 @@ def write_source(subproject, classname, filename, args):
# ------- Now the normal class text ------------------------------
s = """#include "Mantid%s/%s%s.h"
namespace Mantid
{
namespace %s
{
namespace Mantid {
namespace %s {
%s
//----------------------------------------------------------------------------------------------
/** Constructor
*/
%s::%s()
{
}
//----------------------------------------------------------------------------------------------
/** Destructor
*/
%s::~%s()
{
}
//----------------------------------------------------------------------------------------------
/** Constructor
*/
%s::%s() {}
//----------------------------------------------------------------------------------------------
/** Destructor
*/
%s::~%s() {}
%s
} // namespace %s
} // namespace Mantid""" % (
subproject, args.subfolder, classname, subproject, algorithm_top,
Expand Down Expand Up @@ -252,8 +241,7 @@ def write_test(subproject, classname, filename, args):
using Mantid::%s::%s;
using namespace Mantid::API;
class %sTest : public CxxTest::TestSuite
{
class %sTest : public CxxTest::TestSuite {
public:
// This pair of boilerplate methods prevent the suite being created statically
// This means the constructor isn't called when running other tests
Expand Down Expand Up @@ -379,6 +367,13 @@ def generate(subproject, classname, overwrite, args):

print "\n Files were added to Framework/%s/CMakeLists.txt !" % (subproject)
print

if args.alg:
print "Note: if this is a WorkflowAlgorithm, please subclass DataProcessorAlgorithm"
print "Note: if this algorithm operates on a WorkspaceGroup, please override processGroups()"
print


# if not test_only:
# print "\tsrc/%s.cpp" % (classname)
# print "\tinc/Mantid%s/%s.h" % (subproject, classname)
Expand Down
89 changes: 0 additions & 89 deletions Code/Mantid/Build/mwclient/README.txt

This file was deleted.

0 comments on commit 25c34a2

Please sign in to comment.