Docker based headers-only CGAL usage

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Docker based headers-only CGAL usage

Yoni Goyhman
Hello, we have a CGAL based project we are working on, setup with Docker.

We are using different parts of the CGAl library, and have come to a point where every build that requires compilation takes a very long time (sometimes over 15 minutes).

We would like to create a headers-only CGAL Docker configuration so we don't have to compile CGAL everytime, and can only compile our own source code.

Is there a guide / example project that can help us achieve that?

Thank you

--
Yoni Goyhman
CTO
 
+972-544-686890
 
WeWork Sarona, Aluf Kalman Magen St 3Tel Aviv, Israel 6107075
Reply | Threaded
Open this post in threaded view
|

Re: Docker based headers-only CGAL usage

Sebastien Loriot (GeometryFactory)
"headers-only CGAL" and "only compile our own source code" in the same
sentence does not make sense to me.

I guess you want to create a small library with a CGAL-free interface
(=a header without CGAL mentioned inside). All CGAL parts would be
used only in the lib associated to that header.

Best regards,

Sebastien.

On 5/13/20 1:07 PM, Yoni Goyhman wrote:

> Hello, we have a CGAL based project we are working on, setup with Docker.
>
> We are using different parts of the CGAl library, and have come to a
> point where every build that requires compilation takes a very long time
> (sometimes over 15 minutes).
>
> We would like to create a headers-only CGAL Docker configuration so we
> don't have to compile CGAL everytime, and can only compile our own
> source code.
>
> Is there a guide / example project that can help us achieve that?
>
> Thank you
>
> --
> Yoni Goyhman
> CTO
> [hidden email] <mailto:[hidden email]>
> +972-544-686890
> WeWork Sarona, Aluf Kalman Magen St 3Tel Aviv, Israel 6107075

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Docker based headers-only CGAL usage

Maxime Gimeno
In reply to this post by Yoni Goyhman
Hello,

CGAL is header only by default, so I am unsure of what you are trying to do. I'd say that to be quicker, you'd want to build cgal as a classic library, and only link with it in your runs.

Maxime Gimeno

Le mer. 13 mai 2020 à 13:08, Yoni Goyhman <[hidden email]> a écrit :
Hello, we have a CGAL based project we are working on, setup with Docker.

We are using different parts of the CGAl library, and have come to a point where every build that requires compilation takes a very long time (sometimes over 15 minutes).

We would like to create a headers-only CGAL Docker configuration so we don't have to compile CGAL everytime, and can only compile our own source code.

Is there a guide / example project that can help us achieve that?

Thank you

--
Yoni Goyhman
CTO
 
+972-544-686890
 
WeWork Sarona, Aluf Kalman Magen St 3Tel Aviv, Israel 6107075
Reply | Threaded
Open this post in threaded view
|

Re: Docker based headers-only CGAL usage

Yoni Goyhman
I guess I said something stupid :)

I'll refraze - What is the best way for us to use CGAL without having to compile the library every time?

On Wed, May 13, 2020 at 2:23 PM Maxime Gimeno <[hidden email]> wrote:
Hello,

CGAL is header only by default, so I am unsure of what you are trying to do. I'd say that to be quicker, you'd want to build cgal as a classic library, and only link with it in your runs.

Maxime Gimeno

Le mer. 13 mai 2020 à 13:08, Yoni Goyhman <[hidden email]> a écrit :
Hello, we have a CGAL based project we are working on, setup with Docker.

We are using different parts of the CGAl library, and have come to a point where every build that requires compilation takes a very long time (sometimes over 15 minutes).

We would like to create a headers-only CGAL Docker configuration so we don't have to compile CGAL everytime, and can only compile our own source code.

Is there a guide / example project that can help us achieve that?

Thank you

--
Yoni Goyhman
CTO
 
+972-544-686890
 
WeWork Sarona, Aluf Kalman Magen St 3Tel Aviv, Israel 6107075


--
Yoni Goyhman
CTO
 
+972-544-686890
 
WeWork Sarona, Aluf Kalman Magen St 3Tel Aviv, Israel 6107075
Reply | Threaded
Open this post in threaded view
|

Re: Docker based headers-only CGAL usage

Maxime Gimeno
The only solution I see is Sebastien's, then.

Le mer. 13 mai 2020 à 13:28, Yoni Goyhman <[hidden email]> a écrit :
I guess I said something stupid :)

I'll refraze - What is the best way for us to use CGAL without having to compile the library every time?

On Wed, May 13, 2020 at 2:23 PM Maxime Gimeno <[hidden email]> wrote:
Hello,

CGAL is header only by default, so I am unsure of what you are trying to do. I'd say that to be quicker, you'd want to build cgal as a classic library, and only link with it in your runs.

Maxime Gimeno

Le mer. 13 mai 2020 à 13:08, Yoni Goyhman <[hidden email]> a écrit :
Hello, we have a CGAL based project we are working on, setup with Docker.

We are using different parts of the CGAl library, and have come to a point where every build that requires compilation takes a very long time (sometimes over 15 minutes).

We would like to create a headers-only CGAL Docker configuration so we don't have to compile CGAL everytime, and can only compile our own source code.

Is there a guide / example project that can help us achieve that?

Thank you

--
Yoni Goyhman
CTO
 
+972-544-686890
 
WeWork Sarona, Aluf Kalman Magen St 3Tel Aviv, Israel 6107075


--
Yoni Goyhman
CTO
 
+972-544-686890
 
WeWork Sarona, Aluf Kalman Magen St 3Tel Aviv, Israel 6107075
Reply | Threaded
Open this post in threaded view
|

Re: Docker based headers-only CGAL usage

Laurent Rineau (CGAL/GeometryFactory)
In reply to this post by Yoni Goyhman
On Wednesday, May 13, 2020 1:07:55 PM CEST Yoni Goyhman wrote:
> We would like to create a headers-only CGAL Docker configuration so we don't
> have to compile CGAL everytime, and can only compile our own source code.

I suggest you have a look at how to use pre-compiled headers with your build
system.

If you use recent CMake (after version 3.16), there is a new support for pch:

  https://cmake.org/cmake/help/latest/command/target_precompile_headers.html

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/




--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Docker based headers-only CGAL usage

anh.tran
Hi,

I'm not sure how everyone do their things but with my project, I make cgal-based functions and then compile them into dynamic linked library. That way, I don't have to compile CGAL every time.

Thanks & Regards
Anh Tran


On Wed, 13 May 2020 at 23:15, Laurent Rineau (CGAL/GeometryFactory) <[hidden email]> wrote:
On Wednesday, May 13, 2020 1:07:55 PM CEST Yoni Goyhman wrote:
> We would like to create a headers-only CGAL Docker configuration so we don't
> have to compile CGAL everytime, and can only compile our own source code.

I suggest you have a look at how to use pre-compiled headers with your build
system.

If you use recent CMake (after version 3.16), there is a new support for pch:

  https://cmake.org/cmake/help/latest/command/target_precompile_headers.html

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/




--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Docker based headers-only CGAL usage

Giles Puckett

I have a program in C, with one cpp source file containing a small set of glue functions that allow it to call CGAL. That source file rarely changes, so CGAL doesn't get compiled every time.

G.

On 14/05/2020 11:45 am, Trần Anh wrote:
Hi,

I'm not sure how everyone do their things but with my project, I make cgal-based functions and then compile them into dynamic linked library. That way, I don't have to compile CGAL every time.

Thanks & Regards
Anh Tran


On Wed, 13 May 2020 at 23:15, Laurent Rineau (CGAL/GeometryFactory) <[hidden email]> wrote:
On Wednesday, May 13, 2020 1:07:55 PM CEST Yoni Goyhman wrote:
> We would like to create a headers-only CGAL Docker configuration so we don't
> have to compile CGAL everytime, and can only compile our own source code.

I suggest you have a look at how to use pre-compiled headers with your build
system.

If you use recent CMake (after version 3.16), there is a new support for pch:

  https://cmake.org/cmake/help/latest/command/target_precompile_headers.html

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory           http://www.geometryfactory.com/
Release Manager of the CGAL Project       http://www.cgal.org/




--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss