Skip to content
Snippets Groups Projects
Commit 9a71b30e authored by Simon Heybrock's avatar Simon Heybrock
Browse files

Re #16086. WIP creating Histogram module.

parent ca11654f
No related branches found
No related tags found
No related merge requests found
Showing
with 119 additions and 1 deletion
...@@ -70,6 +70,10 @@ include_directories (Kernel/inc) ...@@ -70,6 +70,10 @@ include_directories (Kernel/inc)
add_subdirectory (Kernel) add_subdirectory (Kernel)
set ( MANTIDLIBS ${MANTIDLIBS} Kernel ) set ( MANTIDLIBS ${MANTIDLIBS} Kernel )
include_directories (Histogram/inc)
add_subdirectory (Histogram)
set ( MANTIDLIBS ${MANTIDLIBS} Histogram )
include_directories (Geometry/inc) include_directories (Geometry/inc)
# muParser needed by Geometry and subsequent packages # muParser needed by Geometry and subsequent packages
include_directories ( ${MUPARSER_INCLUDE_DIR} ) include_directories ( ${MUPARSER_INCLUDE_DIR} )
...@@ -131,7 +135,7 @@ add_subdirectory (ISISLiveData) ...@@ -131,7 +135,7 @@ add_subdirectory (ISISLiveData)
# Add a custom target to build all of the Framework # Add a custom target to build all of the Framework
########################################################################### ###########################################################################
set ( FRAMEWORK_LIBS Kernel Geometry API DataObjects set ( FRAMEWORK_LIBS Kernel Histogram Geometry API DataObjects
PythonKernelModule PythonGeometryModule PythonAPIModule PythonKernelModule PythonGeometryModule PythonAPIModule
PythonDataObjectsModule PythonDataObjectsModule
DataHandling Nexus Algorithms CurveFitting ICat DataHandling Nexus Algorithms CurveFitting ICat
......
set ( SRC_FILES
src/BinEdges.cpp
src/Histogram.cpp
src/HistogramX.cpp
src/Points.cpp
)
set ( INC_FILES
inc/MantidHistogram/BinEdges.h
inc/MantidHistogram/ConstIterable.h
inc/MantidHistogram/Histogram.h
inc/MantidHistogram/HistogramData.h
inc/MantidHistogram/HistogramX.h
inc/MantidHistogram/Points.h
inc/MantidHistogram/VectorOf.h
)
set ( TEST_FILES
HistogramDataTest.h
BinEdgesTest.h
ConstIterableTest.h
HistogramXTest.h
PointsTest.h
HistogramTest.h
VectorOfTest.h
)
if (COVERALLS)
foreach( loop_var ${SRC_FILES} ${INC_FILES})
set_property(GLOBAL APPEND PROPERTY COVERAGE_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/${loop_var}")
endforeach(loop_var)
endif()
if(UNITY_BUILD)
include(UnityBuild)
enable_unity_build(Histogram SRC_FILES SRC_UNITY_IGNORE_FILES 10)
endif(UNITY_BUILD)
# Add the target for this directory
add_library ( Histogram ${SRC_FILES} ${INC_FILES} )
# Set the name of the generated library
set_target_properties ( Histogram PROPERTIES OUTPUT_NAME MantidHistogram
COMPILE_DEFINITIONS IN_MANTID_HISTOGRAM )
if (OSX_VERSION VERSION_GREATER 10.8)
set_target_properties ( Histogram PROPERTIES INSTALL_RPATH "@loader_path/../MacOS")
endif ()
# Add to the 'Framework' group in VS
set_property ( TARGET Histogram PROPERTY FOLDER "MantidFramework" )
target_link_libraries ( Histogram LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${MANTIDLIBS} )
# Add the unit tests directory
add_subdirectory ( test )
###########################################################################
# Installation settings
###########################################################################
install ( TARGETS Histogram ${SYSTEM_PACKAGE_TARGET} DESTINATION ${LIB_DIR} )
#ifndef MANTID_HISTOGRAM_DLLCONFIG_H_
#define MANTID_HISTOGRAM_DLLCONFIG_H_
/*
This file contains the DLLExport/DLLImport linkage configuration for the
Histogram library
Copyright © 2016 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge
National Laboratory & European Spallation Source
This file is part of Mantid.
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.
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.
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>
*/
#include "MantidKernel/System.h"
#ifdef IN_MANTID_HISTOGRAM
#define MANTID_HISTOGRAM_DLL DLLExport
#else
#define MANTID_HISTOGRAM_DLL DLLImport
#endif // IN_MANTID_HISTOGRAM
#endif // MANTID_HISTOGRAM_DLLCONFIG_H_
if ( CXXTEST_FOUND )
include_directories ( SYSTEM ${CXXTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR} )
cxxtest_add_test ( HistogramTest ${TEST_FILES} ${GMOCK_TEST_FILES})
target_link_libraries( HistogramTest LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME}
Histogram
Kernel
${Boost_LIBRARIES}
${POCO_LIBRARIES}
${GMOCK_LIBRARIES}
${GTEST_LIBRARIES} )
add_dependencies ( FrameworkTests HistogramTest )
# Add to the 'FrameworkTests' group in VS
set_property ( TARGET HistogramTest PROPERTY FOLDER "UnitTests" )
endif ()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment