Hi Gabriele,
What do you mean exactly by "we can compile libA but we cannot compile libB
without installing libA because the latter needs it"? o.O Are you trying to
find libA in libs/libB/CMakeLists.txt with find_package(...)?
"Normal" targets (libraries and executables) should be globally
Dear All,
I'm trying to use the DEPFILE argument of add_custom_command(...) to be able to
tell Ninja exactly when it should re-run that custom command. But unfortunately
I'm not able to get it to work as I'd like. :-(
I'm running a custom command that processes a header file through a custom
Hi,
Just to say that setting INCLUDE_DIRECTORIES on a custom target is indeed a bit
of an obscure thing, but we do use it. You can find the full reasoning in:
https://gitlab.kitware.com/cmake/cmake/issues/16830
Because of that, I understood that CMake will provide this functionality in the
Dear All,
I ran into an issue with incremental builds that use ExternalProject_Add(...),
which I'm very surprised isn't a more widely advertised issue. So I thought I'd
ask here if people are aware of this behaviour...
For our software projects we build a good number of externals using
Hi Tiago,
Indeed, that page is quite a bit misleading. And it seems to be "liked" by
Google a lot, as most people come across it. (I also found it myself when
looking for CMake documentation early on.)
In general, listing all source files belonging to a library/executable, even
the ones that
Hi Tiago,
This is one of those cases when you have to declare the header files to
add_library(...) as well. In that case AUTOMOC should work fine. At least it
does for us, in a very similar setup.
http://acode-browser.usatlas.bnl.gov/lxr/source/atlas/graphics/VP1/VP1Gui/CMakeLists.txt
Cheers,
Hi,
I'm a bit surprised by this. I had to explicitly tell CMake not to treat
includes coming from imported targets as system includes. Using this variable:
https://cmake.org/cmake/help/v3.0/variable/CMAKE_NO_SYSTEM_FROM_IMPORTED.html
Hi,
If you run the cpack executable directly, it should not reconfigure/rebuild
your project. As far as I know...
How do you run it now? "make package"? That will reconfigure/rebuild the
project not really because of CPack, but because of how the Makefiles are set
up.
Cheers,
Hi Patrick,
I *think* that these public/private rules behave a bit differently for static
libraries than they do for shared ones.
But I have to admit, that based on this code I also would've guessed that
-I/tmp would not show up in the build of exe1...
I did manage to use public and private
Dear All,
I have a similar issue as Matt Keeler. In our project we have some global
linker flags that we set for all targets using the CMAKE_EXE_LINKER_FLAGS,
CMAKE_SHARED_LINKER_FLAGS and CMAKE_MODULE_LINKER_FLAGS cache variables.
Now it turns out that for some libraries in the project I need
Hi Matt,
Have you tried using the
CMAKE_EXE_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS
cache variables? These actually set these flags globally, and not just for one
directory, but on the directory level they are easy to override. You can just
do something like this in a
Hi Philip,
Unfortunately I can't give any insight on this. I just wanted to express my own
interest in this question. As we'd also very much need a convenient way to
document our CMake code. (Currently it's done on a Wiki page, which is out of
date within 5 minutes of it being updated...)
Dear All,
I'm stumped on the following, seemingly simple issue.
I need to figure out in my configuration whether a given header file will be
available when I'll try to build my library, or not. So that I could set a
particular definition for the compiler according to whether the file is
so please replace the file in your 3.5.0 version of
> CMake.
>
> Thanks,
> Domen
>
> 2016-03-24 9:48 GMT+01:00 Attila Krasznahorkay
> <attila.krasznahor...@gmail.com>:
>> Hi Domen,
>>
>> Unfortunately I can't seem to create an easy-to-package exam
at how this could be solved for later versions of CPack.
> Do I understand correctly that those errors occur when a symlink is
> pointing to another simlink outside your project?
> Could you please provide a minimal example of all your cases?
>
> Thanks,
> Domen
>
>
> 2016
Hi Brad,
Thanks! Looks good.
Cheers,
Attila
> On 23 Mar 2016, at 19:05, Brad King <brad.k...@kitware.com> wrote:
>
> On 03/22/2016 08:23 AM, Attila Krasznahorkay wrote:
>> Here is my next attempt. ;-) Hopefully I'm at least getting closer...
>
> Thanks.
a2af70d;hb=HEAD#l994
Cheers,
Attila
> On 23 Mar 2016, at 13:50, Brad King <brad.k...@kitware.com> wrote:
>
> On 03/23/2016 08:44 AM, Attila Krasznahorkay wrote:
>> CMake Error at /afs/cern.ch/sw/lcg/contrib/CMake/3.3.2/...
>
> Please try with C
Dear All,
Not sure what's the best way to post this issue, so I thought I'd send around
an e-mail first.
We've been struggling with some RPM building errors in some of our projects for
a while now. Finally I was able to understand what the cause of the issue is.
In some cases we put symbolic
ir" , not
> "my/srcSiblingDir"
>
>
>
>
> On Fri, Mar 18, 2016 at 11:52 AM, Attila Krasznahorkay
> <attila.krasznahor...@gmail.com> wrote:
>> Hi Brad,
>>
>>>> + // If it's an absolute path, check if it starts with the
: Binary data
> On 15 Mar 2016, at 19:13, Brad King <brad.k...@kitware.com> wrote:
>
> On 03/15/2016 10:48 AM, Attila Krasznahorkay wrote:
>> https://cmake.org/pipermail/cmake-developers/2015-December/027197.html
>>
>> With the following patch, when setting the
Hi Brad,
>> + // If it's an absolute path, check if it starts with the source
>> + // direcotory:
>> + return ( ( path.find( SourceDir ) != 0 ) &&
>> + ( path.find( BinaryDir ) != 0 ) );
>
> Please look at using strncmp and a check that the following character
> is a
Hi Brad,
All valid points. Will try to make a new patch today.
Cheers,
Attila
> On 15 Mar 2016, at 19:13, Brad King <brad.k...@kitware.com> wrote:
>
> On 03/15/2016 10:48 AM, Attila Krasznahorkay wrote:
>> https://cmake.org/pipermail/cmake-developers/2015
Dear All,
I've already talked about this a bit back in December.
https://cmake.org/pipermail/cmake-developers/2015-December/027197.html
I looked at this issue today again, as in our builds we can be seriously
hampered by "cmake -E cmake_depends" calls. And then, by the huge dependency
trees
Hi Roman,
If you only set
set( CMAKE_CXX_STANDARD 11 )
in that subdirectory, then this should happen automatically. (Since the
variable will not be visible as soon as you go out of the scope of this
"subdirectory".)
Otherwise you could just set the CXX_STANDARD property on the targets that
Hi Gerry,
Setting these variables by hand sounds quite dangerous. I'm not sure how much
this is meant to be supported.
There is a much more "native" way of doing this. You could do:
add_subdirectory( ${source_dir} ${binary_dir} )
, where "source_dir" would be the source directory relative to
Hi,
I myself use statements like:
list( INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/modules )
at the beginning of my main CMakeLists.txt file, and it works exactly as one
would expect. I also override some CMake provided modules like this.
Cheers,
Attila
> On 08 Feb 2016, at
Thanks for the suggestions! I'll give it a try.
Cheers,
Attila
> On 28 Jan 2016, at 14:07, Domen Vrankar wrote:
>
>> Not sure how we can disable such script call from CPackRPM unless adding the
>> extra feature to call
>> rpm/rpmbuild wiht appropriate
Dear All,
This should be a simple question, but somehow I don't seem to find an answer to
it with Google.
Our projects have a lot of python files in them. Many of which are not simple
python files. They are files that need our software to interpret them. So CPack
should just leave them alone.
LL_COMMANDS "${CMAKE_CURRENT_SOURCE_DIR}/install_k.sh")
>
> And instead of packaging with "make package" command execute "cpack -G RPM".
>
> However there is an additional problem that this hack only works for
> monolithic packages (that's why I c
Dear All,
I have a slightly unusual question (I guess). Is it possible somehow to force
CPack to produce RPM files from projects that have build problems?
We use CMake in our nightly build system to test the latest changes in our
software. When a build problem occurs we don't want the whole
Hi Rashad,
It may not be the perfect way of doing it, but I attach build log files as
"notes". With something like:
set( CTEST_NOTES_FILES ${CTEST_BINARY_DIRECTORY}/BuildLogs/log1.log ... )
ctest_submit( PARTS Build Notes )
(I actually do something rather more complicated. I split the build
Hi Yann,
I have no idea what LINKER_SCATTER_FILE does, but...
if( TARGET )
is a check that will evaluate to true if a target named *exists*. In this
configuration neither "target_1" or "target_2" exist at the point when you run
this check. So LINKER_SCATTER_FILE will always be set to
Hi Isaac,
ccmake will only allow you to modify cache variables. When you call
set( CMAKE_BUILD_TYPE RelWithDebInfo )
, this creates a local variable in your CMakeLists.txt file. This way it should
*always* override whatever you set on the command line, or as a cache variable.
If you want to
Hi Victor,
(Without a name I don't have anything better to go on here...)
You could do the following in your subdirectory's CMakeLists.txt file:
set( SOURCE ${SOURCE} ${CMAKE_CURRENT_SOURCE_DIR}/file1.cpp ... )
set( SOURCE ${SOURCE} PARENT_SCOPE )
The second line will make sure that the
Hi Andrey,
I would be extremely happy with an extension to this functionality.
Right now I have way too many targets in my projects to make good sense of them
if all of them are put into a single graph. If I would be able to specify that
I'd like to see the connections between all the targets
Hi Alan,
Are you just looking for the TIMEOUT property on the tests?
https://cmake.org/cmake/help/v3.0/command/set_tests_properties.html
This is something that I managed to find with the most basic google-ing myself.
:-/ And I use it like:
set_tests_properties( ${testName}Test PROPERTIES
the addition of this new
feature.
Cheers,
Attila
> On 09 Dec 2015, at 15:38, Ben Boeckel <ben.boec...@kitware.com> wrote:
>
> On Wed, Dec 09, 2015 at 09:19:45 +0100, Attila Krasznahorkay wrote:
>> I myself am on the side of simplicity. Using regular expressi
Hi Igor,
At this point it's really not a CMake question, but a GNU Make one... The
answer is actually right there in the first warning that you got.
make[4]: warning: jobserver unavailable: using -j1. Add `+' to parent make
rule.
I have to admit that I'm not absolutely sure about all the
Hi,
Just to clarify: CMAKE_INSTALL_PREFIX is the variable that sets where the
project will be installed. CMAKE_PREFIX_PATH is used (amongst other things) to
find external projects during the configuration.
Cheers,
Attila
> On 13 Dec 2015, at 21:20, Owen Hogarth II
Dear All,
I'm trying to do something a bit more complicated, so please bear with me...
In our project we use a special kind of source code generator. Called a
"dictionary generator". (https://root.cern.ch/how/how-use-reflex) To simplify
the life of our users a bit, we provide a helper function
brary takes care of
collecting the include directories from the entities that provide such a thing.
Cheers,
Attila
> On 11 Dec 2015, at 12:58, Attila Krasznahorkay
> <attila.krasznahor...@gmail.com> wrote:
>
> Dear All,
>
> I'm trying to do something a bit
Hi Robert,
I'm afraid that the sad situation is that nobody has done this yet, or is
working on it at the moment.
I'm absolutely sure that if you can help with this by any amount, that will be
most welcome by the CMake developers. It will certainly be most welcome by me,
as I've been
portable. Even if my current
project will not work on Windows for a lot of reasons anyway...
Cheers,
Attila
> On 10 Dec 2015, at 13:38, Ruslan Baratov <ruslan_bara...@yahoo.com> wrote:
>
> On 10-Dec-15 12:52, Attila Krasznahorkay wrote:
>> Hi QP,
>>
&g
Hi QP,
Probably not the intended solution, but what I’m doing in such cases is that in
a patch step I create a shell script that does the configuration for me. With
all the environment settings and everything. Like:
PATCH_COMMAND ${CMAKE_COMMAND} -E echo “cd someDir/; CC=\”something\”
Hi Owen,
This seems like a textbook example of using target_include_directories(…) with
generator expressions. Let’s take the example where:
lib1/headers/lib1.h
lib1/lib1.c
lib2/headers/lib2.h
lib2/lib2.c
If you want to be able to include lib1.h and lib2.h with simply
#include “lib1.h”
and
Dear All,
In our software infrastructure I now got to the point that in building "high
level" packages/projects the CMake build spends a very noticeable amount of
time in calculating the dependencies of source files. To give you a feel of the
issue, in one example that I was profiling, I build
ncy calculation.
Should one open a bug report with this? (Does the CMake bug tracking system
have the ability to track "feature requests"?)
Cheers,
Attila
> On 07 Dec 2015, at 11:55, Attila Krasznahorkay
> <attila.krasznahor...@gmail.com> wrote:
>
> Dear
Dear All,
I'm still debugging the performance problems of our build. But now I bumped
into another surprising thing.
Our "highest level" packages can depend on a *lot* of low level packages. The
one I'm testing now depends on more than 180 of them.
This generates >180 -isystem flags for the
Dear All,
I'm struggling since a few days with the following issue.
Our development setup is such that we build large software projects in a
nightly build system, which puts these projects onto a network drive. The
developers then set up these nightly projects, and build their own code against
boost files in my
dependency list.
Any suggestion for how I could express my intent in a regular expression that
CMake would understand?
Cheers,
Attila
> On 07 Dec 2015, at 10:57, Attila Krasznahorkay
> <attila.krasznahor...@gmail.com> wrote:
>
> Dear All,
>
&
015, at 10:05 PM, Alexander Neundorf <a.neundorf-w...@gmx.net>
> wrote:
>
> On Monday, December 07, 2015 15:39:40 Attila Krasznahorkay wrote:
> > Dear All,
> >
> > I'm still debugging the performance problems of our build. But now I bumped
> > into another sur
Dear All,
Is it possible to add additional source files to an already existing custom
target?
My project needs to generate a number of "different things", which it does by
setting up many custom commands. In order to trigger the generation of
everything, I currently need to set up an
Hi Nils,
Clever. I didn't even consider specifying the SOURCES argument of the custom
target with a generator expression. But it seems to work perfectly.
Thanks!
Attila
> On 03 Dec 2015, at 16:00, Nils Gladitz <nilsglad...@gmail.com> wrote:
>
> On 12/03/2015 0
Hi Lloyd,
You mean like:
if( ${CMAKE_BUILD_TYPE} STREQUAL "Release" )
set_target_properties( myexec PROPERTIES WIN32_EXECUTABLE TRUE )
endif()
?
Or would you like the build configuration to change in this respect when you
change the build type in the IDE? This latter may not be possible to
Dear All,
I'm running into a new issue with my custom commands. :-(
I have a project with many subdirectories. Where most subdirectories generate
some files during the build. Some of which need to be merged into a single file
at the end of the build.
In my current implementation the
Hi Zac,
In recent versions of CMake (not sure when it was introduced, but it's
available in 3.2.X) you have an extra argument for ExternalProject_Add:
BUILD_BYPRODUCTS.
https://cmake.org/cmake/help/v3.2/module/ExternalProject.html
I use this in a setup very similar to yours to declare all the
Hi Zac,
Interesting. I was convinced that it wouldn't work with Ninja. But it does.
Thanks!
Attila
> On 19 Nov 2015, at 00:23, Zac Bergquist <zbergquis...@gmail.com> wrote:
>
> Would this work?
>
> add_dependencies(MergeFiles SubdirTarget)
>
> On Nov
Dear All,
I'm trying to do something that may be very easy to implement, but I'm really
struggling with it at the moment...
I have a project in which I generate various files in subdirectories. Which I
add to the main project file using add_subdirectory(...). Some of these files I
need to
Hi Daniel,
You could even do it in a *much* more general way.
We write custom log files about our builds by providing a "replacement" for the
ctest executable. So that when we configure the build with
-DCTEST_USE_LAUNCHERS
, our script would catch *all* the build commands. (To have a chance
Hi,
I'm a bit surprised about this answer.
Sure, build areas are not to be moved around. I completely agree. But this is
why we have the concept of installing releases. As long as you configure your
build correctly, you should be able to move around your install directory. As
the binaries by
Dear All,
In my code I'm trying to do something slightly tricky. I include packages that
provide imported libraries (amongst other things). Then, because of how my
project is structured, I don't make use of the imported libraries directly, but
first make "copies" of them, and then make use of
gt; On Thu, Oct 29, 2015 at 4:53 PM, Attila Krasznahorkay
> <attila.krasznahor...@gmail.com> wrote:
> Dear All,
>
> In my code I'm trying to do something slightly tricky. I include packages
> that provide imported libraries (amongst other things). Then, because of how
XX_FLAGS is deduplicated. But I consider this
> variable as global flags for the whole project which is defined at topmost
> CMakeLists.txt. If you need to specify some flags specifically for a target
> use target_compile_options.
>
> —
> Sent from Mailbox
>
>
Dear All,
Let me try a simpler question this time. (I'm a bit disappointed that nobody
had any comments on my question about sub-projects.)
I'm trying to clean up my project's build a bit. As it collects compilation
flags from a few separate places, by the time it finishes collecting
Dear All,
After the suggestion from Bill Hoffman, I played with CDash for a while now. I
was able to create a ctest script that would build the packages/subdirectories
of my project one by one, and then upload the build/test results to a CDash
server. With the results being quite user friendly
Dear All,
I'd like to ask for some advice about the following issue. We're migrating a
very big project (millions of lines of code...) from a custom build manager to
CMake.
The software is put together from separate "packages" that are all developed by
a different set of people. Our nightly
66 matches
Mail list logo