[CMake] CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?
Robert Maynard
robert.maynard at kitware.com
Sat Jul 29 16:56:12 EDT 2017
Hi,
Can you please provide run from the build directory cmake
--system-information <file> and send the resulting file? That will
help me track down why CUDA is failing for you.
On Fri, Jul 28, 2017 at 8:40 PM, Brian J. Davis <bitminer at gmail.com> wrote:
>
> @Robert
>
> Adding CUDA to my PROJECT(4DRTProto CXX CUDA)
>
> Yields:
>
>
> CMake Error at
> C:/projects/4DRTProto/4DRTProto_3rdParty/platform/tools/cmake-3.9.0-rc6-win64-x64/share/cmake-3.9/Modules/CMakeTestCUDACompiler.cmake:45
> (message):
> The CUDA compiler "C:/Program Files/NVIDIA GPU Computing
> Toolkit/CUDA/v8.0/bin/nvcc.exe" is not able to compile a simple test
> program.
>
> It fails with the following output:
>
> Change Dir: C:/projects/4DRTProto/4DRTProto/build/CMakeFiles/CMakeTmp
>
>
>
> Run Build Command:"C:/Program Files (x86)/MSBuild/12.0/bin/MSBuild.exe"
> "cmTC_20a4f.vcxproj" "/p:Configuration=Debug"
> "/p:VisualStudioVersion=12.0"
>
> Microsoft (R) Build Engine version 12.0.31101.0
>
>
> [Microsoft .NET Framework, version 4.0.30319.42000]
>
>
> Copyright (C) Microsoft Corporation. All rights reserved.
>
>
>
>
>
> Build started 7/28/2017 7:33:34 PM.
>
>
> Project
> "C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\cmTC_20a4f.vcxproj"
> on node 1 (default targets).
>
>
> PrepareForBuild:
>
>
> Creating directory "cmTC_20a4f.dir\Debug\".
>
> Creating directory
> "C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\Debug\".
>
> Creating directory "cmTC_20a4f.dir\Debug\cmTC_20a4f.tlog\".
>
>
> InitializeBuildStatus:
>
>
> Creating "cmTC_20a4f.dir\Debug\cmTC_20a4f.tlog\unsuccessfulbuild"
> because "AlwaysCreate" was specified.
>
>
> C:\Program Files
> (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA
> 8.0.targets(216,9): error : Item 'main.cu' Code Generation value is not in
> the expected format '[Arch],[Code]'.
> [C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\cmTC_20a4f.vcxproj]
>
>
>
> Done Building Project
> "C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\cmTC_20a4f.vcxproj"
> (default targets) -- FAILED.
>
>
>
>
>
> Build FAILED.
>
>
>
>
>
>
> "C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\cmTC_20a4f.vcxproj"
> (default target) (1) ->
>
>
> (AddCudaCompileMetadata target) ->
>
>
> C:\Program Files
> (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA
> 8.0.targets(216,9): error : Item 'main.cu' Code Generation value is not in
> the expected format '[Arch],[Code]'.
> [C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\cmTC_20a4f.vcxproj]
>
>
>
>
>
> 0 Warning(s)
>
> 1 Error(s)
>
>
>
>
>
> Time Elapsed 00:00:00.35
>
>
>
>
>
>
> CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
> CMakeLists.txt:14 (PROJECT)
>
>
> And so it goes the CMake, CUDA, Visual Studio Experience. Maybe time to
> revert back to FindCUDA in CMAKE version 3.2. Sure is awesome.
>
>
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
More information about the CMake
mailing list