MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0015919 | CMake | CMake | public | 2016-01-14 10:11 | 2016-06-10 14:21 |
Reporter | qiv | ||||
Assigned To | |||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | PC | OS | Ubuntu | OS Version | 15.04 |
Product Version | CMake 3.0.2 | ||||
Target Version | CMake 3.5 | Fixed in Version | CMake 3.5 | ||
Summary | 0015919: Building CUDA files fails when source path contains parenthesis | ||||
Description | When working in a source path containing "()" I get the following error upon building CUDA files: 15:13 sandbox$ make [ 6%] Building NVCC (Device) object CMakeFiles/githash.dir//./githash_generated_float3.cu.o /bin/sh: 1: Syntax error: "(" unexpected CMakeFiles/githash.dir/build.make:167: recipe for target 'CMakeFiles/githash.dir/./githash_generated_float3.cu.o' failed make[2]: *** [CMakeFiles/githash.dir/./githash_generated_float3.cu.o] Error 2 CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/githash.dir/all' failed make[1]: *** [CMakeFiles/githash.dir/all] Error 2 Makefile:76: recipe for target 'all' failed make: *** [all] Error 2 The following fix provided by ngladitz in #cmake solves the issue on my machine: diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index ada5b8a..fe2647a 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -1474,6 +1474,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files) -P "${custom_target_script}" WORKING_DIRECTORY "${cuda_compile_intermediate_directory}" COMMENT "${cuda_build_comment_string}" + VERBATIM ) # Make sure the build system knows the file is generated. | ||||
Steps To Reproduce | 16:06 sandbox$ cat CMakeLists.txt CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(githash) FIND_PACKAGE(CUDA REQUIRED) # FIND_PACKAGE(MPI REQUIRED) INCLUDE(FindCUDA) # INCLUDE_DIRECTORIES(/usr/local/cuda/include ${MPI_INCLUDE_PATH}) FILE(GLOB SOURCES "*.cu" "*.cpp" "*.c" "*.h") CUDA_ADD_EXECUTABLE(githash ${SOURCES}) LIST(APPEND CMAKE_CXX_FLAGS "-std=c++0x -O3 -ffast-math -Wall") LIST(APPEND CUDA_NVCC_FLAGS --compiler-options -fno-strict-aliasing -lineinfo -use_fast_math -Xptxas -dlcm=cg) # LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_20,code=sm_20) LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_30,code=sm_30) # LIST(APPEND CUDA_NVCC_FLAGS -gencode arch=compute_35,code=sm_35) # TARGET_LINK_LIBRARIES(githash /usr/local/cuda/lib64/libcudart.so ${MPI_LIBRARIES}) 15:13 sandbox$ cmake . -- Configuring done -- Generating done -- Build files have been written to: /home/.../Dropbox (CRG)/.../sandbox | ||||
Additional Information | |||||
Tags | CMake, CUDA, FindCUDA | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2016-01-14 10:11 | qiv | New Issue | |||
2016-01-14 10:13 | qiv | Tag Attached: CMake | |||
2016-01-14 10:13 | qiv | Tag Attached: CUDA | |||
2016-01-14 10:13 | qiv | Tag Attached: FindCUDA | |||
2016-01-14 10:19 | qiv | Note Added: 0040234 | |||
2016-01-15 08:47 | Brad King | Note Added: 0040246 | |||
2016-01-15 10:11 | qiv | Note Added: 0040247 | |||
2016-01-19 10:44 | Brad King | Status | new => resolved | ||
2016-01-19 10:44 | Brad King | Resolution | open => fixed | ||
2016-01-19 10:44 | Brad King | Fixed in Version | => CMake 3.5 | ||
2016-01-19 10:44 | Brad King | Target Version | => CMake 3.5 | ||
2016-02-17 15:29 | Brad King | Note Added: 0040501 | |||
2016-06-10 14:21 | Kitware Robot | Note Added: 0041248 | |||
2016-06-10 14:21 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|