diff --git a/Core/HardParticle/FormFactorPolyhedron.h b/Core/HardParticle/FormFactorPolyhedron.h index 362c4e03c126f8a95488e2a9e1fc3d173a6cc63f..d449443425c1a860561a20e89e1ef66f13b6b9ee 100644 --- a/Core/HardParticle/FormFactorPolyhedron.h +++ b/Core/HardParticle/FormFactorPolyhedron.h @@ -149,7 +149,7 @@ protected: //! A polygonal surface, for testing form factor computations. -class FormFactorPolygonalSurface : public IFormFactorBorn { +class BA_CORE_API_ FormFactorPolygonalSurface : public IFormFactorBorn { public: FormFactorPolygonalSurface() {} diff --git a/Core/InputOutput/OutputDataReader.cpp b/Core/InputOutput/OutputDataReader.cpp index 4e4a6892ff2b26a0b23ad84bcc5e146290b272b0..bba5ac55f03fabadf9e5fbf0895ebc526a5ed3ee 100644 --- a/Core/InputOutput/OutputDataReader.cpp +++ b/Core/InputOutput/OutputDataReader.cpp @@ -18,9 +18,11 @@ #include "DataFormatUtils.h" #ifdef _WIN32 #pragma warning ( push ) -#pragma warning ( disable: 4244 ) +#pragma warning ( disable: 4244 4275 ) #include "boost_streams.h" #pragma warning ( pop ) +#else +#include "boost_streams.h" #endif #include <fstream> diff --git a/Core/InputOutput/OutputDataWriter.cpp b/Core/InputOutput/OutputDataWriter.cpp index 11adaae1d2a1d829676d59018778224b3c69115b..696109bdbd192bc586a374b1b0c82fea97734e99 100644 --- a/Core/InputOutput/OutputDataWriter.cpp +++ b/Core/InputOutput/OutputDataWriter.cpp @@ -18,9 +18,11 @@ #include "DataFormatUtils.h" #ifdef _WIN32 #pragma warning ( push ) -#pragma warning ( disable: 4244 ) +#pragma warning ( disable: 4244 4275 ) #include "boost_streams.h" #pragma warning ( pop ) +#else +#include "boost_streams.h" #endif #include <fstream> diff --git a/Tests/Functional/Core/CoreIO/CMakeLists.txt b/Tests/Functional/Core/CoreIO/CMakeLists.txt index f668e9e03f17705a4cb50b2a3b69173a32da4d4b..3a583bac86c191f6af3b0d8434fc3694c0d05468 100644 --- a/Tests/Functional/Core/CoreIO/CMakeLists.txt +++ b/Tests/Functional/Core/CoreIO/CMakeLists.txt @@ -3,5 +3,5 @@ set(test CoreIO) add_executable(${test} main.cpp CoreIOTest.h CoreIOTest.cpp Benchmark.h Benchmark.cpp) -target_link_libraries(${test} BornAgainCore) +target_link_libraries(${test} BornAgainCore BornAgainTestMachinery) #add_test(CoreSpecial/${test} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${test}) diff --git a/Tests/Functional/TestMachinery/IFunctionalTest.h b/Tests/Functional/TestMachinery/IFunctionalTest.h index 6505504681a498aec9f6db8cafcd471a0add0a59..d75b5f89124f10257ea76fd3ac32cdd9135a9ca3 100644 --- a/Tests/Functional/TestMachinery/IFunctionalTest.h +++ b/Tests/Functional/TestMachinery/IFunctionalTest.h @@ -22,7 +22,7 @@ //! Base class for all functional tests. //! @class IFunctionalTest -class IFunctionalTest : public INamed +class BA_CORE_API_ IFunctionalTest : public INamed { public: IFunctionalTest() {} diff --git a/Tests/UnitTests/Core/Axes/main.cpp b/Tests/UnitTests/Core/Axes/main.cpp index ed92ed56900f529ad204d8b1754056a4ab11f758..a747eaaeff4ae7684086628fc1fd21df4d8f93c7 100644 --- a/Tests/UnitTests/Core/Axes/main.cpp +++ b/Tests/UnitTests/Core/Axes/main.cpp @@ -1,7 +1,15 @@ #ifdef _MSC_VER #define _VARIADIC_MAX 10 #endif + +#ifdef _WIN32 +#pragma warning ( push ) +#pragma warning ( disable: 4275 ) +#include <gtest/gtest.h> +#pragma warning ( pop ) +#else #include <gtest/gtest.h> +#endif #include "testlist.h" #include "ErrorStreamRedirect.h" diff --git a/Tests/UnitTests/Core/DataStructure/main.cpp b/Tests/UnitTests/Core/DataStructure/main.cpp index ed92ed56900f529ad204d8b1754056a4ab11f758..a747eaaeff4ae7684086628fc1fd21df4d8f93c7 100644 --- a/Tests/UnitTests/Core/DataStructure/main.cpp +++ b/Tests/UnitTests/Core/DataStructure/main.cpp @@ -1,7 +1,15 @@ #ifdef _MSC_VER #define _VARIADIC_MAX 10 #endif + +#ifdef _WIN32 +#pragma warning ( push ) +#pragma warning ( disable: 4275 ) +#include <gtest/gtest.h> +#pragma warning ( pop ) +#else #include <gtest/gtest.h> +#endif #include "testlist.h" #include "ErrorStreamRedirect.h" diff --git a/Tests/UnitTests/Core/Detector/main.cpp b/Tests/UnitTests/Core/Detector/main.cpp index ed92ed56900f529ad204d8b1754056a4ab11f758..a747eaaeff4ae7684086628fc1fd21df4d8f93c7 100644 --- a/Tests/UnitTests/Core/Detector/main.cpp +++ b/Tests/UnitTests/Core/Detector/main.cpp @@ -1,7 +1,15 @@ #ifdef _MSC_VER #define _VARIADIC_MAX 10 #endif + +#ifdef _WIN32 +#pragma warning ( push ) +#pragma warning ( disable: 4275 ) +#include <gtest/gtest.h> +#pragma warning ( pop ) +#else #include <gtest/gtest.h> +#endif #include "testlist.h" #include "ErrorStreamRedirect.h" diff --git a/Tests/UnitTests/Core/ExportToPython/main.cpp b/Tests/UnitTests/Core/ExportToPython/main.cpp index ed92ed56900f529ad204d8b1754056a4ab11f758..a747eaaeff4ae7684086628fc1fd21df4d8f93c7 100644 --- a/Tests/UnitTests/Core/ExportToPython/main.cpp +++ b/Tests/UnitTests/Core/ExportToPython/main.cpp @@ -1,7 +1,15 @@ #ifdef _MSC_VER #define _VARIADIC_MAX 10 #endif + +#ifdef _WIN32 +#pragma warning ( push ) +#pragma warning ( disable: 4275 ) +#include <gtest/gtest.h> +#pragma warning ( pop ) +#else #include <gtest/gtest.h> +#endif #include "testlist.h" #include "ErrorStreamRedirect.h" diff --git a/Tests/UnitTests/Core/Fresnel/main.cpp b/Tests/UnitTests/Core/Fresnel/main.cpp index ed92ed56900f529ad204d8b1754056a4ab11f758..a747eaaeff4ae7684086628fc1fd21df4d8f93c7 100644 --- a/Tests/UnitTests/Core/Fresnel/main.cpp +++ b/Tests/UnitTests/Core/Fresnel/main.cpp @@ -1,7 +1,15 @@ #ifdef _MSC_VER #define _VARIADIC_MAX 10 #endif + +#ifdef _WIN32 +#pragma warning ( push ) +#pragma warning ( disable: 4275 ) +#include <gtest/gtest.h> +#pragma warning ( pop ) +#else #include <gtest/gtest.h> +#endif #include "testlist.h" #include "ErrorStreamRedirect.h" diff --git a/Tests/UnitTests/Core/Numeric0/main.cpp b/Tests/UnitTests/Core/Numeric0/main.cpp index ed92ed56900f529ad204d8b1754056a4ab11f758..a747eaaeff4ae7684086628fc1fd21df4d8f93c7 100644 --- a/Tests/UnitTests/Core/Numeric0/main.cpp +++ b/Tests/UnitTests/Core/Numeric0/main.cpp @@ -1,7 +1,15 @@ #ifdef _MSC_VER #define _VARIADIC_MAX 10 #endif + +#ifdef _WIN32 +#pragma warning ( push ) +#pragma warning ( disable: 4275 ) +#include <gtest/gtest.h> +#pragma warning ( pop ) +#else #include <gtest/gtest.h> +#endif #include "testlist.h" #include "ErrorStreamRedirect.h" diff --git a/Tests/UnitTests/Core/Numeric1/main.cpp b/Tests/UnitTests/Core/Numeric1/main.cpp index ed92ed56900f529ad204d8b1754056a4ab11f758..a747eaaeff4ae7684086628fc1fd21df4d8f93c7 100644 --- a/Tests/UnitTests/Core/Numeric1/main.cpp +++ b/Tests/UnitTests/Core/Numeric1/main.cpp @@ -1,7 +1,15 @@ #ifdef _MSC_VER #define _VARIADIC_MAX 10 #endif + +#ifdef _WIN32 +#pragma warning ( push ) +#pragma warning ( disable: 4275 ) +#include <gtest/gtest.h> +#pragma warning ( pop ) +#else #include <gtest/gtest.h> +#endif #include "testlist.h" #include "ErrorStreamRedirect.h" diff --git a/Tests/UnitTests/Core/Other/main.cpp b/Tests/UnitTests/Core/Other/main.cpp index ed92ed56900f529ad204d8b1754056a4ab11f758..a747eaaeff4ae7684086628fc1fd21df4d8f93c7 100644 --- a/Tests/UnitTests/Core/Other/main.cpp +++ b/Tests/UnitTests/Core/Other/main.cpp @@ -1,7 +1,15 @@ #ifdef _MSC_VER #define _VARIADIC_MAX 10 #endif + +#ifdef _WIN32 +#pragma warning ( push ) +#pragma warning ( disable: 4275 ) +#include <gtest/gtest.h> +#pragma warning ( pop ) +#else #include <gtest/gtest.h> +#endif #include "testlist.h" #include "ErrorStreamRedirect.h" diff --git a/Tests/UnitTests/Core/Parameters/main.cpp b/Tests/UnitTests/Core/Parameters/main.cpp index ed92ed56900f529ad204d8b1754056a4ab11f758..a747eaaeff4ae7684086628fc1fd21df4d8f93c7 100644 --- a/Tests/UnitTests/Core/Parameters/main.cpp +++ b/Tests/UnitTests/Core/Parameters/main.cpp @@ -1,7 +1,15 @@ #ifdef _MSC_VER #define _VARIADIC_MAX 10 #endif + +#ifdef _WIN32 +#pragma warning ( push ) +#pragma warning ( disable: 4275 ) +#include <gtest/gtest.h> +#pragma warning ( pop ) +#else #include <gtest/gtest.h> +#endif #include "testlist.h" #include "ErrorStreamRedirect.h" diff --git a/Tests/UnitTests/Core/Sample/main.cpp b/Tests/UnitTests/Core/Sample/main.cpp index ed92ed56900f529ad204d8b1754056a4ab11f758..a747eaaeff4ae7684086628fc1fd21df4d8f93c7 100644 --- a/Tests/UnitTests/Core/Sample/main.cpp +++ b/Tests/UnitTests/Core/Sample/main.cpp @@ -1,7 +1,15 @@ #ifdef _MSC_VER #define _VARIADIC_MAX 10 #endif + +#ifdef _WIN32 +#pragma warning ( push ) +#pragma warning ( disable: 4275 ) +#include <gtest/gtest.h> +#pragma warning ( pop ) +#else #include <gtest/gtest.h> +#endif #include "testlist.h" #include "ErrorStreamRedirect.h" diff --git a/Tests/UnitTests/Fit/0/main.cpp b/Tests/UnitTests/Fit/0/main.cpp index ed92ed56900f529ad204d8b1754056a4ab11f758..a747eaaeff4ae7684086628fc1fd21df4d8f93c7 100644 --- a/Tests/UnitTests/Fit/0/main.cpp +++ b/Tests/UnitTests/Fit/0/main.cpp @@ -1,7 +1,15 @@ #ifdef _MSC_VER #define _VARIADIC_MAX 10 #endif + +#ifdef _WIN32 +#pragma warning ( push ) +#pragma warning ( disable: 4275 ) +#include <gtest/gtest.h> +#pragma warning ( pop ) +#else #include <gtest/gtest.h> +#endif #include "testlist.h" #include "ErrorStreamRedirect.h" diff --git a/ThirdParty/Fit/RootMinimizers/CMakeLists.txt b/ThirdParty/Fit/RootMinimizers/CMakeLists.txt index 0676e6743fbef0044c9e381d9808b9c5a23edc84..f7e3514693fcd4289ada276b1c18239f415a18c5 100644 --- a/ThirdParty/Fit/RootMinimizers/CMakeLists.txt +++ b/ThirdParty/Fit/RootMinimizers/CMakeLists.txt @@ -28,7 +28,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMATH_NO_PLUGIN_MANAGER -DHAS_MINUIT2 - if(NOT WIN32) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") else() - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /w") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4267") endif() # --- making library ------------ diff --git a/ThirdParty/common/gtest/CMakeLists.txt b/ThirdParty/common/gtest/CMakeLists.txt index ed2b9a0b9cd3ddc47e6610aa794d301f1e454bb9..61ea39b6f5c36d4968e68821df7f3bfa42d60b40 100644 --- a/ThirdParty/common/gtest/CMakeLists.txt +++ b/ThirdParty/common/gtest/CMakeLists.txt @@ -6,7 +6,7 @@ if(POLICY CMP0042) endif() if(MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_VARIADIC_MAX=10 /wd4100") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_VARIADIC_MAX=10 /wd4100 /wd4275") endif() option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." ON)