Are your libraries mutually dependent? You may be hitting the
mutually-dependent static library problem. Look for the word mutual near
the end of
http://www.cmake.org/cmake/help/v3.0/command/target_link_libraries.html,
that section explains some of what is going on.
On Thu, Aug 21, 2014 at
Thanks!
On Thu, Aug 7, 2014 at 7:55 AM, David Cole dlrd...@aol.com wrote:
Specifically, for the OBJECT library feature, I figured out what
version of CMake introduced it like this:
gitk -- Tests/ObjectLibrary/CMakeLists.txt
leads to finding this first commit of that file: 69d3d183 [1]
Hi,
I'm wondering what is the best way to do feature detection or version
checking of cmake itself, in cmake. In particular, I'd like to check for
the OBJECT library feature and either use it or fall back to our current
mechanism if we're using an older cmake.
--
Cheers,
Leif
--
Powered by
Definitely when using -j, I'm not sure about multiple targets. That would be a
kind of insane restriction if it were true, I think.
I also sometimes see dependencies not get satisfied during parallel builds,
when you say something about parallel multiple target builds that worries me,
but
wow
On Fri, Jun 20, 2014 at 10:31 AM, Dan Kegel d...@kegel.com wrote:
It occurs to me that invoking make on this cmake-generated makefile
with two targets and -j4 has indeed triggered a more serious problem,
and the build fails nondeterministically with an internal error in ld
(presumably
I've seen this too but never noticed a pattern about when it happens. --
Cheers,
Leif
On Fri, Jun 20, 2014 at 12:40 AM, Dan Kegel d...@kegel.com wrote:
Seen in the wild today:
[119%] Building CXX object
CMakeFiles/clownCar.dir/examples_noinst/clownCar.C.o *
...
[138%] Built target
You can also use a generator I think: $TARGET_FILE:rexximage--
Cheers,
Leif
On Sun, May 18, 2014 at 1:39 PM, Nils Gladitz nilsglad...@gmail.com
wrote:
On 18.05.2014 19:24, Rick McGuire wrote:
We have a project that builds some executables, then uses those
executables to build some
Based on --help-property I can't really tease them apart. It looks like
LINK_INTERFACE_LIBRARIES is old and INTERFACE_LINK_LIBRARIES is new, but I
can't really figure out what the change is.
In my project, I have a hierarchy of static libraries connected by
TARGET_LINK_LIBRARIES(... LINK_PUBLIC
Hi all,
I'm dealing with an annoying problem with the linker, that I realize is
non-standard usage but I'm hoping CMake can help.
The main question is, is there any way in CMake to use OBJECT libraries but
still represent dependency graph information?
I have a bunch of global variables with
This looks like probably what I want, though I need to sit down and read
the whole thread carefully.
What's the timeline for this? Anything in particular blocking it? Any way
I can help?
On Tue, Mar 4, 2014 at 5:48 PM, Stephen Kelly steve...@gmail.com wrote:
Leif Walsh wrote:
What would
Thanks for the information.
Unfortunately I don't have familiarity with that, so I will just have to
wait. But thanks!
On Tue, Mar 4, 2014 at 6:00 PM, Stephen Kelly steve...@gmail.com wrote:
Leif Walsh wrote:
This looks like probably what I want, though I need to sit down and read
When you file it please shoot me an email, I'd like to vote for this
feature.
Another idea if you are up to it is to add a watchdog to your own test,
it's as simple as using alarm(3) and making a SIGALRM handler that invokes
pstree and gdb however you like. You could make the timeout slightly
What would be a good way to run a tool like this just before compiling? My
naive solution is going to be to add a custom command to run it and touch a
stamp, a target to run that custom command, and then make every single target
in my project depend on that custom target. Is there a less
It builds everything using cmake --build . I believe, or something very
similar to that. It doesn't guess at what to build, it just builds everything.
This is slow with make at least because it's single threaded. To do a parallel
build, you can build (make -jN) right before you run ctest, in
I got buildbot working and it's alright. I don't have experience with anything
else though. This is for a project where one component uses cmake and another
uses scons. It was fairly painless.
--
Cheers,
Leif
On Mon, Jul 15, 2013 at 8:53 AM, Mateusz Loskot mate...@loskot.net
wrote:
On 15
cmake --build . -- -jN
Extra args after -- are passed through to the build tool. Doesn't work if the
tool expects something different though.
I think the colors and carriage returns (without line feeds) are lost because
the build tool sees its controlling terminal is cmake, not a real
cmake --build /path/to/build/dir [--target target name]
I usually go to the build directory and type `cmake --build .` You can
pass extra options to the underlying build system by adding `--`
afterwards, so if you are using, for example, the Makefile generator, you
can build in parallel with
A few ideas:
Set the targets' LINK_FLAGS separately to specify the linker dirs.
Use target_link_libraries on the file path rather than the lib name.
Make an imported library target for the libs in each dir and then link with
those targets. (I'm assuming these are not libs you're building)
I think you shouldn't make B depend on anything, and just make sure that you
list all the libs you need at executable link time.
Sent from my iPhone
On Feb 25, 2013, at 7:47, Pierre Mallard mallard.pie...@gmail.com wrote:
Well it is indeed possible and it works... Note that static libraries
I see. I would not try to express this complexity to cmake. Is there a way you
can separate the alternate functionality out of C so that it doesn't cause the
dependency graph to fragment this way? Usually circular dependencies mean you
need to refactor something anyway. If you can make the dep
CHECK_SYMBOL_EXISTS should suffice
Sent from my iPhone
On Feb 17, 2013, at 13:11, Gregor Jasny gja...@googlemail.com wrote:
Hello,
I need a function to check for existing preprocessor symbols.
Something like
CHECK_C_PREPROCESSOR_SYMBOL_EXISTS(__i386__, X86)
--help-property and --help-property-list exist. I don't know why this is on the
web and not there.
Sent from my iPhone
On Jan 31, 2013, at 2:27, ycollette.nos...@free.fr wrote:
What about a new -help command: --help-properties ?
Do I fill a bug report for that ?
YC
- Mail original
but that has other
issues (code duplication, size of output when running with -V, maybe speed).
Sent from my iPhone
On Jan 31, 2013, at 14:02, Matthew Woehlke matthew.woeh...@kitware.com wrote:
On 2013-01-31 01:19, Leif Walsh wrote:
In CTestCustom.cmake, I use CTEST_CUSTOM_MEMCHECK_IGNORE
-31 14:16, Leif Walsh wrote:
This variable seems to be interpreted as a normal cmake ;-delimited list.
Ah, I see. I misread your message as it is already a regex and didn't take
lists. (Which is a little odd that it *isn't* a regex, as the CTest command
line takes a regex...)
If you have
In CTestCustom.cmake, I use CTEST_CUSTOM_MEMCHECK_IGNORE and
CTEST_CUSTOM_TESTS_IGNORE to turn some long-running tests on and off (on
for nightlies, off for development test cycles).
I recently broke apart a rather large shell script that was used to run a
test under many scenarios into something
I was able to deal with this by modifying the environment variable CPATH. Let
me know if you find something better.
Sent from my iPhone
On Dec 20, 2012, at 7:14, Alexey Petruchik i100...@gmail.com wrote:
Hi, all. I have a fresh install of OS X Mountain Lion. Xcode installed. CMake
fails to
Try make uninstall. It should use install_manifest.txt to find what's
installed.
Sent from my iPhone
On Nov 16, 2012, at 11:58, Érico erico...@gmail.com wrote:
I have followed the steps from bellow to install mysql from src on my linux (
red hat 6 ) :
shell groupadd mysql
shell
to make target `uninstall'. Stop.
[root@ericomtx mysql-5.5.4-m3]#
2012/11/16 Leif Walsh leif.wa...@gmail.com
Try make uninstall. It should use install_manifest.txt to find what's
installed.
Sent from my iPhone
On Nov 16, 2012, at 11:58, Érico erico...@gmail.com wrote:
I have
Possibly $TARGET_FILE:name
Sent from my iPhone
On Nov 16, 2012, at 17:20, Thomas Nilsson thomas.nils...@responsive.se wrote:
In Cmake scripts names of libraries are used without platform specific pre-
and suffixes. Is there a way to convert such a name to the actual filename on
the current
D'oh! Sorry I dropped this ball, thanks again, this is the most helpful
patch ever.
Brad King brad.k...@kitware.com writes:
On 10/26/2012 11:22 AM, Leif Walsh wrote:
On Oct 26, 2012, at 11:13, Brad King brad.k...@kitware.com wrote:
On 10/26/2012 10:39 AM, Leif Walsh wrote:
Sure thing. Can
When a test times out, I want to inspect its state to look for deadlocks. Is
there a way to get ctest to save a corefile from a process it kills due to
timing out? Is there a way to configure it to use a custom signal that I can
catch in my tests?
I may have asked this before. I remember ctest
I'd write a test that forks.
Robert Deschambault robert.deschamba...@gmail.com writes:
Hello,
I have a situation where I would like to run a unit test that requires two
separate processes. Is it possible to set this up under CTest?
Thanks.
Bob
--
Cheers,
Leif
--
Powered by
Cool, thanks. I'll try this!
Sent from my iPhone
On Oct 26, 2012, at 8:43, Brad King brad.k...@kitware.com wrote:
Add target property LINK_DEPENDS_NO_SHARED and initialization variable
CMAKE_LINK_DEPENDS_NO_SHARED to enable this behavior.
Suggested-by: Leif Walsh leif.wa...@gmail.com
This is exactly what I wanted, and the results were incredible. Thank
you.
I'll patch all my installs with this and hope it gets in a public release
soon.
Leif Walsh leif.wa...@gmail.com writes:
Cool, thanks. I'll try this!
Sent from my iPhone
On Oct 26, 2012, at 8:43, Brad King brad.k
Sure thing. Can you let me know where to find an example test? I'll pattern
match one over the weekend.
Sent from my iPhone
On Oct 26, 2012, at 10:38, Bill Hoffman bill.hoff...@kitware.com wrote:
On 10/26/2012 9:43 AM, Leif Walsh wrote:
This is exactly what I wanted, and the results were
Sounds good, I'll send a patch soon.
Sent from my iPhone
On Oct 26, 2012, at 11:13, Brad King brad.k...@kitware.com wrote:
On 10/26/2012 10:39 AM, Leif Walsh wrote:
Sure thing. Can you let me know where to find an example test? I'll pattern
match one over the weekend.
Most CMake tests
Matthew Woehlke matthew.woeh...@kitware.com writes:
I'm not sure that's correct behavior. What if the modification to the
.cpp file was to remove the definition of a function declared in a
header? Now your executable that was using that function will crash when
you try to run it due to a
On Oct 25, 2012, at 16:26, Bill Hoffman bill.hoff...@kitware.com wrote:
On 10/25/2012 1:17 PM, Leif Walsh wrote:
Yes, but this is a very rare thing to do. And the failure result is
just that the problem would be discovered at test time instead of link
time.
What's being proposed here
library to a path that's on your linker path; have
your tests setup to use the system copy of the library instead of the
local copy.
~
Doug.
On Sat, Aug 4, 2012 at 2:41 AM, Leif Walsh leif.wa...@gmail.com wrote:
This is sort of the point of shared libs though, you can update them without
...@insynchsoft.co.uk wrote:
I agree with Leif Walsh
I am currently looking at replacing my unix makefile (linux+gmake,
solaris+make/gmake) and Windows VS projects, with cmake.
For the makefiles I get gcc to output dependency files based on header file
usage, using gcc options -MM -MF -MP -MT
I use check_function_exists() to do some platform checking. On Linux,
pthread_yield() returns int, and on FreeBSD, it returns void. Is there a cmake
way to distinguish between the two? check_function_exists seems to not use
strict enough warnings to make sure the symbol has the right
this works perfectly, thanks
On 25 Sep, 2012, at 9:45 AM, Nils Gladitz glad...@sci-vis.de wrote:
Maybe you want check_prototype_definition?
Nils
On 09/25/2012 03:18 PM, Leif Walsh wrote:
I use check_function_exists() to do some platform checking. On Linux,
pthread_yield() returns int
Have you sourced the intel compilervars script in the shell where you invoke
cmake? Check $C_INCLUDE_PATH and $CPLUS_INCLUDE_PATH. You may also have better
luck setting the CC and CXX env vars rather than setting cmake variables. I
remember using the intel compiler with cmake was a hassle.
I use a technique similar to what's found here:
http://www.mail-archive.com/cmake@cmake.org/msg28670/libutils.cmake
On 21 Sep, 2012, at 8:07 AM, Witold E Wolski wewol...@gmail.com wrote:
Hi,
I am wondering what is the cmake way to combine several libraries into one.
How to do it on linux
On 18 Sep, 2012, at 5:34 PM, Brett Delle Grazie brett.dellegra...@gmail.com
wrote:
Hi,
Is it necessary to specify header files in add_executable /
add_library entries in CMakeLists.txt?
nope
i.e. does CMake automatically do dependency analysis making this unnecessary?
yup
Thanks,
I prefix test names with the name of the component they test, so
a/tests/CMakeLists.txt:
add_test(a/test_foo test_foo)
b/tests/CMakeLists.txt:
add_test(b/test_foo test_foo)
Then, ctest -R '^a/' from toplevel works.
Sent from my iPhone
On Sep 12, 2012, at 14:12, Robert Dailey
I set the build name and site in my CMakeLists.txt before calling
include(CTest) and it works.
Sent from my iPhone
On Aug 24, 2012, at 9:01, Michele Dolfi dolfim...@gmail.com wrote:
Hi all,
I started using CMake, CTest and CDash, with the simple targets Nightly,
Continuous and
They are generated from facts I detect about the os
Sent from my iPhone
On Aug 24, 2012, at 9:24, David Cole david.c...@kitware.com wrote:
On Fri, Aug 24, 2012 at 9:07 AM, Leif Walsh leif.wa...@gmail.com wrote:
I set the build name and site in my CMakeLists.txt before calling
include
Can you provide the output of make VERBOSE=1?
Sent from my iPhone
On Aug 22, 2012, at 19:04, Jason T. Slack-Moehrle slackmoeh...@gmail.com
wrote:
Hello,
I am trying to use come C++v11 features and am trying to get the
compiling to work.
The error:
[jtsm@server]$ ./build.sh
-- The C
cmake --help-command set_target_properties
cmake --help-property LINK_FLAGS
cmake --help-variable CMAKE_EXE_LINKER_FLAGS
I think this will get you started.
Sent from my iPhone
On Aug 19, 2012, at 19:33, Yi Ding yi.s.d...@gmail.com wrote:
Hi everyone,
Is there a way to get CMake to use
should the build system now, if
you really need the relinking?
Am 20.07.2012 14:08, schrieb Leif Walsh:
Why, if I make a small change to my shared library, does cmake relink all of
my tests to it? It's a shared library, isn't the point that it doesn't need
relinking? Seems like a big
On 3 Aug, 2012, at 4:44 PM, Andreas Pakulat ap...@gmx.de wrote:
Actually no, adding new public API, changing existing API in
compatible ways are things you can do with a shared library which
needs relinking.
Not without changing the header files, which forces recompilation. As the
author
Why, if I make a small change to my shared library, does cmake relink all of my
tests to it? It's a shared library, isn't the point that it doesn't need
relinking? Seems like a big waste of time. Can I suppress this in any way?
Sent from my iPhone
--
Powered by www.kitware.com
Visit other
, Jun 26, 2012 at 11:25 PM, Leif Walsh leif.wa...@gmail.com wrote:
I'd like to be able to get a backtrace when a test times out with ctest, so
I can analyze where the test was stuck, if at all.
I tried writing a fake test to tell me what signal ctest was using to kill a
timing out test
Never mind, I found it. SIGKILL is used. Oh well.
Sent from my iPhone
On Jun 27, 2012, at 14:54, Leif Walsh leif.wa...@gmail.com wrote:
Thanks.
Who knows about kwsys? I only need this on a couple of platforms and don't
mind doing it once for each.
Sent from my iPhone
On Jun 27
I'd like to be able to get a backtrace when a test times out with ctest, so I
can analyze where the test was stuck, if at all.
I tried writing a fake test to tell me what signal ctest was using to kill a
timing out test, but it couldn't. I imagine this is because it uses SIGKILL
and I can't
I tried this in my project. I added -fPIC to the COMPILE_FLAGS property of the
object library and it worked, but then you also get PIC static libraries (which
isn't that big of a deal). But time your compiles. Usually the compilation of
individual c files is well dominated by the linking time,
Suppose I have two projects, A and B. A builds a shared lib that links with a
static lib in B.
Sometimes, I want to build and test B by itself. Other times I want to build
A, which requires building B.
For now, I manually (or with a script) build B, then set an environment
variable to say
That is very encouraging. I remembered getting problems but haven't tried on
2.8.8 yet I guess. Thanks, I'll try it soon.
Sent from my iPhone
On Jun 22, 2012, at 13:32, David Cole david.c...@kitware.com wrote:
On Fri, Jun 22, 2012 at 12:10 PM, Leif Walsh leif.wa...@gmail.com wrote
Why does `make install` build things that aren't installed? I would
imagine it would only build targets that are mentioned in INSTALL().
--
Cheers,
Leif
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep
explicitly with add_dependencies. Otherwise, 'make
my_install' will simply do the install step without making sure anything
else is up to date first.
HTH,
David
On Tue, Jun 19, 2012 at 3:42 PM, Leif Walsh leif.wa...@gmail.com wrote:
How can I make it not do that?
Sent from my iPhone
On Jun 19
Use the GLOB_RECURSE mode of file() (cmake --help-command file) and
get_filename_component.
Sent from my iPhone
On Jun 11, 2012, at 11:09, GOO Creations goocreati...@gmail.com wrote:
Hi all,
I want to recursively scan all sub-directories (and their sub-directories,
etc ...) and
With plain makefiles or autotools, I can do 'make
CFLAGS=-Wno-unused-but-set-variable' or something to try out flags when
building without setting it in the makefiles yet. Is there a way to do this in
cmake, or is the only way to reconfigure with 'cmake
Look at things involving the IMPORTED property of add_library. You probably
want to check the headers in to your repo. Or use or create a
FindLibXml2.cmake.
Or if you are compiling libxml2 as part of your build process, look at the
ExternalProject module.
Sent from my iPhone
On May 15,
I want to check whether M_MMAP_THRESHOLD is defined in either malloc.h or
sys/malloc.h, and whether CLOCK_REALTIME is defined in either time.h or
sys/time.h. I thought this would work:
check_symbol_exists(M_MMAP_THRESHOLD malloc.h;sys/malloc.h
HAVE_M_MMAP_THRESHOLD)
On 11 May, 2012, at 5:12 PM, Mohammad Mirzadeh wrote:
You generally need to set CC, CXX, LD, and AR. I found that in some cases
even that didn't work. I use this:
option(INTEL_CC Use the Intel compiler. OFF)
if (INTEL_CC)
find_program(CMAKE_C_COMPILER NAMES icc)
How does this work?
% cmake --help-property INTERPROCEDURAL_OPTIMIZATION
cmake version 2.8.8
INTERPROCEDURAL_OPTIMIZATION
Enable interprocedural optimization for targets in a directory.
If set to true, enables interprocedural optimizations if they are
known to be
On Thu, 10 May 2012, Mohammad Mirzadeh wrote:
Hi,
I have just started using CMake for my projects and have some problems
getting it do exactly the things I want. So these are couple of questions I
have:
1) How can I change the compiler from GNU g++ to my preferred compiler, in
this case
} --build
${CMAKE_BINARY_DIR} --target ${testTarget} --config
$CONFIGURATION)
add_test(NAME someName COMMAND ${testTarget} ...)
It might even be possible to combine them into one command, perhaps
with a custom test driver.
Petr
On Tue, May 8, 2012 at 1:27 AM, Leif Walsh leif.wa...@gmail.com
Yeah, I tried it and I couldn't really figure out what it's doing. I could give
it a binary name that it would build and I could give it a command to use to
test, but the goal here is to only require the test name (since that may be
different from the binary name) and to build all dependencies
Hi,
As should be expected, tests take a lot longer when run under
valgrind. We'd like to keep a lower test timeout when running Test
actions, but increase that timeout when running MemCheck actions. I
have a CTestCustom.cmake and a DartConfig.cmake that seem like likely
candidates. Anyone know
Hi,
Is there a make, cmake, or ctest way to rebuild the dependencies of a
test if needed, and then run the test?
Suppose I have a bulit directory and I'm developing. I want to make
edits, then run a command specifying one test to check, so that
anything needed by that test gets rebuilt (if my
I can't find any good documentation on integrating cdash and trac. I currently
have trac (hosted at cvsdude.com), and I'm setting up a cdash 2.0 server. It
claims to integrate with a trac server to, for example, figure out who to email
when things break. Can someone point me in the right
Hi,
I can't find any documentation that describes gcov integration with ctest in
depth, though there seems to be a fair amount of integration with it, as well
as with cdash.
As far as I can tell, you're supposed to compile with -fprofile-arcs
-ftest-coverage -lgcov and then run all your tests
Apologies. In checking again, these flags were not being passed during the
compile phase. I'll go fix that and bump this if it still doesn't work.
Sent from my iPhone
On May 2, 2012, at 17:32, Leif Walsh leif.wa...@gmail.com wrote:
Hi,
I can't find any documentation that describes gcov
I have some tests that are expected to abort. Imagine something like:
#include assert.h
int main(void) {
assert(0);
return 0;
}
If I put this test into cmake and set the test's property WILL_FAIL to TRUE, it
fails with Exception: Other. I'm writing C, so I don't have exceptions, but
Thanks, this worked perfectly.
On Apr 23, 2012, at 11:45 AM, Nicolas Desprès wrote:
Hi,
You can have a look at the ExternalProject module:
$ cmake --help-module ExternalProject
Cheers,
-Nico
On Mon, Apr 23, 2012 at 5:10 PM, Leif Walsh leif.wa...@gmail.com wrote:
Hi,
I have
Hi,
I have some tests that need to be run as distinct commands, for example:
foo_test --crash
test $? != 0
foo_test --recover
Right now, I have shell scripts that do this, so I have something like
add_test(foo_test run_foo_test.sh ${CMAKE_CFG_INTDIR}/foo_test)
but this doesn't work with
Also, it would be nice if there was a way to specify that only some of
the commands should be run with valgrind, but that may be asking too
much.
On Tue, 24 Apr 2012, Leif Walsh wrote:
Hi,
I have some tests that need to be run as distinct commands, for example:
foo_test --crash
test
Thanks. Looks like that will work great!
On Tue, 24 Apr 2012, Bill Hoffman wrote:
On 4/24/2012 12:07 PM, Leif Walsh wrote:
Also, it would be nice if there was a way to specify that only some of
the commands should be run with valgrind, but that may be asking too
much.
What I
Hi,
I have a cmake project with some weird requirements:
It uses an external project that uses autotools. I have the other project's
source tree unpacked in a subdirectory. During a build of my project, I want to
run configure with some options, make, and make install in the subdirectory,
Hi,
Another question:
I want to be able to run my tests with and without valgrind. A few tests should
always run without valgrind, and a few others should run with helgrind and
still others with drd.
Currently, I have a function add_memcheck_test that invokes add_test twice and
creates
82 matches
Mail list logo