CMakeLists.txt 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #
  2. # Licensed to the Apache Software Foundation (ASF) under one
  3. # or more contributor license agreements. See the NOTICE file
  4. # distributed with this work for additional information
  5. # regarding copyright ownership. The ASF licenses this file
  6. # to you under the Apache License, Version 2.0 (the
  7. # "License"); you may not use this file except in compliance
  8. # with the License. You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. #
  18. include_directories(
  19. ${CMAKE_CURRENT_SOURCE_DIR}/../libhdfs/include
  20. ${GENERATED_JAVAH}
  21. ${CMAKE_BINARY_DIR}
  22. ${CMAKE_CURRENT_SOURCE_DIR}/../libhdfs
  23. ${JNI_INCLUDE_DIRS}
  24. ${OS_DIR}
  25. )
  26. add_library(native_mini_dfs
  27. native_mini_dfs.c
  28. ../libhdfs/common/htable.c
  29. ../libhdfs/exception.c
  30. ../libhdfs/jni_helper.c
  31. ${OS_DIR}/mutexes.c
  32. ${OS_DIR}/thread_local_storage.c
  33. )
  34. add_executable(test_native_mini_dfs test_native_mini_dfs.c)
  35. target_link_libraries(test_native_mini_dfs native_mini_dfs ${JAVA_JVM_LIBRARY})
  36. add_test(test_test_native_mini_dfs test_native_mini_dfs)
  37. add_executable(test_htable ../libhdfs/common/htable.c test_htable.c)
  38. target_link_libraries(test_htable ${OS_LINK_LIBRARIES})