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
e49aed41
Commit
e49aed41
authored
Jul 27, 2021
by
Stephen Smith
Committed by
Stephen
Jul 29, 2021
Browse files
Fix test targets
parent
ef27a939
Changes
29
Hide whitespace changes
Inline
Side-by-side
Framework/API/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -3,8 +3,7 @@ if(CXXTEST_FOUND)
${
CXXTEST_INCLUDE_DIR
}
)
include_directories
(
../../TestHelpers/inc ../../Nexus/inc
${
HDF5_INCLUDE_DIRS
}
)
include_directories
(
../../TestHelpers/inc
)
# This variable is used within the cxxtest_add_test macro to build these
# helper classes into the test executable. It will go out of scope at the end
# of this file so doesn't need un-setting
...
...
@@ -21,17 +20,13 @@ if(CXXTEST_FOUND)
set
(
BCRYPT bcrypt
)
endif
()
target_link_libraries
(
APITest
LINK_PRIVATE
${
MANTIDLIBS
}
${
BCRYPT
}
Types
API
Nexus
${
JSONCPP_LIBRARIES
}
${
NEXUS_LIBRARIES
}
${
MUPARSER_LIBRARIES
}
PRIVATE
Mantid::Types
Mantid::API
Mantid::Nexus
Python::Python
gmock
${
BCRYPT
}
)
add_dependencies
(
FrameworkTests APITest
)
...
...
Framework/Algorithms/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -26,10 +26,7 @@ if(CXXTEST_FOUND)
configure_file
(
PlusMinusTest.in.h
${
CMAKE_CURRENT_SOURCE_DIR
}
/MinusTest.h
)
# Make the rest of the tests
include_directories
(
../../CurveFitting/inc
../../DataHandling/inc
../../Nexus/inc
../../TestHelpers/inc
)
include_directories
(
../../TestHelpers/inc
)
# This variable is used within the cxxtest_add_test macro to build these
# helper classes into the test executable. It will go out of scope at the end
# of this file so doesn't need un-setting
...
...
@@ -52,15 +49,20 @@ if(CXXTEST_FOUND)
set
(
BCRYPT bcrypt
)
endif
()
target_link_libraries
(
AlgorithmsTest
LINK_PRIVATE
${
MANTIDLIBS
}
Algorithms
DataHandling
CurveFitting
Nexus
PRIVATE
Mantid::Algorithms
Mantid::DataHandling
Mantid::CurveFitting
Mantid::Nexus
Mantid::NexusGeometry
Mantid::Geometry
Mantid::API
Mantid::DataObjects
Mantid::Kernel
Boost::boost
Boost::filesystem
${
BCRYPT
}
gmock
)
gmock
)
add_dependencies
(
AlgorithmsTest Crystal CurveFitting
)
add_dependencies
(
FrameworkTests AlgorithmsTest
)
# Test data
...
...
Framework/Algorithms/test/TransposeTest.h
View file @
e49aed41
...
...
@@ -15,6 +15,8 @@
#include
"MantidDataHandling/LoadRaw3.h"
#include
"MantidDataObjects/RebinnedOutput.h"
#include
<boost/math/special_functions/fpclassify.hpp>
using
namespace
Mantid
::
Kernel
;
using
namespace
Mantid
::
API
;
using
namespace
Mantid
::
Algorithms
;
...
...
Framework/Beamline/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -4,19 +4,14 @@ if(CXXTEST_FOUND)
../../TestHelpers/inc
)
cxxtest_add_test
(
BeamlineTest
${
TEST_FILES
}
${
GMOCK_TEST_FILES
}
)
target_include_directories
(
BeamlineTest SYSTEM PRIVATE
${
Boost_INCLUDE_DIRS
}
)
target_link_libraries
(
BeamlineTest
PRIVATE
Beamline
Kernel
${
Boost_LIBRARIES
}
Mantid::Beamline
Mantid::Kernel
gmock
)
if
(
OpenMP_CXX_FOUND
)
# Access to config service is required
target_link_libraries
(
BeamlineTest PRIVATE Kernel
)
endif
()
add_dependencies
(
FrameworkTests BeamlineTest
)
# Add to the 'FrameworkTests' group in VS
...
...
Framework/CMakeLists.txt
View file @
e49aed41
...
...
@@ -5,13 +5,6 @@ if(stdint)
add_definitions
(
-DHAVE_STDINT_H
)
endif
()
# Globally-linked libraries variable
# Might just as well link everything to Boost & Poco (found in CommonSetup)
# Boost_LIBRARIES variable is redefined by MPISetup so capture the value here
# and just add MPI stuff if required
set
(
MANTIDLIBS
${
Boost_LIBRARIES
}
${
POCO_LIBRARIES
}
)
# MPI-enable build setup
# Only available on Linux (specifically RedHat), and for a framework-only build
...
...
Framework/Catalog/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -7,9 +7,8 @@ if(CXXTEST_FOUND)
# The actual test suite
cxxtest_add_test
(
CatalogTest
${
TEST_FILES
}
)
target_link_libraries
(
CatalogTest
LINK_PRIVATE
${
MANTIDLIBS
}
Catalog
PRIVATE
Mantid::Catalog
gmock
)
add_dependencies
(
FrameworkTests CatalogTest
)
...
...
Framework/Crystal/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -3,7 +3,7 @@ if(CXXTEST_FOUND)
${
CXXTEST_INCLUDE_DIR
}
)
include_directories
(
../../DataHandling/inc
../../TestHelpers/inc
)
include_directories
(
../../TestHelpers/inc
)
# This variable is used within the cxxtest_add_test macro to build these
# helper classes into the test executable. It will go out of scope at the end
# of this file so doesn't need un-setting
...
...
@@ -15,12 +15,12 @@ if(CXXTEST_FOUND)
../../TestHelpers/src/MDEventsTestHelper.cpp
)
cxxtest_add_test
(
CrystalTest
${
TEST_FILES
}
)
target_link_libraries
(
CrystalTest
LINK_
PRIVATE
${
MANTIDLIBS
}
Crystal
DataHandling
M
DAlgorithm
s
Nexus
PRIVATE
Mantid::Crystal
Mantid::DataHandling
Mantid::MDAlgorithms
M
antid::Nexu
s
Boost::filesystem
gmock
)
add_dependencies
(
CrystalTest Algorithms CurveFitting
)
...
...
Framework/CurveFitting/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -17,13 +17,11 @@ if(CXXTEST_FOUND)
../../TestHelpers/src/WorkspaceCreationHelper.cpp
)
cxxtest_add_test
(
CurveFittingTest
${
TEST_FILES
}
)
target_link_libraries
(
CurveFittingTest
LINK_PRIVATE
${
MANTIDLIBS
}
CurveFitting
DataHandling
${
GSL_LIBRARIES
}
gmock
)
PRIVATE
Mantid::CurveFitting
Mantid::DataHandling
gmock
)
add_dependencies
(
CurveFittingTest Algorithms
)
add_dependencies
(
FrameworkTests CurveFittingTest
)
# Test data
...
...
Framework/DataHandling/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -21,18 +21,16 @@ if(CXXTEST_FOUND)
../../TestHelpers/src/FileResource.cpp
)
cxxtest_add_test
(
DataHandlingTest
${
TEST_FILES
}
)
target_include_directories
(
DataHandlingTest SYSTEM
PRIVATE
${
HDF5_INCLUDE_DIRS
}
)
target_link_libraries
(
DataHandlingTest
LINK_PRIVATE
${
MANTIDLIBS
}
Catalog
DataHandling
Nexus
HistogramData
${
NEXUS_LIBRARIES
}
${
HDF5_LIBRARIES
}
${
HDF5_HL_LIBRARIES
}
PRIVATE
Mantid::Kernel
Mantid::Catalog
Mantid::DataHandling
Mantid::Nexus
Mantid::NexusGeometry
Mantid::HistogramData
Boost::filesystem
gmock
)
if
(
ENABLE_LIB3MF
)
...
...
Framework/DataObjects/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -21,13 +21,11 @@ if(CXXTEST_FOUND)
cxxtest_add_test
(
DataObjectsTest
${
TEST_FILES
}
)
target_link_libraries
(
DataObjectsTest
LINK_PRIVATE
${
MANTIDLIBS
}
DataObjects
${
NEXUS_LIBRARIES
}
${
JSONCPP_LIBRARIES
}
gmock
)
PRIVATE
Mantid::DataObjects
Mantid::Kernel
Nexus::nexuscpp
gmock
)
# Specify implicit dependency, but don't link to it
add_dependencies
(
FrameworkTests DataObjectsTest
)
# Add to the 'FrameworkTests' group in VS
...
...
Framework/Geometry/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -19,19 +19,13 @@ if(CXXTEST_FOUND)
cxxtest_add_test
(
GeometryTest
${
TEST_FILES
}
${
GMOCK_TEST_FILES
}
)
target_compile_definitions
(
GeometryTest PRIVATE -D_SILENCE_FPOS_SEEKPOS_DEPRECATION_WARNING
)
target_link_libraries
(
GeometryTest
LINK_
PRIVATE
Geometry
Beamline
Types
Kernel
PRIVATE
Mantid::
Geometry
Mantid::
Beamline
Mantid::
Types
Mantid::
Kernel
${
OpenGL_LIBRARIES
}
${
TBB_LIBRARIES
}
${
NEXUS_LIBRARIES
}
${
GSL_LIBRARIES
}
${
Boost_LIBRARIES
}
${
POCO_LIBRARIES
}
gmock
)
gmock
)
add_dependencies
(
FrameworkTests GeometryTest
)
# Add to the 'FrameworkTests' group in VS
...
...
Framework/HistogramData/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -4,19 +4,13 @@ if(CXXTEST_FOUND)
../../TestHelpers/inc
)
cxxtest_add_test
(
HistogramDataTest
${
TEST_FILES
}
${
GMOCK_TEST_FILES
}
)
target_include_directories
(
HistogramDataTest SYSTEM
PRIVATE
${
Boost_INCLUDE_DIRS
}
)
target_link_libraries
(
HistogramDataTest
PRIVATE
HistogramData
Kernel
${
Boost_LIBRARIES
}
Mantid::HistogramData
Mantid::Kernel
gmock
)
if
(
OpenMP_CXX_FOUND
)
# Access to config service is required
target_link_libraries
(
HistogramDataTest PRIVATE Kernel
)
endif
()
add_dependencies
(
FrameworkTests HistogramDataTest
)
# Add to the 'FrameworkTests' group in VS
...
...
Framework/ICat/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -13,9 +13,10 @@ if(CXXTEST_FOUND)
# The actual test suite
cxxtest_add_test
(
ICatTest
${
TEST_FILES
}
)
target_link_libraries
(
ICatTest
LINK_PRIVATE
${
MANTIDLIBS
}
ICat
PRIVATE
Mantid::ICat
Mantid::API
Mantid::DataObjects
gmock
)
add_dependencies
(
FrameworkTests ICatTest
)
...
...
Framework/Indexing/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -11,15 +11,12 @@ if(CXXTEST_FOUND)
cxxtest_add_test
(
IndexingTest
${
TEST_FILES
}
${
GMOCK_TEST_FILES
}
)
target_link_libraries
(
IndexingTest
PRIVATE
${
MANTIDLIBS
}
Indexing
Parallel
Mantid::Types
Mantid::
Indexing
Mantid::
Parallel
gmock
)
if
(
OpenMP_CXX_FOUND
)
# Access to config service is required
target_link_libraries
(
IndexingTest PRIVATE Kernel
)
endif
()
add_dependencies
(
FrameworkTests IndexingTest
)
# Add to the 'FrameworkTests' group in VS
...
...
Framework/Kernel/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -14,16 +14,10 @@ if(CXXTEST_FOUND)
../../TestHelpers/inc
)
target_link_libraries
(
KernelTest
PRIVATE
Types
Kernel
Json
${
NEXUS_LIBRARIES
}
${
Boost_LIBRARIES
}
${
POCO_LIBRARIES
}
gmock
${
JSONCPP_LIBRARIES
}
${
TBB_LIBRARIES
}
${
TBB_MALLOC_LIBRARIES
}
)
Mantid::Types
Mantid::Kernel
Mantid::Json
gmock
)
add_dependencies
(
FrameworkTests KernelTest
)
# Test data
add_dependencies
(
KernelTest StandardTestData
)
...
...
Framework/LiveData/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -20,9 +20,8 @@ if(CXXTEST_FOUND)
cxxtest_add_test
(
LiveDataTest
${
TEST_FILES
}
)
target_link_libraries
(
LiveDataTest
LINK_PRIVATE
${
MANTIDLIBS
}
LiveData
PRIVATE
Mantid::LiveData
gmock
)
target_include_directories
(
LiveDataTest PRIVATE ../src/
)
add_dependencies
(
LiveDataTest DataHandling Algorithms MDAlgorithms
)
...
...
Framework/MDAlgorithms/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -21,16 +21,13 @@ if(CXXTEST_FOUND)
cxxtest_add_test
(
MDAlgorithmsTest
${
TEST_FILES
}
${
GMOCK_TEST_FILES
}
)
target_link_libraries
(
MDAlgorithmsTest
LINK_PRIVATE
${
MANTIDLIBS
}
DataHandling
CurveFitting
MDAlgorithms
Nexus
${
MUPARSER_LIBRARIES
}
gmock
${
NEXUS_LIBRARIES
}
${
HDF5_LIBRARIES
}
)
PRIVATE
Mantid::DataHandling
Mantid::CurveFitting
Mantid::MDAlgorithms
Mantid::Nexus
Mantid::Kernel
gmock
)
add_dependencies
(
MDAlgorithmsTest DataHandling Algorithms CurveFitting
)
add_dependencies
(
FrameworkTests MDAlgorithmsTest
)
...
...
Framework/MPIAlgorithms/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -9,7 +9,7 @@ if(CXXTEST_FOUND)
../../TestHelpers/src/WorkspaceCreationHelper.cpp
)
cxxtest_add_test
(
MPIAlgorithmsTest
${
TEST_FILES
}
)
target_link_libraries
(
MPIAlgorithmsTest MPIAlgorithms
)
target_link_libraries
(
MPIAlgorithmsTest
Mantid::
MPIAlgorithms
)
add_dependencies
(
FrameworkTests MPIAlgorithmsTest
)
# Add to the 'FrameworkTests' group in VS
set_property
(
TARGET MPIAlgorithmsTest PROPERTY FOLDER
"UnitTests"
)
...
...
Framework/Muon/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -8,12 +8,7 @@ if(CXXTEST_FOUND)
endif
()
# Make the tests
include_directories
(
../../Algorithms/inc
../../CurveFitting/inc
../../DataHandling/inc
../../Nexus/inc
../../TestHelpers/inc
../../Muon/inc
)
include_directories
(
../../TestHelpers/inc
)
# This variable is used within the cxxtest_add_test macro to build these
# helper classes into the test executable. It will go out of scope at the end
...
...
@@ -32,14 +27,13 @@ if(CXXTEST_FOUND)
../../TestHelpers/src/MuonGroupingXMLHelper.cpp
)
cxxtest_add_test
(
MuonTest
${
TEST_FILES
}
)
target_link_libraries
(
MuonTest
LINK_PRIVATE
${
MANTIDLIBS
}
Algorithms
DataHandling
Muon
Nexus
PRIVATE
Mantid::Algorithms
Mantid::DataHandling
Mantid::Muon
Mantid::DataObjects
gmock
)
)
add_dependencies
(
MuonTest Crystal CurveFitting
)
add_dependencies
(
FrameworkTests MuonTest
)
# Test data
...
...
Framework/Nexus/test/CMakeLists.txt
View file @
e49aed41
...
...
@@ -3,14 +3,10 @@ if(CXXTEST_FOUND)
cxxtest_add_test
(
NexusTest
${
TEST_FILES
}
)
target_include_directories
(
NexusTest SYSTEM PRIVATE
${
HDF5_INCLUDE_DIRS
}
)
target_link_libraries
(
NexusTest
LINK_PRIVATE
${
MANTIDLIBS
}
Nexus
${
NEXUS_LIBRARIES
}
${
HDF5_LIBRARIES
}
${
HDF5_HL_LIBRARIES
}
PRIVATE
Mantid::API
Mantid::Nexus
gmock
)
add_dependencies
(
FrameworkTests NexusTest
)
add_dependencies
(
NexusTest StandardTestData
)
...
...
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