[cmake-developers] cuda_compile_ptx re-runs CMake at build time
Charles Huet
charles.huet at gmail.com
Thu Feb 14 10:55:50 EST 2019
Hi,
I'm having an issue with CUDA (sadly the old-style FindCUDA, not the new
native support of CUDA).
The following CMake file reproduces the issue easily on Windows with any
Visual Studio Generator (14 2015 Win64 being the one I use).
Adding the file generated by cuda_compile_ptx to any target (even a custom
one) causes CMake to be re-run at compile time.
Which is very annoying, but causes build errors on multi-threaded builds
(permission denied on the vcxproj generated by this CMakeLists.). Of
course, such issues cannot be reproduced with this simple CMakeLists file.
Am I misusing the cuda_compile_ptx method ?
Is there a way to prevent such CMake runs during compile time to occur ?
Thanks.
project(testCuda)
cmake_minimum_required(VERSION 3.10.2)
find_package(CUDA 9.2 REQUIRED)
CUDA_COMPILE_PTX(OBJECT_FILES Arithmetic.cu)
add_library(stuff SHARED SoArithmetic.cxx ${OBJECT_FILES})
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake-developers/attachments/20190214/4201db29/attachment.html>
More information about the cmake-developers
mailing list