Skip to content
Snippets Groups Projects
Commit fc357bbb authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

OpenSuse: defence against missed numpy/arrayobject.h

parent 01d594da
No related branches found
No related tags found
No related merge requests found
......@@ -22,3 +22,4 @@ TestCore.depends = ThirdParty/gtest
TestCore.depends = ThirdParty/gtest
CONFIG += ordered # compilation in lister order
......@@ -8,6 +8,9 @@ project(BornAgain)
# --- General project settings ---
set(BORNAGAIN_PYTHON ON)
set(BORNAGAIN_APP ON)
set(BORNAGAIN_GUI OFF)
#--- Where to look first for cmake modules ---
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
......@@ -25,7 +28,9 @@ add_subdirectory(Tests/UnitTests/TestCore)
if(ROOT_FOUND)
add_subdirectory(ThirdParty/RootMathMore)
add_subdirectory(Fit)
add_subdirectory(App)
if(BORNAGAIN_APP)
add_subdirectory(App)
endif()
endif()
# functional tests (cmake; make check)
......
......@@ -28,10 +28,13 @@ in \SecRef{Examples}.
Fitting tools provided by the frame work are presented in \SecRef{Fitting}.
\vspace*{2mm}
\colorbox{Lightgray}{\parbox{\linewidth-8\fboxsep}
{\noindent \underline{Icons used in this manual:}
\begin{itemize}
\item[] \smallpencil: this sign highlights further references.
%\item[] {\huge\ding{45}} - \smallpencil \textbf{\smallpencil}: this sign highlights further references.
\item[] {\huge\danger}: this sign highlights essential points.
\end{itemize}}}
%\colorbox{Lightgray}
%{\parbox{\linewidth-8\fboxsep}
%{\noindent \underline{Icons used in this manual:}
%\begin{itemize}
%\item[] \smallpencil: this sign highlights further references.
%\item[] {\huge\ding{45}} - \smallpencil \textbf{\smallpencil}: this sign highlights further %references.
%\item[] {\huge\danger}: this sign highlights essential points.
%\end{itemize}}}
......@@ -29,7 +29,7 @@ git clone git://apps.jcns.fz-juelich.de/BornAgain.git
{\bf Step III: $~$ building the source}
\begin{lstlisting}[language=shell, style=commandline]
mkdir <build_dir>; cd <build_dir>;
cmake <source_dir> -DCMAKE_INSTALL_PREFFIX=<install_dir>
cmake <source_dir> -DCMAKE_INSTALL_PREFIX=<install_dir>
make
make check
make install
......
No preview for this file type
......@@ -6,7 +6,7 @@
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[scaled=0.8]{beramono} % beramono or luximono give very nice ttfamily fonts
%`\usepackage[scaled=0.8]{beramono} % beramono or luximono give very nice ttfamily fonts
%----------------------------------------------------------------------------------------
% PAGE LAYOUT
......@@ -72,14 +72,13 @@
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{float}
\usepackage{tikz}
\usepackage{tikz-uml}
%\usepackage{tikz}
%\usepackage{tikz-uml}
\usepackage{amsmath}
\usepackage{pifont}
\usepackage{fourier}
\usepackage{dingbat}
%\usepackage{fourier}
%\usepackage{dingbat}
\usepackage{hyperref}
\newcommand{\reffig}[1]{figure \ref{fig:#1}}
......@@ -158,10 +157,10 @@ keepaspectratio]{results2_2.png}%
%\chapter{Working with BornAgain}
\input{Introduction}
\input{QuickStart}
\input{SoftwareArchitecture}
\input{Installation}
%\input{SoftwareArchitecture}
%\input{Installation}
%\input{Fitting}
\input{Examples}
%\input{Examples}
%\input{Appendix}
......
# - Find numpy
# Find the native numpy includes
# This module defines
# NUMPY_INCLUDE_DIR, where to find numpy/arrayobject.h, etc.
......@@ -6,7 +5,7 @@
if (NUMPY_INCLUDE_DIR)
# in cache already
set (NUMPY_FIND_QUIETLY TRUE)
set (Numpy_FIND_QUIETLY TRUE)
endif (NUMPY_INCLUDE_DIR)
EXEC_PROGRAM ("${PYTHON_EXECUTABLE}"
......@@ -14,23 +13,29 @@ EXEC_PROGRAM ("${PYTHON_EXECUTABLE}"
OUTPUT_VARIABLE NUMPY_INCLUDE_DIR
RETURN_VALUE NUMPY_NOT_FOUND)
if (NUMPY_INCLUDE_DIR MATCHES "Traceback")
# Did not successfully include numpy
set(NUMPY_FOUND FALSE)
else (NUMPY_INCLUDE_DIR MATCHES "Traceback")
# successful
set (NUMPY_FOUND TRUE)
set (NUMPY_INCLUDE_DIR ${NUMPY_INCLUDE_DIR} CACHE STRING "Numpy include path")
endif (NUMPY_INCLUDE_DIR MATCHES "Traceback")
# Did not successfully include numpy
set(NUMPY_FOUND FALSE)
else()
# successful
if(NOT EXISTS ${NUMPY_INCLUDE_DIR}/numpy/arrayobject.h)
message(STATUS "Can't find numpy/arrayobject.h, please install python-numpy-devel package")
else()
set (NUMPY_FOUND TRUE)
set (NUMPY_INCLUDE_DIR ${NUMPY_INCLUDE_DIR} CACHE STRING "Numpy include path")
endif()
endif()
if (NUMPY_FOUND)
if (NOT NUMPY_FIND_QUIETLY)
message (STATUS "Numpy headers found")
endif (NOT NUMPY_FIND_QUIETLY)
else (NUMPY_FOUND)
if (NUMPY_FIND_REQUIRED)
message (FATAL_ERROR "Numpy headers missing")
endif (NUMPY_FIND_REQUIRED)
endif (NUMPY_FOUND)
if (NOT Numpy_FIND_QUIETLY)
message (STATUS "Numpy headers found")
endif()
else()
if (Numpy_FIND_REQUIRED)
message (FATAL_ERROR "Numpy headers missing, please install python-numpy-devel package")
endif()
endif()
MARK_AS_ADVANCED (NUMPY_INCLUDE_DIR)
......@@ -50,11 +50,16 @@ if(BORNAGAIN_PYTHON)
find_package(PythonInterp)
find_package(PythonLibs)
include_directories(${PYTHON_INCLUDE_DIRS})
find_package(PythonLibs REQUIRED)
if(PYTHONLIBS_FOUND)
include_directories(${PYTHON_INCLUDE_DIRS})
else()
message(SEND_ERROR "No python libraries have been found")
endif()
find_package(Numpy)
find_package(Numpy REQUIRED)
include_directories(${NUMPY_INCLUDE_DIR})
endif()
# --- ROOT ---
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment