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 visi
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
e
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 separate
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 a
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
https://cmake.org/cmake/help/v3.0/prop_tgt/NO_SYSTEM_FROM_IMPO
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,
Atti
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 de
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...)
Chee
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
availa
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 20:22,
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 option. May be you can try to f
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.
t(CPACK_INSTALL_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
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 bui
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 int
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 se
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 "file_2
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 variabl
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 wrote:
>
> wow
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 subt
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 disappoin
at provide such a thing.
Cheers,
Attila
> On 11 Dec 2015, at 12:58, Attila Krasznahorkay
> wrote:
>
> 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 gener
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
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 wrote:
>
> On 10-Dec-15 12:52, Attila Krasznahorkay wrote:
>> Hi QP,
>>
>> Probably not the intended so
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\”
./config
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
#
015, at 10:05 PM, Alexander Neundorf
> 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 surprising thing.
> >
&
ndency 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
> wrote:
>
> Dear All,
>
> Mayb
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 co
;m back to having all the 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
> wrote:
>
> Dear All,
>
> I'm st
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
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 wrote:
>
> On 12/03/2015 03:47 PM, Attila Krasz
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 inconveni
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 subdirecto
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 wrote:
>
> Would this work?
>
> add_dependencies(MergeFiles SubdirTarget)
>
> On Nov 18, 2015 12:56 PM, "
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 merg
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 to
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 d
Thanks! It indeed looks like it will do the job.
Cheers,
Attila
> On 29 Oct 2015, at 20:42, Tamás Kenéz wrote:
>
> There's a TYPE property which should contain what you need:
> https://cmake.org/cmake/help/latest/prop_tgt/TYPE.html
>
> On Thu, Oct 29,
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 t
AGS 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
>
>
> On Mon, Oc
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
everythin
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 bu
50 matches
Mail list logo