<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Arial'; COLOR: #000000; FONT-SIZE: 10pt">
<DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none"><FONT
face=Arial></FONT><EM></EM> </DIV>
<DIV class=gmail_quote>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Arial'; FONT-SIZE: 10pt">
<DIV><FONT face=Arial><FONT style="FONT-SIZE: 10pt"><EM> -The code in
question is the Geant4 (</EM><A
title=http://geant4.web.cern.ch/geant4/support/download.shtml
href="http://geant4.web.cern.ch/geant4/support/download.shtml"
target=_blank><EM>http://geant4.web.cern.ch/geant4/support/download.shtml</EM></A><EM>)
toolkit, which uses CMake to handle its cross-platform configurations. The end
result of the toolkit is to compile a large set of
libraries.</EM></FONT></FONT></DIV>
<DIV><FONT face=Arial><EM><FONT style="FONT-SIZE: 10pt">-I’ve changed all of
the source files from .cc to .cu, and changed all “add_library” terms to
</FONT><FONT
style="FONT-SIZE: 10pt">“cuda_add_library”</FONT></EM></FONT></DIV>
<DIV><FONT face=Arial><EM>-I’ve also updated all of the “include directories”
to “cuda_include_directories”</EM></FONT></DIV>
<DIV><FONT face=Arial><EM>-The end result is that I am able to generate a
build directory (without any errors) using cmake, for VS2010.
</EM></FONT></DIV>
<DIV><FONT face=Arial></FONT><EM></EM> </DIV>
<DIV><FONT face=Arial><EM>However when I attempt to build the package in an
analagous fashion, I get errors from visual studio informing me mid-build that
it:</EM></FONT></DIV>
<DIV><FONT face=Arial></FONT><EM></EM> </DIV>
<DIV><FONT face=Arial><EM>Cannot load macro project “ for the following
reason:</EM></FONT></DIV>
<DIV><FONT face=Arial><EM>C:\...\Projects\VSMacros80\Samples\Samples.vsmacros’
is an invalid or inaccessible macro project file</EM></FONT></DIV>
<DIV><FONT face=Arial></FONT><EM></EM> </DIV>
<DIV><FONT face=Arial><EM>Once I acknowledge this message, it then
says:</EM></FONT></DIV>
<DIV><FONT face=Arial></FONT><EM></EM> </DIV>
<DIV><FONT face=Arial><EM>CMake has regenerated 3 .sln and/or .vcproj
files.</EM></FONT></DIV>
<DIV><FONT face=Arial><EM>Click:</EM></FONT></DIV>
<DIV><FONT face=Arial><EM>--Yes to reload the whole
solution...</EM></FONT></DIV>
<DIV><FONT face=Arial><EM>--No to reload the solution ...</EM></FONT></DIV>
<DIV><FONT face=Arial><EM>--Cancel to do nothing</EM></FONT></DIV>
<DIV><FONT face=Arial></FONT><EM></EM> </DIV>
<DIV><FONT face=Arial><EM>This message shows up even though CMake was done
generating files and was closed prior to the build.</EM></FONT></DIV>
<DIV><FONT face=Arial><EM>The same thing happens on my work computer, and I am
able to compile other programs just fine, so I do not believe it to be a
corrupt install of visual studio. Any suggestions on why this would
occur is appreciated!</EM></FONT></DIV>
<DIV><FONT face=Arial></FONT><EM></EM> </DIV>
<DIV><FONT face=Arial><EM>Thanks,</EM></FONT></DIV>
<DIV><FONT face=Arial><EM>Ming</EM></FONT></DIV>
<DIV><FONT face=Arial></FONT><EM></EM> </DIV>
<DIV><FONT face=Arial><EM>Uploaded screenshots of the error
messages:</EM></FONT></DIV>
<DIV><A href="https://mywebspace.wisc.edu/ymyang/web/macroerr1.png"
target=_blank><FONT
face="Times New Roman"><EM>https://mywebspace.wisc.edu/ymyang/web/macroerr1.png</EM></FONT></A><FONT
face="Times New Roman"><EM> </EM></FONT></DIV>
<DIV><A href="https://mywebspace.wisc.edu/ymyang/web/macroerr2.png"
target=_blank><FONT
face="Times New Roman"><EM>https://mywebspace.wisc.edu/ymyang/web/macroerr2.png</EM></FONT></A><FONT
face="Times New Roman"><EM>
</EM></FONT></DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV>
<BLOCKQUOTE></BLOCKQUOTE></DIV>
<DIV><BR><EM>I believe the macro error is a known problem with the CMake VS
macro in VS 2010 (MS broke it). The regeneration of the project files is
also a known behavior of FindCUDA. The dependencies are computed by nvcc
during build and saved in a file. When the dependency file is regenerated
CMake will want to reconfigure to add those new dependencies to the project
file. This is the expected behavior.<BR><BR>My current recommendation for
CUDA + VS 2010 is to specify CMAKE_SUPPRESS_REGENERATION OFF in your project
file's CMakeLists.txt:<BR>option(CMAKE_SUPPRESS_REGENERATION "Suppress
regeneration of build scripts during build" ON)<BR><BR>This will disable the VS
CMake plugin, requiring you to manually configure with CMake when you change the
build scripts. I also recommend configuring CMake after your first build
to pick up the file level dependencies that CUDA
generates.<BR><BR>James<BR></EM></DIV>
<DIV><FONT size=2 face=Arial>Hey James, </FONT></DIV>
<DIV><FONT size=2 face=Arial>Thanks you for the reply. I am a bit new to
this (and definitely jumping into the deep end with what I am attempting).
Could you elaborate on what you mean by “manually configure with CMake” after
the initial build? Is it safe to interpret that as re-running CMake-gui
after a build, for the same source and build directories?. Or is there
something else implied? I’ve had issues in the past trying to perform a
configure command in CMake-gui when the buidl directory already
existed..?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Thanks!</FONT></DIV>
<DIV><FONT size=2 face=Arial>Ming</FONT></DIV></DIV></DIV></DIV></BODY></HTML>