set(CUDA_OPTION)
if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA")
  set(CUDA_OPTION "PSM_CUDA=1;CUDA_HOME=${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}/../")
endif()

superbuild_add_project(
  psm2
  BUILD_IN_SOURCE 1
  CONFIGURE_COMMAND "" 
  BUILD_COMMAND make DESTDIR=<INSTALL_DIR> ${CUDA_OPTION} -j${SUPERBUILD_PROJECT_PARALLELISM} -l${SUPERBUILD_PROJECT_PARALLELISM} 
  INSTALL_COMMAND make DESTDIR=<INSTALL_DIR> install
  )

