[Cmake-commits] CMake branch, master, updated. v3.5.2-727-g24391d9

2016-05-20 Thread Kitware Robot
_VERSION_MINOR 5) -set(CMake_VERSION_PATCH 20160520) +set(CMake_VERSION_PATCH 20160521) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/

Re: [CMake] Cross Compilation & Source file generators

2016-05-20 Thread Walter Gray
A small addendum - The way I am currently solving this problem is by replacing the version of protoc in the library folder for android with one that works on the host machine, but this is really not the best since it means that the library distribution is tied to the host AND the target. Thinking

[CMake] Cross Compilation & Source file generators

2016-05-20 Thread Walter Gray
I've got a project with a number of target platforms, including some that I have to cross-compile to such as android, that uses protobuf. If you're unfamiliar, the crux of the issue is that there is both a library, libprotobuf, and an 'compiler', protoc, that takes .proto files and generates a

Re: [CMake] cmake 3.5.2 Xcode generator bug

2016-05-20 Thread Paul Smith
On Fri, 2016-05-20 at 14:34 -0400, Paul Smith wrote: > Just discovered a bug in the Xcode generator; this works fine with > Makefile generator (on OSX or Linux) and Visual Studio, but fails on > Xcode: Meh. Looks like this is documented in add_library(): > Some native build systems may not like

[CMake] cmake 3.5.2 Xcode generator bug

2016-05-20 Thread Paul Smith
Just discovered a bug in the Xcode generator; this works fine with Makefile generator (on OSX or Linux) and Visual Studio, but fails on Xcode: $ cat CMakeLists.txt cmake_minimum_required(VERSION 3.5) project(BadXcode) add_library(obj OBJECT foo.cpp) add_library(shared SHARED $) $

[Cmake-commits] CMake branch, next, updated. v3.5.2-1509-ga639d9b

2016-05-20 Thread Brad King
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 a639d9b9828a57142d53847fc033fcca59ee4fab (commit) via

Re: [cmake-developers] [MODERN] CMake ~3.6 vs Qt 5.6 vs MSVC2015

2016-05-20 Thread Konstantin Podsvirov
Hi all! Modern master alive! :-) It's time to upgrade: CMake 3.5.20160520 now available! Previously had problems with that, but now it seems that it works. Thank you brad for the new functionality:

Re: [CMake] Argh! Thwarted at every turn!

2016-05-20 Thread Paul Smith
On Fri, 2016-05-20 at 11:58 -0400, Paul Smith wrote: > This is not nice but it does work... Gah! The last of my problems can be solved with add_dependencies(). Somehow I didn't see this and was looking through all the target properties with set_properties() to find a way to add a dependency...

[CMake] Argh! Thwarted at every turn!

2016-05-20 Thread Paul Smith
I'm using CMake 3.5.2 generating for Linux / OSX / Visual Studio. I'm creating a shared library. This shared library is constructed mostly from other libraries (which are also built in other directories by this cmake setup). I have been doing this for a long time and it worked fine:

Re: [CMake] How to use 'CMAKE_EXE_LINKER_FLAGS' correctly

2016-05-20 Thread Chuck Atkins
> -rpath RPATHs are automatically added by CMake to executables so they can use libraries from the build tree. > -whole-archive > whole-archive is definitely trickier since you shouldn't be applying it to the entire executable but instead wrapping individual libraries with it. Conveniently,

Re: [CMake] Setting a value in a sub-project

2016-05-20 Thread Doug Cuthbertson
Petr - using: set(OPT1 ON CACHE BOOL "Set to OFF|ON (default is OFF) to control build of Bar library" FORCE) works like a champ! Jakob - Thanks for the suggestion, but I can't put "add_subdirectory(Bar)" before setting the variable(s) in Foo's CMakeLists.txt, because cmake finishes

Re: [cmake-developers] Custom commands with Ninja on Windows

2016-05-20 Thread Brad King
On 05/20/2016 03:41 AM, Martin Ankerl wrote: > From what I have understood it seems more safe to use .bat and not > .cmd, because the behavior of the errorlevel is different. From > http://waynes-world-it.blogspot.co.at/2008/08/difference-between-bat-and-cmd.html: > >> The differences between

[Cmake-commits] CMake branch, next, updated. v3.5.2-1507-gc1f682f

2016-05-20 Thread Brad King
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 c1f682fc1e292bfd6040d19002bd93675d282fa9 (commit) via

[Cmake-commits] CMake branch, master, updated. v3.5.2-726-g94b9ead

2016-05-20 Thread Brad King
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 94b9ead117a1aa6320cd434d020273b904731432 (commit) via

[Cmake-commits] CMake branch, master, updated. v3.5.2-717-gacd039a

2016-05-20 Thread Brad King
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 acd039ae0e432d85c1317bd910d409e0300e280a (commit) via

[Cmake-commits] CMake branch, master, updated. v3.5.2-724-ge07f7e6

2016-05-20 Thread Brad King
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 e07f7e6cd56609c1debd9a49b88f939b8b6b8840 (commit) via

Re: [CMake] How to use 'CMAKE_EXE_LINKER_FLAGS' correctly

2016-05-20 Thread Chaos Zhang
Nice to see you again, Mr. Atkins. I was trying to add a very long gcc link option to a ELF file, there are some options, like -whole-archive, -rpath,and i don't known how to set in CMake, so i decided to use original gcc option, is there better way to solve this? Chuck Atkins wrote > Is there a

Re: [CMake] How to use 'CMAKE_EXE_LINKER_FLAGS' correctly

2016-05-20 Thread Chuck Atkins
Is there a reason to not use target_link_libraries here? For the purposes of your example there's no reason to be using CMAKE_EXE_LINKER_FLAGS. What are you actually trying to accomplish? Because there is almost certainly a better way to achieve your desired result than via

Re: [CMake] Setting a value in a sub-project

2016-05-20 Thread Jakob van Bethlehem
Ah, nice. Good to know. But then still that cache variable is not created until *after* it was set by Foo, because it is only created when adding the Bar subdirectory, which explains the output. Sincerely, Jakob On Fri, May 20, 2016 at 1:18 PM, Petr Kmoch wrote: > The

Re: [CMake] Setting a value in a sub-project

2016-05-20 Thread Petr Kmoch
The situation already involves a cache variable, though: `option(abc "cmt" ON)` is just syntactic sugar for `set(abc ON CACHE BOOL "cmt")`. Petr On 20 May 2016 at 13:03, Jakob van Bethlehem wrote: > You don't have to create a cache variable for this. Put yourself in

Re: [CMake] Setting a value in a sub-project

2016-05-20 Thread Jakob van Bethlehem
You don't have to create a cache variable for this. Put yourself in the position of CMake; * While scanning the CMakeLists.txt of Foo CMake encounters the set(OPT1 ON FORCE) command, which tells CMake to create a *variable* called OPT1 with value ON * Then CMake is asked to include Bar * While

Re: [CMake] Setting a value in a sub-project

2016-05-20 Thread Doug Cuthbertson
Hi Petr, Thank you so much. I'll try it when I get in to work this morning. Doug On Fri, May 20, 2016 at 5:37 AM, Petr Kmoch wrote: > Hi Doug, > > your syntax for `set()` in Foo is incorrect; you're actually setting a > non-cache variable OPT1 do the value "ON;FORCE". > >

Re: [CMake] Setting a value in a sub-project

2016-05-20 Thread Petr Kmoch
Hi Doug, your syntax for `set()` in Foo is incorrect; you're actually setting a non-cache variable OPT1 do the value "ON;FORCE". You want to set the *cache* variable OPT1, which would be done like this: set(OPT1 ON CACHE BOOL "Set to OFF|ON (default is OFF) to control build of Bar library"

[CMake] Setting a value in a sub-project

2016-05-20 Thread Doug Cuthbertson
CMake (version 3.5.2) surprised me with how it's passing values to sub-projects, so I was wondering if this is expected behavior. Here's an example of what I mean. Let's say I have a project Foo in a directory of the same name. It contains a third-party library called Bar which has a

[CMake] How to use 'CMAKE_EXE_LINKER_FLAGS' correctly

2016-05-20 Thread Chaos Zhang
Hi, all, I try to use some gcc link option and libs(except libs link by target_link_libraries(...)), i researched and try to use 'CMAKE_EXE_LINKER_FLAGS' in a simple project, as below: in dir, there are 5 files: -hello.h -hello.c -main.c -hello.o -libhello.a hello.o was compiled by hello.c(gcc

Re: [cmake-developers] Custom commands with Ninja on Windows

2016-05-20 Thread Martin Ankerl
sorry, that DEP_FILE problem was my fault. It's working correctly. Martin On Fri, May 20, 2016 at 9:41 AM Martin Ankerl wrote: > From what I have understood it seems more safe to use .bat and not .cmd, > because the behavior of the errorlevel is different. From >

Re: [cmake-developers] Custom commands with Ninja on Windows

2016-05-20 Thread Martin Ankerl
>From what I have understood it seems more safe to use .bat and not .cmd, because the behavior of the errorlevel is different. From http://waynes-world-it.blogspot.co.at/2008/08/difference-between-bat-and-cmd.html : > The differences between .CMD and .BAT as far as CMD.EXE is concerned are: With

[cmake-developers] Windows Phone 10.0 and Windows Phone 8.1 support

2016-05-20 Thread Roman Wüger
Hi, I read that CMake has support for those platforms. Is there a way to modify the *.appxrecipe file or is there a chance to add files before packaging to an *.appx file? Thanks in advance Regards Roman -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ

[CMake] Windows Phone 10.0 and Windows Phone 8.1 support

2016-05-20 Thread Roman Wüger
Hi, I read that CMake has support for those platforms. Is there a way to modify the *.appxrecipe file or is there a chance to add files before packaging to an *.appx file? Thanks in advance Regards Roman -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ