Re: [CMake] CMake Digest, Vol 182, Issue 32

2019-06-20 Thread Michael Wild
On Wed, Jun 19, 2019 at 11:30 AM Innokentiy Alaytsev wrote: > Hello! > > Are the header files of the shared library (DLL) listed as INTERFACE_SOURCES > for the library target? AFAIK, the only reason for header files to be > processed by AUTOMOC is to be part of the project. The only way that I know

[CMake] Problem with AUTOMOC on WIN32

2019-06-18 Thread Michael Wild
Dear all It's a very long time I last posted here, so please be kind :-) I currently am having a very hard time to get AUTOMOC to work properly on WIN32 for the case where I have some Qt classes in a DLL that I link to an executable. In this case, the header gets included by both, the correspondi

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-30 Thread Michael Wild
On Mon, Nov 30, 2015 at 7:01 PM, Dan Liew wrote: > Hi Michael, > >> Not going into detail as I'm typing on the phone, but this really sounds >> like a case where a "SuperBuild" >> (http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html) >> can help you to simplify things a lot

Re: [CMake] [cmake-developers] Obtaining header file dependencies of a source file manually

2015-11-29 Thread Michael Wild
On Sun, Nov 29, 2015, 10:47 Dan Liew wrote: Hi, # TL;DR I need a way of determining the header file dependencies of a source file and inform CMake about them. CMake doesn't do this automatically because I'm using custom commands for the compilation step so CMake doesn't do it's usual magic of a

Re: [CMake] CMAKE__OUTPUT_EXTENSION

2013-09-06 Thread Michael Wild
make/help/v2.8.11/cmake.html#variable:CMAKE_USER_MAKE_RULES_OVERRIDE > http://cmake.org/cmake/help/v2.8.11/cmake.html#variable:CMAKE_USER_MAKE_RULES_OVERRIDE_LANG > > If the documentation isn't sufficient, can you please suggest modifications. > > On Fri, Sep 6, 2013 at

Re: [CMake] CMAKE__OUTPUT_EXTENSION

2013-09-06 Thread Michael Wild
On Thu, Sep 5, 2013 at 8:22 AM, Michael Wild wrote: > [snip long rant] > Sorry, Alex. If had scrolled down a bit more in CMakeInformation.cmake, I would have seen the hook variables CMAKE_USER_MAKE_RULES_OVERRIDE{,_}. However, can I request that this be documented? Michael -- Powe

Re: [CMake] CMAKE__OUTPUT_EXTENSION

2013-09-04 Thread Michael Wild
On 04.09.2013 20:42, Michael Wild wrote: > Dear all > > no matter when I try to set CMAKE_{C,CXX}_OUTPUT_EXTENSION, on my Linux > box using the GNU Makefiles generator the resulting object files always > have a .o extension. I tried setting it in the cache, before and after >

[CMake] CMAKE__OUTPUT_EXTENSION

2013-09-04 Thread Michael Wild
Dear all no matter when I try to set CMAKE_{C,CXX}_OUTPUT_EXTENSION, on my Linux box using the GNU Makefiles generator the resulting object files always have a .o extension. I tried setting it in the cache, before and after the project() call. Nothing helps. Is this a known issue? I tried trawlin

Re: [CMake] write file if different?

2013-05-29 Thread Michael Wild
On 28.05.2013 22:07, Matthew Woehlke wrote: > Is there a built-in way to write a string to a file (a la FILE(WRITE)) > that will only write the file if the content would be different? (Or > does FILE(WRITE) already work this way despite no obvious hint in the > documentation that it does?) > > Rig

Re: [CMake] How do I search for personal libraries?

2013-04-02 Thread Michael Wild
You should find this interesting: http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file In short: * In project A create a AConfig.cmake file and export your targets * In project B call find_package(A REQUIRED) HTH Michael On Wed, Apr 3, 2013 at 7:44 AM, Saad Khatt

Re: [CMake] adding program suffix

2013-03-11 Thread Michael Wild
Looking at the sources, it seems that you also need to set GMX_DEFAULT_SUFFIX to FALSE in order for this to work. Michael On Mon, Mar 11, 2013 at 10:49 AM, Chandan Choudhury wrote: > Dear Micheal, Yngve Decker and Eric > > Thank for remarks. > > Micheal you are right that I want to append a suf

Re: [CMake] adding program suffix

2013-03-11 Thread Michael Wild
27 AM, J Decker wrote: > > > On Mon, Mar 11, 2013 at 1:24 AM, Michael Wild wrote: > >> >> >> >> On Mon, Mar 11, 2013 at 9:20 AM, J Decker wrote: >> >>> >>> >>> On Sun, Mar 10, 2013 at 11:56 PM, Chandan Choudhury >>>

Re: [CMake] adding program suffix

2013-03-11 Thread Michael Wild
On Mon, Mar 11, 2013 at 9:20 AM, J Decker wrote: > > > On Sun, Mar 10, 2013 at 11:56 PM, Chandan Choudhury wrote: > >> >> Dear cmake users, >> >> I am very new to cmake. I really find it interesting. I installed gromacs >> (4.6.1) with it. One simple query regarding its usage is, how do I add >>

Re: [CMake] adding program suffix

2013-03-11 Thread Michael Wild
UTABLE_SUFFIX=_461 && make -j 12 && make install > > But the suffix was not added to the executables. Might be I am missing > something or doing silly. > > Kindly have a look. > > Chandan > > > -- > Chandan kumar Choudhury > NCL, Pune > INDIA

Re: [CMake] adding program suffix

2013-03-11 Thread Michael Wild
On Mon, Mar 11, 2013 at 7:56 AM, Chandan Choudhury wrote: > > Dear cmake users, > > I am very new to cmake. I really find it interesting. I installed gromacs > (4.6.1) with it. One simple query regarding its usage is, how do I add > program suffix to the executables created. > > > Chandan > Just

Re: [CMake] Passing CMAKE_TOOLCHAIN_FILE on command line causes CMake warning

2013-02-06 Thread Michael Wild
Hi On Wed, Feb 6, 2013 at 11:59 AM, Pat Marion wrote: > Hi, > > I'm emailing about bug > 13093in the backlog. I > found comments > by Brad that > suggest it's a legitimate warnin

Re: [CMake] help: Does CMake support Vxworks platform?

2013-02-04 Thread Michael Wild
AFAIK you will need to cross-compile for VxWorks, and for that you need a toolchain file that describes the cross-compile toolchain (compiler, linker, archiver, etc.) to CMake. Googling I found this: https://github.com/alexbrinister/vxWorks-GCC-NashobaRobotics/blob/master/vxworks-toolchain.cmake. P

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Michael Wild
In a SuperBuild, all projects, even your own, are built by one large "super-build" project that contains a series of ExternalProject_Add calls. That's all there is to it. On Mon, Feb 4, 2013 at 4:23 PM, Ansis Māliņš wrote: > >SuperBuild pattern > Tell me all about it! > > -- > > Powered by www.

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Michael Wild
How did you compile SDL? Most generally, you would do: find_path(SDL2_INCLUDE_DIR SDL.h PATH_SUFFIXES SDL2) # I have no idea against which libraries you have to link, so you might need more than this find_library(SDL2_LIBRARY SDL) if(NOT SDL2_INCLUDE_DIR OR NOT SDL2_LIBRARY) message(SEND_ERROR

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Michael Wild
If your project is open source and you want to have any chance of it ever being included in any of the major Linux distros without making somebody very angry at you, forget about add_subdirectory() for external dependencies. On Mon, Feb 4, 2013 at 3:29 PM, Theodore Papadopoulo < theodore.papadopo

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Michael Wild
x27;s all you can do. On Mon, Feb 4, 2013 at 2:05 PM, Ansis Māliņš wrote: > Exactly! So, going back to my original question, how do I use CMake in > face of DLL Hell? > > > On Mon, Feb 4, 2013 at 2:58 PM, Michael Wild wrote: > >> That has nothing to do whether

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Michael Wild
Michael On Mon, Feb 4, 2013 at 1:43 PM, Ansis Māliņš wrote: > If shared libraries on Windows are truly shared, then why so many > applications carry their own copies of that same Qt and Python? Examples > from my own Program Files: Anki, Blender, Mixxx, Mumble, TortoiseHg. > > &

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Michael Wild
Hi On Mon, Feb 4, 2013 at 12:43 PM, Ansis Māliņš wrote: > I'm just learning CMake and posting questions in this mailing list, but > the answers I get only confuse me. It seems I must take a step back and ask > more general questions. > > In Linux there is a package for everything, so you just fi

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Michael Wild
gt; "SDL installation"? But there is no such thing. At least not on Windows. > ... Right? > > > On Mon, Feb 4, 2013 at 1:10 PM, Michael Wild wrote: > >> In that case, clearly ExternalProject_Add. It is an external dependency, >> and should be treated as s

Re: [CMake] add_custom_command

2012-10-18 Thread Michael Wild
On 10/17/2012 08:05 PM, Totte Karlsson wrote: > > On 10/16/2012 12:49 AM, Michael Wild wrote: >> This will always work: >> >> add_executable(frobnicate frobnicate.c) >> >> add_custom_command(OUTPUT ${resultFile} >>COMMAND frobnicate $

Re: [CMake] Same effect as g++ -bundle ?

2012-10-16 Thread Michael Wild
On 10/16/2012 02:06 AM, digitalriptide wrote: > I need to create a Mach-o bundle format file. With g++, for example, I > can do the following > > g++ -o helloWorld.bundle -bundle helloWorld.o > > given some object file. > > Is there some way to do this from cmake? I've looked at the > documentat

Re: [CMake] add_custom_command

2012-10-16 Thread Michael Wild
On 10/15/2012 08:20 PM, Totte Karlsson wrote: > > set( resultFileFolder "${PROJECT_SOURCE_DIR}/wiki/reports") set( > resultFile "${resFileFolder}/tests_auto.xml") > >> First things first: You should *never* pollute your source tree, always >> output to the build tree. > This is part of a google c

Re: [CMake] add_custom_command

2012-10-14 Thread Michael Wild
Hi On 10/15/2012 12:54 AM, Totte Karlsson wrote: > Hi, I have an executable target, that I want to be executed as part > of its own build. > > The target takes one argument, which is output folder of a text > file. This text file is part of my source dir. > > In my CMake file I have, at the end

Re: [CMake] Add Find*.cmake files for Pantheios and STLSoft to distro?

2012-09-12 Thread Michael Wild
On 09/12/2012 12:41 PM, Philipp Berger wrote: About a few weeks ago I asked for help regarding Find*.cmake files for Pantheios. With your help, I managed to build a Find file for Pantheios and its associated library STLSoft. My question now is: Where can I submit those files to be included in th

Re: [CMake] numerical option at compile time

2012-09-06 Thread Michael Wild
On 09/06/2012 04:15 PM, Jack Stalnaker wrote: > Using autoconf, I could specify a numerical option using AC_ARG_ENABLE. > This was useful for specifying a logging level at compile time. I could > pass --enable-logging=8 to the configure script to enable deep logging. > Is there a way to do this wit

Re: [CMake] Version in name of shared library

2012-09-06 Thread Michael Wild
On 09/06/2012 10:09 AM, Michael Wild wrote: > On 09/06/2012 10:05 AM, Benjamin Eikel wrote: >> Am Donnerstag, 6. September 2012 um 10:01:36 schrieb Michael Wild: >>> On 09/06/2012 09:43 AM, Anton Sibilev wrote: >>>> Hi all! >>>> >>>> I'm m

Re: [CMake] Version in name of shared library

2012-09-06 Thread Michael Wild
On 09/06/2012 10:05 AM, Benjamin Eikel wrote: > Am Donnerstag, 6. September 2012 um 10:01:36 schrieb Michael Wild: >> On 09/06/2012 09:43 AM, Anton Sibilev wrote: >>> Hi all! >>> >>> I'm making shared library with add_library(xxx SHARED xxx.c) and as &g

Re: [CMake] Version in name of shared library

2012-09-06 Thread Michael Wild
On 09/06/2012 09:56 AM, Michael Stürmer wrote: > Am 06.09.2012 09:43, schrieb Anton Sibilev: >> Hi all! >> >> I'm making shared library with add_library(xxx SHARED xxx.c) and as >> result I got 'libxxx.so'. >> I want to create lib with name like 'libxxx.so.1', can you please help, >> how to make th

Re: [CMake] Version in name of shared library

2012-09-06 Thread Michael Wild
On 09/06/2012 09:43 AM, Anton Sibilev wrote: > Hi all! > > I'm making shared library with add_library(xxx SHARED xxx.c) and as > result I got 'libxxx.so'. > I want to create lib with name like 'libxxx.so.1', can you please help, > how to make this? > > Point is not to create link or copy libxxx.s

Re: [CMake] Failure to create CMakeFiles/libname.dir

2012-08-18 Thread Michael Wild
On 08/18/2012 02:20 PM, David Cole wrote: > > > On Sat, Aug 18, 2012 at 6:57 AM, Michael Wild <mailto:them...@gmail.com>> wrote: > > On 08/17/2012 05:25 PM, David Cole wrote: > > > > > > On Fri, Aug 17, 2012 at 11:16 AM, R

Re: [CMake] Failure to create CMakeFiles/libname.dir

2012-08-18 Thread Michael Wild
On 08/17/2012 05:25 PM, David Cole wrote: > > > On Fri, Aug 17, 2012 at 11:16 AM, Rolf Eike Beer <mailto:e...@sf-mail.de>> wrote: > > Am Freitag, 17. August 2012, 14:17:33 schrieb Michael Wild: > > Yes, e.g. i386 works fine: > > > >

Re: [CMake] cmake output file naming

2012-08-17 Thread Michael Wild
BTW, I found that using lcov is much easier than trying to figure out the raw gcov output and it handles the output file naming automatically too. Michael On 08/17/2012 04:22 PM, Sumit Adhikari wrote: > Now I am doing good. Thanks for the info. > > By the way, why not making this a feature (ins

Re: [CMake] Failure to create CMakeFiles/libname.dir

2012-08-17 Thread Michael Wild
are all big-endian... Michael On 08/17/2012 02:10 PM, David Cole wrote: > Guess: Maybe the "+" in the build tree directory name is messing > something up? > > Are there "+" characters in the build tree names on architectures that work? > > > On Fri

[CMake] Failure to create CMakeFiles/libname.dir

2012-08-17 Thread Michael Wild
Dear all I have this very strange case that on some hardware architectures (powerpc, s390, s390x) CMake somehow fails to generate the target-directories (/path/to/build-tree/CMakeFiles/libname.dir). Have you ever encountered this problem? If you're curious, here's the build log of one such failu

Re: [CMake] How to build only when file contents are actually changed?

2012-08-14 Thread Michael Wild
On 08/14/2012 04:32 PM, Peng Yu wrote: >> You miss the point. If CMake wanted to offer hash-based checking, it >> would need to do so for *all* backends, not just GNU Make. Good look >> implementing that hack in Visual Studio or Xcode... > > I get your point that there is not an easy to do content

Re: [CMake] How to build only when file contents are actually changed?

2012-08-14 Thread Michael Wild
On 08/14/2012 02:41 PM, Peng Yu wrote: >> Again, using ccache solves this much more elegantly. And calling md5sum >> twice is also not very nice... > > I'm not sure ccache replaces hash. My understanding is that ccache > speed up individual compilation, but all the targets that depends on > it are

Re: [CMake] How to build only when file contents are actually changed?

2012-08-14 Thread Michael Wild
On 08/14/2012 01:18 PM, Peng Yu wrote: >> CMake really leaves the decision when to recompile something to the >> backend, i.e. GNU Make, Xcode, Visual Studio, ninja etc. It merely >> defines dependencies and then lets the actual build tool handle the >> rest, and most of them choose to use simple t

Re: [CMake] How to build only when file contents are actually changed?

2012-08-13 Thread Michael Wild
CMake really leaves the decision when to recompile something to the backend, i.e. GNU Make, Xcode, Visual Studio, ninja etc. It merely defines dependencies and then lets the actual build tool handle the rest, and most of them choose to use simple time-stamps instead of hashes. Also note that comput

Re: [CMake] cmake manpage in pdf with section (subsection, etc) bookmarks and hyperlinks?

2012-08-13 Thread Michael Wild
On 08/13/2012 04:18 PM, Peng Yu wrote: > Hi, > > I use the following command to generate the pdf file from cmake > manpage. But the pdf file does not have bookmarks. Does anybody know a > way to generated the manual in pdf with bookmarks and possibly > hyperlinks? > > man -t "$f" | ps2pdf - >

Re: [CMake] Howto create a ProjectConfig.cmake tutorial

2012-08-08 Thread Michael Wild
Oops, my bad. Apologies. Fixed now. Michael On 08/08/2012 01:04 PM, Eric Noulard wrote: > 2012/8/8 Nico Schlömer : >> Hi, >> >> I just looked at >> http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file >> to learn about exporting build information to the installation,

Re: [CMake] stderr and stdout in cmake

2012-07-30 Thread Michael Wild
On 07/30/2012 04:12 PM, luxInteg wrote: > Greetings > > I have a bash script (from an auto-tools Makefile ) to translate > to cmake > > > My 'translation might go something like thios > > execute_process(COMMAND ${some_command} '2>&1' INPUT_FILE > ${someFile2} OUTPUT_FILE/dev/nul

Re: [CMake] installing python scripts

2012-07-29 Thread Michael Wild
On 07/30/2012 02:15 AM, Kyle Husmann wrote: > Hi all, > > In my project I have a python program (call it program.py) that > references a python module also in my project (call it pymodule). > program.py gets installed to ${CMAKE_INSTALL_PREFIX}/bin/program and > pymodule gets installed to ${PYTHON

Re: [CMake] Writing a custom Find*.cmake file for Pantheios

2012-07-17 Thread Michael Wild
A few comments: * transform all CMake commands to lower case names: s/IF/if/g, s/ELSE/else/g, s/ENDIF/endif/g, s/SET/set/g etc. * spelling: s/Settung/Setting/g * docs list a component "NFrontEnd", but that string doesn't show up in the actual code. Typo? * just set the default front- and backen

Re: [CMake] Can multiple make commands be set in BUILD_COMMAND for ExternalProject_Add?

2012-07-04 Thread Michael Wild
On 07/04/2012 08:37 AM, hce wrote: > Hi, > > In ExternalProject_Add, "BUILD_COMMAND make" works fine, but I need to add > multiple make commands. In Linux command line I can type "make && make > extra", but how can I set following BUILD_COMMAND for multiple make > commands, it just not working? >

Re: [CMake] Adding "*.obj" geometry files...

2012-06-13 Thread Michael Wild
On 06/13/2012 12:13 PM, Daniel Dekkers wrote: > Somewhat related... > > We now have the resources excluded from the build but visible in the IDE. So > far so good. > But we also want to copy them (all) to the build directory. > We have a post build command that does that. > But if you only change

Re: [CMake] Custom install target to install only files

2012-05-24 Thread Michael Wild
On 05/24/2012 03:43 PM, vivek goel wrote: > I have a project with 10 binary files. > and I am installing custom 15 bash files using > > install(PROGRAMS > > DESTINATION /bin > ) > > Is there a way to have custom install target like > make install script which

Re: [CMake] Reason of Fortran include directories /config?

2012-05-15 Thread Michael Wild
My guess is that it has something to do with module files. Michael On 05/16/2012 08:31 AM, Petr Kmoch wrote: > Anyone? Surely there must be a reason for adding those directories. > > Petr > > On Thu, May 10, 2012 at 9:25 AM, Petr Kmoch wrote: >> Hi all, >> >> we're using cmake to generate Inte

Re: [CMake] Package installation conundrum

2012-05-09 Thread Michael Wild
On 09.05.2012, at 21:03, Alexander Neundorf wrote: > On Wednesday 09 May 2012, Michael Wild wrote: > > On 05/08/2012 11:13 PM, Dave Abrahams wrote: > > > on Tue May 08 2012, Alexander Neundorf > > > wrote: > > >> On Tuesday 08 May 2012, Dave Abr

Re: [CMake] Package installation conundrum

2012-05-08 Thread Michael Wild
On 05/08/2012 11:13 PM, Dave Abrahams wrote: > > on Tue May 08 2012, Alexander Neundorf > wrote: > >> On Tuesday 08 May 2012, Dave Abrahams wrote: >> >>> Here's another one! >>> >>> Scenario: >>> >>> * I am running CMake under 0install to build and install libraries >>> >>> * Each library build

Re: [CMake] relocatable build directory: howto?

2012-05-05 Thread Michael Wild
On 05/05/2012 09:59 PM, Dave Abrahams wrote: [...] > > ...but I hadn't thought of "installing" everything as part of creating > the pre-installed state and then having the "installed" state draw from > those results. That's a very interesting idea. I'll try it, thanks. > The other advantage is t

Re: [CMake] Setting COMPILE_FLAGS property on a target in only debug?

2012-05-05 Thread Michael Wild
On 05/04/2012 10:16 PM, Robert Dailey wrote: > I'm doing the following: > > set_property( TARGET ${target_name} APPEND_STRING PROPERTY > COMPILE_FLAGS "/ZI /Gy " > ) > > However this applies to all configurations. I want to only set this > compiler flag for debug builds, not release. How can I do

Re: [CMake] automatable way to specify parallel --builds

2012-05-05 Thread Michael Wild
On 05/05/2012 08:25 AM, Dave Abrahams wrote: > > I am driving invocations of cmake with another tool, and I would like to > pass the equivalent of -jN for the "cmake --build" step, but I don't > seem to be about to find out what generator will be used, which makes it > hard to even write code to g

Re: [CMake] relocatable build directory: howto?

2012-05-05 Thread Michael Wild
On 05/05/2012 07:25 AM, Dave Abrahams wrote: > > I need to preserve the built-but-not-yet-installed state of some > projects, and the tool I'm driving CMake with moves the result of every > build step from a read-write build directory into a readonly cache. The > result is that the generated cmak

Re: [CMake] configure_file as a build step?

2012-05-01 Thread Michael Wild
You can configure_file() a CMake-script which itself then performs the configure_file() in a custom command. E.g.: # CMakeLists.txt: #... set(FOO "Some text to show up in json_file.json") set(BAR "More text") configure_file(configure_json_file.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/configure_json

Re: [CMake] Add IDE-specific projects

2012-04-29 Thread Michael Wild
On 04/30/2012 04:42 AM, Klaim - Joël Lamotte wrote: > Hi, > > I'm having a hard time finding documentation about this: I have a > library that provide IDE-specific project files, for example Visual > Studio project files. Instead of writing CMake file for it, I just > want to write in my CMakeFile

Re: [CMake] FortranCInterface generating header correctly?

2012-03-21 Thread Michael Wild
On 03/21/2012 02:32 PM, Giovanni Azua wrote: > Hello, > > I have a project for which the main language is C (soon CPP) that calls > some functions from Intel MKL. I have the need to use four third-party > high performance fortran routines and I need to: > > 1) be able to call these Fortran routin

Re: [CMake] Triggers for isysroot

2012-03-11 Thread Michael Wild
On 03/11/2012 09:07 PM, P. Martin wrote: > > On Mar 11, 2012, Michael Wild wrote: >> On 03/11/2012 07:46 AM, P. Martin wrote: >>> In CMake 2.8.7 on Lion, is there anything that would trigger -isysroot >>> to appear in flags.make for a cxx program when there

Re: [CMake] Triggers for isysroot

2012-03-11 Thread Michael Wild
On 03/11/2012 07:46 AM, P. Martin wrote: > In CMake 2.8.7 on Lion, is there anything that would trigger -isysroot > to appear in flags.make for a cxx program when there is no code by the > devs to specifically add a -isysroot? Thanks. Yes, the CMAKE_OSX_SYSROOT in the cache does that. Michael -

Re: [CMake] CMake Linking Error

2012-03-08 Thread Michael Wild
On 03/08/2012 05:40 PM, buzz clay wrote: > Hi, > > I have not been able to find the answer to my current problem so I > thought I'd try a new post. Before diving into the details, please be > aware that the code I am writing compiles/runs perfectly with a personal > Makefile I wrote. > > My code

Re: [CMake] Forcibly run 'moc' on Qt files that are NOT part of the build

2012-03-07 Thread Michael Wild
On 03/07/2012 04:10 PM, Michael Jackson wrote: > In an effort to speed up the build of a project that uses Qt (and moc) I > tried an alternate approach with the moc files. Normally I use the basic idea > of gathering the headers that need to be "moc'ed" and feed those to moc with > this type of

Re: [CMake] recognizing shell in use

2012-03-06 Thread Michael Wild
That's the wrong way to go about things. Rather than putting the COMMAND in the custom target, put it in a add_custom_command() call and make the custom target DEPENDS on it. Then you let the build system handle the dependencies. E.g. like this: find_program(JAVAC_COMPILER javac PATH_SUFFIXES bin

Re: [CMake] How to include the generated header file?

2012-02-29 Thread Michael Wild
On 03/01/2012 07:21 AM, Tan, Tom (Shanghai) wrote: > According to the doc, generate_export_header(somelib) generates a file > in the ${CMAKE_CURRENT_BUILD_DIR} called somelib_export.h. > What's the recommended way to include this "somelib_export.h". > #include "somelib_export.h" does not work. A

Re: [CMake] figuring out exact name of boost-regex lib to use

2012-02-28 Thread Michael Wild
Hi Bart Please keep answers on the list, so others can also profit from the discussion. On 02/28/2012 01:59 PM, Bart Vandewoestyne wrote: > On 02/28/2012 10:28 AM, Michael Wild wrote: >> Don't do it this way. Use this: >> >> find_package(Boost REQUIRED COMPONENTS reg

Re: [CMake] figuring out exact name of boost-regex lib to use

2012-02-28 Thread Michael Wild
On 02/28/2012 10:00 AM, Bart Vandewoestyne wrote: > Hello list, > > I'm quite new to CMake, still learning my way around... I currently > have the following in a CMakeList.txt file: > > set(BOOST_LIBNAME "boost_regex") > #set(BOOST_LIBNAME "boost_regex-mt") > target_link_libraries(airspace

Re: [CMake] apply for maintainer of FindOpenCL.cmake

2012-02-24 Thread Michael Wild
On 02/24/2012 10:52 AM, yao wang wrote: > Hi, > We've written a module finding AMD's APP SDK's "include" abd "library" > paths. And set "OPENCL_INCLUDE_DIR" and "OPENCL_LIBRARY", which are > useful for compiling OpenCL programs. Is it possible for me to > contribute to the share modules and make i

Re: [CMake] upper/lower case

2012-02-23 Thread Michael Wild
On 02/23/2012 04:08 PM, Andrea Crotti wrote: > I really physically suffer using case-insensitive languages, Seriously? You must be an annoyingly happy person if that's your biggest problem in life! ;-) > but is > there any convention to decide > at least when to use upper and when to use a lower

Re: [CMake] CMAKE_INSTALL_LIBDIR - full path or relative?

2012-02-20 Thread Michael Wild
On 02/20/2012 09:59 PM, Orion Poplawski wrote: > For quite a while, Fedora packages will call cmake with > -DCMAKE_INSTALL_LIBDIR set to /usr/lib or /usr/lib64 as appropriate. > Some projects that use this convention include plplot, lasi > > The relatively new cmake module GNUInstallDirs sets CMA

Re: [CMake] Find script distribution strategy

2012-02-20 Thread Michael Wild
On 02/20/2012 04:32 PM, Barth wrote: > Hello, > > Let be a project A developed and distributed by organization AA. > Let be another project B depending on A, developed by organization BB. B > calls find_package(A) in its CMakeLists.txt as to get the dependencies > libraries and includes. > > H

Re: [CMake] $ in the add_custom_command()

2012-02-14 Thread Michael Wild
On 02/14/2012 04:36 PM, aaron.mead...@thomsonreuters.com wrote: > *Looks like ‘+’ is not a valid character for the target name. * > > * * > > *Specifically, cmGeneratorExpression.cxx does not have it as part of the > regular expression to match target names: (line 23 on) * > > * * > > * * >

Re: [CMake] Install selected|group of targets

2012-02-02 Thread Michael Wild
On 02/02/2012 08:44 AM, Joakim Hove wrote: > > > First you should use the COMPONENT parameter of the INSTALL command. > See: > cmake --help-command install > and > http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack > > then you may install all the target/files/.

Re: [CMake] Issues with FindBoost / ${Boost_LIBRARIES}

2012-02-01 Thread Michael Wild
On 02/01/2012 09:33 AM, Arnaud Gelas wrote: > Hi all, > > I have been trying to compile a very simple example with cmake (2.8.5) > and boost, and I can't get what I am doing wrong... > > CMakeLists.txt > -- > > cmake_minimum_required(VERSION 2.6) > > project(ReadGraph) > >

Re: [CMake] About CMAKE_INSTALL_PREFIX

2012-01-24 Thread Michael Wild
On 01/24/2012 09:35 AM, pellegrini wrote: > Hello everbody, > > I would like to understand a bit more one feature related to > CMAKE_INSTALL_PREFIX initialization. > > When reading the documentation, it is specified that this variable > contains the directory that will be pre-pended to all instal

Re: [CMake] Copy files to build folder

2012-01-17 Thread Michael Wild
On 01/17/2012 03:25 PM, Tim Hutton wrote: > On 17 January 2012 13:21, David Cole wrote: >> If you want to use file GLOB at CMake time, then you have to re-run >> CMake manually when you add or remove a file. There's no way around >> that, because we are not going to monitor your hard drive for >>

Re: [CMake] Copy files to build folder

2012-01-17 Thread Michael Wild
AFAICS these files are considered to be source files, right? So they should be explicitly listed in the CMakeLists.txt file. If your CMakeLists.txt file gets too big, you can put the relevant code into another file and then include() it from the CMakeLists.txt. Doing this also helps you detecting

Re: [CMake] Problems finding the SSL library

2012-01-16 Thread Michael Wild
On 01/16/2012 04:59 PM, Maciej (Matchek) Bliziński wrote: > 2011/12/22 Maciej (Matchek) Bliziński : >> CMake Error at cmake/ssl.cmake:83 (MESSAGE): >> Cannot find appropriate system libraries for SSL. Use WITH_SSL=bundled to >> enable SSL support >> Call Stack (most recent call first): >> CMake

Re: [CMake] directshow change dll name to .ax

2012-01-12 Thread Michael Wild
On 01/12/2012 04:26 PM, gilles B wrote: > Hi, > > I want to create a directshow filter (windows) and so change output name > of my dll from "myfilter.dll" to "myfilter.ax" > How to do this ? > > Thank you very much for your help > > regards > Gilles. > set_target_properties(myfilter PROPERTIES

Re: [CMake] Cmake coloring gcc output on errror

2012-01-11 Thread Michael Wild
On 01/11/2012 01:44 PM, Michael Hertling wrote: > On 01/10/2012 07:17 PM, vivek goel wrote: >> Is there a way to color warning/error of gcc with cmake ? > > AFAIK, no, but you might remember the power of *nix, feed the output > of "make VERBOSE=1 2>&1" into sed/awk/perl/ and > use ANSI Control Seq

Re: [CMake] Adding user defined search path for find_package

2012-01-10 Thread Michael Wild
On 01/10/2012 11:14 AM, Martin Uhrin wrote: > Dear CMake community, > > firstly, thank you for the extremely useful build tool, it's saved me a > lot of time and effort! > > I'm trying to solve the following problem: > > I'd like the user (i.e. non-developer compiling my code) to have the > opti

Re: [CMake] CPack output name using VS IDE

2012-01-10 Thread Michael Wild
On 01/10/2012 10:50 AM, Totte Karlsson wrote: >>> >>> But when executing the PACKAGE target, from within VS IDE, the >>> ${CMAKE_BUILD_TYPE} does not seem to be set. >> >> VS IDE or XCode do not set this because they are able to handle >> several config at once. > > yes. > >> You may try to use "

Re: [CMake] Add Custom COmmand and CMAKE_CFG_INTDIR

2012-01-04 Thread Michael Wild
On 01/04/2012 09:28 PM, Michael Jackson wrote: > I am having trouble getting add_custom_Command and CMAKE_CFG_INTDIR to work > correctly together. This is what I have so far. > > # -- Setup output Directories - > SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY > ${PROJECT_BI

Re: [CMake] __FILE__ relative path

2011-12-28 Thread Michael Wild
If you don't want to have the full path embedded in the binary, you do. As an addendum to my previous answer, the string after the equal sign might need escaped quoting. Michael. On 28.12.2011, at 18:41, J Decker wrote: > ya - before using the file parameter, find the last / or '\' and prin

Re: [CMake] __FILE__ relative path

2011-12-28 Thread Michael Wild
set(SRCS a/a.cpp b/b.cpp c/c.cpp d/d.cpp) foreach(f IN LISTS SRCS) get_filename_component(b ${f} NAME) set_source_files_properties(${f} PROPERTIES COMPILE_DEFINITIONS "MYSRCNAME=${b}") endforeach() add_executable(foo ${SRCS}) HTH Michael On 12/28/2011 08:17 AM, vivek goel wrote: > Is

Re: [CMake] Printing the detailed link command call

2011-12-26 Thread Michael Wild
Try make VERBOSE=1 Michael On 26.12.2011, at 15:18, Ceylow wrote: > Hello, > > I'm having some troubles with a linking step and I would like to see exactly > which parameters are given to my compiler when running the Makefile generated > by CMake. > > Currently it only shows: > Linking

Re: [CMake] regex first subfolder

2011-12-26 Thread Michael Wild
On 12/26/2011 11:52 AM, Anton Sibilev wrote: > Hello! Can you, please, help me with regex? > > I have the string, for example, "aaa111/bbb222/ccc333". > As the result of regex I want to get "aaa111", but I can't set proper > expression.. > > string (REGEX REPLACE "^(.*/)?" "" folder ${folder}) ?

Re: [CMake] building on linux, extra libraries referenced

2011-12-26 Thread Michael Wild
On 12/26/2011 08:46 AM, J Decker wrote: > I have this huge project that I've been building with cmake; and even > under gcc (mingw) I don't have this problem... but what is happening > is I have a generic list of libraries that I provide for applications > to link against. This includes the c vers

Re: [CMake] Compile project as C++ if MSVC

2011-12-22 Thread Michael Wild
On 12/23/2011 07:23 AM, Eric Noulard wrote: > 2011/12/23 Pau Garcia i Quiles : >> Hi, >> >> Visual C++ 2010 does not support C99 yet and it seems it will be a >> long time before MSVC supports it. For now, the usual work-around is >> to build the project as C++. >> >> I'd like to build as C if usin

Re: [CMake] Determine 32 vs 64 bit cpu

2011-12-22 Thread Michael Wild
On 12/22/2011 12:23 PM, pellegrini wrote: > Hi all, > > I have a program that uses an external library whose path name depends > on its version (32 or 64 bit). > > Is there a direct way in cmake to test whether my cpu is 32 or 64 bit ? You don't actually care about the CPU, but the operating sys

Re: [CMake] CMake add_subdirectory and recompiling

2011-12-21 Thread Michael Wild
On 12/21/2011 05:59 PM, David Cole wrote: > On Wed, Dec 21, 2011 at 11:56 AM, Michael Wild wrote: >> On 12/21/2011 05:25 PM, André Caron wrote: >>> I've recently been surprised by the behavior of CMake when modifying >>> "CMakeLists.txt" files poi

Re: [CMake] CMake add_subdirectory and recompiling

2011-12-21 Thread Michael Wild
On 12/21/2011 05:25 PM, André Caron wrote: > I've recently been surprised by the behavior of CMake when modifying > "CMakeLists.txt" files pointed to by "add_subdirectory()" directives. > I've asked the question on StackOverflow[1] and have gotten no clean > answer. If anyone is interested, there

Re: [CMake] Documentation request

2011-12-21 Thread Michael Wild
As I already said, all the old documentation (back to version 1.6, AFAIK) is available on the wiki. Michael On 12/21/2011 01:12 PM, Renato Utsch wrote: >> You ? >> This represents a fair amount of work... >> I bet that if no-one did it it is because it's a hUGe task. > > Sorry, I am not that goo

Re: [CMake] Documentation request

2011-12-20 Thread Michael Wild
On 12/21/2011 02:24 AM, Tim Gallagher wrote: > Hi, > > I don't know if this will get done, but is it possible for future releases of > CMake to change the name on the website for the documentation? For example, > if you just looked at the URL: > > http://www.cmake.org/cmake/help/cmake-2-8-docs.

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-12 Thread Michael Wild
), my flags are setup properly in the > CMAKE_SHARED_LINK_FLAGS variable. > > - > Robert Dailey > > > > On Mon, Dec 12, 2011 at 2:20 PM, Michael Wild <mailto:them...@gmail.com>> wrote: > >

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-12 Thread Michael Wild
On 12/12/2011 09:13 PM, Robert Dailey wrote: > On Mon, Dec 12, 2011 at 2:10 PM, David Cole > wrote: > > Apparently, they are undocumented, but there are also: > > CMAKE_SHARED_LINKER_FLAGS and CMAKE_MODULE_LINKER_FLAGS (and their > per-config variants)

Re: [CMake] Setting environment variables in custom command

2011-12-12 Thread Michael Wild
On 12/12/2011 09:05 PM, Robert Dailey wrote: > On Mon, Dec 12, 2011 at 1:53 PM, Michael Wild <mailto:them...@gmail.com>> wrote: > > > CMake script would imply that it runs as part of the configuration > > process. I can't build an installer until all

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-12 Thread Michael Wild
On 12/12/2011 09:00 PM, Robert Dailey wrote: > I need a version of CMAKE_EXE_LINKER_FLAGS for shared libraries. I need > to specify /NODEFAULTLIB for a shared library (DLL) that I'm building, > but it doesn't seem that CMAKE_EXE_LINKER_FLAGS is used by shared > library projects generated by CMake f

  1   2   3   4   5   6   7   8   9   10   >