MantisBT - CMake | ||||||||||
View Issue Details | ||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||
0016031 | CMake | CMake | public | 2016-03-22 13:09 | 2016-06-10 14:21 | |||||
Reporter | Thibault Notargiacomo | |||||||||
Assigned To | ||||||||||
Priority | high | Severity | major | Reproducibility | always | |||||
Status | closed | Resolution | duplicate | |||||||
Platform | OS | Linux | OS Version | All versions | ||||||
Product Version | CMake 3.5 | |||||||||
Target Version | Fixed in Version | |||||||||
Summary | 0016031: FindCUDA.cmake - CUDA_SEPARABLE_COMPILATION fails because of escape character | |||||||||
Description | When using set( CUDA_SEPARABLE_COMPILATION ON ) in cunjunction with find_package(CUDA 7.5 REQUIRED) I get a problem in the make command generated for the link with the intermediate object file, especially, the "-ccbin" option that should give to the cuda command line the $CXX variable (in my case). | |||||||||
Steps To Reproduce | Try to setup in a directory the following files: =================================================== test.cu: #include "test.cu.h" #include "thrust/device_vector.h" void A::doIt() { thrust::device_vector<float> a(10,10); std::cout <<"A = "<<a[0]<<std::endl; } =================================================== test.cu.h: #include <iostream> class A { public: A()=default; virtual ~A()=default; virtual void doIt(); private: int m_a; }; =================================================== main.cpp: #include <cstdlib> #include "test.cu.h" int main(int argc, char* argv[]) { A a; a.doIt(); return EXIT_SUCCESS; } =================================================== CMakeLists.txt: cmake_minimum_required (VERSION 3.5) ADD_DEFINITIONS( ${CMAKE_CXX_FLAGS} "-std=c++11" ) find_package(CUDA 7.5 REQUIRED) set( CUDA_SEPARABLE_COMPILATION ON ) cuda_add_executable( testit test.cu main.cpp ) | |||||||||
Additional Information | Extract of the build.make file that I had to modify in order to bypass the problem temporarily: CMakeFiles/testit.dir/testit_intermediate_link.o: CMakeFiles/testit.dir/testit_generated_test.cu.o @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/home/technic105/Documents/test/cmake35Bug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building NVCC intermediate link file CMakeFiles/testit.dir/testit_intermediate_link.o" /usr/local/cuda/bin/nvcc -m64 -ccbin \"/opt/rh/devtoolset-2/root/usr/bin/gcc\" -dlink /home/technic105/Documents/test/cmake35Bug/CMakeFiles/testit.dir//./testit_generated_test.cu.o -o /home/technic105/Documents/test/cmake35Bug/CMakeFiles/testit.dir/./testit_intermediate_link.o Notice the -ccbin \"/opt/rh/devtoolset-2/root/usr/bin/gcc\" that causes the build to fail on my machine | |||||||||
Tags | No tags attached. | |||||||||
Relationships |
| |||||||||
Attached Files | CMakeLists.txt (205) 2016-03-22 13:11 https://public.kitware.com/Bug/file/5654/CMakeLists.txt main.cpp (118) 2016-03-22 13:11 https://public.kitware.com/Bug/file/5655/main.cpp test.cu (155) 2016-03-22 13:11 https://public.kitware.com/Bug/file/5656/test.cu test.cu.h (120) 2016-03-22 13:12 https://public.kitware.com/Bug/file/5657/test.cu.h | |||||||||
Issue History | ||||||||||
Date Modified | Username | Field | Change | |||||||
2016-03-22 13:09 | Thibault Notargiacomo | New Issue | ||||||||
2016-03-22 13:11 | Thibault Notargiacomo | File Added: CMakeLists.txt | ||||||||
2016-03-22 13:11 | Thibault Notargiacomo | File Added: main.cpp | ||||||||
2016-03-22 13:11 | Thibault Notargiacomo | File Added: test.cu | ||||||||
2016-03-22 13:12 | Thibault Notargiacomo | File Added: test.cu.h | ||||||||
2016-03-22 13:13 | Thibault Notargiacomo | Note Added: 0040750 | ||||||||
2016-03-22 13:35 | Brad King | Relationship added | duplicate of 0016027 | |||||||
2016-03-22 13:35 | Brad King | Status | new => resolved | |||||||
2016-03-22 13:35 | Brad King | Resolution | open => duplicate | |||||||
2016-06-10 14:21 | Kitware Robot | Note Added: 0041217 | ||||||||
2016-06-10 14:21 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|