Skip to content
Snippets Groups Projects
Commit e5e2a37b authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

ctd

parent 1b2e3f59
No related branches found
No related tags found
No related merge requests found
......@@ -8,9 +8,9 @@
set(output_dir ${TEST_OUTPUT_DIR_PY_EXAMPLES})
file(MAKE_DIRECTORY ${output_dir})
file(GLOB sim_examples "${PY_EXAMPLES_DIR}/sim*/*.py")
file(GLOB sim_examples ${PY_EXAMPLES_DIR}/sim*/*.py)
file(GLOB fit_examples
"${PY_EXAMPLES_DIR}/fit55_Specular/FitSpecularBasics.py")
${PY_EXAMPLES_DIR}/fit55_Specular/FitSpecularBasics.py)
set(examples ${sim_examples} ${fit_examples})
set(test_script ${output_dir}/check_functionality.py)
......@@ -21,5 +21,5 @@ foreach(example_path ${examples})
set(test_name PyExamples.${example_name})
add_test(${test_name} ${Python3_EXECUTABLE} ${test_script} ${example_path})
set_tests_properties(${test_name} PROPERTIES LABELS "Fullcheck")
set_tests_properties(${test_name} PROPERTIES LABELS Fullcheck)
endforeach()
# Configure and install the Swig runtime, the BornAgain Python module, and more
if(NOT BORNAGAIN_PYTHON)
message(FATAL_ERROR "PythonAPI included though BORNAGAIN_PYTHON=false")
message(FATAL_ERROR PythonAPI included though BORNAGAIN_PYTHON=false)
endif()
configure_file(${WRAP_DIR}/Python/plot_utils.py
${CMAKE_BINARY_DIR}/lib/bornagain/plot_utils.py COPYONLY)
if(WIN32)
set(BA_MODULES_IMPORT_PATH "../../bin")
set(BA_MODULES_IMPORT_PATH ../../bin)
else()
set(BA_MODULES_IMPORT_PATH "..")
set(BA_MODULES_IMPORT_PATH ..)
endif()
if(BORNAGAIN_APPLE_BUNDLE)
set(BA_MODULES_IMPORT_PATH
lib/BornAgain-${BornAgain_VERSION_MAJOR}.${BornAgain_VERSION_MINOR})
endif()
configure_file("${WRAP_DIR}/Python/__init__.py.in"
"${CMAKE_BINARY_DIR}/lib/bornagain/__init__.py" @ONLY)
configure_file(${WRAP_DIR}/Python/__init__.py.in
${CMAKE_BINARY_DIR}/lib/bornagain/__init__.py @ONLY)
if(CONFIGURE_BINDINGS)
add_custom_command(
......@@ -30,21 +30,21 @@ endif()
add_custom_target(swig_runtime DEPENDS ${AUTO_DIR}/swig_runtime.h)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/Examples/
DESTINATION ${destination_examples} COMPONENT Examples FILES_MATCHING PATTERN "*.py" )
DESTINATION ${destination_examples} COMPONENT Examples FILES_MATCHING PATTERN *.py )
install(DIRECTORY ${CMAKE_SOURCE_DIR}/Examples/
DESTINATION ${destination_examples} COMPONENT Examples FILES_MATCHING PATTERN "README")
DESTINATION ${destination_examples} COMPONENT Examples FILES_MATCHING PATTERN README)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/Examples/
DESTINATION ${destination_examples} COMPONENT Examples FILES_MATCHING PATTERN "*.gz")
DESTINATION ${destination_examples} COMPONENT Examples FILES_MATCHING PATTERN *.gz)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/Examples/
DESTINATION ${destination_examples} COMPONENT Examples FILES_MATCHING PATTERN "*.png")
DESTINATION ${destination_examples} COMPONENT Examples FILES_MATCHING PATTERN *.png)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/Examples/cpp
DESTINATION ${destination_examples} COMPONENT Examples)
install(FILES "${AUTO_DIR}/swig_runtime.h"
install(FILES ${AUTO_DIR}/swig_runtime.h
DESTINATION ${destination_include}/Wrap COMPONENT Headers)
# Install bornagain/__init__.py and utilites
install(DIRECTORY "${CMAKE_BINARY_DIR}/lib/bornagain/"
DESTINATION "${destination_libexec}/bornagain"
install(DIRECTORY ${CMAKE_BINARY_DIR}/lib/bornagain/
DESTINATION ${destination_libexec}/bornagain
COMPONENT Libraries
FILES_MATCHING PATTERN "*.py"
PATTERN "__pycache__" EXCLUDE)
FILES_MATCHING PATTERN *.py
PATTERN __pycache__ EXCLUDE)
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