File: CMakeLists.txt

package info (click to toggle)
adios2 2.10.2%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 33,764 kB
  • sloc: cpp: 175,964; ansic: 160,510; f90: 14,630; yacc: 12,668; python: 7,275; perl: 7,126; sh: 2,825; lisp: 1,106; xml: 1,049; makefile: 579; lex: 557
file content (41 lines) | stat: -rw-r--r-- 1,994 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#------------------------------------------------------------------------------#
# Distributed under the OSI-approved Apache License, Version 2.0.  See
# accompanying file Copyright.txt for details.
#------------------------------------------------------------------------------#

cmake_minimum_required(VERSION 3.12)
project(ADIOS2PluginsEngineExample)

if(NOT TARGET adios2_core)
  set(_components CXX)

  find_package(ADIOS2 REQUIRED COMPONENTS ${_components})
endif()

include(GenerateExportHeader)

add_library(adios2_plugins_exampleWritePlugin ExampleWritePlugin.cpp)
target_link_libraries(adios2_plugins_exampleWritePlugin adios2::cxx11 adios2_core)
generate_export_header(adios2_plugins_exampleWritePlugin BASE_NAME plugin_engine_write)
target_include_directories(adios2_plugins_exampleWritePlugin PUBLIC
  $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
  $<INSTALL_INTERFACE:include>
)
install(TARGETS adios2_plugins_exampleWritePlugin RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

add_library(adios2_plugins_exampleReadPlugin ExampleReadPlugin.cpp)
target_link_libraries(adios2_plugins_exampleReadPlugin adios2::cxx11 adios2_core)
generate_export_header(adios2_plugins_exampleReadPlugin BASE_NAME plugin_engine_read)
target_include_directories(adios2_plugins_exampleReadPlugin PUBLIC
  $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
  $<INSTALL_INTERFACE:include>
)
install(TARGETS adios2_plugins_exampleReadPlugin RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

add_executable(adios2_plugins_examplePluginEngineWrite examplePluginEngineWrite.cpp)
target_link_libraries(adios2_plugins_examplePluginEngineWrite adios2::cxx11)
install(TARGETS adios2_plugins_examplePluginEngineWrite RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

add_executable(adios2_plugins_examplePluginEngineRead examplePluginEngineRead.cpp)
target_link_libraries(adios2_plugins_examplePluginEngineRead adios2::cxx11)
install(TARGETS adios2_plugins_examplePluginEngineRead RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})