<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dear all,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<blockquote style="border-color: rgb(200, 200, 200); border-left: 3px solid rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex; color: rgb(102, 102, 102);">
<span>A naive grep tells me the IAR compiler detection sets CMAKE_CXX_LINK_FLAGS</span><span><br>
in its compiler detection.</span><br>
</blockquote>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
If I use `CMAKE_CXX_LINK_FLAGS`, I have to pass the option manually, which is not convenient. I was looking for something more automatic:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<ol>
<li>I set `cxx_std_14` in `target_compile_feature` of my `CMakeLists.txt`;<br>
</li><li>Then `CMAKE_CXX14_STANDARD_COMPILE_OPTION` is added to the compiler flags (which is the case);</li><li>Then `CMAKE_CXX14_STANDARD_LINK_OPTION` (or `CMAKE_CXX14_STANDARD_COMPILE_OPTION` by default) is added to the linker flags.</li></ol>
<div>I cannot find in the documentation if such a thing is possible. Is it?</div>
<div><br>
</div>
<div>Best regards,<br>
</div>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0">-- <br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><b>Paul Zehner, Ph. D.</b><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0">Invited Researcher</p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0">Numerical Simulation Research Unit</p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><b></b><i><b>Japan Aerospace Exploration Agency</b></i><b></b></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><i>7-44-1 Jindaiji Higashi-machi, Chofu-shi, Tokyo</i></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><i>182-8522, Japan</i></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><i>Tel. +81-50-3362-7933</i></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><i>Fax. +81-422-40-3327</i></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><a href="mailto:zehner.paul@jaxa.jp" class="OWAAutoLink">zehner.paul@jaxa.jp</a></p>
<p style="margin-top: 0px; margin-bottom: 0px;margin-top:0; margin-bottom:0"><a href="http://www.jaxa.jp" class="OWAAutoLink">www.jaxa.jp</a><br>
</p>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> CMake <cmake-bounces@cmake.org> on behalf of Patrick Griffiths <patrick.griffiths@gmail.com><br>
<b>Sent:</b> Friday, May 24, 2019 21:09<br>
<b>To:</b> cmake@cmake.org<br>
<b>Subject:</b> Re: [CMake] Support of compile features for Fujitsu C++ Compiler</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">A naive grep tells me the IAR compiler detection sets CMAKE_CXX_LINK_FLAGS<br>
in its compiler detection. Maybe that'd work for you?<br>
<br>
<br>
On Fri, May 24, 2019 at 3:48 AM Zehner Paul <zehner.paul@jaxa.jp> wrote:<br>
<br>
> Hello all,<br>
><br>
> So, I managed to configure my `Fujitsu-CXX.cmake` file to use the Fujitsu<br>
> C++ compiler with MPI as well. The problem of not detecting headers of the<br>
> STL (like `array`) was due to the fact the C++ standard flag was not set<br>
> correctly.<br>
><br>
> I am facing another problem though: the linker needs the C++ standard flag<br>
> to be set, which is not something GCC needs. I could not find a way to make<br>
> `CMAKE_CXX**_STANDARD_COMPILE_OPTION` applied to the linker as well. What I<br>
> am missing?<br>
><br>
> Best regards,<br>
><br>
> --<br>
><br>
> *Paul Zehner, Ph. D.*<br>
><br>
> Invited Researcher<br>
><br>
> Numerical Simulation Research Unit<br>
><br>
> *Japan Aerospace Exploration Agency*<br>
><br>
> *7-44-1 Jindaiji Higashi-machi, Chofu-shi, Tokyo*<br>
><br>
> *182-8522, Japan*<br>
><br>
> *Tel. +81-50-3362-7933*<br>
><br>
> *Fax. +81-422-40-3327*<br>
><br>
> zehner.paul@jaxa.jp<br>
><br>
> <a href="http://www.jaxa.jp">www.jaxa.jp</a><br>
> ------------------------------<br>
> *From:* CMake <cmake-bounces@cmake.org> on behalf of Zehner Paul <<br>
> zehner.paul@jaxa.jp><br>
> *Sent:* Tuesday, May 14, 2019 11:58<br>
> *To:* Robert Maynard<br>
> *Cc:* cmake@cmake.org<br>
> *Subject:* Re: [CMake] Support of compile features for Fujitsu C++<br>
> Compiler<br>
><br>
> Robert,<br>
><br>
> so that all users could benefit from the improved compiler detection :)<br>
> That is my plan! If I can make a compiler module which works well enough,<br>
> I will submit it as a merge request.<br>
><br>
> Regarding the detection of MPI with FindMPI, I failed to detect the MPI<br>
> compiler using `MPI_CXX_COMPILER_FLAGS`. But using the normal Fujitsu<br>
> compiler binary (not the wrapper) and setting `MPI_CXX_COMPILER`, I can<br>
> detect it.<br>
><br>
> The problem is now that it does not detect the STL anymore at compiling<br>
> time: "error: namespace "std" has no member "array"" (note that I used to<br>
> build the project with a hand made Makefile, so the source code is valid).<br>
> I checked the `include` directory of the compiler and it contains the Array<br>
> header, though. In other warnings, I clearly see that this `include`<br>
> directory is used. What is wrong here?<br>
><br>
> Best regards,<br>
><br>
><br>
> --<br>
><br>
> Paul Zehner, Ph. D.<br>
><br>
> Invited Researcher<br>
><br>
> Numerical Simulation Research Unit<br>
><br>
> Japan Aerospace Exploration Agency<br>
><br>
> 7-44-1 Jindaiji Higashi-machi, Chofu-shi, Tokyo<br>
><br>
> 182-8522, Japan<br>
><br>
> Tel. +81-50-3362-7933<br>
><br>
> Fax. +81-422-40-3327<br>
><br>
> zehner.paul@jaxa.jp<<a href=""></a>mailto:zehner.paul@jaxa.jp <zehner.paul@jaxa.jp>><br>
><br>
> www.jaxa.jp<<a href="http://www.jaxa.jp">http://www.jaxa.jp</a>><br>
><br>
> ________________________________<br>
> From: Robert Maynard <robert.maynard@kitware.com><br>
> Sent: Thursday, May 9, 2019 23:29<br>
> To: Zehner Paul<br>
> Cc: Kai Wolf; cmake@cmake.org<br>
> Subject: Re: [CMake] Support of compile features for Fujitsu C++ Compiler<br>
><br>
> The goal would be to upstream the compiler changes to cmake so that<br>
> all users could benefit from the improved compiler detection :)<br>
><br>
> I would look at the FindMPI docs on locating the correct mpi compiler:<br>
><br>
> <a href="https://cmake.org/cmake/help/v3.14/module/FindMPI.html#variables-for-locating-mpi">
https://cmake.org/cmake/help/v3.14/module/FindMPI.html#variables-for-locating-mpi</a><br>
> . It looks like what you will need to specify is<br>
> MPI_<lang>_COMPILER_FLAGS<br>
><br>
> On Wed, May 8, 2019 at 10:15 PM Zehner Paul <zehner.paul@jaxa.jp> wrote:<br>
> ><br>
> > Thank you for your answer.<br>
> ><br>
> > This means I have to override<br>
> `/usr/share/cmake/Modules/Compiler/Fujitsu-DetermineCompiler.cmake`? This<br>
> is not unfeasible, but it may seems tricky to my users. Since detecting<br>
> compiler version is not a crucial task, maybe I will keep this file as it<br>
> and concentrate on other ones.<br>
> ><br>
> > Another question I have is regarding MPI. The `find_package(MPI<br>
> REQUIRED)` directive fails with "Could NOT find MPI (missing:<br>
> MPI_CXX_FOUND)". I have no clue on how to help the detection of MPI. The<br>
> compiler I give to CMake is actually an MPI wrapper that only needs one<br>
> argument to enable MPI features. I tried with some exotic-named GCC<br>
> compilers at my lab (which are MPI wrappers as well) and it could detect<br>
> MPI with no problem. Where should I start?<br>
> ><br>
> > Best regards,<br>
> ><br>
> > --<br>
> ><br>
> > Paul Zehner, Ph. D.<br>
> ><br>
> > Invited Researcher<br>
> ><br>
> > Numerical Simulation Research Unit<br>
> ><br>
> > Japan Aerospace Exploration Agency<br>
> ><br>
> > 7-44-1 Jindaiji Higashi-machi, Chofu-shi, Tokyo<br>
> ><br>
> > 182-8522, Japan<br>
> ><br>
> > Tel. +81-50-3362-7933<br>
> ><br>
> > Fax. +81-422-40-3327<br>
> ><br>
> > zehner.paul@jaxa.jp<br>
> ><br>
> > www.jaxa.jp<<a href="http://www.jaxa.jp">http://www.jaxa.jp</a>><br>
> ><br>
> > ________________________________<br>
> > From: Robert Maynard <robert.maynard@kitware.com><br>
> > Sent: Thursday, May 9, 2019 3:12<br>
> > To: Zehner Paul<br>
> > Cc: Kai Wolf; cmake@cmake.org<br>
> > Subject: Re: [CMake] Support of compile features for Fujitsu C++ Compiler<br>
> ><br>
> > I believe the only way is to have your version of<br>
> > Fujitsu-DetermineCompiler.cmake be installed over the one provided by<br>
> > CMake. When it comes to known compilers CMake explicitly includes the<br>
> > version it ships.<br>
> ><br>
> > On Tue, May 7, 2019 at 11:01 PM Zehner Paul <zehner.paul@jaxa.jp> wrote:<br>
> > ><br>
> > > Robert,<br>
> > ><br>
> > > Thank you for the advice.<br>
> > ><br>
> > > As I want to take account of compiler version, I overrided the<br>
> `Fujitsu-DetermineCompiler.cmake` file by copy-pasting and editing it in<br>
> the folder of `CMAKE_MODULE_PATH`. However, the installation<br>
> `Fujitsu-DetermineCompiler.cmake` file is always used instead. What should<br>
> I do?<br>
> > ><br>
> > > Best regards,<br>
> > ><br>
> > > --<br>
> > ><br>
> > > Paul Zehner, Ph. D.<br>
> > ><br>
> > > Invited Researcher<br>
> > ><br>
> > > Numerical Simulation Research Unit<br>
> > ><br>
> > > Japan Aerospace Exploration Agency<br>
> > ><br>
> > > 7-44-1 Jindaiji Higashi-machi, Chofu-shi, Tokyo<br>
> > ><br>
> > > 182-8522, Japan<br>
> > ><br>
> > > Tel. +81-50-3362-7933<br>
> > ><br>
> > > Fax. +81-422-40-3327<br>
> > ><br>
> > > zehner.paul@jaxa.jp<br>
> > ><br>
> > > www.jaxa.jp<<a href="http://www.jaxa.jp">http://www.jaxa.jp</a>><br>
> > ><br>
> > > ________________________________<br>
> > > From: Robert Maynard <robert.maynard@kitware.com><br>
> > > Sent: Friday, April 26, 2019 23:32<br>
> > > To: Zehner Paul<br>
> > > Cc: Kai Wolf; cmake@cmake.org<br>
> > > Subject: Re: [CMake] Support of compile features for Fujitsu C++<br>
> Compiler<br>
> > ><br>
> > > For an initial implementation I would base the work on the PGI<br>
> > > compiler module (<br>
> > ><br>
> <a href="https://gitlab.kitware.com/cmake/cmake/blob/v3.14.3/Modules/Compiler/PGI-CXX.cmake">
https://gitlab.kitware.com/cmake/cmake/blob/v3.14.3/Modules/Compiler/PGI-CXX.cmake</a><br>
> > > ) not the GNU-CXX module.<br>
> > > This will allow you to add a new compiler with only meta-language<br>
> > > flags ( cxx_std_11, cxx_std_14, ... ) and you avoid the complexity of<br>
> > > having to manually build the feature tables.<br>
> > ><br>
> > > On Fri, Apr 26, 2019 at 3:58 AM Zehner Paul <zehner.paul@jaxa.jp><br>
> wrote:<br>
> > > ><br>
> > > > Kai,<br>
> > > ><br>
> > > ><br>
> > > > Thanks for your answer and for your presentation. So, I will try to<br>
> add support for this Fujitsu compiler. Is there a list of the common<br>
> compile features that I can base me upon? I plan use `GNU-CXX.cmake` as a<br>
> source of inspiration.<br>
> > > ><br>
> > > ><br>
> > > > If I succeed to complete the `Fujitsu-CXX.cmake` file, I will<br>
> propose it as a merge request.<br>
> > > ><br>
> > > ><br>
> > > > --<br>
> > > ><br>
> > > > Paul Zehner, Ph. D.<br>
> > > ><br>
> > > > Invited Researcher<br>
> > > ><br>
> > > > Numerical Simulation Research Unit<br>
> > > ><br>
> > > > Japan Aerospace Exploration Agency<br>
> > > ><br>
> > > > 7-44-1 Jindaiji Higashi-machi, Chofu-shi, Tokyo<br>
> > > ><br>
> > > > 182-8522, Japan<br>
> > > ><br>
> > > > Tel. +81-50-3362-7933<br>
> > > ><br>
> > > > Fax. +81-422-40-3327<br>
> > > ><br>
> > > > zehner.paul@jaxa.jp<br>
> > > ><br>
> > > > www.jaxa.jp<<a href="http://www.jaxa.jp">http://www.jaxa.jp</a>><br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > ________________________________<br>
> > > > From: Kai Wolf <kai.wolf@gmail.com><br>
> > > > Sent: Friday, April 26, 2019 16:22<br>
> > > > To: Zehner Paul<br>
> > > > Cc: cmake@cmake.org<br>
> > > > Subject: Re: [CMake] Support of compile features for Fujitsu C++<br>
> Compiler<br>
> > > ><br>
> > > > If you want to add support to your specific compiler, you could add<br>
> or extend another Fujitsu-DetermineCompiler.cmake<br>
> > > > file and append your CMAKE_MODULE_PATH in order to CMake to find it.<br>
> You probably also need to adjust<br>
> > > > *Fujitsu-CXX.cmake, Fujitsu-CXX-FeatureTests.cmake and so on.<br>
> > > ><br>
> > > > I gave a talk a few years ago that shortly explains the whole<br>
> process of CMake initialization and compiler verification which<br>
> > > > you can find here:<br>
> <a href="https://github.com/NewProggie/Talks/blob/master/2017-06-dep-management-with-cmake-MUC%2B%2B.pdf">
https://github.com/NewProggie/Talks/blob/master/2017-06-dep-management-with-cmake-MUC%2B%2B.pdf</a><br>
> > > ><br>
> > > ><br>
> > > > Greetings,<br>
> > > ><br>
> > > > Kai<br>
> > > ><br>
> > > > <a href="http://kai-wolf.me">http://kai-wolf.me</a><br>
> > > > <a href="http://effective-cmake.com">http://effective-cmake.com</a><br>
> > > ><br>
> > > > Am 26.04.2019 um 07:35 schrieb Zehner Paul <zehner.paul@jaxa.jp>:<br>
> > > ><br>
> > > > Hello Cmake community,<br>
> > > ><br>
> > > > I would like to use Cmake to build research simulation programs in a<br>
> Fujitsu supercomputer environment. Unfortunately, it seems that Cmake<br>
> (version 3.14) does not support any compile feature for the Fujitsu C++<br>
> compiler (FCCpx, version 2.0.0 P-id: T01815-02 (Jul 12 2018 13:13:18)). I<br>
> add I am pretty new to Cmake. Searching for similar issues, I found only<br>
> this [thread](<br>
> <a href="https://cmake.org/pipermail/cmake-developers/2014-August/010989.html">
https://cmake.org/pipermail/cmake-developers/2014-August/010989.html</a>),<br>
> which talk about basic support of the compiler.<br>
> > > ><br>
> > > > I tested it on a simple project, and the line:<br>
> > > ><br>
> > > > ```cmake<br>
> > > > target_compile_features(test PUBLIC cxx_std_11)<br>
> > > > ```<br>
> > > ><br>
> > > > fails with this message:<br>
> > > ><br>
> > > > ```<br>
> > > > CMake Error at CMakeLists.txt:15 (target_compile_features):<br>
> > > > target_compile_features no known features for CXX compiler<br>
> > > ><br>
> > > > "Fujitsu"<br>
> > > ><br>
> > > > version .<br>
> > > ><br>
> > > > ```<br>
> > > ><br>
> > > > So, it seems that the compiler is detected (without its version),<br>
> but compile features are not known. To be sure, I ran this simple test to<br>
> list any supported features:<br>
> > > ><br>
> > > > ```cmake<br>
> > > > cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)<br>
> > > > project(foobar CXX)<br>
> > > > message("Your C++ compiler supports these C++ features:")<br>
> > > > foreach(i ${CMAKE_CXX_COMPILE_FEATURES})<br>
> > > > message("${i}")<br>
> > > > endforeach()<br>
> > > > ```<br>
> > > ><br>
> > > > and no feature are listed.<br>
> > > ><br>
> > > > So, what should I do from now on? Are there some people here using<br>
> Cmake with Fujitsu who could help me? Should I propose a patch with the<br>
> different compile features of the compiler? Or should I address it to<br>
> Fujitsu?<br>
> > > ><br>
> > > > Thanks for your help,<br>
> > > ><br>
> > > > --<br>
> > > > Paul Zehner, Ph. D.<br>
> > > > Invited Researcher<br>
> > > > Numerical Simulation Research Unit<br>
> > > > Japan Aerospace Exploration Agency<br>
> > > > 7-44-1 Jindaiji Higashi-machi, Chofu-shi, Tokyo<br>
> > > > 182-8522, Japan<br>
> > > > Tel. +81-50-3362-7933<br>
> > > > Fax. +81-422-40-3327<br>
> > > > zehner.paul@jaxa.jp<br>
> > > > www.jaxa.jp<<a href="http://www.jaxa.jp">http://www.jaxa.jp</a>><br>
> > > > --<br>
> > > ><br>
> > > > Powered by www.kitware.com<<a href="http://www.kitware.com">http://www.kitware.com</a>><br>
> > > ><br>
> > > > Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
> > > ><br>
> > > > Kitware offers various services to support the CMake community. For<br>
> more information on each offering, please visit:<br>
> > > ><br>
> > > > CMake Support: <a href="http://cmake.org/cmake/help/support.html">http://cmake.org/cmake/help/support.html</a><br>
> > > > CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html">http://cmake.org/cmake/help/consulting.html</a><br>
> > > > CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html">
http://cmake.org/cmake/help/training.html</a><br>
> > > ><br>
> > > > Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html">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">https://cmake.org/mailman/listinfo/cmake</a><br>
> > > ><br>
> > > ><br>
> > > > --<br>
> > > ><br>
> > > > Powered by www.kitware.com<<a href="http://www.kitware.com">http://www.kitware.com</a>><br>
> > > ><br>
> > > > Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
> > > ><br>
> > > > Kitware offers various services to support the CMake community. For<br>
> more information on each offering, please visit:<br>
> > > ><br>
> > > > CMake Support: <a href="http://cmake.org/cmake/help/support.html">http://cmake.org/cmake/help/support.html</a><br>
> > > > CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html">http://cmake.org/cmake/help/consulting.html</a><br>
> > > > CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html">
http://cmake.org/cmake/help/training.html</a><br>
> > > ><br>
> > > > Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html">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">https://cmake.org/mailman/listinfo/cmake</a><br>
> --<br>
><br>
> Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Kitware offers various services to support the CMake community. For more<br>
> information on each offering, please visit:<br>
><br>
> CMake Support: <a href="http://cmake.org/cmake/help/support.html">http://cmake.org/cmake/help/support.html</a><br>
> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html">http://cmake.org/cmake/help/consulting.html</a><br>
> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html">http://cmake.org/cmake/help/training.html</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html">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">https://cmake.org/mailman/listinfo/cmake</a><br>
><br>
</div>
</span></font></div>
</body>
</html>