Skip to content

Instantly share code, notes, and snippets.

@bchretien
Created September 14, 2014 16:33
Show Gist options
  • Save bchretien/63fef5d4dad9cc438c99 to your computer and use it in GitHub Desktop.
Save bchretien/63fef5d4dad9cc438c99 to your computer and use it in GitHub Desktop.
CMake support for simpleSeparateCompilation
# CMake support for 0_Simple/simpleSeparateCompilation
# sample of the CUDA SDK.
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
FIND_PACKAGE(CUDA 5.0 REQUIRED)
SET(CUDA_SEPARABLE_COMPILATION ON)
SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-rdc=true")
SET(CUDA_VERBOSE_BUILD ON)
INCLUDE_DIRECTORIES(../../common/inc)
CUDA_ADD_LIBRARY(simpleDeviceLibrary STATIC simpleDeviceLibrary.cu)
CUDA_ADD_EXECUTABLE(simpleSeparateCompilation simpleSeparateCompilation.cu)
TARGET_LINK_LIBRARIES(simpleSeparateCompilation simpleDeviceLibrary)
@bchretien
Copy link
Author

Possible bug reported here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment