From 9206f0221c891a5268b34e134c353034655110b3 Mon Sep 17 00:00:00 2001
From: pospelov <pospelov@fz-juelich.de>
Date: Sat, 6 Apr 2013 17:19:37 +0200
Subject: [PATCH] Repairing build for JCNS

---
 Core/Samples/inc/Layer.h                                 | 5 +++--
 Tests/FunctionalTests/TestCore/IsGISAXS03/IsGISAXS03.cpp | 3 ++-
 shared.pri                                               | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Core/Samples/inc/Layer.h b/Core/Samples/inc/Layer.h
index dbf75cf0208..fd2f73c9bb9 100644
--- a/Core/Samples/inc/Layer.h
+++ b/Core/Samples/inc/Layer.h
@@ -44,7 +44,8 @@ class Layer : public ICompositeSample
 
     virtual ~Layer() {}
 
-    virtual Layer *clone() const { return new Layer(*this); }
+    //virtual Layer *clone() const { return new Layer(*this); }
+    virtual Layer *clone() const { return new Layer(mp_material, m_thickness); }
 
     //! Sets layer thickness in Angstrom.
     virtual void setThickness(double thickness);
@@ -76,7 +77,7 @@ class Layer : public ICompositeSample
     virtual LayerDWBASimulation *createDWBASimulation() const { return 0; }
 
  protected:
-    Layer(const Layer& other)
+    Layer(const Layer& other) : ICompositeSample()
     {
         mp_material = other.mp_material;
         m_thickness = other.m_thickness;
diff --git a/Tests/FunctionalTests/TestCore/IsGISAXS03/IsGISAXS03.cpp b/Tests/FunctionalTests/TestCore/IsGISAXS03/IsGISAXS03.cpp
index 176899bb585..a92e0fd2303 100644
--- a/Tests/FunctionalTests/TestCore/IsGISAXS03/IsGISAXS03.cpp
+++ b/Tests/FunctionalTests/TestCore/IsGISAXS03/IsGISAXS03.cpp
@@ -111,7 +111,8 @@ void FunctionalTests::IsGISAXS03::runBA_Size()
     Particle nano_particle(n_particle, p_ff_cylinder);
     // radius of nanoparticles will be sampled with gaussian probability
     int nbins(100), nfwhm(2);
-    StochasticSampledParameter par(StochasticDoubleGaussian(radius, sigma), nbins, nfwhm);
+    StochasticDoubleGaussian double_gaussian(radius, sigma);
+    StochasticSampledParameter par(double_gaussian, nbins, nfwhm);
     ParticleBuilder builder;
     builder.setPrototype(nano_particle,"/Particle/FormFactorCylinder/radius", par);
     builder.plantParticles(particle_decoration);
diff --git a/shared.pri b/shared.pri
index ed3e5620c7a..1c206d34abb 100644
--- a/shared.pri
+++ b/shared.pri
@@ -177,7 +177,6 @@ CONFIG(BORNAGAIN_ROOT) {
 # -----------------------------------------------------------------------------
 CONFIG  += BORNAGAIN_PYTHON
 CONFIG(BORNAGAIN_PYTHON) {
-  # TODO - implement check for existance of numpy/arrayobject.h
   # user wants to compile python module
   WhichPython=$$system(which python)
   isEmpty(WhichPython) {
@@ -200,6 +199,7 @@ CONFIG(BORNAGAIN_PYTHON) {
 
     # we need to know the location of numpy
     pythonnumpy=$$system("python -c 'import sys; import numpy; sys.stdout.write(numpy.get_include())'")
+    !exists($$pythonnumpy/numpy/arrayobject.h): error("Can't find numpy/arrayobject.h in $$pythonnumpy, you have to install python-numpy-devel")
     INCLUDEPATH += $$pythonnumpy
   }
 }
-- 
GitLab