Commit 10ac4069 authored by David Moxey's avatar David Moxey

Fix various issues

parent 6083e4db
......@@ -288,10 +288,4 @@ MACRO(ADD_NEKPY_EXECUTABLE name source)
INSTALL(FILES ${source} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
FILE(COPY ${source} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
ADD_CUSTOM_TARGET(${name} SOURCES ${source})
ENDMACRO()
MACRO(ADD_NEKPY_TEST testname)
ADD_TEST(NAME python_${testname}
COMMAND $<TARGET_FILE:Tester>
${CMAKE_CURRENT_SOURCE_DIR}/Python/Tests/${testname}.tst)
ENDMACRO()
ENDMACRO()
\ No newline at end of file
......@@ -48,7 +48,12 @@ IF (NEKTAR_BUILD_PYTHON)
SET(TMP_BOOST_LIST ${NEEDED_BOOST_LIBS})
# Now try different versions of the string.
SET(NAMES_TO_TRY python-py${BOOST_PYTHON_VERSION_MAJOR}${BOOST_PYTHON_VERSION_MINOR} python-py${BOOST_PYTHON_VERSION_MAJOR} python${BOOST_PYTHON_VERSION_MAJOR} python)
SET(NAMES_TO_TRY python-py${BOOST_PYTHON_VERSION_MAJOR}${BOOST_PYTHON_VERSION_MINOR}
python-py${BOOST_PYTHON_VERSION_MAJOR}
python${BOOST_PYTHON_VERSION_MAJOR}${BOOST_PYTHON_VERSION_MINOR}
python${BOOST_PYTHON_VERSION_MAJOR}
python
)
FOREACH(BPLIB ${NAMES_TO_TRY})
SET(NEEDED_BOOST_LIBS ${TMP_BOOST_LIST} ${BPLIB})
......@@ -67,7 +72,7 @@ ENDIF()
SET(Boost_NO_BOOST_CMAKE ON)
IF( BOOST_ROOT )
SET(Boost_NO_SYSTEM_PATHS ON)
FIND_PACKAGE( Boost ${MIN_VER} COMPONENTS ${NEEDED_BOOST_LIBS})
FIND_PACKAGE( Boost ${MIN_VER} QUIET COMPONENTS ${NEEDED_BOOST_LIBS})
ELSE ()
SET(TEST_ENV1 $ENV{BOOST_HOME})
SET(TEST_ENV2 $ENV{BOOST_DIR})
......
......@@ -8,7 +8,13 @@
IF (NEKTAR_BUILD_PYTHON)
# Try to find Boost.NumPy
FIND_LIBRARY(BOOST_NUMPY_LIB boost_numpy PATHS ${Boost_LIBRARY_DIRS})
FIND_LIBRARY(BOOST_NUMPY_LIB
NAMES boost_numpy-py${BOOST_PYTHON_VERSION_MAJOR}${BOOST_PYTHON_VERSION_MINOR}
boost_numpy${BOOST_PYTHON_VERSION_MAJOR}${BOOST_PYTHON_VERSION_MINOR}
boost_numpy-py${BOOST_PYTHON_VERSION_MAJOR}
boost_numpy${BOOST_PYTHON_VERSION_MAJOR}
boost_numpy
PATHS ${Boost_LIBRARY_DIRS})
# If we can't find it, pull it from git and compile it
IF (NOT BOOST_NUMPY_LIB)
......@@ -51,4 +57,6 @@ IF (NEKTAR_BUILD_PYTHON)
FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/NekPy)
FILE(WRITE ${CMAKE_BINARY_DIR}/NekPy/__init__.py "# placeholder")
MARK_AS_ADVANCED(BOOST_NUMPY_LIB)
ENDIF()
......@@ -58,6 +58,5 @@ ADD_NEKTAR_TEST(StdProject_Diff3D_Hex_Legendre_P6_Q7)
ADD_NEKTAR_TEST(StdProject_Diff3D_Hex_Chebyshev_P6_Q7)
IF (NEKTAR_BUILD_PYTHON)
ADD_NEKPY_EXECUTABLE(StdIntegral2D.py Python/StdIntegral2D.py)
ADD_NEKPY_TEST(StdIntegral2D-python)
SUBDIRS(Python)
ENDIF()
ADD_NEKPY_EXECUTABLE(StdIntegral2D.py StdIntegral2D.py)
ADD_NEKTAR_TEST(StdIntegral2D-python)
<?xml version="1.0" encoding="utf-8" ?>
<test>
<description> Std Projection in 1D </description>
<executable python="true"> StdProject1D.py </executable>
<description> Integral in standard 2D quad region </description>
<executable python="true"> StdIntegral2D.py </executable>
<parameters></parameters>
<metrics>
<metric type="regex" id="1">
<regex>.*error = ([-+]?\d*\.?\d+[eE]-+]?\d+)?$</regex>
<regex>.*error.*= ([-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)$</regex>
<matches>
<match>
<field id="0" tolerance="1e-12">4.44089e-16</field>
......
......@@ -228,7 +228,7 @@ int main(int argc, char *argv[])
if (file.IsPythonTest())
{
command += "PYTHONPATH=\"@BUILD_PATH\" ";
command += "PYTHONPATH=\"@CMAKE_BINARY_DIR@\" ";
command += "@PYTHON_EXECUTABLE@ ";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment