<div dir="ltr">Thank. Yeah, I've seen BLT through it's use in RAJA. You're right, it'd work, but I'm reluctant to stray away from "vanilla" cmake too much, since other people will have to deal with this code, and cmake itself is already quite a step up from the regular Makefiles that they're used to.<div><br></div><div>--Kai</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 2, 2019 at 4:14 PM David Poliakoff <<a href="mailto:david.poliakoff@gmail.com">david.poliakoff@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Kai,</div><div><br></div><div>If you're game to use a framework, back at LLNL I used a CMake system called BLT a lot (<a href="https://github.com/LLNL/blt" target="_blank">https://github.com/LLNL/blt</a> ). I believe it uses something similar to what you've been recommended (get_target_property, set_source_files_properties), but it has a mechanism where you say targets "depend on" things, and if a target "depends_on" CUDA it uses the CUDA compiler (and behaves similarly for MPI). <br></div><div><br></div><div>I know frameworks are a big shift, but it always saved me more effort than it cost me in similar problems, and if you're looking at things like RAJA and Kokkos it's probably going to be up your alley.<br></div><div><br></div><div>Best,</div><div><br></div><div>David P</div><div><br></div><div>Opinions in this email are my own, not those of my employer<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 2, 2019 at 12:44 PM Kai Germaschewski <<a href="mailto:kai.germaschewski@gmail.com" target="_blank">kai.germaschewski@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 2, 2019 at 2:48 PM Robert Maynard <<a href="mailto:robert.maynard@kitware.com" target="_blank">robert.maynard@kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">get_target_property(source_files <target> SOURCES)<br>
set_source_files_properties(${source_files} PROPERTIES LANGUAGE CUDA)<br></blockquote><div><br></div><div>Thanks, that'll work for the time being, I can put this into a function/macro and it'll look alright.</div><div><br></div><div>--Kai</div><div> </div></div></div>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail-m_-6632258581211921865gmail_signature">Thanks,<br><br>David</div>
</blockquote></div>