Re: [CMake] CMake+QT always failed for the first build, and succeeded for second build or later.

2016-06-01 Thread Konstantin Tokarev
01.06.2016, 14:09, "Jakob van Bethlehem" : >> Hey, that was the LTS release until 1 or 2 month ago! > > Oops, you're right, my mistake. Somewhere in the back of my head was that the > 4-series was in the 4.12.x or so version, not sure where that came from. KDE 4 I

[CMake] Automoc for a part of target sources

2016-04-12 Thread Konstantin Tokarev
Hi all, Is it somehow possible to apply automoc-like processing to the list of files, not whole target? My use case: in QtWebKit most of sources composing core targets are not related to Qt at all, but there are specific sources specific to Qt port. Currently I'm using automoc, but I suspect

[CMake] Assign large C++ source to separate ninja pool

2016-04-23 Thread Konstantin Tokarev
Hello, In Ninja documentation on pools feature there is an example of separate heavy_object_pool [1]. Is it possible to use this feature with cmake? Use case is to avoid parallel compilation of N large sources, while compilation of 1 large and N-1 small sources is OK. [1]

Re: [CMake] in source makefile / helper script that enables building out of source?

2016-05-11 Thread Konstantin Tokarev
11.05.2016, 16:58, "Steve Lorimer" : > I've recently changed over from using boost-build > (http://www.boost.org/build/) to cmake. > > Boost build builds in-source. > > I've become quite used to building and searching etc from the source root > >> ~/src $ b2 module >>

Re: [CMake] CMake: how to use 'for cyclic sentence' in command add_custom_command(...)

2016-04-19 Thread Konstantin Tokarev
19.04.2016, 16:21, "Chaos Zhang" : > Hi, > > I was using 'for cyclic sentence' in command add_custom_command(...), the > content of the CMakeLists.txt as below: > add_custom_command(TARGET temp_target > POST_BUILD >  

Re: [CMake] CMakeRelink.dir fails on make package on Ninja

2016-07-29 Thread Konstantin Tokarev
29.07.2016, 17:36, "Gonzalo" : > On Linux (Kubuntu 16.04) I am trying to pack my program (no cross > compiling), and I am running into the following with the Ninja Generator > and a custom library (that is also built in the project): > > [2/2] Run CPack packaging tool... >

Re: [CMake] Running CxxTest fails on Fedora 24

2016-08-12 Thread Konstantin Tokarev
12.08.2016, 04:32, "Zan Lynx" : > The Fedora /usr/bin/cxxtestgen script calls /usr/bin/python3. NOT > python2 or python. > > CMake runs /usr/bin/python /usr/bin/cxxtestgen which is linked to > python2, and the script fails. > > I don't quite understand why CMake feels the need to

Re: [CMake] Comaptibility with older gcc

2017-01-27 Thread Konstantin Tokarev
27.01.2017, 20:04, "Michele Portolan" : > I have a project that build correctly using gcc 4.9.3, generating a > dynamic library that I can later link to obtain my executables. So, > nothing special. > > My problem is that on one of my target systems, I only have

Re: [CMake] Comaptibility with older gcc

2017-01-27 Thread Konstantin Tokarev
27.01.2017, 21:05, "Elizabeth A. Fischer" : > C++ code is not compatible between different compilers.  This is not true for compilers implementing Itanium C++ ABI, including GCC. The only possible source of incompatibility comes from different standard library

Re: [CMake] Comaptibility with older gcc

2017-01-27 Thread Konstantin Tokarev
27.01.2017, 20:04, "Michele Portolan" : > I have a project that build correctly using gcc 4.9.3, generating a > dynamic library that I can later link to obtain my executables. So, > nothing special. > > My problem is that on one of my target systems, I only have

Re: [CMake] set_if_not_set

2017-02-15 Thread Konstantin Tokarev
15.02.2017, 20:08, "Bill Newcomb" : > My top-level CMakeLists.txt files always end up with a lot of > > if(NOT_DEFINED foo) >  set(foo bar) > endif() > > things to allow people to pass interesting things on the command line or > to write their own "set this and that"

Re: [CMake] -DCMAKE_BUILD_TYPE=Release breaks build process

2017-03-02 Thread Konstantin Tokarev
02.03.2017, 13:58, " Jan Hegewald" : > Hi Berni, > >>  On 2 Mar 2017, at 10:12, Bernhard Seckinger >> wrote: > > ... >>  but when I try to build with >>  -DCMAKE_BUILD_TYPE=Release the linker complains about missing functions. > > ... >>  Maybe

Re: [CMake] Error: no cmake_fortran_compiler could be found.

2016-09-02 Thread Konstantin Tokarev
01.09.2016, 23:22, "ning...@ghiocel-tech.com" : > Dear There, > > This is first time to use CMAKE. I got the error that says "no > cmake_fortran_compiler could be found." > I use it on Windows 8.1, which have installed Visual Studio Community 2015, > Intel FORTRAN

Re: [CMake] CMake library installations and pkg-config

2016-09-01 Thread Konstantin Tokarev
01.09.2016, 08:34, "n...@appletonaudio.com" <n...@appletonaudio.com>: > On 2016-08-31 23:32, Konstantin Tokarev wrote: >>  31.08.2016, 16:22, "Nick Appleton" <n...@appletonaudio.com>: >>>  Hi, >>> >>>  I’ve been recently doing

Re: [CMake] CMake library installations and pkg-config

2016-08-31 Thread Konstantin Tokarev
31.08.2016, 16:22, "Nick Appleton" : > Hi, > > I’ve been recently doing a bit of work for an open source project trying to > extend it’s support for CMake. I’ve been trying to get CMake to be able to > replicate most of the functionality which can be achieved with the

Re: [CMake] Proper way to support 64bit and 32bit builds

2016-10-29 Thread Konstantin Tokarev
29.10.2016, 16:46, "cen" : > I tried setting CXXFLAGS and CMAKE_CXX_FLAGS to -m32 before the > project() call but nothing changed. I could make it fail with > "CXXFLAGS=-m32 cmake -G ..." from command line but this seems wrong. A > minimal CMakeLists.txt example would be nice.

Re: [CMake] Pointing CMAKE_AUTOMOC to a custom version of Qt and its moc.exe

2016-11-07 Thread Konstantin Tokarev
07.11.2016, 18:49, "Saad Khattak" : > I am working on a plugin for Maya and it uses a customized version of Qt. > Maya's SDK comes with everything to build Qt (headers, libraries and > customized Qt tools such as moc.exe). > > I have the following issues: > > (1) With

Re: [CMake] Executing python though CMake and linking libraries

2016-11-28 Thread Konstantin Tokarev
28.11.2016, 21:53, "Matthew Woehlke" : > On 2016-11-25 04:04, Kit Chambers wrote: >>  I have a Cmake custom target which runs a python script: >> >>  add_custom_target(run >>   COMMAND python myscript.py >>    ) >> >>  ... >> >>  To me it

Re: [CMake] Relinking with Ninja broken in 3.7.0

2016-11-16 Thread Konstantin Tokarev
16.11.2016, 19:44, "Mika Fischer" : > Hi, > > I get the following error even though I'm on Linux and thus an ELF-based > platform. This breaks all our builds... > > `The install of the target requires changing an RPATH from > the build tree, but this is not supported

[CMake] Proper way to find system copy of libxml2 on macOS

2016-10-12 Thread Konstantin Tokarev
Hello, In my cmake project I need to use system version of libxml2 on macOS (/usr/lib/libxml2.dylib), however in case it is installed in MacPorts the latter version is picked by find_package. On the other hand I'd like to avoid hardcoding absolute path, just in case Apple changes some path or

Re: [CMake] Proper way to find system copy of libxml2 on macOS

2016-10-12 Thread Konstantin Tokarev
12.10.2016, 19:04, "rle...@codelibre.net" <rle...@codelibre.net>: > On 2016-10-12 15:28, Konstantin Tokarev wrote: >>  Hello, >> >>  In my cmake project I need to use system version of libxml2 on macOS >>  (/usr/lib/libxml2.dylib), however in case

Re: [CMake] Proper way to find system copy of libxml2 on macOS

2016-10-12 Thread Konstantin Tokarev
12.10.2016, 18:48, "Eric Noulard" <eric.noul...@gmail.com>: > 2016-10-12 17:28 GMT+02:00 Konstantin Tokarev <annu...@yandex.ru>: >> Hello, >> >> In my cmake project I need to use system version of libxml2 on macOS >> (/usr/lib/libxml2.dy

[CMake] Get path without Windows drive letter

2016-12-01 Thread Konstantin Tokarev
Hello, On Windows, is there any better way to strip out drive letter from path besides using REGEX REPLACE? I looked at get_filename_component but didn't find anything appropriate. What I'm doing at higher level is transposition of CMAKE_INSTALL_PREFIX with DESTDIR variable, like what

Re: [CMake] Building third party libraries along with normal targets

2017-03-30 Thread Konstantin Tokarev
30.03.2017, 18:15, "Miller Henry" : > I have found the following projects which all seem to do some variation of a > meta build so that you can build multiple projects that depend on each other > and manage dependencies. (there are a couple others that seem to not be

[CMake] _debug postfix in macOS frameworks

2017-04-09 Thread Konstantin Tokarev
Hello, I'd like to put debug and release version of framework into the same bungle by adding "_debug" postfix to debug binaries. However it seems like CMAKE_DEBUG_POSTFIX is ignored b frameworks. What is the best way to achieve this? Is there any alternative cmake module for making

Re: [CMake] cmake-gui on windows and qt5 dlls

2017-08-14 Thread Konstantin Tokarev
14.08.2017, 16:01, "Craig Scott" : > On Mon, Aug 14, 2017 at 9:05 PM, Clément Gregoire wrote: >> Wouldn't it be possible to move it to a subfolder with the DLLs and put a >> link next to cmake and ccmake? Executables look for DLLs in their directory

Re: [CMake] Parallel moc for Qt files

2017-07-07 Thread Konstantin Tokarev
06.07.2017, 23:00, "Michael Jackson" : > I have a large list of files that need to have Qt's 'moc' run on them > (107 headers). I use all the normal CMake facilities for Qt based > projects. I noticed that the generation of the moc files are done > serially. Is there

Re: [CMake] CPack Multicore Usage

2017-07-20 Thread Konstantin Tokarev
20.07.2017, 11:22, "Jörg Kreuzberger" : > Hi > > My Project is compiling multicore without any problems using Unix makefiles > or ninja. > > In calls to cpack only one core is used if Makefiles are used. Is there any > option to enable multicore? Yes, you should run

Re: [CMake] Coverage support

2017-08-07 Thread Konstantin Tokarev
07.08.2017, 17:24, "Clément Gregoire" : >> I usually stop reading Cmakelists.txt as soon as I see this >> >> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -pthread -g -O0 >> -fprofile-arcs -ftest-coverage") >> >> The pthread thing there is likely wrong anyway, and the

Re: [CMake] Coverage support

2017-08-07 Thread Konstantin Tokarev
The other option is to uses something like a special script that will set those variables before your Cmakelists.txt (ie a toolchain file).  Le lun. 7 août 2017 à 17:22, Konstantin Tokarev <annu...@yandex.ru> a écrit : 07.08.2017, 17:24, "Clément Gregoire" <lec...@gmail.com>:&g

Re: [CMake] How to detect MSVC 2015 update 3 (= presence of /fpermissive-)

2017-05-15 Thread Konstantin Tokarev
15.05.2017, 15:57, "René J.V. Bertin" : > Hello, > > A question that will hopefully have a quick/easy answer: > > I'd like to detect when the MSVC /fpermissive- (yes, that's a dash at the > end) can be used instead of /Za . I know that a later update bumped the > version

Re: [CMake] Is there analog of source command from bash ?

2017-05-28 Thread Konstantin Tokarev
28.05.2017, 16:58, "Denis Kotov" : > Hi everyone, > > I have tried to find solution to the following problem: > There is the project with environment variable described in setenv.sh file > Old build process looks like: > source setenv.sh > make release > > But I want to

Re: [CMake] Qt Project Generator for Cmake

2017-05-03 Thread Konstantin Tokarev
  03.05.2017, 11:06, "K O ranjith" :I'm using CMake for Qt creator project(in Non-Qt c++ project).In Qt kit->CMake generator I couldn't find a way to generate a Qt project (o CMakeLists.txt which can open as non-Qt project in Qt creator)(But have generator option to other IDE

[CMake] Release flags on one target in debug build type

2017-05-05 Thread Konstantin Tokarev
Hello, Is there any clear way to build specific target in "Debug" mode with flags that it would have in "Release"? In particular, build this specific target without effect of CMAKE_CXX_FLAGS_DEBUG and CMAKE_C_FLAGS_DEBUG, while preserving flags added by target_compile_options -- Regards,

Re: [CMake] Release flags on one target in debug build type

2017-05-05 Thread Konstantin Tokarev
05.05.2017, 23:22, "Michael Ellery" <mellery...@gmail.com>: >>  On May 5, 2017, at 11:45 AM, Konstantin Tokarev <annu...@yandex.ru> wrote: >> >>  Hello, >> >>  Is there any clear way to build specific target in "Debug" mode with f

Re: [CMake] How to maintain compatibility with earlier versions?

2017-09-11 Thread Konstantin Tokarev
11.09.2017, 16:52, "Robert Dailey" : > So typically my setup is that I have the newest CMake installed, but > am working with projects that set cmake_minimum_required to something > like version 2.8. Will version 3.9 of CMake prevent me from using > features that were

Re: [CMake] [Windows] clang-cl.exe detected as MSVC?

2017-09-11 Thread Konstantin Tokarev
11.09.2017, 17:59, "Mateusz Loskot" : > Hi, > > I'm building a project with CMake 3.9 using clang-cl.exe driver [1] > from LLVM/clang 4.0 enabled with Visual Studio 2015 environment. > > CMake detects the compiler as Clang 4.0.0: > > -- The C compiler identification is Clang

Re: [CMake] [Windows] clang-cl.exe detected as MSVC?

2017-09-12 Thread Konstantin Tokarev
11.09.2017, 18:12, "Mateusz Loskot" <mate...@loskot.net>: > On 11 September 2017 at 17:04, Konstantin Tokarev <annu...@yandex.ru> wrote: >>  11.09.2017, 17:59, "Mateusz Loskot" <mate...@loskot.net>: >>>  Hi, >>> >>>  I'm

Re: [CMake] debugging CMAKE_PREFIX_PATH

2017-09-12 Thread Konstantin Tokarev
12.09.2017, 16:31, "Zakrzewski, Jakub" : > Hi, > >>  find_package(Qt5Core ${QT_MIN_VERSION} REQUIRED) > >>  I build with -DCMAKE_PREFIX_PATH set, and in CMakeCache.txt, I see: > >>  //No help, variable specified on the command line. >>  

Re: [CMake] Automoc for a part of target sources

2017-11-24 Thread Konstantin Tokarev
12.04.2016, 22:32, "Konstantin Tokarev" <annu...@yandex.ru>: > Hi all, > > Is it somehow possible to apply automoc-like processing to the list of files, > not whole target? > > My use case: in QtWebKit most of sources composing core targe

Re: [CMake] Using find_package() portably?

2017-11-22 Thread Konstantin Tokarev
22.11.2017, 13:37, "Carsten Fuchs" : > Hi all, > > thanks to you all for your replies! > > Concluding from your replies, it seems that the following approach for > each external dependency implements a good(?) solution: > > find_package(JPEG) # without "REQUIRED" > > if

Re: [CMake] CMake fixup_bundle for ubuntu 16.04

2017-12-13 Thread Konstantin Tokarev
  13.12.2017, 22:16, "Waldo Valenzuela via CMake" :Dear Miklos, thanks for the email, and your suggestions, but the problem with fixup_bundle in ubuntu is that is not fixing the libraries locations from the executables meaning: if I execute the idd command like this “ idd ./app”

Re: [CMake] CMake fixup_bundle for ubuntu 16.04

2017-12-14 Thread Konstantin Tokarev
13.12.2017, 23:08, "Daniel Schepler" : > You would need to set the INSTALL_RPATH property of the targets to something > like "$ORIGIN/../lib" . > > You might also need to add "-Wl,--disable-new-dtags" to the > CMAKE_*_LINK_FLAGS variables - otherwise, the RPATH

Re: [CMake] Using find_package() portably?

2017-11-21 Thread Konstantin Tokarev
> Using ExternalProject and a dependency fetching script suffer from the > same problem. It is very easy to implement these things insecurely, > and it makes your software hard to package for Linux distributions. > When I see a trendy new project that prominently features a "curl | > sh" line on

Re: [CMake] MinGW Compilers on Windows

2017-12-08 Thread Konstantin Tokarev
08.12.2017, 22:16, "Kevan Hashemi" : > Greetings, > > I'm new to CMake, so please forgive this basic question. > > I'd like to use CMake to build OpenCV on Windows 7 using the C and C++ > compilers that come with my > installation of MinGW. I compile all my other code with

Re: [CMake] CMake: using dlopen

2018-01-07 Thread Konstantin Tokarev
> - Mail original - > >> De: "Roger Leigh" >> À: cmake@cmake.org >> Envoyé: Samedi 6 Janvier 2018 18:42:11 >> Objet: Re: [CMake] CMake: using dlopen >> >> On 06/01/18 17:01, J Decker wrote: >>> CMake/shared/modules will define the CMAKE_DL_LIBS which a very high

Re: [CMake] CMake: using dlopen

2018-01-07 Thread Konstantin Tokarev
07.01.2018, 19:36, "Franck Houssen" <franck.hous...@inria.fr>: > - Mail original - >>  De: "Konstantin Tokarev" <annu...@yandex.ru> >>  À: "Franck Houssen" <franck.hous...@inria.fr> >>  Cc: cmake@cmake.org, "Roger

Re: [CMake] CMake: using dlopen

2018-01-07 Thread Konstantin Tokarev
07.01.2018, 21:13, "Franck Houssen" : > >> De: "Roger Leigh" >> À: "Franck Houssen" >> Cc: cmake@cmake.org >> Envoyé: Dimanche 7 Janvier 2018 18:14:04 >> Objet: Re: [CMake] CMake:

Re: [CMake] CMake support for MYS2

2018-01-10 Thread Konstantin Tokarev
10.01.2018, 11:40, "Mojca Miklavec" <mojca.miklavec.li...@gmail.com>: > On 8 January 2018 at 17:38, Konstantin Tokarev wrote: >>  08.01.2018, 14:35, "Mojca Miklavec": >>>  Dear CMake developers, >>> >>>  I installed msys2 from http:

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"

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 >

Re: [CMake] CMake support for MYS2

2018-01-08 Thread Konstantin Tokarev
08.01.2018, 14:35, "Mojca Miklavec" : > Dear CMake developers, > > I installed msys2 from http://www.msys2.org/ and (after updating etc) > installed cmake via > pacman -S cmake You should install mingw-w64-x86_64-cmake (or i686). You've installed package that

Re: [CMake] Using CMake to compile non-standard languages

2018-01-16 Thread Konstantin Tokarev
16.01.2018, 13:39, "Jakob van Bethlehem" : > Dear all, > > Currently I'm trying to make a case to convert the pure makefile-based build > environment at my company into cmake. This is a rather extensive build > environment, which takes care of many things

Re: [CMake] how to detect architecture ?

2018-01-19 Thread Konstantin Tokarev
them by default when building projects with MinGW). > > ------ > Chuck Atkins > Staff R Engineer, Scientific Computing > Kitware, Inc. > > On Tue, Jan 9, 2018 at 10:04 AM, Franck Houssen <franck.hous...@inria.fr> > wrote: >> Thanks ! >> >> - Mail or

Re: [CMake] Querying CMake variables of external CMake projects

2018-01-13 Thread Konstantin Tokarev
13.01.2018, 06:26, "Saad Khattak" : > Hi, > > Say I find LibA using find_package(LibA) and I now have access to LibA_DIR, > which is the build folder of LibA. Is there a way I can query additional > variables, such as LibA's source directory, install directory etc. i.e.

Re: [CMake] Do any CMake back ends have support for parallel builds that efficiently use clusters?

2018-01-12 Thread Konstantin Tokarev
12.01.2018, 12:58, "Alan W. Irwin" : > I am looking into the practicality of using clusters containing ~5 > cheap ARM 8-core computers (such as the Banana Pi M3) to rapidly build > and test software (since even with ccache I am currently spending a > lot of my time

Re: [CMake] Parallel build setup question

2018-02-16 Thread Konstantin Tokarev
the nature of my project where gmake seems not > to see too many opportunities for parallel processing. Maybe it works always > module by module, or whatever. > > Anyway, my question is answered - thanks again! Note that if you used Ninja generator, it would use all cores by default. &

Re: [CMake] Parallel build setup question

2018-02-16 Thread Konstantin Tokarev
  16.02.2018, 20:20, "Cornelis Bockemühl" :Thanks for your hints! And you are right: it is still interesting to know how QtCreator is actually invoking and using cmake.You should go to project settings and change cmake --build arguments there  This is the beginning of a log

Re: [CMake] ExternalProject_Add and Git Update? How do I make these work?

2017-12-22 Thread Konstantin Tokarev
> ExternalProject_Add(${extProjectName} > GIT_REPOSITORY "git://github.com/BlueQuartzSoftware/discount.git" > GIT_PROGRESS 1 > #GIT_TAG master > > TMP_DIR "${DREAM3D_SDK}/superbuild/${extProjectName}/tmp/${CMAKE_BUILD_TYPE}" > STAMP_DIR "${DREAM3D_SDK}/superbuild/${extProjectName}/Stamp" >

Re: [CMake] Generating MSVS solution files that can be passed around

2018-04-19 Thread Konstantin Tokarev
19.04.2018, 18:46, "Zaak Beekman" : > Greetings fellow CMake users! > > While I know this topic has been discussed intermittently over the years I > was wondering if anyone had any further insight. > > The situation is that we have a client who works with other contractors