Re: [CMake] CMake removes /DEF: option in CMAKE_SHARED_LINKER_FLAGS

2019-10-04 Thread Cristian Adam
Hi, You should simply add the my_defs.def file as a source files to add_library/add_executable. CMake will automagically pass /DEF: to the linker with my_defs.def Cheers, Cristian. On Fri, Oct 4, 2019 at 4:45 PM Alexander wrote: > Hello, > > I would like to add an extra .defs file for linking

[CMake] Hunter [CMake/C++] Package Manager: To be or not to be

2019-07-24 Thread Cristian Adam
Hi, For those of you who use Hunter for package management with CMake, its maintainer has issued a call for support to keep it alive or take over its maintainership: https://github.com/ruslo/hunter/issues/1921 Hunter is different than vcpkg and Conan, it uses only CMake to do the package manage

Re: [CMake] Combining two static libraries into one

2019-07-02 Thread Cristian Adam
On Tue, Jul 2, 2019 at 5:14 PM vinay kumar Kotegowder < vinay.kotegow...@gmail.com> wrote: > Hi Everyone, > > I have a requirement on combining two static library into one. > Can anyone tell me how can I achieve this? > > Regards, > Vinay > > If your compiler is GCC or Visual C++, you can use this

Re: [CMake] cmake on MinGW64; which generator

2019-06-23 Thread Cristian Adam
Hi, You are most probably using MSys2, which means that you are using CMake from MSys2, and they patch CMake for their platform. This also means that CMake upstream doesn't support it. Here are the differences between upstream CMake 3.14.3 and MSys2 CMake

Re: [CMake] ExternalProjectAdd and patch on Windows

2019-06-20 Thread Cristian Adam
Hi, If the users have git installed, you could try find_program(git...), and then "git apply", which should work to apply patches. Cheers, Cristian. On Thu, Jun 20, 2019 at 1:21 PM Kris Thielemans wrote: > Hi all > > > > I have a superbuild project where I need to patch a library (HDF5) after

Re: [CMake] Alternative to `add_compile_options` in Toolchain Files

2019-03-27 Thread Cristian Adam
Hi, If your CMake version is newer than 3.11 you can control what gets into the CMAKE__FLAGS_INIT flags with the technique from https://cristianadam.eu/20190223/modifying-the-default-cmake-build-types/ In your case you want to remove from the linker flags init the cxx compiler options. Cheers Cr

Re: [CMake] CMake Project Generation Speedup

2019-03-21 Thread Cristian Adam
Hi, CMake has for Visual Studio is a multi configuration generator. (Debug, Release, RelMinSize, RelWithDbgInformation). If you specify only one configuration you should cut the generation time to 1/4th. See https://cmake.org/cmake/help/latest/variable/CMAKE_CONFIGURATION_TYPES.html#variable:CMA

Re: [CMake] Toolchain file for TI in CMake 3.10: how do I override compiler options and specify tools?

2019-02-23 Thread Cristian Adam
On Sat, Feb 23, 2019 at 8:49 AM Jason Heeris wrote: > I am trying to use CMake (3.10) to build an ANSI C project that may be > compiled on PC with eg. GCC, but also needs to compile with Texas > Instruments' compilers for their microprocessors. So I have about a million > questions. > > According

Re: [CMake] New version forces rebuild all?

2018-12-05 Thread Cristian Adam
On Wed, Dec 5, 2018 at 10:19 PM Andy wrote: > (previously I send this mail not to mail list, but user) > Maybe my cmake files are bad? > I have created test project > https://gitlab.com/andrzejbor/test_rebuild_all > after commit is rebuild whole project > what I might change? > I don't want movin

Re: [CMake] Tips on reducing configure time

2018-11-14 Thread Cristian Adam
On Wed, Nov 14, 2018 at 10:20 AM Poughon Victor wrote: > Hi all > > I am working on a large C++ project using CMake ( > https://www.orfeo-toolbox.org/) and our 'configure' step takes quite a > lot of time. This can be annoying for developers working on features where > the configure step needs to

[CMake] CMake Checks Cache

2018-04-23 Thread Cristian Adam
Hi, If you use CMake in a CI you should probably have a look at how to speed up your CMake build: https://github.com/cristianadam/cmake-checks-cache In the case of LLVM + Clang on a Windows box the speed up was either 2.66x or 3.32x, depending on the CMake generator. Even if you don't use CMake

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

2018-04-19 Thread Cristian Adam
On Thu, Apr 19, 2018 at 5:46 PM, Zaak Beekman wrote: > The situation is that we have a client who works with other contractors > who use almost exclusively windows and MSVS. This client wants to > distribute MSVS solution files with the source code so that other > contractors don’t have to instal

[CMake] [blog article] It's Time To Do CMake Right

2018-02-20 Thread Cristian Adam
Hi, I thought the audience here would appreciate this: https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/ It did quite a stir on /r/cpp too: https://www.reddit.com/r/cpp/comments/7yps20/its_time_to_do_cmake_right/ Cheers, Cristian. -- Powered by www.kitware.com Please keep

[CMake] cmake_format

2018-02-07 Thread Cristian Adam
Hi, I don't remember seeing this tool advertised on the CMake mailing lists: https://github.com/cheshirekow/cmake_format/tree/master/cmake_format *cmake-format can format your listfiles nicely so that they don't look like crap.* Cheers, Cristian. -- Powered by www.kitware.com Please keep mes

Re: [CMake] downloading ftp URL problems

2018-01-27 Thread Cristian Adam
On Sat, Jan 27, 2018 at 12:12 PM, Kris Thielemans < kris.f.thielem...@gmail.com> wrote: > Dear all > > > > I have had no response to this. The problem continues with CMake 3.10.2. I > have no idea what causes this or how to fix it. Any help would be much > appreciated. > > > > Kris > > > > *From:*

Re: [CMake] Link Time Code Generation (LTGC) by default, for Release configurations of Visual Studio projects?

2018-01-24 Thread Cristian Adam
Hi, I had a quick check to see if CMake 3.10 for which compilers it has support for Interprocedural Optimization (IPO, or LTCG as known on Visual C++). Modules/Compiler had only f

Re: [CMake] CMake Monthly Meeting Summary

2017-11-21 Thread Cristian Adam
On Tue, Nov 21, 2017 at 6:40 PM, Robert Maynard wrote: > Sorry about this this was meant for an internal mailing list. > > Please do give us an update on the part regarding C++20 modules! I think I'm not the only on interested in this. Cheers, Cristian. -- Powered by www.kitware.com Please ke

Re: [CMake] CMake equivalent to Boost.Build site-config.jam or user-config.jam

2017-08-09 Thread Cristian Adam
On Tue, Aug 8, 2017 at 8:08 PM, Brian Davis wrote: > > Is there a CMake equivalent to a site-config.jam or user-config.jam > > http://www.boost.org/build/doc/html/bbv2/recipies/site-config.html > > basically a CMake file the user can put in a project directory that CMake > will read first when us

Re: [CMake] Parallel moc for Qt files

2017-07-06 Thread Cristian Adam
On Thu, Jul 6, 2017 at 10:00 PM, Michael Jackson < mike.jack...@bluequartz.net> wrote: > 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 ser

Re: [CMake] Using Clang + Ninja on Windows?

2016-04-22 Thread Cristian Adam
On Fri, Apr 22, 2016 at 8:59 AM, Mueller-Roemer, Johannes Sebastian < johannes.sebastian.mueller-roe...@igd.fraunhofer.de> wrote: > You are mistaken, Clang absolutely also works with MinGW. Or it did at > least up to 3.7 (didn’t get around to trying 3.8 yet) > > > Clang works fine with libstdc++

Re: [CMake] Using Clang + Ninja on Windows?

2016-04-21 Thread Cristian Adam
On Wed, Apr 20, 2016 at 4:01 PM, Johan Holmberg wrote: > Hi! > > How should I setup CMake to build a C/C++ application on Windows using > clang/clang++ as compilers and Ninja as build tool? > > I tried specifying "-GNinja" to cmake, and setting CC/CXX to > clang/clang++. But this didn't work. I g

Re: [CMake] CMake download blocked by Google Chrome

2016-04-10 Thread Cristian Adam
Hi, virustotal.com (which belongs to google) doesn't find any problems with the msi file. I assume Google Chrome panics because the file is not digitally signed by CMake.org. One can get an open source authenticode for 14€ from Certum

Re: [CMake] Problem using VS-compiled Clang as a C/C++ compiler.

2016-03-10 Thread Cristian Adam
On Thu, Mar 10, 2016 at 12:48 AM, Anton Yartsev wrote: > Oops, sorry, confused with different variants. > > I've tried > $SET CC=D:\LLVM-3.7.1\bin\clang-cl.exe > $SET CXX=D:\LLVM-3.7.1\bin\clang-cl.exe > $cmake -G "Ninja" .. > > Compilation succeeded, linkage has ended up with "clang-cl.exe: erro

Re: [CMake] Problem using VS-compiled Clang as a C/C++ compiler.

2016-03-04 Thread Cristian Adam
Hi Anton, When I say clang-cl I mean how the official llvm package does it - a 50mb executable named cl.exe and not clang-cl.exe. Ninja believes it compiles with visual c++, but instead it compiles with clang. That's why you need to put the path to clang INCLUDE and PATH first. Simply rename cla

Re: [CMake] Problem using VS-compiled Clang as a C/C++ compiler.

2016-03-03 Thread Cristian Adam
Hi Anton, clang.exe doesn't know of any windows specific things. Clang-cl instead does. Just make sure to have clang-cl before msvc-cl in path and ninja will just work. Cheers, Cristian On Mar 4, 2016 01:31, "Anton Yartsev" wrote: > Hi all, > > I'm trying to use Clang, compiled with VS 2013 (

Re: [CMake] Question on usage of cmake on Windows with clang

2016-02-08 Thread Cristian Adam
On Mon, Feb 8, 2016 at 1:56 PM, Victor Leschuk wrote: > Hello, I am trying to use clang with cmake on Windows. > > I have compiled LLVM+clang using Visual Studio 2015. And now I am facing > problems with building cmake projects using this clang. It looks like cmake > is trying to pass wrong optio

Re: [CMake] Help for a cmake newbie

2016-01-31 Thread Cristian Adam
On 31-Jan-16 03:42, vadtec wrote: curl, libiconv, libpng, libssh2, and zlib are the libs I want to build and use both on Linux and Windows. I know all of those are available on Linux and I could use the system installed versions, but I want to use the same vesions on Windows as well. The serv

Re: [CMake] Is there any way to use clang-cl with MSBuild on Windows?

2016-01-29 Thread Cristian Adam
On 29-Jan-16 19:04, Yi-Hong Lyu wrote: Hello everyone, I am a newbie of CMake. I would like to use clang-cl with MSBuild on Windows. However it always use MSVC 19.0.23506.0 as the identified compiler even I defined CMAKE_C_COMPILER / CMAKE_CXX_COMPILER / CMAKE_C_COMPILER_FORCED / CMAKE_CXX_CO

Re: [CMake] CMake based package manager

2016-01-11 Thread Cristian Adam
On Mon, Jan 11, 2016 at 2:33 PM, Nicholas Braden wrote: > Doesn't biicode already fill this role? Biicode seems to work well > enough for me, anyway. > > Biicode is dead. There is a comparison with biicode here: https://github.com/ruslo/hunter/issues/54 Having only CMake as a dependency is awes

Re: [CMake] CMake based package manager

2016-01-11 Thread Cristian Adam
Ruslan Baratov via CMake writes: > > Hi, > > I'm developing a project that is a kind of wrapper of > ExternalProject_Add and > allow it to be more reusable. User interface is quite simple. > > For anybody interested, here is a github project: > > * https://github.com/ruslo/hunter Recently p

Re: [CMake] Ninja generator fail for QNX on Windows

2014-09-24 Thread Cristian Adam
Hendrik Sattler writes: > On 23. September 2014 16:22:40 MESZ, Cristian Adam > >>> QCC compiler generates for this project dependency files which look > >like: > >>> > >>> c:\projects\my_proj\include\/a.h \ > >>> c:\projects\my_proj\src

Re: [CMake] Ninja generator fail for QNX on Windows

2014-09-23 Thread Cristian Adam
On 23 Sep 2014 15:27, "Bill Hoffman" wrote: > > > Seems that gmake supports that: > http://www.qnx.com/developers/docs/6.4.1/neutrino/prog/make_convent.html#Parallel > In theory it should work, but the mingw version they ship doesn't work. I've upgraded to a version of make which does (one needs

Re: [CMake] Ninja generator fail for QNX on Windows

2014-09-23 Thread Cristian Adam
On Mon, Sep 22, 2014 at 6:32 PM, Bill Hoffman wrote: > Maybe if you looked at the very first older than in your output instead of > the dirty ones it might tell you what ninja thinks is out of date. Could be > some sort of path issue that has something to do with the way the paths are > construc

Re: [CMake] Ninja generator fail for QNX on Windows

2014-09-22 Thread Cristian Adam
On Mon, Sep 22, 2014 at 5:40 PM, Bill Hoffman wrote: > On 9/22/2014 1:45 AM, Cristian Adam wrote: > >> >> On QNX side, thins are not as good. First, in order to compile >> the project I had to apply this patch [1], provided by Stephen Kelly. >> >> And now

[CMake] Ninja generator fail for QNX on Windows

2014-09-21 Thread Cristian Adam
Hi, I have a project which uses CMake (v 2.8.12.2) to (cross)compile on Windows using either Visual Studio 2008 or QNX 6.5.0. Using ninja (v1.5.1) as a CMake generator works as expected with Visual Studio 2008. First build takes time, second subsequent build says: "ninja: no work to do". On QNX

Re: [CMake] CMake 2.8.0 RC 1 ready for testing!

2009-09-26 Thread Cristian Adam
Bill Hoffman wrote: - Qt based GUI cmake-gui is now the default GUI, MFC CMakeSetup is no longer included in CMake. ccmake is still supported. If MFC is no longer used then the following files should not be part of the installer: Microsoft.VC90.MFCLOC.manifest Microsoft.VC90.MFC.manifest mf

Re: [CMake] cmake 2.6.4 won't find boost 1.40 on windows

2009-09-17 Thread Cristian Adam
John Drescher wrote: You set BOOST_ROOT in your windows environment variables. Thanks for the tip. Setting BOOST_INCLUDEDIR environment variable to "c:/boost/include/boost-1_40" resolved all the problems, no need to set additional versions, it just worked. I was a bit surprised to see that

Re: [CMake] cmake 2.6.4 won't find boost 1.40 on windows

2009-09-17 Thread Cristian Adam
James C. Sutherland wrote: From FindBoost.cmake: # These last three variables are available also as environment variables: # # BOOST_ROOT or BOOSTROOT The preferred installation prefix for searching for #Boost. Set this if the module has problems findin

Re: [CMake] cmake 2.6.4 won't find boost 1.40 on windows

2009-09-17 Thread Cristian Adam
Michael Jackson wrote: When you build boost use the --prefix=C:\boost_1_40 ... install also you should specify toolset==msvc9.0 or the libraries will not be named correctly. Hmm, I managed to compile a small program_options test program. Program options libraries are named like: boost_prog

[CMake] cmake 2.6.4 won't find boost 1.40 on windows

2009-09-17 Thread Cristian Adam
Hi, I have encountered problems with Boost 1.40 (build on Windows using Visual Studio 2008 and MinGW GCC 4.4.0) with CMake 2.6.4. Boost was compiled for Visual Studio 2008 like this: bjam --build-dir=c:\temp\boost toolset=msvc --build-type=complete install and for MinGW GCC like this: bjam --bui

Re: [CMake] InstallRequiredSystemLibraries with MSVC9 SP1

2008-12-07 Thread Cristian Adam
cyril_wobow wrote: - adding the following preprocessor definitions to my project : _BIND_TO_CURRENT_MFC_VERSION=1 and _BIND_TO_CURRENT_CRT_VERSION=1, as I read about in forums, results in the embedded manifest depending on both RTM and SP1 CRTs, which doesn't help. - there must be the same pro

[CMake] FindBoost.cmake: please test

2008-01-20 Thread Cristian Adam
Also, where did you get those binary package from? Boost.org itself doesn't have any binaries available as far as I can see? Andreas http://www.boost-consulting.com/products/free ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman

Re: [CMake] submission: updated Modules/FindBoost.cmake

2007-05-18 Thread Cristian Adam
Mike Talbot wrote: I have made some enhancements to FindBoost.cmake to try to add support for the boost libraries (attached). Thanks, the enhancements are welcome, the script now looks like this: project(signal CXX) if (MINGW) set(Boost_LIB_SUFFIX mgw34-s-1_34) set(Boost_LI

Re: [CMake] submission: updated Modules/FindBoost.cmake

2007-05-18 Thread Cristian Adam
Bob Kuehne wrote: boost recently updated to 1.34, changing (of course) the default installation path. this breaks the FindBoost cmaker, so attached is an update that allows 1.34 as released to work. Regarding FindBoost.cmake, I'm testing Boost 1.34.0 with MinGW gcc 3.4.2 MinGW doesn't have a

[CMake] qt4 simple app

2006-05-17 Thread Cristian Adam
Hi all, I'm trying to compile a simple Qt4 (4.1.1) application with Visual Studio 7 .NET 2003, but I get this error: Linking... MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol [EMAIL PROTECTED] referenced in function _WinMainCRTStartup Here is my CMakeLists.txt file: SET

Re: [CMake] Digital Mars

2006-05-17 Thread Cristian Adam
William A. Hoffman wrote: You could run cmake --debug-trycompile and it will leave the makefiles around, and you can run make in CMakeFiles/CMakeTmp to see what the error really is. Does Digital Mars have its own make? Yes it has. "Digital Mars Make Version 5.05" Cristi.

[CMake] mingw and cygwin is not detected for CXX

2006-04-17 Thread Cristian Adam
Hi all, MINGW is not set for CXX projects, it works with C projects though. Please add:     IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )   SET(CMAKE_COMPILER_IS_MINGW 1)     ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" )     IF("${CMAKE_COMPILER_OUTPUT}" MA

[CMake] mingw windows applications

2006-04-17 Thread Cristian Adam
Hi all, In order to build windows applications (not console) with MinGW you need to set "-mwindows" parameter for the compiler (http://www.mingw.org/docs.shtml). Please add SET(CMAKE_CREATE_WIN32_EXE  "-mwindows") to Windows-gcc.cmake I hope this will be included in cmake 2.4 ;-) Best reg