On 2019-09-24 14:02-0700 Alan W. Irwin wrote:
[...]
I. Possible feature request
After reading through the generator-expression documentation at
<https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html>
it appears for my use case (see below) I need generator expressions of
the form
$<$<NOT:$<LINK_LANGUAGE:D>>:-pthread>
$<$<LINK_LANG_AND_ID:D,gdc>:-pthread>
$<$<LINK_LANG_AND_ID:D,ldc2>:-Xcc-pthread>
$<$<LINK_LANG_AND_ID:D,dmd>:libbasename> (where libbasename is likely
pthread)
To follow up, I have just been informed on one of the dmd mailing
lists that the dmd developers have implemented an option in a
pre-release version of dmd 2.088.0 that will change the semantics of
-L so that dmd with that option (-preview=noXlinker) will interpret
-L-pthread as a request to pass that -pthread option on to the C
compiler used internally by dmd for linking. So when I implement this
fixed -preview=noXlinker option in PLplot's fork of the cmake-d dmd D
language support it appears the above dmd example of my possible
feature request above would change to
$<$<LINK_LANG_AND_ID:D,dmd>:-L-pthread>
And similarly I would use -L-pthread for dmd in my proposed workaround for
the lack of such generator-expressions right now.
In sum, some substantial uncertainty about how to handle the -pthread
option for the dmd case is now gone, but the question still persists
about whether I will always have to use the proposed messy workaround
(which requires building an extra variant of the PLplot library) or
whether I can look forward to someone implementing the above generator
expressions which would provide a neat solution to the -pthread
linking issue I have described.
Alan
__________________________
Alan W. Irwin
Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.org); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
--
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:
https://cmake.org/mailman/listinfo/cmake-developers