Easy enough. ADD_TEST can run whatever you want.
I created a simple cmake function
Function(RUN_REMOTE_TEST testname, other_args)
# insert useful code here…
add_test(${testname}
remote_run_test ${binary_dir}/${testname} other test runner script args…
)
End_function()
You will have
We have had luck packaging all the CTestTestFile.cmake files, and using sed to
adjust paths for the target location. You need to install ctest on the test
machine, along with all the tests.
The only paths we change are the test output location (ie google test .xml
files: this might not apply t
I like the idea, some tweaks that I think you need
add_host_build - executables built here need to be available not as targets,
but as variables as if FIND_EXECUTABLE was called on them. This is probably
what you meant, but it didn't come across that way.
In the case where you are cross compili
There are two options. Each with pros and cons.
The first what you are doing now, except you use external project
https://cmake.org/cmake/help/v3.12/module/ExternalProject.html to build the
host tools instead of add_custom_command. It otherwise has all the cons you
mention, but are they signifi
I have a fairly large project that I'm trying to update from building with
cmake 2.8.12 to 3.10.2. When I make the change my build times go up by half on
our Jenkins ci build system. The build machines are 32 core and my build time
goes from 59m 38s to 1h 28m 33s. When I try this locally the ti
To add fuel to this, I like to argue that paths should not be quoted if at all
possible. I find that in many cases where a path is quoted those quotes are
being done to work around a bad project structure and you can reorganize your
project to get rid of the need for quotes.
-Original Mess
nt in official cmake documentation, but it
seems like something that has never been done before.
-Original Message-
From: Robert Maynard [mailto:robert.mayn...@kitware.com]
Sent: Tuesday, August 22, 2017 9:46 AM
To: Miller Henry
Cc: cmake@cmake.org
Subject: Re: [CMake] target_link_libr
I've been playing with the private/public/interface keyword to
target_link_libraries. It seems to me that WHAT they do is well documented, but
nobody has ever actually documented what they correct rules of WHEN/WHY you
should use any of them. After a lot of misstarts I think I've started to
un
Instead of trying to do this with the toolchain somehow in cmake I think you
might want to look into a meta build system that handles the toolchain and all
other dependencies. I listed all I know of a couple months ago in this thread.
https://cmake.org/pipermail/cmake/2017-March/065229.html
I have found the following projects which all seem to do some variation of a
meta build so that you can build multiple projects that depend on each other
and manage dependencies. (there are a couple others that seem to not be
maintained as well)
https://gradle.org/
https://bazel.build/
https:
A superbuild will work, and you can write your own Find*.cmake so that
find_package works - you don't need most of what the real Find_package would do
for you because you already know what is installed where as you control that.
But, can you live with the trade off: long build times?
What my c
I have a few different cmake based projects that depend on each other (as a
tree, no circular dependencies). Mostly this works great, but a few people
have expressed interested in a superbuild which builds everything together for
various purposes. I can make this work with ExternalProject, but
I'm going to ask two questions, but a good answer to the first will make the
second question redundant.
I work with several different cmake projects that are cross compiled, and they
depend on each other. Each project creates a cmake config, so we can use
find_package to find the contents. Up
I found the same thing a few years ago, and my solution was the same: only
include those modules once. I find that my sub cmake modules are much cleaner
now as a bonus.
I tend to blame the time not on file IO, but on time to parse those files.
I've never done actual profiling though.
-Or
I hate to state the obvious, but
set_property (TEST test2 PROPERTY LABELS LABEL1 LABEL2 LABEL1andLABEL2)
I know it isn’t what you asked for, but I don’t want cmake to change, but I
don’t think it is worthwhile to add more complex set algebra to the -L command
so that we can support complex things
I'm using cmake to build a set of libraries that then gets packaged and shipped
to other groups that are also using cmake to use the library. Since I use
google mock to mock my libraries, and the downstreams also want to mock my
library I just provide the mock header for their use. This works
I do something like this, which works for clang and should work for gcc 4.9
though I haven't tested it. I haven't wrote the right way to do this which is
to check if the terminal supports color before passing the flag in. I don't
know what will happen on our e.g. CI system which doesn't suppo
Use find_library to find the library. You will probably need this anyway
because different systems install libraries in different locations.
http://www.cmake.org/cmake/help/v3.3/command/find_library.html
From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Ette, Anthony (CDS)
Sent: Tuesda
I'm trying out my project on 3.3.0-rc1, but currently I'm using 2.8.11 and
2.8.12. I got a couple errors from CMP0046. Most of them are correct: I've
fixed a couple places where a non-existent dependency was used, and I want to
set this policy to NEW so that more do not sneak in.
However the
I develop a shared library that gets imported into a number of applications
(scattered across a number of different repositories). To aid in testing we
provide some mocks and fakes, made available by a cmake export files.
This works okay, but it isn't right: google mock doesn't guarantee binary
)..
However, what "Cmake" rules do you use to have to have the test dependent on
the output file, and not the running of the test?
Scott
From: Miller Henry [mailto:millerhe...@johndeere.com]
Sent: Monday, March 23, 2015 6:44 AM
To: Scott Aron Bloom; CMake ML
Subject: RE: unit tests
I have setup our unit tests to output a junit report, and the junit report is
what is in the all target. Thus my unit tests don't run on a make install if
they have run during the original make. If anything was rebuilt during the make
install only the affected tests are run.
This of course dep
You need to use include_directories to tell cmake where to find headers.
include_directories(${CMAKE_SOURCE_DIR}/src)
http://www.cmake.org/cmake/help/v3.0/command/include_directories.html
http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_SOURCE_DIR.html
From: CMake [mailto:cmake-boun...@cmake
One of my co-workers just did a build where they ran cmake with the option
-DCMAKE_BUILD_TYPE=RelWithDebugInfo Of course what was obviously meant was
RelWithDbgInfo. Because of this incorrect option the build was not as
expected, but it took a while to figure out why it failed. Of course once
I'll second (third) the vote for uncrustify over astyle. Astyle doesn't have
enough options to take care of all style issues, with uncrustify you can
configure everything. Also check out clang-format - it only supports 3 styles
(last I checked), but if one of them fit it might be easiest.
Wha
I just switched to using ctest, which is overall much better, but when I run
with -j it often happens that some test suite fails. After investigating I
discovered that the failing test is not a unit tests (ie a test with everything
mocked out), but an integration test that is intentionally test
s)
-Original Message-
From: Игорь Пашев [mailto:pashev.i...@gmail.com]
Sent: Wednesday, September 11, 2013 11:31 PM
To: Miller Henry
Cc: cmake@cmake.org
Subject: Re: [CMake] Alternate compiler specific options - how to specify?
2013/9/11 Miller Henry :
> We are using cmake 2.8.11 fo
We are using cmake 2.8.11 for out project.
Our local compiler is gcc-4.4.3. There is desire to use a newer compiler, but
we are not yet ready to commit to anything yet. In the mean time we have
installed binaries gcc-4.7 and gcc-4.8. We can specify the alternate compiler
with -DCMAKE_C_COMPI
I'm experimenting with using a compiler other than my system compiler (gcc
4.4.3) on my linux system. I've built gcc 4.7.2, and installed it. Everything
works when I build only on my local system, but I have a large cluster of
computers available on an ice cream (icecc) network that I can use t
Nice theory, but I have to deal with the real world where many projects don't
provide a project config .cmake script. They see no reason to: they don't build
with cmake, other downstreams don't build with cmake. It seems to them that
they are supporting one system, and there are hundreds. I do
Our build it taking a long time, (15+ minutes even when with a massive build
farm to distribute compiles across), and the question keeps coming up: what is
actually taking so long. Is there an easy way to measure?
If there are some top 10 files we might be able to split them (reducing some
inc
Our normal coding standards requires zero warnings with -wall -wextra
(gcc/clang), but often the swig generated file has warnings. We don't mind
turning these warnings off for the generated file, but we still want to see
them for other files in the project. However I'm stumped on how to do t
On a practical matter though: if the file is not listed someplace, then your
IDE may not pick it up. Thus while it is legal to not list all files, it is a
good idea to list them anyway.
-Original Message-
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of
Brett
We have a cmake based project where cmake runtime is becoming a problem:
everytime a CMakeLists.txt changes the build takes an extra 40-50 seconds. Our
main CMakeLists.txt contains a lot of ADD_SUBDIRECTORY (and little else).
Most of the subdirectories then call FIND_PACKAGE(Qt4) with variou
34 matches
Mail list logo