C/C++ IDE support for HotSpot

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

C/C++ IDE support for HotSpot

Mikael Gerdin
Hi all,

I've finally grown tired of manually setting up a hand crafted Eclipse
CDT configuration for the JVM sources and decided to share my progress
towards improving the overall situation for JVM developers.

To achieve better IDE support without having to add project generators
for all different kinds of past or future IDEs I've decided to try to
leverage CMake to do project generation.
The idea is to have the JDK build system generate a CMakeLists.txt
describing all the include paths and definitions required by an IDE to
interpret the sources correctly.

Several modern IDEs natively support CMake but we can also rely on the
fact that the CMake build system has the ability to generate projects
for a number of different IDEs. For information about which generators
CMake supports see
https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html
for your CMake version.

To try this out check out (heh) my branch "JDK-8177329-cmake-branch" in
the jdk10/sandbox forest:
http://hg.openjdk.java.net/jdk10/sandbox/branches
So far I've only made changes in the toplevel and hotspot repositories.
I've written a short readme in the repo:
http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-8177329-cmake-branch/README-cmake.html

It would be great if people tried this out to see if it works on their
setup but I don't expect it to work on Windows without changing the
makefile to do path conversion.
If we can make this work properly then perhaps we can get rid of the
Visual Studio generator and rely on CMake to generate VS projects.

It would also be great if someone from build-dev could give me some
hints about how to do the file writing and "vardeps" thing properly.

Thanks
/Mikael
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C/C++ IDE support for HotSpot

Stanislav Smirnov
Hi Mikael,

why do not you try NetBeans that has openjdk project support out of the box?
common/nb_native/nbproject

Best regards,
Stanislav Smirnov





> On 22 Mar 2017, at 17:21, Mikael Gerdin <[hidden email]> wrote:
>
> Hi all,
>
> I've finally grown tired of manually setting up a hand crafted Eclipse CDT configuration for the JVM sources and decided to share my progress towards improving the overall situation for JVM developers.
>
> To achieve better IDE support without having to add project generators for all different kinds of past or future IDEs I've decided to try to leverage CMake to do project generation.
> The idea is to have the JDK build system generate a CMakeLists.txt describing all the include paths and definitions required by an IDE to interpret the sources correctly.
>
> Several modern IDEs natively support CMake but we can also rely on the fact that the CMake build system has the ability to generate projects for a number of different IDEs. For information about which generators CMake supports see
> https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html
> for your CMake version.
>
> To try this out check out (heh) my branch "JDK-8177329-cmake-branch" in the jdk10/sandbox forest:
> http://hg.openjdk.java.net/jdk10/sandbox/branches
> So far I've only made changes in the toplevel and hotspot repositories.
> I've written a short readme in the repo:
> http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-8177329-cmake-branch/README-cmake.html
>
> It would be great if people tried this out to see if it works on their setup but I don't expect it to work on Windows without changing the makefile to do path conversion.
> If we can make this work properly then perhaps we can get rid of the Visual Studio generator and rely on CMake to generate VS projects.
>
> It would also be great if someone from build-dev could give me some hints about how to do the file writing and "vardeps" thing properly.
>
> Thanks
> /Mikael

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C/C++ IDE support for HotSpot

Erik Osterlund
In reply to this post by Mikael Gerdin
Hi Mikael,

In my workflow I use emacs with rtags for snytax awareness.
With your cmake patch, I could easily generate the cmake files and run
cmake  with -DCMAKE_EXPORT_COMPILE_COMMANDS to generate the
compiler_commands.json file used by rtags to understand how the code
fits together, and feed it to rdm. Everything worked out of the box.

With these changes it was faster than ever to setup a good emacs-based
project for hotspot development. So I encourage these changes!

Thanks,
/Erik

On 2017-03-22 15:21, Mikael Gerdin wrote:

> Hi all,
>
> I've finally grown tired of manually setting up a hand crafted Eclipse
> CDT configuration for the JVM sources and decided to share my progress
> towards improving the overall situation for JVM developers.
>
> To achieve better IDE support without having to add project generators
> for all different kinds of past or future IDEs I've decided to try to
> leverage CMake to do project generation.
> The idea is to have the JDK build system generate a CMakeLists.txt
> describing all the include paths and definitions required by an IDE to
> interpret the sources correctly.
>
> Several modern IDEs natively support CMake but we can also rely on the
> fact that the CMake build system has the ability to generate projects
> for a number of different IDEs. For information about which generators
> CMake supports see
> https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html
> for your CMake version.
>
> To try this out check out (heh) my branch "JDK-8177329-cmake-branch"
> in the jdk10/sandbox forest:
> http://hg.openjdk.java.net/jdk10/sandbox/branches
> So far I've only made changes in the toplevel and hotspot repositories.
> I've written a short readme in the repo:
> http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-8177329-cmake-branch/README-cmake.html 
>
>
> It would be great if people tried this out to see if it works on their
> setup but I don't expect it to work on Windows without changing the
> makefile to do path conversion.
> If we can make this work properly then perhaps we can get rid of the
> Visual Studio generator and rely on CMake to generate VS projects.
>
> It would also be great if someone from build-dev could give me some
> hints about how to do the file writing and "vardeps" thing properly.
>
> Thanks
> /Mikael

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C/C++ IDE support for HotSpot

jesper.wilhelmsson
In reply to this post by Stanislav Smirnov
Hi,

I use the OpenJDK NetBeans project most of the time and am very happy with it. I still think Mikael's initiative is a very good one since I don't believe in forcing developers to use some specific tools, but rather think that we should make the OpenJDK code available to as many developers as possible regardless of their IDE preference.

The technology should adapt to humans, humans should not adapt to technology.

Thanks,
/Jesper

> On 22 Mar 2017, at 16:02, Stanislav Smirnov <[hidden email]> wrote:
>
> Hi Mikael,
>
> why do not you try NetBeans that has openjdk project support out of the box?
> common/nb_native/nbproject
>
> Best regards,
> Stanislav Smirnov
>
>
>> On 22 Mar 2017, at 17:21, Mikael Gerdin <[hidden email]> wrote:
>>
>> Hi all,
>>
>> I've finally grown tired of manually setting up a hand crafted Eclipse CDT configuration for the JVM sources and decided to share my progress towards improving the overall situation for JVM developers.
>>
>> To achieve better IDE support without having to add project generators for all different kinds of past or future IDEs I've decided to try to leverage CMake to do project generation.
>> The idea is to have the JDK build system generate a CMakeLists.txt describing all the include paths and definitions required by an IDE to interpret the sources correctly.
>>
>> Several modern IDEs natively support CMake but we can also rely on the fact that the CMake build system has the ability to generate projects for a number of different IDEs. For information about which generators CMake supports see
>> https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html
>> for your CMake version.
>>
>> To try this out check out (heh) my branch "JDK-8177329-cmake-branch" in the jdk10/sandbox forest:
>> http://hg.openjdk.java.net/jdk10/sandbox/branches
>> So far I've only made changes in the toplevel and hotspot repositories.
>> I've written a short readme in the repo:
>> http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-8177329-cmake-branch/README-cmake.html
>>
>> It would be great if people tried this out to see if it works on their setup but I don't expect it to work on Windows without changing the makefile to do path conversion.
>> If we can make this work properly then perhaps we can get rid of the Visual Studio generator and rely on CMake to generate VS projects.
>>
>> It would also be great if someone from build-dev could give me some hints about how to do the file writing and "vardeps" thing properly.
>>
>> Thanks
>> /Mikael
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C/C++ IDE support for HotSpot

Thomas Stüfe-2
In reply to this post by Stanislav Smirnov
Hi Stanislav,

last time I checked, there was no support for netbeans on Windows, is that
still the case?

Thanks, Thomas

On Wed, Mar 22, 2017 at 4:02 PM, Stanislav Smirnov <
[hidden email]> wrote:

> Hi Mikael,
>
> why do not you try NetBeans that has openjdk project support out of the
> box?
> common/nb_native/nbproject
>
> Best regards,
> Stanislav Smirnov
>
>
>
>
>
> > On 22 Mar 2017, at 17:21, Mikael Gerdin <[hidden email]>
> wrote:
> >
> > Hi all,
> >
> > I've finally grown tired of manually setting up a hand crafted Eclipse
> CDT configuration for the JVM sources and decided to share my progress
> towards improving the overall situation for JVM developers.
> >
> > To achieve better IDE support without having to add project generators
> for all different kinds of past or future IDEs I've decided to try to
> leverage CMake to do project generation.
> > The idea is to have the JDK build system generate a CMakeLists.txt
> describing all the include paths and definitions required by an IDE to
> interpret the sources correctly.
> >
> > Several modern IDEs natively support CMake but we can also rely on the
> fact that the CMake build system has the ability to generate projects for a
> number of different IDEs. For information about which generators CMake
> supports see
> > https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html
> > for your CMake version.
> >
> > To try this out check out (heh) my branch "JDK-8177329-cmake-branch" in
> the jdk10/sandbox forest:
> > http://hg.openjdk.java.net/jdk10/sandbox/branches
> > So far I've only made changes in the toplevel and hotspot repositories.
> > I've written a short readme in the repo:
> > http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-
> 8177329-cmake-branch/README-cmake.html
> >
> > It would be great if people tried this out to see if it works on their
> setup but I don't expect it to work on Windows without changing the
> makefile to do path conversion.
> > If we can make this work properly then perhaps we can get rid of the
> Visual Studio generator and rely on CMake to generate VS projects.
> >
> > It would also be great if someone from build-dev could give me some
> hints about how to do the file writing and "vardeps" thing properly.
> >
> > Thanks
> > /Mikael
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C/C++ IDE support for HotSpot

Stanislav Smirnov
Hi Thomas,

according to https://netbeans.org/downloads/ there is Windows platform with C/C++ support if I understood you correctly.

Best regards,
Stanislav Smirnov





> On 22 Mar 2017, at 20:34, Thomas Stüfe <[hidden email]> wrote:
>
> Hi Stanislav,
>
> last time I checked, there was no support for netbeans on Windows, is that still the case?
>
> Thanks, Thomas
>
> On Wed, Mar 22, 2017 at 4:02 PM, Stanislav Smirnov <[hidden email] <mailto:[hidden email]>> wrote:
> Hi Mikael,
>
> why do not you try NetBeans that has openjdk project support out of the box?
> common/nb_native/nbproject
>
> Best regards,
> Stanislav Smirnov
>
>
>
>
>
> > On 22 Mar 2017, at 17:21, Mikael Gerdin <[hidden email] <mailto:[hidden email]>> wrote:
> >
> > Hi all,
> >
> > I've finally grown tired of manually setting up a hand crafted Eclipse CDT configuration for the JVM sources and decided to share my progress towards improving the overall situation for JVM developers.
> >
> > To achieve better IDE support without having to add project generators for all different kinds of past or future IDEs I've decided to try to leverage CMake to do project generation.
> > The idea is to have the JDK build system generate a CMakeLists.txt describing all the include paths and definitions required by an IDE to interpret the sources correctly.
> >
> > Several modern IDEs natively support CMake but we can also rely on the fact that the CMake build system has the ability to generate projects for a number of different IDEs. For information about which generators CMake supports see
> > https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html <https://urldefense.proofpoint.com/v2/url?u=https-3A__cmake.org_cmake_help_v3.5_manual_cmake-2Dgenerators.7.html&d=DwMFaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=9YfM3bKkWy3cpyWthRfyfAiQHbbMKEPL6snPxtZtjh8&m=hZmVYDLD5jMoRUkVz8XSkqkO_WmXFskfsKbJ4lRDXcU&s=Sd11q12ajJn0vRz4qbXDgiUXj_I9vj21kOa5c_hSLM8&e=>
> > for your CMake version.
> >
> > To try this out check out (heh) my branch "JDK-8177329-cmake-branch" in the jdk10/sandbox forest:
> > http://hg.openjdk.java.net/jdk10/sandbox/branches <http://hg.openjdk.java.net/jdk10/sandbox/branches>
> > So far I've only made changes in the toplevel and hotspot repositories.
> > I've written a short readme in the repo:
> > http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-8177329-cmake-branch/README-cmake.html <http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-8177329-cmake-branch/README-cmake.html>
> >
> > It would be great if people tried this out to see if it works on their setup but I don't expect it to work on Windows without changing the makefile to do path conversion.
> > If we can make this work properly then perhaps we can get rid of the Visual Studio generator and rely on CMake to generate VS projects.
> >
> > It would also be great if someone from build-dev could give me some hints about how to do the file writing and "vardeps" thing properly.
> >
> > Thanks
> > /Mikael
>
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C/C++ IDE support for HotSpot

jesper.wilhelmsson
In reply to this post by Thomas Stüfe-2
Hi,

The project in common/nb_native/nbproject does not have a build configuration for Windows. The project itself should still be usable for browsing the code, but it might require some changes to make it build correctly. If you have a NetBeans / SolarisStudio installation on Windows and want to make the changes required to add a build configuration for Windows I'd be happy to sponsor the change.

Thanks,
/Jesper

> On 22 Mar 2017, at 18:34, Thomas Stüfe <[hidden email]> wrote:
>
> Hi Stanislav,
>
> last time I checked, there was no support for netbeans on Windows, is that
> still the case?
>
> Thanks, Thomas
>
> On Wed, Mar 22, 2017 at 4:02 PM, Stanislav Smirnov <
> [hidden email]> wrote:
>
>> Hi Mikael,
>>
>> why do not you try NetBeans that has openjdk project support out of the
>> box?
>> common/nb_native/nbproject
>>
>> Best regards,
>> Stanislav Smirnov
>>
>>
>>
>>
>>
>>> On 22 Mar 2017, at 17:21, Mikael Gerdin <[hidden email]>
>> wrote:
>>>
>>> Hi all,
>>>
>>> I've finally grown tired of manually setting up a hand crafted Eclipse
>> CDT configuration for the JVM sources and decided to share my progress
>> towards improving the overall situation for JVM developers.
>>>
>>> To achieve better IDE support without having to add project generators
>> for all different kinds of past or future IDEs I've decided to try to
>> leverage CMake to do project generation.
>>> The idea is to have the JDK build system generate a CMakeLists.txt
>> describing all the include paths and definitions required by an IDE to
>> interpret the sources correctly.
>>>
>>> Several modern IDEs natively support CMake but we can also rely on the
>> fact that the CMake build system has the ability to generate projects for a
>> number of different IDEs. For information about which generators CMake
>> supports see
>>> https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html
>>> for your CMake version.
>>>
>>> To try this out check out (heh) my branch "JDK-8177329-cmake-branch" in
>> the jdk10/sandbox forest:
>>> http://hg.openjdk.java.net/jdk10/sandbox/branches
>>> So far I've only made changes in the toplevel and hotspot repositories.
>>> I've written a short readme in the repo:
>>> http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-
>> 8177329-cmake-branch/README-cmake.html
>>>
>>> It would be great if people tried this out to see if it works on their
>> setup but I don't expect it to work on Windows without changing the
>> makefile to do path conversion.
>>> If we can make this work properly then perhaps we can get rid of the
>> Visual Studio generator and rely on CMake to generate VS projects.
>>>
>>> It would also be great if someone from build-dev could give me some
>> hints about how to do the file writing and "vardeps" thing properly.
>>>
>>> Thanks
>>> /Mikael
>>
>>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C/C++ IDE support for HotSpot

Thomas Stüfe-2
Hi Jesper,

thank you. Yes, this was my experience last time I tried it, that the
windows build configuration was missing and that the Indexer did not work
as well as expected (did, of course, not find any system headers etc). I
did not feel like putting work into it, so I went back to CDT. I might look
at it again though.

Kind Regards, Thomas

On Wed, Mar 22, 2017 at 6:45 PM, <[hidden email]> wrote:

> Hi,
>
> The project in common/nb_native/nbproject does not have a build
> configuration for Windows. The project itself should still be usable for
> browsing the code, but it might require some changes to make it build
> correctly. If you have a NetBeans / SolarisStudio installation on Windows
> and want to make the changes required to add a build configuration for
> Windows I'd be happy to sponsor the change.
>
> Thanks,
> /Jesper
>
> > On 22 Mar 2017, at 18:34, Thomas Stüfe <[hidden email]> wrote:
> >
> > Hi Stanislav,
> >
> > last time I checked, there was no support for netbeans on Windows, is
> that
> > still the case?
> >
> > Thanks, Thomas
> >
> > On Wed, Mar 22, 2017 at 4:02 PM, Stanislav Smirnov <
> > [hidden email]> wrote:
> >
> >> Hi Mikael,
> >>
> >> why do not you try NetBeans that has openjdk project support out of the
> >> box?
> >> common/nb_native/nbproject
> >>
> >> Best regards,
> >> Stanislav Smirnov
> >>
> >>
> >>
> >>
> >>
> >>> On 22 Mar 2017, at 17:21, Mikael Gerdin <[hidden email]>
> >> wrote:
> >>>
> >>> Hi all,
> >>>
> >>> I've finally grown tired of manually setting up a hand crafted Eclipse
> >> CDT configuration for the JVM sources and decided to share my progress
> >> towards improving the overall situation for JVM developers.
> >>>
> >>> To achieve better IDE support without having to add project generators
> >> for all different kinds of past or future IDEs I've decided to try to
> >> leverage CMake to do project generation.
> >>> The idea is to have the JDK build system generate a CMakeLists.txt
> >> describing all the include paths and definitions required by an IDE to
> >> interpret the sources correctly.
> >>>
> >>> Several modern IDEs natively support CMake but we can also rely on the
> >> fact that the CMake build system has the ability to generate projects
> for a
> >> number of different IDEs. For information about which generators CMake
> >> supports see
> >>> https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html
> >>> for your CMake version.
> >>>
> >>> To try this out check out (heh) my branch "JDK-8177329-cmake-branch" in
> >> the jdk10/sandbox forest:
> >>> http://hg.openjdk.java.net/jdk10/sandbox/branches
> >>> So far I've only made changes in the toplevel and hotspot repositories.
> >>> I've written a short readme in the repo:
> >>> http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-
> >> 8177329-cmake-branch/README-cmake.html
> >>>
> >>> It would be great if people tried this out to see if it works on their
> >> setup but I don't expect it to work on Windows without changing the
> >> makefile to do path conversion.
> >>> If we can make this work properly then perhaps we can get rid of the
> >> Visual Studio generator and rely on CMake to generate VS projects.
> >>>
> >>> It would also be great if someone from build-dev could give me some
> >> hints about how to do the file writing and "vardeps" thing properly.
> >>>
> >>> Thanks
> >>> /Mikael
> >>
> >>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C/C++ IDE support for HotSpot

Thomas Stüfe-2
In reply to this post by Stanislav Smirnov
Hi Stanislav,

thanks. See my answer to Jesper. I was using Netbeans on Windows and was
missing Windows Configuration files. Sorry for being unclear.

Kind Regards, Thomas

On Wed, Mar 22, 2017 at 6:40 PM, Stanislav Smirnov <
[hidden email]> wrote:

> Hi Thomas,
>
> according to https://netbeans.org/downloads/ there is Windows platform
> with C/C++ support if I understood you correctly.
>
> Best regards,
> Stanislav Smirnov
>
>
>
>
>
> On 22 Mar 2017, at 20:34, Thomas Stüfe <[hidden email]> wrote:
>
> Hi Stanislav,
>
> last time I checked, there was no support for netbeans on Windows, is that
> still the case?
>
> Thanks, Thomas
>
> On Wed, Mar 22, 2017 at 4:02 PM, Stanislav Smirnov <
> [hidden email]> wrote:
>
>> Hi Mikael,
>>
>> why do not you try NetBeans that has openjdk project support out of the
>> box?
>> common/nb_native/nbproject
>>
>> Best regards,
>> Stanislav Smirnov
>>
>>
>>
>>
>>
>> > On 22 Mar 2017, at 17:21, Mikael Gerdin <[hidden email]>
>> wrote:
>> >
>> > Hi all,
>> >
>> > I've finally grown tired of manually setting up a hand crafted Eclipse
>> CDT configuration for the JVM sources and decided to share my progress
>> towards improving the overall situation for JVM developers.
>> >
>> > To achieve better IDE support without having to add project generators
>> for all different kinds of past or future IDEs I've decided to try to
>> leverage CMake to do project generation.
>> > The idea is to have the JDK build system generate a CMakeLists.txt
>> describing all the include paths and definitions required by an IDE to
>> interpret the sources correctly.
>> >
>> > Several modern IDEs natively support CMake but we can also rely on the
>> fact that the CMake build system has the ability to generate projects for a
>> number of different IDEs. For information about which generators CMake
>> supports see
>> > https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__cmake.org_cmake_help_v3.5_manual_cmake-2Dgenerators.7.html&d=DwMFaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=9YfM3bKkWy3cpyWthRfyfAiQHbbMKEPL6snPxtZtjh8&m=hZmVYDLD5jMoRUkVz8XSkqkO_WmXFskfsKbJ4lRDXcU&s=Sd11q12ajJn0vRz4qbXDgiUXj_I9vj21kOa5c_hSLM8&e=>
>> > for your CMake version.
>> >
>> > To try this out check out (heh) my branch "JDK-8177329-cmake-branch" in
>> the jdk10/sandbox forest:
>> > http://hg.openjdk.java.net/jdk10/sandbox/branches
>> > So far I've only made changes in the toplevel and hotspot repositories.
>> > I've written a short readme in the repo:
>> > http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-817732
>> 9-cmake-branch/README-cmake.html
>> >
>> > It would be great if people tried this out to see if it works on their
>> setup but I don't expect it to work on Windows without changing the
>> makefile to do path conversion.
>> > If we can make this work properly then perhaps we can get rid of the
>> Visual Studio generator and rely on CMake to generate VS projects.
>> >
>> > It would also be great if someone from build-dev could give me some
>> hints about how to do the file writing and "vardeps" thing properly.
>> >
>> > Thanks
>> > /Mikael
>>
>>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C/C++ IDE support for HotSpot

Mario Torre-5
In reply to this post by jesper.wilhelmsson
For what is worth, I agree.

Cheers,
Mario


On Wed, 22 Mar 2017 at 17:37, <[hidden email]> wrote:

> Hi,
>
> I use the OpenJDK NetBeans project most of the time and am very happy with
> it. I still think Mikael's initiative is a very good one since I don't
> believe in forcing developers to use some specific tools, but rather think
> that we should make the OpenJDK code available to as many developers as
> possible regardless of their IDE preference.
>
> The technology should adapt to humans, humans should not adapt to
> technology.
>
> Thanks,
> /Jesper
>
> > On 22 Mar 2017, at 16:02, Stanislav Smirnov <
> [hidden email]> wrote:
> >
> > Hi Mikael,
> >
> > why do not you try NetBeans that has openjdk project support out of the
> box?
> > common/nb_native/nbproject
> >
> > Best regards,
> > Stanislav Smirnov
> >
> >
> >> On 22 Mar 2017, at 17:21, Mikael Gerdin <[hidden email]>
> wrote:
> >>
> >> Hi all,
> >>
> >> I've finally grown tired of manually setting up a hand crafted Eclipse
> CDT configuration for the JVM sources and decided to share my progress
> towards improving the overall situation for JVM developers.
> >>
> >> To achieve better IDE support without having to add project generators
> for all different kinds of past or future IDEs I've decided to try to
> leverage CMake to do project generation.
> >> The idea is to have the JDK build system generate a CMakeLists.txt
> describing all the include paths and definitions required by an IDE to
> interpret the sources correctly.
> >>
> >> Several modern IDEs natively support CMake but we can also rely on the
> fact that the CMake build system has the ability to generate projects for a
> number of different IDEs. For information about which generators CMake
> supports see
> >> https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html
> >> for your CMake version.
> >>
> >> To try this out check out (heh) my branch "JDK-8177329-cmake-branch" in
> the jdk10/sandbox forest:
> >> http://hg.openjdk.java.net/jdk10/sandbox/branches
> >> So far I've only made changes in the toplevel and hotspot repositories.
> >> I've written a short readme in the repo:
> >>
> http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-8177329-cmake-branch/README-cmake.html
> >>
> >> It would be great if people tried this out to see if it works on their
> setup but I don't expect it to work on Windows without changing the
> makefile to do path conversion.
> >> If we can make this work properly then perhaps we can get rid of the
> Visual Studio generator and rely on CMake to generate VS projects.
> >>
> >> It would also be great if someone from build-dev could give me some
> hints about how to do the file writing and "vardeps" thing properly.
> >>
> >> Thanks
> >> /Mikael
> >
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C/C++ IDE support for HotSpot

Severin Gehwolf
In reply to this post by Mikael Gerdin
Hi,

On Wed, 2017-03-22 at 15:21 +0100, Mikael Gerdin wrote:

> Hi all,
>
> I've finally grown tired of manually setting up a hand crafted Eclipse 
> CDT configuration for the JVM sources and decided to share my progress 
> towards improving the overall situation for JVM developers.
>
> To achieve better IDE support without having to add project generators 
> for all different kinds of past or future IDEs I've decided to try to 
> leverage CMake to do project generation.
> The idea is to have the JDK build system generate a CMakeLists.txt 
> describing all the include paths and definitions required by an IDE to 
> interpret the sources correctly.
>
> Several modern IDEs natively support CMake but we can also rely on the 
> fact that the CMake build system has the ability to generate projects 
> for a number of different IDEs. For information about which generators 
> CMake supports see
> https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html
> for your CMake version.
>
> To try this out check out (heh) my branch "JDK-8177329-cmake-branch" in 
> the jdk10/sandbox forest:
> http://hg.openjdk.java.net/jdk10/sandbox/branches
> So far I've only made changes in the toplevel and hotspot repositories.
> I've written a short readme in the repo:
> http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-8177329-cmake-branch/README-cmake.html
>
> It would be great if people tried this out to see if it works on their 
> setup but I don't expect it to work on Windows without changing the 
> makefile to do path conversion.
> If we can make this work properly then perhaps we can get rid of the 
> Visual Studio generator and rely on CMake to generate VS projects.
>
> It would also be great if someone from build-dev could give me some 
> hints about how to do the file writing and "vardeps" thing properly.

I, for one, wholeheartedly support this effort. Hopefully this will get
in. Kudos! Note: I didn't have time to test this yet.

Thanks,
Severin

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C/C++ IDE support for HotSpot

Robbin Ehn
In reply to this post by Erik Osterlund
Hi Mikeal,

On 03/22/2017 05:20 PM, Erik Österlund wrote:
> Hi Mikael,
>
> In my workflow I use emacs with rtags for snytax awareness.
> With your cmake patch, I could easily generate the cmake files and run cmake  with -DCMAKE_EXPORT_COMPILE_COMMANDS to generate the compiler_commands.json file used by rtags
> to understand how the code fits together, and feed it to rdm. Everything worked out of the box.

I also use rtags, but with vim.

>
> With these changes it was faster than ever to setup a good emacs-based project for hotspot development. So I encourage these changes!

I have not tested this, but it must be faster, since now I compile the source twice, once with gcc and once with clang for rtags.

Can cmake do incremental updates to compiler_command.json file, would be awesome if so? (Erik?)

Thanks for doing this!

/Robbin

>
> Thanks,
> /Erik
>
> On 2017-03-22 15:21, Mikael Gerdin wrote:
>> Hi all,
>>
>> I've finally grown tired of manually setting up a hand crafted Eclipse CDT configuration for the JVM sources and decided to share my progress towards improving the
>> overall situation for JVM developers.
>>
>> To achieve better IDE support without having to add project generators for all different kinds of past or future IDEs I've decided to try to leverage CMake to do project
>> generation.
>> The idea is to have the JDK build system generate a CMakeLists.txt describing all the include paths and definitions required by an IDE to interpret the sources correctly.
>>
>> Several modern IDEs natively support CMake but we can also rely on the fact that the CMake build system has the ability to generate projects for a number of different
>> IDEs. For information about which generators CMake supports see
>> https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html
>> for your CMake version.
>>
>> To try this out check out (heh) my branch "JDK-8177329-cmake-branch" in the jdk10/sandbox forest:
>> http://hg.openjdk.java.net/jdk10/sandbox/branches
>> So far I've only made changes in the toplevel and hotspot repositories.
>> I've written a short readme in the repo:
>> http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-8177329-cmake-branch/README-cmake.html
>>
>> It would be great if people tried this out to see if it works on their setup but I don't expect it to work on Windows without changing the makefile to do path conversion.
>> If we can make this work properly then perhaps we can get rid of the Visual Studio generator and rely on CMake to generate VS projects.
>>
>> It would also be great if someone from build-dev could give me some hints about how to do the file writing and "vardeps" thing properly.
>>
>> Thanks
>> /Mikael
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C/C++ IDE support for HotSpot

Robbin Ehn
Hi, again,

On 03/24/2017 08:58 AM, Robbin Ehn wrote:

> Hi Mikeal,
>
> On 03/22/2017 05:20 PM, Erik Österlund wrote:
>> Hi Mikael,
>>
>> In my workflow I use emacs with rtags for snytax awareness.
>> With your cmake patch, I could easily generate the cmake files and run cmake  with -DCMAKE_EXPORT_COMPILE_COMMANDS to generate the compiler_commands.json file used by rtags
>> to understand how the code fits together, and feed it to rdm. Everything worked out of the box.
>
> I also use rtags, but with vim.
>
>>
>> With these changes it was faster than ever to setup a good emacs-based project for hotspot development. So I encourage these changes!
>
> I have not tested this, but it must be faster, since now I compile the source twice, once with gcc and once with clang for rtags.

I have still gotten my morning coffee, this step I have to do anyways of course.

>
> Can cmake do incremental updates to compiler_command.json file, would be awesome if so? (Erik?)

This is what I need, now I can't do incremental builds if change any flags or add files.

/Robbin

>
> Thanks for doing this!
>
> /Robbin
>
>>
>> Thanks,
>> /Erik
>>
>> On 2017-03-22 15:21, Mikael Gerdin wrote:
>>> Hi all,
>>>
>>> I've finally grown tired of manually setting up a hand crafted Eclipse CDT configuration for the JVM sources and decided to share my progress towards improving the
>>> overall situation for JVM developers.
>>>
>>> To achieve better IDE support without having to add project generators for all different kinds of past or future IDEs I've decided to try to leverage CMake to do project
>>> generation.
>>> The idea is to have the JDK build system generate a CMakeLists.txt describing all the include paths and definitions required by an IDE to interpret the sources correctly.
>>>
>>> Several modern IDEs natively support CMake but we can also rely on the fact that the CMake build system has the ability to generate projects for a number of different
>>> IDEs. For information about which generators CMake supports see
>>> https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html
>>> for your CMake version.
>>>
>>> To try this out check out (heh) my branch "JDK-8177329-cmake-branch" in the jdk10/sandbox forest:
>>> http://hg.openjdk.java.net/jdk10/sandbox/branches
>>> So far I've only made changes in the toplevel and hotspot repositories.
>>> I've written a short readme in the repo:
>>> http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-8177329-cmake-branch/README-cmake.html
>>>
>>> It would be great if people tried this out to see if it works on their setup but I don't expect it to work on Windows without changing the makefile to do path conversion.
>>> If we can make this work properly then perhaps we can get rid of the Visual Studio generator and rely on CMake to generate VS projects.
>>>
>>> It would also be great if someone from build-dev could give me some hints about how to do the file writing and "vardeps" thing properly.
>>>
>>> Thanks
>>> /Mikael
>>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C/C++ IDE support for HotSpot

Robbin Ehn
Hmmz, brain not functioning.

On 03/24/2017 09:02 AM, Robbin Ehn wrote:
> I have still gotten my morning coffee, this step I have to do anyways of course.

NOT

/Robbin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C/C++ IDE support for HotSpot

Mikael Gerdin
In reply to this post by Robbin Ehn
Hi Robbin,

On 2017-03-24 09:02, Robbin Ehn wrote:

> Hi, again,
>
> On 03/24/2017 08:58 AM, Robbin Ehn wrote:
>> Hi Mikeal,
>>
>> On 03/22/2017 05:20 PM, Erik Österlund wrote:
>>> Hi Mikael,
>>>
>>> In my workflow I use emacs with rtags for snytax awareness.
>>> With your cmake patch, I could easily generate the cmake files and
>>> run cmake  with -DCMAKE_EXPORT_COMPILE_COMMANDS to generate the
>>> compiler_commands.json file used by rtags
>>> to understand how the code fits together, and feed it to rdm.
>>> Everything worked out of the box.
>>
>> I also use rtags, but with vim.
>>
>>>
>>> With these changes it was faster than ever to setup a good
>>> emacs-based project for hotspot development. So I encourage these
>>> changes!
>>
>> I have not tested this, but it must be faster, since now I compile the
>> source twice, once with gcc and once with clang for rtags.
>
> I have still gotten my morning coffee, this step I have to do anyways of
> course.
>
>>
>> Can cmake do incremental updates to compiler_command.json file, would
>> be awesome if so? (Erik?)
>
> This is what I need, now I can't do incremental builds if change any
> flags or add files.

I'm not sure how the generation of compiler_command.json works but to
refresh the CMakeLists.txt file you have to invoke the
hotspot-cmake-project make target again. This should pick up new files
or flags from the build system.

There is a way to add dependencies on build system variables so that the
refresh would only actuallly run when needed but I couldn't figure that
out so for now the CMakeLists generation is .PHONY-target.



/Mikael

>
> /Robbin
>
>>
>> Thanks for doing this!
>>
>> /Robbin
>>
>>>
>>> Thanks,
>>> /Erik
>>>
>>> On 2017-03-22 15:21, Mikael Gerdin wrote:
>>>> Hi all,
>>>>
>>>> I've finally grown tired of manually setting up a hand crafted
>>>> Eclipse CDT configuration for the JVM sources and decided to share
>>>> my progress towards improving the
>>>> overall situation for JVM developers.
>>>>
>>>> To achieve better IDE support without having to add project
>>>> generators for all different kinds of past or future IDEs I've
>>>> decided to try to leverage CMake to do project
>>>> generation.
>>>> The idea is to have the JDK build system generate a CMakeLists.txt
>>>> describing all the include paths and definitions required by an IDE
>>>> to interpret the sources correctly.
>>>>
>>>> Several modern IDEs natively support CMake but we can also rely on
>>>> the fact that the CMake build system has the ability to generate
>>>> projects for a number of different
>>>> IDEs. For information about which generators CMake supports see
>>>> https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html
>>>> for your CMake version.
>>>>
>>>> To try this out check out (heh) my branch "JDK-8177329-cmake-branch"
>>>> in the jdk10/sandbox forest:
>>>> http://hg.openjdk.java.net/jdk10/sandbox/branches
>>>> So far I've only made changes in the toplevel and hotspot repositories.
>>>> I've written a short readme in the repo:
>>>> http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-8177329-cmake-branch/README-cmake.html
>>>>
>>>>
>>>> It would be great if people tried this out to see if it works on
>>>> their setup but I don't expect it to work on Windows without
>>>> changing the makefile to do path conversion.
>>>> If we can make this work properly then perhaps we can get rid of the
>>>> Visual Studio generator and rely on CMake to generate VS projects.
>>>>
>>>> It would also be great if someone from build-dev could give me some
>>>> hints about how to do the file writing and "vardeps" thing properly.
>>>>
>>>> Thanks
>>>> /Mikael
>>>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: C/C++ IDE support for HotSpot

Christian Thalinger-4
In reply to this post by Mikael Gerdin
There is already support to generate IDE config files in 9:

$ mx ideinit

(this is part of JVMCI and came in via JEP 243)

> On Mar 22, 2017, at 4:21 AM, Mikael Gerdin <[hidden email]> wrote:
>
> Hi all,
>
> I've finally grown tired of manually setting up a hand crafted Eclipse CDT configuration for the JVM sources and decided to share my progress towards improving the overall situation for JVM developers.
>
> To achieve better IDE support without having to add project generators for all different kinds of past or future IDEs I've decided to try to leverage CMake to do project generation.
> The idea is to have the JDK build system generate a CMakeLists.txt describing all the include paths and definitions required by an IDE to interpret the sources correctly.
>
> Several modern IDEs natively support CMake but we can also rely on the fact that the CMake build system has the ability to generate projects for a number of different IDEs. For information about which generators CMake supports see
> https://cmake.org/cmake/help/v3.5/manual/cmake-generators.7.html
> for your CMake version.
>
> To try this out check out (heh) my branch "JDK-8177329-cmake-branch" in the jdk10/sandbox forest:
> http://hg.openjdk.java.net/jdk10/sandbox/branches
> So far I've only made changes in the toplevel and hotspot repositories.
> I've written a short readme in the repo:
> http://hg.openjdk.java.net/jdk10/sandbox/raw-file/JDK-8177329-cmake-branch/README-cmake.html
>
> It would be great if people tried this out to see if it works on their setup but I don't expect it to work on Windows without changing the makefile to do path conversion.
> If we can make this work properly then perhaps we can get rid of the Visual Studio generator and rely on CMake to generate VS projects.
>
> It would also be great if someone from build-dev could give me some hints about how to do the file writing and "vardeps" thing properly.
>
> Thanks
> /Mikael

Loading...