Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
452b0099
Commit
452b0099
authored
Jan 27, 2021
by
Peterson, Peter
Committed by
Danny Hindson
Jan 28, 2021
Browse files
Merge pull request #30404 from mantidproject/30401_AddMoreFilesToPrecompiledHeaders
Improve Precompiled header files to speed up Windows build
parent
e0555c96
Changes
27
Hide whitespace changes
Inline
Side-by-side
Framework/API/inc/MantidAPI/PrecompiledHeader.h
View file @
452b0099
...
...
@@ -7,33 +7,15 @@
#pragma once
// Mantid
#include
"MantidAPI/DllConfig.h"
#include
"MantidGeometry/IComponent.h"
#include
"MantidGeometry/IDetector.h"
#include
"MantidGeometry/Instrument.h"
#include
"MantidKernel/ArrayProperty.h"
#include
"MantidKernel/DateAndTime.h"
#include
"MantidKernel/DynamicFactory.h"
#include
"MantidKernel/Exception.h"
#include
"MantidKernel/IPropertyManager.h"
#include
"MantidKernel/Logger.h"
#include
"MantidKernel/Quat.h"
#include
"MantidKernel/System.h"
#include
"MantidKernel/V3D.h"
// STL
#include
<cfloat>
#include
<cmath>
#include
<cstddef>
#include
<map>
#include
<set>
#include
<string>
#include
<utility>
#include
<vector>
// Boost
#include
<boost/variant.hpp>
#include
<memory>
// Poco
#include
<Poco/DOM/DOMParser.h>
#include
<Poco/XML/XML.h>
Framework/Algorithms/inc/MantidAlgorithms/PrecompiledHeader.h
View file @
452b0099
...
...
@@ -7,8 +7,15 @@
#pragma once
#include
"MantidAPI/Algorithm.h"
#include
"MantidAPI/MatrixWorkspace.h"
#include
"MantidAlgorithms/DllConfig.h"
#include
"MantidKernel/Exception.h"
// STL
// No speed up from including STL headers for some reason
// Boost
#include
<memory>
#include
<boost/algorithm/string.hpp>
#include
<boost/format.hpp>
#include
<boost/function.hpp>
#include
<boost/lexical_cast.hpp>
#include
<boost/math/special_functions.hpp>
Framework/Algorithms/test/PrecompiledHeader.h
View file @
452b0099
...
...
@@ -11,6 +11,7 @@
// Mantid
#include
"MantidAPI/Algorithm.h"
#include
"MantidTestHelpers/WorkspaceCreationHelper.h"
// STL
#include
<set>
...
...
Framework/Crystal/CMakeLists.txt
View file @
452b0099
...
...
@@ -227,6 +227,9 @@ if(COVERALLS)
endforeach
(
loop_var
)
endif
()
# Add a precompiled header where they are supported
enable_precompiled_headers
(
inc/MantidCrystal/PrecompiledHeader.h SRC_FILES
)
# Add the target for this directory
add_library
(
Crystal
${
SRC_FILES
}
${
INC_FILES
}
)
# Set the name of the generated library
...
...
Framework/Crystal/inc/MantidCrystal/PrecompiledHeader.h
0 → 100644
View file @
452b0099
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include
"MantidAPI/Algorithm.h"
#include
"MantidCrystal/DllConfig.h"
// STL
Framework/CurveFitting/inc/MantidCurveFitting/PrecompiledHeader.h
View file @
452b0099
...
...
@@ -6,6 +6,7 @@
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include
<set>
#include
<string>
#include
<vector>
#include
"MantidAPI/IFunction1D.h"
#include
"MantidCurveFitting/DllConfig.h"
// STL
Framework/DataHandling/inc/MantidDataHandling/PrecompiledHeader.h
View file @
452b0099
...
...
@@ -6,11 +6,21 @@
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
// Algorithm
#include
"MantidAPI/Algorithm.h"
#include
"MantidDataObjects/EventWorkspace.h"
#include
"MantidDataObjects/Workspace2D.h"
#include
"MantidGeometry/Instrument.h"
// STL
// NeXus
// clang-format off
#include
<nexus/NeXusFile.hpp>
#include
<nexus/NeXusException.hpp>
// clang-format on
// Poco
#include
<Poco/DOM/Document.h>
#include
<Poco/DOM/Element.h>
#include
<Poco/DOM/DOMParser.h>
#include
<Poco/DOM/NodeList.h>
\ No newline at end of file
Framework/DataHandling/test/PrecompiledHeader.h
View file @
452b0099
...
...
@@ -11,8 +11,10 @@
#include
"MantidAPI/Algorithm.h"
#include
"MantidKernel/System.h"
#include
"MantidTestHelpers/WorkspaceCreationHelper.h"
// STL
#include
<set>
#include
<string>
#include
<vector>
// Poco
#include
<Poco/File.h>
#include
<Poco/Path.h>
Framework/DataObjects/test/PeakShapeSphericalFactoryTest.h
View file @
452b0099
...
...
@@ -68,7 +68,7 @@ public:
void
test_create
()
{
const
double
radius
=
2
;
const
SpecialCoordinateSystem
frame
=
HKL
;
const
SpecialCoordinateSystem
frame
=
SpecialCoordinateSystem
::
HKL
;
const
std
::
string
algorithmName
=
"foo"
;
const
int
algorithmVersion
=
3
;
...
...
@@ -92,7 +92,7 @@ public:
const
double
radius
=
2
;
const
double
backgroundInnerRadius
=
3
;
const
double
backgroundOuterRadius
=
4
;
const
SpecialCoordinateSystem
frame
=
HKL
;
const
SpecialCoordinateSystem
frame
=
SpecialCoordinateSystem
::
HKL
;
const
std
::
string
algorithmName
=
"foo"
;
const
int
algorithmVersion
=
3
;
...
...
Framework/DataObjects/test/PeakShapeSphericalTest.h
View file @
452b0099
...
...
@@ -36,7 +36,7 @@ public:
void
test_constructor
()
{
const
double
radius
=
2
;
const
SpecialCoordinateSystem
frame
=
HKL
;
const
SpecialCoordinateSystem
frame
=
SpecialCoordinateSystem
::
HKL
;
const
std
::
string
algorithmName
=
"foo"
;
const
int
algorithmVersion
=
3
;
...
...
@@ -55,7 +55,7 @@ public:
const
double
radius
=
2
;
const
double
backgroundInnerRadius
=
3
;
const
double
backgroundOuterRadius
=
4
;
const
SpecialCoordinateSystem
frame
=
HKL
;
const
SpecialCoordinateSystem
frame
=
SpecialCoordinateSystem
::
HKL
;
const
std
::
string
algorithmName
=
"foo"
;
const
int
algorithmVersion
=
3
;
...
...
@@ -97,7 +97,7 @@ public:
const
double
radius
=
2
;
const
double
backgroundInnerRadius
=
3
;
const
double
backgroundOuterRadius
=
4
;
const
SpecialCoordinateSystem
frame
=
HKL
;
const
SpecialCoordinateSystem
frame
=
SpecialCoordinateSystem
::
HKL
;
const
std
::
string
algorithmName
=
"foo"
;
const
int
algorithmVersion
=
3
;
...
...
@@ -119,7 +119,7 @@ public:
const
double
radius
=
2
;
const
double
backgroundInnerRadius
=
3
;
const
double
backgroundOuterRadius
=
4
;
const
SpecialCoordinateSystem
frame
=
HKL
;
const
SpecialCoordinateSystem
frame
=
SpecialCoordinateSystem
::
HKL
;
const
std
::
string
algorithmName
=
"foo"
;
const
int
algorithmVersion
=
3
;
...
...
@@ -146,7 +146,7 @@ public:
const
double
radius
=
2
;
const
double
backgroundInnerRadius
=
3
;
const
double
backgroundOuterRadius
=
4
;
const
SpecialCoordinateSystem
frame
=
HKL
;
const
SpecialCoordinateSystem
frame
=
SpecialCoordinateSystem
::
HKL
;
const
std
::
string
algorithmName
=
"foo"
;
const
int
algorithmVersion
=
3
;
...
...
@@ -169,7 +169,7 @@ public:
void
test_toJSON
()
{
const
double
radius
=
2
;
const
SpecialCoordinateSystem
frame
=
HKL
;
const
SpecialCoordinateSystem
frame
=
SpecialCoordinateSystem
::
HKL
;
const
std
::
string
algorithmName
=
"foo"
;
const
int
algorithmVersion
=
3
;
...
...
@@ -191,7 +191,7 @@ public:
const
double
radius
=
2
;
const
double
backgroundInnerRadius
=
3
;
const
double
backgroundOuterRadius
=
4
;
const
SpecialCoordinateSystem
frame
=
HKL
;
const
SpecialCoordinateSystem
frame
=
SpecialCoordinateSystem
::
HKL
;
const
std
::
string
algorithmName
=
"foo"
;
const
int
algorithmVersion
=
3
;
...
...
@@ -240,7 +240,7 @@ public:
void
test_shape_name
()
{
const
double
radius
=
1
;
const
SpecialCoordinateSystem
frame
=
HKL
;
const
SpecialCoordinateSystem
frame
=
SpecialCoordinateSystem
::
HKL
;
// Construct it.
PeakShapeSpherical
shape
(
radius
,
frame
);
...
...
Framework/MDAlgorithms/inc/MantidMDAlgorithms/PrecompiledHeader.h
View file @
452b0099
...
...
@@ -7,4 +7,6 @@
#pragma once
#include
"MantidAPI/Algorithm.h"
#include
"MantidDataObjects/EventWorkspace.h"
#include
"MantidDataObjects/MDEventWorkspace.h"
#include
"MantidKernel/Exception.h"
Framework/MDAlgorithms/src/SmoothMD.cpp
View file @
452b0099
...
...
@@ -57,7 +57,9 @@ namespace {
* @return function map
*/
SmoothFunctionMap
makeFunctionMap
(
Mantid
::
MDAlgorithms
::
SmoothMD
*
instance
)
{
using
namespace
std
::
placeholders
;
using
std
::
placeholders
::
_1
;
using
std
::
placeholders
::
_2
;
using
std
::
placeholders
::
_3
;
return
{
{
"Hat"
,
std
::
bind
(
&
Mantid
::
MDAlgorithms
::
SmoothMD
::
hatSmooth
,
instance
,
_1
,
_2
,
_3
)},
...
...
Framework/MDAlgorithms/src/ThresholdMD.cpp
View file @
452b0099
...
...
@@ -105,9 +105,10 @@ void ThresholdMD::exec() {
using
namespace
std
::
placeholders
;
boost
::
function
<
bool
(
double
)
>
comparitor
=
std
::
bind
(
std
::
less
<
double
>
(),
_1
,
referenceValue
);
std
::
bind
(
std
::
less
<
double
>
(),
std
::
placeholders
::
_1
,
referenceValue
);
if
(
condition
==
GreaterThan
())
{
comparitor
=
std
::
bind
(
std
::
greater
<
double
>
(),
_1
,
referenceValue
);
comparitor
=
std
::
bind
(
std
::
greater
<
double
>
(),
std
::
placeholders
::
_1
,
referenceValue
);
}
Progress
prog
(
this
,
0.0
,
1.0
,
100
);
...
...
Framework/MDAlgorithms/test/PrecompiledHeader.h
View file @
452b0099
...
...
@@ -6,6 +6,11 @@
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
// Mantid
#include
"MantidAPI/AnalysisDataService.h"
#include
"MantidTestHelpers/MDEventsTestHelper.h"
#include
"MantidTestHelpers/WorkspaceCreationHelper.h"
// cxxtest
#include
<cxxtest/WrappedTestSuite.h>
...
...
Framework/PythonInterface/core/CMakeLists.txt
View file @
452b0099
...
...
@@ -64,6 +64,10 @@ set(INC_FILES
inc/MantidPythonInterface/core/Policies/VectorToNumpy.h
)
# Add a precompiled header where they are supported
enable_precompiled_headers
(
inc/MantidPythonInterface/core/PrecompiledHeader.h SRC_FILES
)
# Add the target for this directory
set
(
_target_name PythonInterfaceCore
)
add_library
(
${
_target_name
}
${
SRC_FILES
}
${
INC_FILES
}
)
...
...
Framework/PythonInterface/core/inc/MantidPythonInterface/core/PrecompiledHeader.h
0 → 100644
View file @
452b0099
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2021 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
// STL
#include
<memory>
#include
<string>
#include
<boost/python/class.hpp>
#include
<boost/python/dict.hpp>
#include
<boost/python/extract.hpp>
#include
<boost/python/list.hpp>
Framework/PythonInterface/mantid/api/CMakeLists.txt
View file @
452b0099
...
...
@@ -120,10 +120,14 @@ set(INC_FILES
inc/MantidPythonInterface/api/WorkspacePropertyExporter.h
)
# Add a precompiled header where they are supported
list
(
APPEND ALL_FILES
${
EXPORT_FILES
}
${
SRC_FILES
}
)
enable_precompiled_headers
(
inc/MantidPythonInterface/api/PrecompiledHeader.h ALL_FILES
)
# Create the target for this directory
add_library
(
PythonAPIModule
${
EXPORT
_FILES
}
${
MODULE_DEFINITION
}
${
SRC_FILES
}
PythonAPIModule
${
ALL
_FILES
}
${
MODULE_DEFINITION
}
${
INC_FILES
}
${
PYTHON_INSTALL_FILES
}
)
set_python_properties
(
PythonAPIModule _api
)
...
...
Framework/PythonInterface/mantid/api/inc/MantidPythonInterface/api/PrecompiledHeader.h
0 → 100644
View file @
452b0099
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2021 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include
"MantidAPI/Algorithm.h"
// STL
// Boost
#include
<boost/mpl/and.hpp>
#include
<boost/mpl/if.hpp>
#include
<boost/optional.hpp>
#include
<boost/python/call_method.hpp>
#include
<boost/python/class.hpp>
#include
<boost/python/copy_const_reference.hpp>
#include
<boost/python/def.hpp>
#include
<boost/python/dict.hpp>
#include
<boost/python/enum.hpp>
#include
<boost/python/make_constructor.hpp>
#include
<boost/python/make_function.hpp>
#include
<boost/python/object.hpp>
#include
<boost/python/overloads.hpp>
#include
<boost/python/register_ptr_to_python.hpp>
#include
<boost/python/return_value_policy.hpp>
#include
<boost/python/tuple.hpp>
#include
<boost/python/wrapper.hpp>
Framework/PythonInterface/mantid/geometry/CMakeLists.txt
View file @
452b0099
...
...
@@ -58,9 +58,13 @@ set(INC_FILES inc/MantidPythonInterface/geometry/ComponentInfoPythonIterator.h
inc/MantidPythonInterface/geometry/DetectorInfoPythonIterator.h
)
# Add a precompiled header where they are supported
list
(
APPEND ALL_FILES
${
EXPORT_FILES
}
${
SRC_FILES
}
)
enable_precompiled_headers
(
inc/MantidPythonInterface/geometry/PrecompiledHeader.h ALL_FILES
)
# Create the target for this directory
add_library
(
PythonGeometryModule
${
EXPORT
_FILES
}
${
MODULE_DEFINITION
}
${
SRC_FILES
}
PythonGeometryModule
${
ALL
_FILES
}
${
MODULE_DEFINITION
}
${
INC_FILES
}
${
PYTHON_INSTALL_FILES
}
)
set_python_properties
(
PythonGeometryModule _geometry
)
...
...
Framework/PythonInterface/mantid/geometry/inc/MantidPythonInterface/geometry/PrecompiledHeader.h
0 → 100644
View file @
452b0099
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2021 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
// STL
#include
<boost/python/class.hpp>
#include
<boost/python/copy_const_reference.hpp>
#include
<boost/python/def.hpp>
#include
<boost/python/default_call_policies.hpp>
#include
<boost/python/dict.hpp>
#include
<boost/python/enum.hpp>
#include
<boost/python/make_constructor.hpp>
#include
<boost/python/make_function.hpp>
#include
<boost/python/overloads.hpp>
#include
<boost/python/register_ptr_to_python.hpp>
#include
<boost/python/return_value_policy.hpp>
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment