Now that I have working machines and can create CUDA app (simple)
successfully that will run
​While trying:
message( "GPU_ARCH = ${GPU_ARCH}" )
target_compile_options(
${SOME_LIB_NAME}
PRIVATE
$<$<COMPILE_LANGUAGE:CUDA>:${GPU_ARCH}>
)
with output of:
GPU_ARCH = -gencode arch=compute_30,code="sm_30,compute_30" -gencode
arch=compute_35,code="sm_35,compute_35" -gencode
arch=compute_50,code="sm_50,compute_50"
Configuring done
CMake Error at
subprojects/4d_fluro_prototype/endoscopic_view/src/CMakeLists.txt:92
(target_compile_options):
Error evaluating generator expression:
$<COMPILE_LANGUAGE:CUDA>
$<COMPILE_LANGUAGE:...> may not be used with Visual Studio generators.
I think I may becoming fully aware of the meaning of these statements from
CMake doc and from initial post of this thread:
--snip--
CMake learned to support CUDA as a first-class language that can be enabled
via the project() and enable_language() commands.
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.*
The NVIDIA CUDA Toolkit compiler (nvcc) is supported.
--snip--
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.
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:
https://github.com/boostcon/cppnow_presentations_2017/blob/
master/05-19-2017_friday/effective_cmake__daniel_pfeifer__
cppnow_05-19-2017.pdf
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.
--
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