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 2:
Thanks!
On Thu, Aug 7, 2014 at 7:55 AM, David Cole 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]
>
> g
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 ww
wow
On Fri, Jun 20, 2014 at 10:31 AM, Dan Kegel 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 because the
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 hon
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 wrote:
> Seen in the wild today:
> [119%] Building CXX object
> CMakeFiles/clownCar.dir/examples_noinst/clownCar.C.o *
> ...
> [138%] Built target examples_noinst
>
You can also use a generator I think: $--
Cheers,
Leif
On Sun, May 18, 2014 at 1:39 PM, Nils Gladitz
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 additional build artifacts. We have this
>> w
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 .
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 wrote:
> Leif Walsh wrote:
>
> > This looks like probably what I want, though I need to sit down and read
>
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 wrote:
> Leif Walsh wrote:
>
> > What w
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 cons
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
sho
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 invasiv
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 o
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
wrote:
> On 15 July 2013 12:53, Avi
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 termin
cmake --build /path/to/build/dir [--target ]
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 `cmake --build
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 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 g
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 wrote:
> Well it is indeed possible and it works... Note that static libraries 's
> object files are b
CHECK_SYMBOL_EXISTS should suffice
Sent from my iPhone
On Feb 17, 2013, at 13:11, Gregor Jasny wrote:
> Hello,
>
> I need a function to check for existing preprocessor symbols.
> Something like
>
> CHECK_C_PREPROCESSOR_SYMBOL_EXISTS("__i386__", X86)
> CHECK_C_PREPROCESSOR_SYMBOL_EXISTS("__x86
Ah I see. Yep, it would both make sense and work perfectly if it was a regex.
Sadly it would also break stuff. Maybe CTEST_CUSTOM_TESTS_IGNORE_REGEX would be
a sane feature request.
Sent from my iPhone
On Jan 31, 2013, at 14:51, Matthew Woehlke wrote:
> On 2013-01-31 14:16, Leif Walsh wr
e 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 wrote:
> On 2013-01-31 01:19, Leif Walsh wrote:
>> In CTestCustom.cmake, I use CTEST_CUSTOM_MEMCHECK_IGNORE and
>> CTEST
--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 ori
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 wrote:
> Hi, all. I have a fresh install of OS X Mountain Lion. Xcode installed. CMake
> fails to locate zlib hea
Possibly $
Sent from my iPhone
On Nov 16, 2012, at 17:20, Thomas Nilsson 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 platform?
>
> I need this as an argument
rule to make target `uninstall'. Stop.
> [root@ericomtx mysql-5.5.4-m3]#
>
>
>
>
> 2012/11/16 Leif Walsh
>> Try make uninstall. It should use install_manifest.txt to find what's
>> installed.
>>
>> Sent from my iPhone
>>
>> On
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 wrote:
> I have followed the steps from bellow to install mysql from src on my linux (
> red hat 6 ) :
>
> shell> groupadd mysql
> shell> useradd -r -g mysq
D'oh! Sorry I dropped this ball, thanks again, this is the most helpful
patch ever.
Brad King writes:
> On 10/26/2012 11:22 AM, Leif Walsh wrote:
>> On Oct 26, 2012, at 11:13, Brad King wrote:
>>
>>> On 10/26/2012 10:39 AM, Leif Walsh wrote:
>>>> Sure
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 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 www.kitware.com
Visit other Kit
Sounds good, I'll send a patch soon.
Sent from my iPhone
On Oct 26, 2012, at 11:13, Brad King 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.
>
&g
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 wrote:
> On 10/26/2012 9:43 AM, Leif Walsh wrote:
>> This is exactly what I wanted, and the results were incr
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 writes:
> Cool, thanks. I'll try this!
>
> Sent from my iPhone
>
> On Oct 26, 2012, at 8:43, Brad Kin
Cool, thanks. I'll try this!
Sent from my iPhone
On Oct 26, 2012, at 8:43, Brad King wrote:
> Add target property LINK_DEPENDS_NO_SHARED and initialization variable
> CMAKE_LINK_DEPENDS_NO_SHARED to enable this behavior.
>
> Suggested-by: Leif Walsh
> ---
>
> On
r 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 wrote:
>> This is sort of the point of shared libs though, yo
Sent from my iPhone
On Oct 25, 2012, at 16:26, Bill Hoffman 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
>&
Matthew Woehlke 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 missing symbol. If you h
en 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 -
this works perfectly, thanks
On 25 Sep, 2012, at 9:45 AM, Nils Gladitz 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,
>>
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 signatur
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.
Sen
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 wrote:
> Hi,
>
> I am wondering what is the cmake way to combine several libraries into one.
> How to do it on linux or windows is d
On 18 Sep, 2012, at 5:34 PM, Brett Delle Grazie
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,
>
> --
> Best Regar
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 wrote:
> The so
They are generated from facts I detect about the os
Sent from my iPhone
On Aug 24, 2012, at 9:24, David Cole wrote:
>
>
> On Fri, Aug 24, 2012 at 9:07 AM, Leif Walsh wrote:
> I set the build name and site in my CMakeLists.txt before calling
> include(CTest) and it works.
&
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 wrote:
> Hi all,
>
> I started using CMake, CTest and CDash, with the simple targets Nightly,
> Continuous and Experimental: it works ve
Can you provide the output of "make VERBOSE=1"?
Sent from my iPhone
On Aug 22, 2012, at 19:04, "Jason T. Slack-Moehrle"
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 compiler ide
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 wrote:
> Hi everyone,
>
> Is there a way to get CMake to use -fwhole-program (but
On 3 Aug, 2012, at 4:44 PM, Andreas Pakulat 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 of a share
ing, where 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
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 Kit
Never mind, I found it. SIGKILL is used. Oh well.
Sent from my iPhone
On Jun 27, 2012, at 14:54, Leif Walsh 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
>
&
now
> for a fact that it's going to work on a given system.
>
>
> HTH,
> David
>
>
> On Tue, Jun 26, 2012 at 11:25 PM, Leif Walsh 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 stu
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 tr
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 wrote:
>
>
> On Fri, Jun 22, 2012 at 12:10 PM, Leif Walsh wrote:
> Suppose I have two
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 wh
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, e
e up-to-date first, you could
> depend on them 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, L
and all typically includes things that are
> installed and not installed.
>
>
> On Tue, Jun 19, 2012 at 3:11 PM, Leif Walsh wrote:
> Why does `make install` build things that aren't installed? I would
> imagine it would only build targets that are mentioned in INSTAL
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 mes
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 wrote:
> Hi all,
>
> I want to recursively scan all sub-directories (and their sub-directories,
> etc ...) and determine if the directory
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
-DCMAKE_C_FLAGS=-Wno-unused-but-set-varia
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, 2012
:
>> Date: Fri, 11 May 2012 13:32:55 -0400
>> From: Leif Walsh
>>
>> 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
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)
> >
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)
check_symbol_exists(CLOCK
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
> th
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 supported
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 o
et} COMMAND ${CMAKE_COMMAND} --build
> "${CMAKE_BINARY_DIR}" --target ${testTarget} --config
> $)
>
> add_test(NAME someName COMMAND ${testTarget} ...)
>
> It might even be possible to combine them into one command, perhaps
> with a custom test driver.
>
> Pet
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 ch
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
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 dire
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 wrote:
> Hi,
>
> I can't find any documentation that describ
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
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 aski
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:
>
> f
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 Me
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 wrote:
&
I have some tests that are expected to abort. Imagine something like:
#include
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
cmake s
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 targe
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,
then
84 matches
Mail list logo