set ( SRC_FILES
	src/AppendGeometryToSNSNexus.cpp
	src/AsciiPointBase.cpp
	src/CheckMantidVersion.cpp
	src/CompressEvents.cpp
	src/CreateChopperModel.cpp
	src/CreateChunkingFromInstrument.cpp
	src/CreateModeratorModel.cpp
	src/CreateSampleShape.cpp
	src/CreateSimulationWorkspace.cpp
	src/DefineGaugeVolume.cpp
	src/DeleteTableRows.cpp
	src/DetermineChunking.cpp
	src/DownloadFile.cpp
	src/DownloadInstrument.cpp
	src/EventWorkspaceCollection.cpp
	src/ExtractMonitorWorkspace.cpp
	src/FilterEventsByLogValuePreNexus.cpp
	src/FindDetectorsInShape.cpp
	src/FindDetectorsPar.cpp
	src/GenerateGroupingPowder.cpp
	src/GroupDetectors.cpp
	src/GroupDetectors2.cpp
	src/ISISDataArchive.cpp
	src/ISISRunLogs.cpp
	src/Load.cpp
	src/LoadANSTOHelper.cpp
	src/LoadAscii.cpp
	src/LoadAscii2.cpp
	src/LoadBBY.cpp
	src/LoadCalFile.cpp
	src/LoadCanSAS1D.cpp
	src/LoadCanSAS1D2.cpp
	src/LoadDaveGrp.cpp
	src/LoadDetectorInfo.cpp
	src/LoadDetectorsGroupingFile.cpp
	src/LoadDiffCal.cpp
	src/LoadDspacemap.cpp
	src/LoadEmptyInstrument.cpp
	src/LoadEventNexus.cpp
	src/LoadEventPreNexus.cpp
	src/LoadEventPreNexus2.cpp
	src/LoadFITS.cpp
	src/LoadFullprofResolution.cpp
	src/LoadGSASInstrumentFile.cpp
	src/LoadGSS.cpp
	src/LoadHelper.cpp
	src/LoadIDFFromNexus.cpp
	src/LoadILL.cpp
	src/LoadILLIndirect.cpp
	src/LoadILLReflectometry.cpp
	src/LoadILLSANS.cpp
	src/LoadISISNexus2.cpp
	src/LoadInstrument.cpp
	src/LoadInstrumentFromNexus.cpp
	src/LoadInstrumentFromRaw.cpp
	src/LoadIsawDetCal.cpp
	src/LoadLLB.cpp
	src/LoadLog.cpp
	src/LoadLogsForSNSPulsedMagnet.cpp
	src/LoadMLZ.cpp
	src/LoadMappingTable.cpp
	src/LoadMask.cpp
	src/LoadMcStas.cpp
	src/LoadMcStasNexus.cpp
	src/LoadMuonLog.cpp
	src/LoadMuonNexus.cpp
	src/LoadMuonNexus1.cpp
	src/LoadMuonNexus2.cpp
	src/LoadNXSPE.cpp
	src/LoadNexus.cpp
	src/LoadNexusLogs.cpp
	src/LoadNexusMonitors.cpp
        src/LoadNexusMonitors2.cpp
	src/LoadNexusProcessed.cpp
	src/LoadPDFgetNFile.cpp
	src/LoadParameterFile.cpp
	src/LoadPreNexus.cpp
	src/LoadPreNexusMonitors.cpp
	src/LoadQKK.cpp
	src/LoadRKH.cpp
	src/LoadRaw/byte_rel_comp.cpp
	src/LoadRaw/isisraw.cpp
	src/LoadRaw/isisraw2.cpp
	src/LoadRaw/item_struct.cpp
	src/LoadRaw/vms_convert.cpp
	src/LoadRaw3.cpp
	src/LoadRawBin0.cpp
	src/LoadRawHelper.cpp
	src/LoadRawSpectrum0.cpp
	src/LoadReflTBL.cpp
	src/LoadSINQFocus.cpp
	src/LoadSNSspec.cpp
	src/LoadSPE.cpp
	src/LoadSampleDetailsFromRaw.cpp
	src/LoadSassena.cpp
	src/LoadSavuTomoConfig.cpp
	src/LoadSpec.cpp
	src/LoadSpice2D.cpp
	src/LoadSpiceAscii.cpp
	src/LoadSpiceXML2DDet.cpp
	src/LoadTOFRawNexus.cpp
	src/LoadCSNSNexus.cpp
	src/LoadVulcanCalFile.cpp
	src/MaskDetectors.cpp
	src/MaskDetectorsInShape.cpp
	src/MergeLogs.cpp
	src/ModifyDetectorDotDatFile.cpp
	src/MoveInstrumentComponent.cpp
	src/NexusTester.cpp
	src/PDLoadCharacterizations.cpp
	src/ProcessDasNexusLog.cpp
	src/RawFileInfo.cpp
	src/RemoveLogs.cpp
	src/RenameLog.cpp
	src/RotateInstrumentComponent.cpp
	src/RotateSource.cpp
	src/SNSDataArchive.cpp
	src/SaveANSTOAscii.cpp
	src/SaveAscii.cpp
	src/SaveAscii2.cpp
	src/SaveCSV.cpp
	src/SaveCalFile.cpp
	src/SaveCanSAS1D.cpp
	src/SaveCanSAS1D2.cpp
	src/SaveDaveGrp.cpp
	src/SaveDetectorsGrouping.cpp
	src/SaveDiffCal.cpp
	src/SaveDspacemap.cpp
	src/SaveFocusedXYE.cpp
	src/SaveFullprofResolution.cpp
	src/SaveGSASInstrumentFile.cpp
	src/SaveGSS.cpp
	src/SaveILLCosmosAscii.cpp
	src/SaveISISNexus.cpp
	src/SaveIsawDetCal.cpp
	src/SaveMask.cpp
	src/SaveNISTDAT.cpp
	src/SaveNXSPE.cpp
	src/SaveNXTomo.cpp
	src/SaveNexus.cpp
	src/SaveNexusProcessed.cpp
	src/SaveOpenGenieAscii.cpp
	src/SavePAR.cpp
	src/SavePDFGui.cpp
	src/SavePHX.cpp
	src/SaveParameterFile.cpp
	src/SaveRKH.cpp
	src/SaveReflCustomAscii.cpp
	src/SaveReflTBL.cpp
	src/SaveReflThreeColumnAscii.cpp
	src/SaveSPE.cpp
	src/SaveSavuTomoConfig.cpp
	src/SaveToSNSHistogramNexus.cpp
	src/SaveVTK.cpp
	src/SetSampleMaterial.cpp
	src/SetScalingPSD.cpp
	src/SortTableWorkspace.cpp
	src/UpdateInstrumentFromFile.cpp
	src/XmlHandler.cpp
)

set ( INC_FILES
	inc/MantidDataHandling/AppendGeometryToSNSNexus.h
	inc/MantidDataHandling/AsciiPointBase.h
	inc/MantidDataHandling/CheckMantidVersion.h
	inc/MantidDataHandling/CompressEvents.h
	inc/MantidDataHandling/CreateChopperModel.h
	inc/MantidDataHandling/CreateChunkingFromInstrument.h
	inc/MantidDataHandling/CreateModeratorModel.h
	inc/MantidDataHandling/CreateSampleShape.h
	inc/MantidDataHandling/CreateSimulationWorkspace.h
	inc/MantidDataHandling/DefineGaugeVolume.h
	inc/MantidDataHandling/DeleteTableRows.h
	inc/MantidDataHandling/DetermineChunking.h
	inc/MantidDataHandling/DownloadFile.h
	inc/MantidDataHandling/DownloadInstrument.h
	inc/MantidDataHandling/EventWorkspaceCollection.h
	inc/MantidDataHandling/ExtractMonitorWorkspace.h
	inc/MantidDataHandling/FilterEventsByLogValuePreNexus.h
	inc/MantidDataHandling/FindDetectorsInShape.h
	inc/MantidDataHandling/FindDetectorsPar.h
	inc/MantidDataHandling/GenerateGroupingPowder.h
	inc/MantidDataHandling/GroupDetectors.h
	inc/MantidDataHandling/GroupDetectors2.h
	inc/MantidDataHandling/ISISDataArchive.h
	inc/MantidDataHandling/ISISRunLogs.h
	inc/MantidDataHandling/Load.h
	inc/MantidDataHandling/LoadANSTOHelper.h
	inc/MantidDataHandling/LoadAscii.h
	inc/MantidDataHandling/LoadAscii2.h
	inc/MantidDataHandling/LoadBBY.h
	inc/MantidDataHandling/LoadCalFile.h
	inc/MantidDataHandling/LoadCanSAS1D.h
	inc/MantidDataHandling/LoadCanSAS1D2.h
	inc/MantidDataHandling/LoadDaveGrp.h
	inc/MantidDataHandling/LoadDetectorInfo.h
	inc/MantidDataHandling/LoadDetectorsGroupingFile.h
	inc/MantidDataHandling/LoadDiffCal.h
	inc/MantidDataHandling/LoadDspacemap.h
	inc/MantidDataHandling/LoadEmptyInstrument.h
	inc/MantidDataHandling/LoadEventNexus.h
	inc/MantidDataHandling/LoadEventPreNexus.h
	inc/MantidDataHandling/LoadEventPreNexus2.h
	inc/MantidDataHandling/LoadFITS.h
	inc/MantidDataHandling/LoadFullprofResolution.h
	inc/MantidDataHandling/LoadGSASInstrumentFile.h
	inc/MantidDataHandling/LoadGSS.h
	inc/MantidDataHandling/LoadHelper.h
	inc/MantidDataHandling/LoadIDFFromNexus.h
	inc/MantidDataHandling/LoadILL.h
	inc/MantidDataHandling/LoadILLIndirect.h
	inc/MantidDataHandling/LoadILLReflectometry.h
	inc/MantidDataHandling/LoadILLSANS.h
	inc/MantidDataHandling/LoadISISNexus2.h
	inc/MantidDataHandling/LoadInstrument.h
	inc/MantidDataHandling/LoadInstrumentFromNexus.h
	inc/MantidDataHandling/LoadInstrumentFromRaw.h
	inc/MantidDataHandling/LoadIsawDetCal.h
	inc/MantidDataHandling/LoadLLB.h
	inc/MantidDataHandling/LoadLog.h
	inc/MantidDataHandling/LoadLogsForSNSPulsedMagnet.h
	inc/MantidDataHandling/LoadMLZ.h
	inc/MantidDataHandling/LoadMappingTable.h
	inc/MantidDataHandling/LoadMask.h
	inc/MantidDataHandling/LoadMcStas.h
	inc/MantidDataHandling/LoadMcStasNexus.h
	inc/MantidDataHandling/LoadMuonLog.h
	inc/MantidDataHandling/LoadMuonNexus.h
	inc/MantidDataHandling/LoadMuonNexus1.h
	inc/MantidDataHandling/LoadMuonNexus2.h
	inc/MantidDataHandling/LoadNXSPE.h
	inc/MantidDataHandling/LoadNexus.h
	inc/MantidDataHandling/LoadNexusLogs.h
	inc/MantidDataHandling/LoadNexusMonitors.h
        inc/MantidDataHandling/LoadNexusMonitors2.h
	inc/MantidDataHandling/LoadNexusProcessed.h
	inc/MantidDataHandling/LoadPDFgetNFile.h
	inc/MantidDataHandling/LoadParameterFile.h
	inc/MantidDataHandling/LoadPreNexus.h
	inc/MantidDataHandling/LoadPreNexusMonitors.h
	inc/MantidDataHandling/LoadQKK.h
	inc/MantidDataHandling/LoadRKH.h
	inc/MantidDataHandling/LoadRaw3.h
	inc/MantidDataHandling/LoadRawBin0.h
	inc/MantidDataHandling/LoadRawHelper.h
	inc/MantidDataHandling/LoadRawSpectrum0.h
	inc/MantidDataHandling/LoadReflTBL.h
	inc/MantidDataHandling/LoadSINQFocus.h
	inc/MantidDataHandling/LoadSNSspec.h
	inc/MantidDataHandling/LoadSPE.h
	inc/MantidDataHandling/LoadSampleDetailsFromRaw.h
	inc/MantidDataHandling/LoadSassena.h
	inc/MantidDataHandling/LoadSavuTomoConfig.h
	inc/MantidDataHandling/LoadSpec.h
	inc/MantidDataHandling/LoadSpice2D.h
	inc/MantidDataHandling/LoadSpiceAscii.h
	inc/MantidDataHandling/LoadSpiceXML2DDet.h
	inc/MantidDataHandling/LoadTOFRawNexus.h
	inc/MantidDataHandling/LoadCSNSNexus.h
	inc/MantidDataHandling/LoadVulcanCalFile.h
	inc/MantidDataHandling/MaskDetectors.h
	inc/MantidDataHandling/MaskDetectorsInShape.h
	inc/MantidDataHandling/MergeLogs.h
	inc/MantidDataHandling/ModifyDetectorDotDatFile.h
	inc/MantidDataHandling/MoveInstrumentComponent.h
	inc/MantidDataHandling/NexusTester.h
	inc/MantidDataHandling/PDLoadCharacterizations.h
	inc/MantidDataHandling/ProcessDasNexusLog.h
	inc/MantidDataHandling/RawFileInfo.h
	inc/MantidDataHandling/RemoveLogs.h
	inc/MantidDataHandling/RenameLog.h
	inc/MantidDataHandling/RotateInstrumentComponent.h
	inc/MantidDataHandling/RotateSource.h
	inc/MantidDataHandling/SNSDataArchive.h
	inc/MantidDataHandling/SaveANSTOAscii.h
	inc/MantidDataHandling/SaveAscii.h
	inc/MantidDataHandling/SaveAscii2.h
	inc/MantidDataHandling/SaveCSV.h
	inc/MantidDataHandling/SaveCalFile.h
	inc/MantidDataHandling/SaveCanSAS1D.h
	inc/MantidDataHandling/SaveCanSAS1D2.h
	inc/MantidDataHandling/SaveDaveGrp.h
	inc/MantidDataHandling/SaveDetectorsGrouping.h
	inc/MantidDataHandling/SaveDiffCal.h
	inc/MantidDataHandling/SaveDspacemap.h
	inc/MantidDataHandling/SaveFocusedXYE.h
	inc/MantidDataHandling/SaveFullprofResolution.h
	inc/MantidDataHandling/SaveGSASInstrumentFile.h
	inc/MantidDataHandling/SaveGSS.h
	inc/MantidDataHandling/SaveILLCosmosAscii.h
	inc/MantidDataHandling/SaveISISNexus.h
	inc/MantidDataHandling/SaveIsawDetCal.h
	inc/MantidDataHandling/SaveMask.h
	inc/MantidDataHandling/SaveNISTDAT.h
	inc/MantidDataHandling/SaveNXSPE.h
	inc/MantidDataHandling/SaveNXTomo.h
	inc/MantidDataHandling/SaveNexus.h
	inc/MantidDataHandling/SaveNexusProcessed.h
	inc/MantidDataHandling/SaveOpenGenieAscii.h
	inc/MantidDataHandling/SavePAR.h
	inc/MantidDataHandling/SavePDFGui.h
	inc/MantidDataHandling/SavePHX.h
	inc/MantidDataHandling/SaveParameterFile.h
	inc/MantidDataHandling/SaveRKH.h
	inc/MantidDataHandling/SaveReflCustomAscii.h
	inc/MantidDataHandling/SaveReflTBL.h
	inc/MantidDataHandling/SaveReflThreeColumnAscii.h
	inc/MantidDataHandling/SaveSPE.h
	inc/MantidDataHandling/SaveSavuTomoConfig.h
	inc/MantidDataHandling/SaveToSNSHistogramNexus.h
	inc/MantidDataHandling/SaveVTK.h
	inc/MantidDataHandling/SetSampleMaterial.h
	inc/MantidDataHandling/SetScalingPSD.h
	inc/MantidDataHandling/SortTableWorkspace.h
	inc/MantidDataHandling/UpdateInstrumentFromFile.h
	inc/MantidDataHandling/XmlHandler.h
	src/LoadRaw/byte_rel_comp.h
	src/LoadRaw/isisraw.h
	src/LoadRaw/isisraw2.h
	src/LoadRaw/item_struct.h
	src/LoadRaw/vms_convert.h
)

set ( TEST_FILES
	AppendGeometryToSNSNexusTest.h
	CheckMantidVersionTest.h
	CompressEventsTest.h
	CreateChopperModelTest.h
	CreateChunkingFromInstrumentTest.h
	CreateModeratorModelTest.h
	CreateSampleShapeTest.h
	CreateSimulationWorkspaceTest.h
	DefineGaugeVolumeTest.h
	DeleteTableRowsTest.h
	DetermineChunkingTest.h
	DownloadFileTest.h
	DownloadInstrumentTest.h
	EventWorkspaceCollectionTest.h
	ExtractMonitorWorkspaceTest.h
	FilterEventsByLogValuePreNexusTest.h
	FindDetectorsInShapeTest.h
	FindDetectorsParTest.h
	GenerateGroupingPowderTest.h
	GroupDetectors2Test.h
	GroupDetectorsTest.h
	ISISDataArchiveTest.h
	InstrumentRayTracerTest.h
	LoadAscii2Test.h
	LoadAsciiTest.h
	LoadBBYTest.h
	LoadCalFileTest.h
	LoadCanSAS1dTest.h
	LoadDaveGrpTest.h
	LoadDetectorInfoTest.h
	LoadDetectorsGroupingFileTest.h
	LoadDiffCalTest.h
	LoadDspacemapTest.h
	LoadEmptyInstrumentTest.h
	LoadEventNexusTest.h
	LoadEventPreNexus2Test.h
	LoadEventPreNexusTest.h
	LoadFITSTest.h
	LoadFullprofResolutionTest.h
	LoadGSASInstrumentFileTest.h
	LoadGSSTest.h
	LoadIDFFromNexusTest.h
	LoadILLIndirectTest.h
	LoadILLReflectometryTest.h
	LoadILLSANSTest.h
	LoadILLTest.h
	LoadISISNexusTest.h
	LoadInstrumentFromRawTest.h
	LoadInstrumentTest.h
	LoadIsawDetCalTest.h
	LoadLLBTest.h
	LoadLogTest.h
	LoadMLZTest.h
	LoadMappingTableTest.h
	LoadMaskTest.h
	LoadMcStasNexusTest.h
	LoadMcStasTest.h
	LoadMuonLogTest.h
	LoadMuonNexus1Test.h
	LoadMuonNexus2Test.h
	LoadNXSPETest.h
	LoadNexusLogsTest.h
	LoadNexusMonitorsTest.h
	LoadNexusProcessedTest.h
	LoadNexusTest.h
	LoadPDFgetNFileTest.h
	LoadParameterFileTest.h
	LoadPreNexusMonitorsTest.h
	LoadPreNexusTest.h
	LoadQKKTest.h
	LoadRKHTest.h
	LoadRaw3Test.h
	LoadRawBin0Test.h
	LoadRawSaveNxsLoadNxsTest.h
	LoadRawSpectrum0Test.h
	LoadReflTBLTest.h
	LoadSINQFocusTest.h
	LoadSNSspecTest.h
	LoadSPETest.h
	LoadSassenaTest.h
	LoadSaveAsciiTest.h
	LoadSavuTomoConfigTest.h
	LoadSpice2dTest.h
	LoadSpiceAsciiTest.h
	LoadSpiceXML2DDetTest.h
	LoadTOFRawNexusTest.h
	LoadTest.h
	LoadVulcanCalFileTest.h
	MaskDetectorsInShapeTest.h
	MaskDetectorsTest.h
	MergeLogsTest.h
	ModifyDetectorDotDatFileTest.h
	MoveInstrumentComponentTest.h
	NexusTesterTest.h
	PDLoadCharacterizationsTest.h
	ProcessDasNexusLogTest.h
	RawFileInfoTest.h
	RemoveLogsTest.h
	RenameLogTest.h
	RotateInstrumentComponentTest.h
	RotateSourceTest.h
	SNSDataArchiveTest.h
	SaveANSTOAsciiTest.h
	SaveAscii2Test.h
	SaveAsciiTest.h
	SaveCSVTest.h
	SaveCalFileTest.h
	SaveCanSAS1dTest.h
	SaveCanSAS1dTest2.h
	SaveDaveGrpTest.h
	SaveDetectorsGroupingTest.h
	SaveDiffCalTest.h
	SaveDspacemapTest.h
	SaveFocussedXYETest.h
	SaveFullprofResolutionTest.h
	SaveGSASInstrumentFileTest.h
	SaveGSSTest.h
	SaveILLCosmosAsciiTest.h
	SaveIsawDetCalTest.h
	SaveMaskTest.h
	SaveNISTDATTest.h
	SaveNXSPETest.h
	SaveNXTomoTest.h
	SaveNexusProcessedTest.h
	SaveNexusTest.h
	SavePARTest.h
	SavePDFGuiTest.h
	SavePHXTest.h
	SaveParameterFileTest.h
	SaveRKHTest.h
	SaveReflCustomAsciiTest.h
	SaveReflTBLTest.h
	SaveReflThreeColumnAsciiTest.h
	SaveSPETest.h
	SaveSavuTomoConfigTest.h
	SaveToSNSHistogramNexusTest.h
	SetSampleMaterialTest.h
	SetScalingPSDTest.h
	SortTableWorkspaceTest.h
	UpdateInstrumentFromFileTest.h
	XMLInstrumentParameterTest.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(DataHandling SRC_FILES SRC_UNITY_IGNORE_FILES 10)
endif(UNITY_BUILD)

# Use a precompiled header where they are supported
enable_precompiled_headers( inc/MantidDataHandling/PrecompiledHeader.h SRC_FILES )
# Add the target for this directory
add_library ( DataHandling ${SRC_FILES} ${INC_FILES})
# Set the name of the generated library
set_target_properties ( DataHandling PROPERTIES OUTPUT_NAME MantidDataHandling )

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

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

include_directories ( inc ../Nexus/inc ${HDF5_INCLUDE_DIRS})

target_link_libraries ( DataHandling LINK_PRIVATE ${TCMALLOC_LIBRARIES_LINKTIME} ${MANTIDLIBS} Nexus ${NEXUS_LIBRARIES} ${HDF5_LIBRARIES} ${JSONCPP_LIBRARIES} )

# Add the unit tests directory
add_subdirectory ( test )

###########################################################################
# Installation settings
###########################################################################

install ( TARGETS DataHandling ${SYSTEM_PACKAGE_TARGET} DESTINATION ${PLUGINS_DIR} )
