diff options
author | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2017-12-06 21:59:04 +0000 |
---|---|---|
committer | Jonas Hahnfeld <hahnjo@hahnjo.de> | 2017-12-06 21:59:04 +0000 |
commit | cac6ef05a1238df8bebc6093f5f713411d7fcf9a (patch) | |
tree | b6134cd3b07eb89a7a9a425495fe84722e84f4ea /libomptarget/src/CMakeLists.txt | |
parent | 74e93713411c12f4a9eced02b518abfb731284a3 (diff) |
[libomptarget] Move header files and CMake library definition
Future patches will add (private) header files in src/ that should
not be visible to plugins, so move the "public" ones to a new
include/ directory. This is still internal in a sense that the
contained files won't be installed for the user.
Similarly, the target agnostic offloading library should be built
directly in src/. The parent directory is responsible for finding
dependencies and including all subdirectories.
Differential Revision: https://reviews.llvm.org/D40797
git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@319968 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'libomptarget/src/CMakeLists.txt')
-rw-r--r-- | libomptarget/src/CMakeLists.txt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libomptarget/src/CMakeLists.txt b/libomptarget/src/CMakeLists.txt new file mode 100644 index 0000000..c8da01c --- /dev/null +++ b/libomptarget/src/CMakeLists.txt @@ -0,0 +1,27 @@ +##===----------------------------------------------------------------------===## +# +# The LLVM Compiler Infrastructure +# +# This file is dual licensed under the MIT and the University of Illinois Open +# Source Licenses. See LICENSE.txt for details. +# +##===----------------------------------------------------------------------===## +# +# Build offloading library libomptarget.so. +# +##===----------------------------------------------------------------------===## + +libomptarget_say("Building offloading runtime library libomptarget.") + +set(src_files + omptarget.cpp +) + +# Build libomptarget library with libdl dependency. +add_library(omptarget SHARED ${src_files}) +target_link_libraries(omptarget + ${CMAKE_DL_LIBS} + "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports") + +# Install libomptarget under the lib destination folder. +install(TARGETS omptarget LIBRARY DESTINATION lib${OPENMP_LIBDIR_SUFFIX}) |