<div dir="ltr"><div><br></div><div>Now that I have working machines and can create CUDA app  (simple) successfully that will run<br></div><div><br></div>​While trying:<br><div><br>message( "GPU_ARCH = ${GPU_ARCH}" )<br><br>target_compile_options(<br>    ${SOME_LIB_NAME}<br>    PRIVATE <br>    $<$<COMPILE_LANGUAGE:CUDA>:${<wbr>GPU_ARCH}><br>)<br><br></div><div>with output of:<br><br></div><div>GPU_ARCH =  -gencode arch=compute_30,code="sm_30,<wbr>compute_30" -gencode arch=compute_35,code="sm_35,<wbr>compute_35" -gencode arch=compute_50,code="sm_50,<wbr>compute_50"<br>Configuring done<br>CMake Error at subprojects/4d_fluro_<wbr>prototype/endoscopic_view/src/<wbr>CMakeLists.txt:92 (target_compile_options):<br>  Error evaluating generator expression:<br><br>    $<COMPILE_LANGUAGE:CUDA><br><br>  $<COMPILE_LANGUAGE:...> may not be used with Visual Studio generators.<br><br></div><div>I think I may becoming fully aware of the meaning of these statements from CMake doc and from initial post of this thread:<br></div><div><br></div><div>--snip--<br></div><div>CMake learned to support CUDA as a first-class language that can be enabled via the project() and enable_language() commands.<br>CUDA
 is currently supported by the Makefile Generators and the Ninja 
generator on Linux, macOS, and Windows. *Support for the Visual Studio 
IDE is under development but not included in this release.*<br>The NVIDIA CUDA Toolkit compiler (nvcc) is supported.<br>--snip--<br><br></div><div>Or did I try and misuse and abuse CMake again.  I am trying to learn the "new way" of doing things and converting my projects accordingly, but the doc leaves much to be desired.  <br><br></div><div>I can get CMAKE_CUDA_FLAGS (well actually it duplicates the args twice but at least they change in VS) to work but the bit about "Deprecate CMake Variables" here:<br></div><div><br><a href="https://github.com/boostcon/cppnow_presentations_2017/blob/master/05-19-2017_friday/effective_cmake__daniel_pfeifer__cppnow_05-19-2017.pdf" target="_blank">https://github.com/boostcon/cp<wbr>pnow_presentations_2017/blob/<wbr>master/05-19-2017_friday/effec<wbr>tive_cmake__daniel_pfeifer__<wbr>cppnow_05-19-2017.pdf</a><br><br></div><div>as "Variables are so CMake 2.8.12  Modern CMake is about Targets and Properties!", I assume as emphasized in the true The Black Eyed Peas style... I am sure I am "so 2017 late" to upgrading my CMake... err well if only it was fully supportive of what I need... maybe it is... not that I have any hope on learning how it does ( from doc)... I think I am gonna blame "them Chickens jackin' my style"  as there ain't nobody here but us chickens.<br></div><div><br><br></div></div>