Re: [CMake] include_directories converting CMAKE_BINARY_DIR into relative path

2018-01-09 Thread Russell L. Carter
Ah well, I figured out the problem, it was located between my chair and my keyboard. Everything works perfectly now. I sure do love cmake. Thanks, Russell On 01/09/18 15:46, Russell L. Carter wrote: Greetings, I am trying to generate a platform specific file by copying it from the source tre

[CMake] include_directories converting CMAKE_BINARY_DIR into relative path

2018-01-09 Thread Russell L. Carter
Greetings, I am trying to generate a platform specific file by copying it from the source tree into a specific directory in the separate out-of-source build tree. The file generation works fine. When I try the following cmake code: set(target_dir ${CMAKE_BINARY_DIR}/nail/platform) message("tar

Re: [CMake] Multiple cross compiling

2018-01-09 Thread Robert Maynard
Currently CMake only supports a single platform / toolchain per build directory. If you need to build with multiple toolchains you will need to use some form of a wrapper. Which can either be an external script that invokes CMake multiple times or a CMake project that uses ExternalProject ( https:

Re: [CMake] how to detect architecture ?

2018-01-09 Thread Franck Houssen
Thanks ! - Mail original - > De: "Konstantin Tokarev" > À: "Franck Houssen" , "CMake Mail List" > > Envoyé: Mardi 9 Janvier 2018 16:00:55 > Objet: Re: [CMake] how to detect architecture ? > > > > 09.01.2018, 17:58, "Franck Houssen" : > > Is there a way to detect architecture ? > > >

Re: [CMake] how to detect architecture ?

2018-01-09 Thread J Decker
On Tue, Jan 9, 2018 at 6:57 AM, Franck Houssen wrote: > Is there a way to detect architecture ? > > Seems there is nothing simple since these old threads : > https://stackoverflow.com/questions/11944060/how-to- > detect-target-architecture-using-cmake/12024211#12024211 > https://stackoverflow.com

Re: [CMake] how to detect architecture ?

2018-01-09 Thread Konstantin Tokarev
09.01.2018, 17:58, "Franck Houssen" : > Is there a way to detect architecture ? > > Seems there is nothing simple since these old threads : > https://stackoverflow.com/questions/11944060/how-to-detect-target-architecture-using-cmake/12024211#12024211 > https://stackoverflow.com/questions/16796629

[CMake] how to detect architecture ?

2018-01-09 Thread Franck Houssen
Is there a way to detect architecture ? Seems there is nothing simple since these old threads : https://stackoverflow.com/questions/11944060/how-to-detect-target-architecture-using-cmake/12024211#12024211 https://stackoverflow.com/questions/16796629/cmake-create-architecture-aware-makefile

Re: [CMake] how to port to cmake a project using gnulib

2018-01-09 Thread Alan W. Irwin
On 2018-01-09 12:01- Cosimo Lupo wrote: Hello, I'm new to Cmake. I would like to port to cmake a project that is currently built with the Autotools and depends on gnulib, the GNU Portability Library: https://www.gnu.org/software/gnulib/ (The project in question is https://www.freetype.org

Re: [CMake] how to port to cmake a project using gnulib

2018-01-09 Thread Konstantin Tokarev
Alfred: Gnulib isn't library in usual sense, AFAIK it's a bunch of source files some of which may be added to the project if needed Cosimo: I think you should stay with autotools, otherwsie it might be a can of worms. Or get rid of gnulib. 09.01.2018, 15:55, "Cosimo Lupo" : > This is from the

Re: [CMake] how to port to cmake a project using gnulib

2018-01-09 Thread Cosimo Lupo
This is from the gnulib mailing list in reply to a similar question on how to use gnulib without autotools: https://lists.gnu.org/archive/html/bug-gnulib/2010-02/msg00248.html "Gnulib depends heavily on autoconf and automake. You could manually extract the portions you think you need and attempt

Re: [CMake] how to port to cmake a project using gnulib

2018-01-09 Thread Cosimo Lupo
Thanks for your help, Alfred. The problem is that very concept of "external dependency" seems to be at odds with the way gnulib is supposed to work. And the docs are clear that "Gnulib assumes that your project uses Autoconf. When using Gnulib, you will need to have Autoconf among your build tool

Re: [CMake] how to port to cmake a project using gnulib

2018-01-09 Thread Alfred Sawaya
Sorry, I did not got this hint.Well, you might still use gnulib as an external dependency (https://www.gnu.org/software/gnulib/manual/html_node/POSIX-Substitutes-Library.html#POSIX-Substitutes-Library). Maybe be it worth considering a better separation if the build tool is different.I need to rea

Re: [CMake] how to port to cmake a project using gnulib

2018-01-09 Thread Cosimo Lupo
Thanks. However, that's not exactly what I was looking for. The gnulib, by design, is not an external library that you link with, but a collection of modules that are meant to be copied into one's project. I would like to build ttfautohint with cmake (and ninja), not just adding ttfautohint as an e

Re: [CMake] how to port to cmake a project using gnulib

2018-01-09 Thread Alfred Sawaya
Hello,I have some CMake projects that depend on autotools bases libs.I compile them as External project.https://cmake.org/cmake/help/latest/module/ExternalProject.htmlRegards

[CMake] how to port to cmake a project using gnulib

2018-01-09 Thread Cosimo Lupo
Hello, I'm new to Cmake. I would like to port to cmake a project that is currently built with the Autotools and depends on gnulib, the GNU Portability Library: https://www.gnu.org/software/gnulib/ (The project in question is https://www.freetype.org/ttfautohint/) It appears that gnulib itself i

Re: [CMake] configure_file: escaping (single) quotes

2018-01-09 Thread Franck Houssen
OK. Got it to work ! Thanks - Mail original - > De: "Marc CHEVRIER" > À: "Franck Houssen" > Cc: "CMake Mail List" > Envoyé: Mardi 9 Janvier 2018 11:26:55 > Objet: Re: [CMake] configure_file: escaping (single) quotes > Yes, you have to rewrite your line as: > CMD="mpirun -n @ MPIEXEC

Re: [CMake] configure_file: escaping (single) quotes

2018-01-09 Thread CHEVRIER, Marc
Yes, you have to rewrite your line as: CMD="mpirun -n @MPIEXEC_PREFLAGS@ @MPIEXEC_NUMPROC_FLAG@ @MPIEXEC_MAX_NUMPROCS@ @MPIEXEC_POSTFLAGS@" From: Franck Houssen Date: Tuesday 9 January 2018 at 11:23 To: "CHEVRIER, Marc" Cc: CMake Mail List Subject: Re: [CMake] configure_file: escaping (single

Re: [CMake] configure_file: escaping (single) quotes

2018-01-09 Thread Franck Houssen
- Mail original - De: "Marc CHEVRIER" À: "Franck Houssen" , "CMake Mail List" Envoyé: Mardi 9 Janvier 2018 10:29:30 Objet: Re: [CMake] configure_file: escaping (single) quotes The problem comes from CMake evaluating variable VAR (i.e. expression ${VAR…}) and detect wrong syntax

Re: [CMake] configure_file: escaping (single) quotes

2018-01-09 Thread J Decker
On Tue, Jan 9, 2018 at 1:29 AM, J Decker wrote: > > > On Tue, Jan 9, 2018 at 1:24 AM, Franck Houssen > wrote: > >> Hello, >> >> I need configure_file to produce a bash file containing this line: >> VAR="${VAR//*'*#*'*/}" >> >> > maybe > > VAR="$" "{VAR//*'*#*'*/}" > Oh nevermind I was doing that

Re: [CMake] configure_file: escaping (single) quotes

2018-01-09 Thread CHEVRIER, Marc
The problem comes from CMake evaluating variable VAR (i.e. expression ${VAR…}) and detect wrong syntax. The solution is to specify option @ONLY to command configure_file to avoid ${} evaluation. From: CMake on behalf of Franck Houssen Date: Tuesday 9 January 2018 at 10:24 To: CMake Mail List

Re: [CMake] configure_file: escaping (single) quotes

2018-01-09 Thread J Decker
On Tue, Jan 9, 2018 at 1:24 AM, Franck Houssen wrote: > Hello, > > I need configure_file to produce a bash file containing this line: > VAR="${VAR//*'*#*'*/}" > > maybe VAR="$" "{VAR//*'*#*'*/}" > I tried without success VAR="${VAR//*'*#*'*/}" and VAR="${VAR//*\'*#*\'*/}" > with and without ES

[CMake] configure_file: escaping (single) quotes

2018-01-09 Thread Franck Houssen
Hello, I need configure_file to produce a bash file containing this line: VAR="${VAR// ' # ' /}" I tried without success VAR="${VAR// ' # ' /}" and VAR="${VAR// \' # \' /}" with and without ESCAPE_QUOTES in configure_file : always get an error like "Syntax error in cmake code when parsing st