Enable parallel tests.
[hoomd-blue.git] / share / hoomd / plugin_template_evaluators_ext / cppmodule / CMakeLists.txt
blobeef2bb72cd629dbfd42600bf80c788b49d1b01dd
1 file(GLOB _SRCS ${CMAKE_CURRENT_SOURCE_DIR}/*.cc ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
2 file(GLOB _CUDA_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/*.cu ${CMAKE_CURRENT_SOURCE_DIR}/*.cuh)
4 list(APPEND PLUGIN_SRC ${_SRCS})
6 if (ENABLE_CUDA)
7     CUDA_COMPILE(_CUDA_GENERATED_FILES ${_CUDA_SRCS} OPTIONS ${CUDA_ADDITIONAL_OPTIONS} SHARED)
8     list(APPEND PLUGIN_SRC ${_CUDA_GENERATED_FILES})
9 endif (ENABLE_CUDA)
11 # build the C++ python module
12 set(LIB_TARGET "_${PROJECT_NAME}")
13 add_library(${LIB_TARGET} ${PLUGIN_SRC} ${PYMODULE_BUILD})
14 target_link_libraries(${LIB_TARGET} ${HOOMD_LIBRARIES})
15 # fix up the file name so it will work as a python module
16 set_target_properties(${LIB_TARGET} PROPERTIES PREFIX "" OUTPUT_NAME "${LIB_TARGET}")
17 if(APPLE)
18     set_target_properties(${LIB_TARGET} PROPERTIES SUFFIX ".so")
19 endif(APPLE)
20 fix_cudart_rpath(${LIB_TARGET})
22 # install the library to the hoomd_plugins directory
23 install(TARGETS ${LIB_TARGET}
24         LIBRARY DESTINATION hoomd_plugins/${PROJECT_NAME}
25         )