Hi,
You could make it a non-cache variable and manage the caching yourself. The
cache is your version.cmake. Before including it, check if the variable is set
and update your version cmake file, possibly with configure_file(). After
that, unset() the cache variable and include your cmake
On Mon, Apr 10, 2017 at 5:04 PM, Robert Dailey wrote:
> Actually I think your idea does work. Why do you think it won't? I'm
> using it right now and so far it seems OK.
I assumed (without testing, admittedly) is that it would fail if
someone used -D to set the value,
Actually I think your idea does work. Why do you think it won't? I'm
using it right now and so far it seems OK.
1. On build server, if it overrides it with -D, then it does not set
it by hand. If it doesn't override, it will use the fixed version in
the file
2. On work machines, it's never
Actually this seems to work:
if( BUILD_VERSION )
set( version_override ${BUILD_VERSION} )
unset( BUILD_VERSION CACHE )
set( BUILD_VERSION ${version_override} )
unset( version_override )
else()
set( BUILD_VERSION 7.1.1.2 )
endif()
It's a bit messy but gets the job done,
OK weirdly, tested again, this also works and is a little more
simplified (although more confusing, since now we're intermixing
non-cache and cache variables with the same name; behavior is not
exactly clear, or well-defined.
if( BUILD_VERSION )
set( BUILD_VERSION ${BUILD_VERSION} )
I am proud to announce that CMake 3.8.0 is now available for download at:
https://cmake.org/download/
Documentation is available at:
https://cmake.org/cmake/help/v3.8
Release notes appear below and are also published at
https://cmake.org/cmake/help/v3.8/release/3.8.html
Some of the more
Sorry you're right, this isn't working because -D creates a cache
entry for the variable, which breaks it.
So maybe more ideas on the configure_file() solution would be ideal...
unsetting the cache variable might work as well, I have to toy around
with this.
On Mon, Apr 10, 2017 at 12:48 PM,
When I execute a CMake script as a custom command, message() logs are
not shown in stdout from that script.
Is there a way to make it pipe out messages?
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers
>From the Windows command line, you would do it with 2>&1 after the command (2
>is stderr, and 1 is stdout). You could write your custom command as a batch
>file or bash script (unfortunately platform dependent) which uses this
>technique with a single command inside the batch file.
HTH,
Hello,
After googling a bit I found this post which I think describe exactly what I'm
facing : https://cmake.org/pipermail/cmake/2016-August/064100.html
However I fail to understand the answers. Maybe I'm expecting too much.
Basically, I have 2 imported static targets (A and B with B that
I have a file called version.cmake that my root CMakeLists.txt
includes. There is only a single line in this file:
set( BUILD_VERSION 1.2.3.4 CACHE STRING "Version of the product" )
I have two scenarios where this version number setting needs to work
slightly differently from a CMake
Seems like the solution here is to make COMMENT work
properly/consistently across all generators. That's the point, after
all, right?
On Sat, Apr 8, 2017 at 12:33 AM, Hendrik Sattler
wrote:
> However, this messes up parallel make progress output.
>
> Am 7. April 2017
You could do something like
if(NOT "${BUILD_VERSION}")
set(BUILD_VERSION 1.2.3.4)
endif()
On Mon, Apr 10, 2017 at 2:29 PM, Robert Dailey wrote:
> I have a file called version.cmake that my root CMakeLists.txt
> includes. There is only a single line in this file:
>
>
On Mon, Apr 10, 2017 at 2:36 PM, Bruce Stephens
wrote:
> You could do something like
>
> if(NOT "${BUILD_VERSION}")
> set(BUILD_VERSION 1.2.3.4)
> endif()
That doesn't work at all, come to think of it. I suspect your best bet
is to handle
the caching yourself
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, release has been updated
via da7833c5bb1f331162d46a2c664a443c1c641089 (commit)
from
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
discards aebbdc41a3795dc3588098592bb9f89a93732fc5 (commit)
discards
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 0419ecbcad7719614349a07189b45e341a8f2c69 (commit)
via
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, release has been updated
via a6a0cfb24d637063bdb1c8e9e8ceb78cac3f90ac (commit)
via
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
discards 3a91ee7c7a510a20d19ac3834031841dedfbc052 (commit)
discards
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via b08d2092df1e2736fe07544b1a5f1f115903e964 (commit)
via
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The annotated tag, v3.8.0 has been created
at c94470fad93d37fa94fefaacdda235b870c375bb (tag)
tagging
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 32277a80d15fbd5710c1321dcd851de55811a2bb (commit)
via
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, nightly has been updated
discards 06153266a61a59be774217c750032c37245cbb1a (commit)
via
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, nightly-master has been updated
via 0419ecbcad7719614349a07189b45e341a8f2c69 (commit)
via
Am Montag, 6. Februar 2017, 13:00:33 schrieb Brad King:
> On 02/05/2017 02:10 PM, Gregor Jasny via cmake-developers wrote:
> > I wonder if it would make sense to publish the CMake release tarballs
> > and binaries not only on cmake.org but also on github...
> >
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
discards 0281d306efe054161c8a3bd1578ba520cd367632 (commit)
via
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 7b51c1c789657384f56103944248c639193e8276 (commit)
via
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 730a5480555ddf142e489ec4d4f3828824008a8f (commit)
via
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
discards a82ad31a2e5abe74896cff33757122fb418be84b (commit)
via
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 0281d306efe054161c8a3bd1578ba520cd367632 (commit)
via
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 1136cbd4763ca573a3c073de282a39fbc11b4402 (commit)
via
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
discards d2132c55af0d318ff663f358cfe4cd94f2f0525c (commit)
discards
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, release has been updated
via e265ddecfc8df5509acd16958da134291a96df9f (commit)
via
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
discards 253c0670dd346bd0e8b0486011f7f8d917aa3036 (commit)
via
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 23fccf30b01bb59c18ce2c8ac5a924ce5f2bcab5 (commit)
via
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
discards 32277a80d15fbd5710c1321dcd851de55811a2bb (commit)
discards
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via e086b0e081d10f491dfe67fe065586423524942a (commit)
from
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
discards 1b7b15124f0cb16acb85aa2c238ee95db0df2aa3 (commit)
discards
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via dafddda4794ab37a2d5a29b821f8f4fba1c373d5 (commit)
via
39 matches
Mail list logo