Skip to content

Commit

Permalink
encryptionoperator: add adios2 prefix and soname
Browse files Browse the repository at this point in the history
  • Loading branch information
vicentebolea committed Jan 10, 2025
1 parent f2d335d commit cb5ff61
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 16 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ endif()
#------------------------------------------------------------------------------#
# Plugins
#------------------------------------------------------------------------------#
set(ADIOS2_INSTALL_PLUGIN_LIBDIR ${CMAKE_INSTALL_BINDIR}/adios2-modules-${ADIOS2_LIBRARY_SOVERSION} CACHE STRING "")
set(ADIOS2_INSTALL_PLUGIN_BINDIR ${CMAKE_INSTALL_LIBDIR}/adios2-modules-${ADIOS2_LIBRARY_SOVERSION} CACHE STRING "")
add_subdirectory(plugins)

#------------------------------------------------------------------------------#
Expand Down
2 changes: 1 addition & 1 deletion examples/plugins/operator/examplePluginOperatorRead.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int main(int argc, char *argv[])
* other parameters, they can be passed in here as well. */
adios2::Params params;
params["PluginName"] = "MyOperator";
params["PluginLibrary"] = "EncryptionOperator";
params["PluginLibrary"] = "adios2_encryption_operator";
params["SecretKeyFile"] = "test-key";
var.AddOperation("plugin", params);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/plugins/operator/examplePluginOperatorWrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ int main(int argc, char *argv[])
* other parameters, they can be passed in here as well. */
adios2::Params params;
params["PluginName"] = "MyOperator";
params["PluginLibrary"] = "EncryptionOperator";
params["PluginLibrary"] = "adios2_encryption_operator";
params["SecretKeyFile"] = "test-key";
var.AddOperation("plugin", params);
}
Expand Down
4 changes: 2 additions & 2 deletions examples/plugins/operator/example_operator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<variable name="data">
<operation type="plugin">
<parameter key="PluginName" value="OperatorPlugin"/>
<parameter key="PluginLibrary" value="EncryptionOperator" />
<parameter key="PluginLibrary" value="adios2_encryption_operator" />
<parameter key="SecretKeyFile" value="test-key" />
</operation>
</variable>
Expand All @@ -30,7 +30,7 @@
<variable name="data">
<operation type="plugin">
<parameter key="PluginName" value="OperatorPlugin"/>
<parameter key="PluginLibrary" value="EncryptionOperator" />
<parameter key="PluginLibrary" value="adios2_encryption_operator" />
<parameter key="SecretKeyFile" value="test-key" />
</operation>
</variable>
Expand Down
5 changes: 2 additions & 3 deletions plugins/engines/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ if(ADIOS2_HAVE_Catalyst)
PRIVATE
catalyst::catalyst)
install(TARGETS ParaViewADIOSInSituEngine EXPORT adios2Exports
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_core-runtime
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT adios2_core-libraries NAMELINK_COMPONENT adios2_core-development
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT adios2_core-development
RUNTIME DESTINATION ${ADIOS2_INSTALL_PLUGIN_BINDIR} COMPONENT adios2_core-runtime
LIBRARY DESTINATION ${ADIOS2_INSTALL_PLUGIN_LIBDIR} COMPONENT adios2_core-libraries NAMELINK_COMPONENT adios2_core-development
)
endif()
16 changes: 8 additions & 8 deletions plugins/operators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
#------------------------------------------------------------------------------#

if(ADIOS2_HAVE_Sodium)
add_library(EncryptionOperator MODULE
add_library(adios2_encryption_operator MODULE
EncryptionOperator.cpp
)
target_link_libraries(EncryptionOperator adios2_core sodium)
target_link_libraries(adios2_encryption_operator adios2_core sodium)
if (NOT CMAKE_SKIP_INSTALL_RPATH)
set_target_properties(EncryptionOperator PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
set_target_properties(adios2_encryption_operator PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
endif()
install(TARGETS EncryptionOperator EXPORT adios2Exports
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_core-runtime
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT adios2_core-libraries NAMELINK_COMPONENT adios2_core-development
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT adios2_core-development
)

install(TARGETS adios2_encryption_operator EXPORT adios2Exports
RUNTIME DESTINATION ${ADIOS2_INSTALL_PLUGIN_BINDIR} COMPONENT adios2_core-runtime
LIBRARY DESTINATION ${ADIOS2_INSTALL_PLUGIN_LIBDIR} COMPONENT adios2_core-libraries NAMELINK_COMPONENT adios2_core-development
)
endif()
1 change: 1 addition & 0 deletions testing/install/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function(add_install_cmake_test name)
"-DBUILD_TYPE=$<CONFIG>"
"-DMPIEXEC_EXECUTABLE=${MPIEXEC_EXECUTABLE}"
"-DMPIEXEC_EXTRA_FLAGS=${MPIEXEC_EXTRA_FLAGS}"
"-DADIOS2_INSTALL_PLUGIN_LIBDIR=${ADIOS2_INSTALL_PLUGIN_LIBDIR}"
-P "${CMAKE_CURRENT_SOURCE_DIR}/run_cmake.cmake"
)
set_tests_properties(Install.CMake.${name} PROPERTIES
Expand Down
2 changes: 1 addition & 1 deletion testing/install/EncryptionOperator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ find_package(adios2 REQUIRED)

option(BUILD_SHARED_LIBS "build shared libs" ON)

set(ENV{ADIOS2_PLUGIN_PATH} "${adios2_DIR}/../../")
set(ENV{ADIOS2_PLUGIN_PATH} "${adios2_DIR}/../../../${ADIOS2_INSTALL_PLUGIN_LIBDIR}")

#---------- Operator Plugin Tests

Expand Down
1 change: 1 addition & 0 deletions testing/install/run_cmake.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ execute_process(COMMAND "${CMAKE_CTEST_COMMAND}"
"-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS}"
"-DMPIEXEC_EXECUTABLE=${MPIEXEC_EXECUTABLE}"
"-DMPIEXEC_EXTRA_FLAGS=${MPIEXEC_EXTRA_FLAGS}"
"-DADIOS2_INSTALL_PLUGIN_LIBDIR=${ADIOS2_INSTALL_PLUGIN_LIBDIR}"
--test-command "${CMAKE_CTEST_COMMAND}" -V
-C "${BUILD_TYPE}"
RESULT_VARIABLE result
Expand Down

0 comments on commit cb5ff61

Please sign in to comment.