##// END OF EJS Templates
Initial Pybind11 binding experiment working....
Initial Pybind11 binding experiment working. Can open an amda formatted file from Python and get few attributes from ScalarSeries. Loading module from python works. Embedding python interpreter also works. Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r1339:98271eda8c6e
r1339:98271eda8c6e
Show More
CMakeLists.txt
62 lines | 2.5 KiB | text/plain | TextLexer
Modernized CMake configuration...
r1331 include_directories(include)
FILE (GLOB_RECURSE amdaplugin_SRCS
include/*.h
src/*.cpp
resources/*.qrc
)
Alexandre Leroux
Cmakes for AMDA plugin
r349
Added fuzzy tests and small fixes on meson files...
r1333
set(AMDA_server_type hybrid CACHE STRING "AMDA server type selected at CMake configure time")
set(AMDA_SERVER_TYPE "hybrid;amdatest;localhost" CACHE STRING
"List of possible for AMDA server type")
set_property(CACHE AMDA_server_type PROPERTY STRINGS ${AMDA_SERVER_TYPE})
Initial Pybind11 binding experiment working....
r1339 add_definitions(-DSCIQLOP_AMDA_SERVER="${AMDA_server_type}")
Added fuzzy tests and small fixes on meson files...
r1333
Modernized CMake configuration...
r1331 add_definitions(-DQT_PLUGIN)
add_definitions(-DSCIQLOP_PLUGIN_JSON_FILE_PATH="${CMAKE_CURRENT_SOURCE_DIR}/resources/amda.json")
if(NOT BUILD_SHARED_LIBS)
add_definitions(-DQT_STATICPLUGIN)
endif()
Alexandre Leroux
Cmakes for AMDA plugin
r349
Modernized CMake configuration...
r1331 add_library(amdaplugin ${amdaplugin_SRCS})
SET_TARGET_PROPERTIES(amdaplugin PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
Alexandre Leroux
Cmakes for AMDA plugin
r349
Modernized CMake configuration...
r1331 target_link_libraries(amdaplugin PUBLIC sciqlopgui)
Alexandre Leroux
Cmakes for AMDA plugin
r349
Modernized CMake configuration...
r1331 install(TARGETS amdaplugin
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/SciQlop
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/SciQlop
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
Alexandre Leroux
Cmakes for AMDA plugin
r349
Modernized CMake configuration...
r1331 include(sciqlop_tests)
Alexandre Leroux
Cmakes for AMDA plugin
r349
Modernized CMake configuration...
r1331 add_definitions(-DAMDA_TESTS_RESOURCES_DIR="${CMAKE_CURRENT_LIST_DIR}/tests-resources")
Alexandre Leroux
Cmakes for AMDA plugin
r349
Modernized CMake configuration...
r1331 declare_test(TestAmdaParser TestAmdaParser tests/TestAmdaParser.cpp "amdaplugin;Qt5::Test")
declare_test(TestAmdaResultParser TestAmdaResultParser tests/TestAmdaResultParser.cpp "amdaplugin;Qt5::Test")
declare_test(TestAmdaAcquisition TestAmdaAcquisition tests/TestAmdaAcquisition.cpp "amdaplugin;Qt5::Test")
Added fuzzy tests and small fixes on meson files...
r1333 declare_test(TestAmdaFuzzing TestAmdaFuzzing "tests/TestAmdaFuzzing.cpp;tests/FuzzingValidators.cpp;tests/FuzzingUtils.cpp;tests/FuzzingOperations.cpp;tests/FuzzingDefs.cpp" "amdaplugin;Qt5::Test")
Initial Pybind11 binding experiment working....
r1339
pybind11_add_module(pytestamda tests/PyTestAmdaWrapper.cpp)
target_link_libraries(pytestamda PUBLIC amdaplugin)
#pybind11_add_module(pytestamdalib SHARED tests/PyTestAmdaWrapper.cpp)
add_library(pytestamdalib tests/PyTestAmdaWrapper.cpp)
target_link_libraries(pytestamdalib PUBLIC pybind11::module)
target_link_libraries(pytestamdalib PUBLIC pybind11::embed)
target_link_libraries(pytestamdalib PUBLIC amdaplugin)
declare_test(TestPytestamda TestPytestamda "tests/PyTestAmdaWrapperExe.cpp" "amdaplugin;pytestamdalib")
target_compile_definitions(TestPytestamda PRIVATE -DPYTESTAMDA_SCRIPT="${CMAKE_CURRENT_LIST_DIR}/tests/pyamdatests.py")
find_package(PythonInterp 3 REQUIRED)
add_test(NAME pyamdatests
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_CURRENT_LIST_DIR}/tests/pyamdatests.py
pyamdatests)
set_tests_properties(pyamdatests PROPERTIES ENVIRONMENT PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR})