Re: [CMake] Bug in SLN generation

2015-01-06 Thread David Cole via CMake
Two ways to do this occur to me: (1) wrap cmake with a two-line script that your project developers use: @call cmake -G Visual Studio 12 2013 @call post-cmake.cmd (2) do a file(WRITE ...) unconditionally somewhere in your CMakeLists.txt file, and then introduce a custom command that

Re: [CMake] Bug in SLN generation

2015-01-06 Thread Petr Kmoch
On Tue, Jan 6, 2015 at 2:29 PM, David Cole dlrd...@aol.com wrote: Two ways to do this occur to me: (1) wrap cmake with a two-line script that your project developers use: @call cmake -G Visual Studio 12 2013 @call post-cmake.cmd Would this work with re-runs triggered by CMake

[cmake-developers] [CMake 0015338]: Querying for (deprecated) LOCATION property prevents expansion of TARGET_OBJECTS generator expression

2015-01-06 Thread Mantis Bug Tracker
The following issue has been SUBMITTED. == http://public.kitware.com/Bug/view.php?id=15338 == Reported By:Matthias Maier Assigned To:

Re: [CMake] FindCUDA ignores project dependencies when separable compilation is on

2015-01-06 Thread James Bigler
James On Jan 6, 2015, at 11:29 AM, Irwin Zaid irwin.z...@physics.ox.ac.uk wrote: Okay, so I've gone and put the messages into FindCUDA.cmake. I specifically put them right before and after the foreach() in CUDA_LINK_SEPARARABLE_COMPILATION_OBJECTS. The output is the following. Is

Re: [CMake] FindCUDA ignores project dependencies when separable compilation is on

2015-01-06 Thread Irwin Zaid
Wait, hold on. The -fPIC does get passed to everything if I set the build mode to Debug by passing -DCMAKE_BUILD_TYPE=Debug to CMake. Is that what I should be doing? (Sorry about that, if yes.) If that's the case, what is the correct way to get -fPIC passed to the intermediate linking? Am I

[CMake] add_subdirectory cache configuration via cmake script

2015-01-06 Thread Dario Oliveri
How can I prevent variables cache pollution in CMAKE? My real problem is the following: I have library A and library B, both libraries have some cmake variable used to configure there and there and that's ok, but what when variables are semantically duplicated? Library A depends on Library B

Re: [cmake-developers] target_link_libraries and --start-group/--end-group ?

2015-01-06 Thread Robert Goulet
Thanks Robert, But it doesn’t seems to work when building for NVidia NSight Android platform using Visual Studio IDE. Is there a way to add custom flags before and after the flags set by target_link_libraries? I tried CMAKE_LINK_EXE_FLAGS but it doesn’t work. Thanks! From: Robert Maynard

Re: [CMake] FindCUDA ignores project dependencies when separable compilation is on

2015-01-06 Thread James Bigler
Right, if you don't specify the CMAKE_BUILD_TYPE you are only getting the CMAKE_CXX_FLAGS and none of the build type specific flags such as CMAKE_CXX_FLAGS_DEBUG. There is still the issue that I wasn't bringing in the CMAKE_CXX_FLAGS (which is why my patch helped). James On Tue, Jan 6, 2015 at

Re: [CMake] FindCUDA ignores project dependencies when separable compilation is on

2015-01-06 Thread Irwin Zaid
Okay, so to conclude: Should we make a PR to include your patched code so CMAKE_CXX_FLAGS just works? I think this makes sense, as I would never have thought to do the DEBUG / RELEASE stuff. I can do the PR, unless you want to. And, of course, thanks for all your help! Irwin James Bigler

Re: [CMake] FindCUDA ignores project dependencies when separable compilation is on

2015-01-06 Thread James Bigler
I've pushed a change into 'stage' [1] that I hope to get into 'next' (something isn't working with my ssh authentication). James [1] commit b4e54f9b8c748f78d16e9da055a7e0436d7654ef Author: James Bigler @ Date: Tue Jan 6 16:28:05 2015 -0700 FindCUDA: Add relevant CMAKE_{C,CXX}_FLAGS for

[CMake] Unable to create project files with Visual Studio 2010 on Windows 7

2015-01-06 Thread David . Karr
I have just started using a new Windows 7 host with Visual Studio 2010 Professional. When I call CMake to generate my project files, I get the following output in CMakeError.log: == Determining if the C compiler works failed with the following output: Change Dir:

Re: [CMake] Get the BINARY_DIR for a target?

2015-01-06 Thread Braden McDaniel
On Tue, 2015-01-06 at 12:34 -0500, Braden McDaniel wrote: Are there any properties on a target that I can query to get whatever was the CMAKE_CURRENT_BINARY_DIR when the target was defined? I'm aware of the LOCATION property; however, its generator-specific nature makes teasing the

Re: [cmake-developers] [PATCH] FindCURL: Search for Windows debugbuilds as well

2015-01-06 Thread Pietraszkiewicz, Piotr
Thank you for the hint. How do you find my second attempt? See attachment. Piotr -Ursprüngliche Nachricht- Von: cmake-developers [mailto:cmake-developers-boun...@cmake.org] Im Auftrag von Rolf Eike Beer Gesendet: Freitag, 19. Dezember 2014 13:39 An: cmake-developers@cmake.org Betreff:

Re: [CMake] FindCUDA ignores project dependencies when separable compilation is on

2015-01-06 Thread Irwin Zaid
I just double-checked. The -fPIC is definitely there for each individual object file, but not for the *_intermediate_link.o. Irwin James Bigler wrote: James On Jan 6, 2015, at 11:29 AM, Irwin Zaidirwin.z...@physics.ox.ac.uk wrote: Okay, so I've gone and put the messages into

Re: [CMake] Bug in SLN generation

2015-01-06 Thread David Cole via CMake
No, with the wrapper script technique, you'd have to train all your developers to run the wrapper script whenever any CMake stuff changes... On Tue, Jan 6, 2015 at 8:39 AM, Petr Kmoch petr.km...@gmail.com wrote: On Tue, Jan 6, 2015 at 2:29 PM, David Cole dlrd...@aol.com wrote: Two ways to do

Re: [CMake] Bug in SLN generation

2015-01-06 Thread Scott Aron Bloom
I filed a bug yesterday, and may take a look at the source code and look into a coding thr patch this week. I did find the previous bug as well once I Google the right keywords... --Scott Original message From: Petr Kmoch petr.km...@gmail.com Date:01/05/2015 23:50

Re: [CMake] Bug in SLN generation

2015-01-06 Thread Scott Aron Bloom
The other problem with the script technique, is most of my devs use cmake inside visual Studio.. --Scott Original message From: David Cole dlrd...@aol.com Date:01/06/2015 07:35 (GMT-08:00) To: Petr Kmoch petr.km...@gmail.com Cc: Scott Aron Bloom scott.bl...@onshorecs.com,

Re: [CMake] FindCUDA ignores project dependencies when separable compilation is on

2015-01-06 Thread Irwin Zaid
Okay, an update on this. 1) This is fixed now, thank you. We just needed to add a custom target, as you said. 2) This is trickier and, unfortunately, still not working. We are already adding -fPIC to CMAKE_CXX_FLAGS, should that not be enough? I also tried adding it to both

[Cmake-commits] CMake branch, master, updated. v3.1.0-601-g8c4b7c5

2015-01-06 Thread Kitware Robot
20150106) +set(CMake_VERSION_PATCH 20150107) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake

Re: [CMake] FindCUDA ignores project dependencies when separable compilation is on

2015-01-06 Thread James Bigler
On Tue, Jan 6, 2015 at 8:54 AM, Irwin Zaid irwin.z...@physics.ox.ac.uk wrote: Okay, an update on this. 2) This is trickier and, unfortunately, still not working. We are already adding -fPIC to CMAKE_CXX_FLAGS, should that not be enough? I also tried adding it to both CMAKE_CXX_FLAGS_DEBUG

[Cmake-commits] CMake branch, next, updated. v3.1.0-1506-g007b045

2015-01-06 Thread Ben Boeckel
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 007b0452b5f7e536f1f88b30bcc5331227cbb098 (commit) via

Re: [CMake] FindCUDA ignores project dependencies when separable compilation is on

2015-01-06 Thread Irwin Zaid
Right, when I modify FindCUDA.cmake as you describe everything works. So that's good. Without doing that, I still don't see CMAKE_CXX_FLAGS_DEBUG propagating its flags to the intermediate link file. Did you mean to put message commands into CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS itself? When

[CMake] Get the BINARY_DIR for a target?

2015-01-06 Thread Braden McDaniel
Are there any properties on a target that I can query to get whatever was the CMAKE_CURRENT_BINARY_DIR when the target was defined? I'm aware of the LOCATION property; however, its generator-specific nature makes teasing the non-generator-specific part out of it rather challenging (without some

Re: [CMake] FindCUDA ignores project dependencies when separable compilation is on

2015-01-06 Thread James Bigler
I meant putting messages into FindCUDA.cmake itself. Only certain flags are propagated for the intermediate link file compilation, because I've had a lot of trouble over the years for propagating all the host flags. This set of flags is filtered by the function _cuda_get_important_host_flags.

Re: [CMake] FindCUDA ignores project dependencies when separable compilation is on

2015-01-06 Thread Irwin Zaid
Okay, so I've gone and put the messages into FindCUDA.cmake. I specifically put them right before and after the foreach() in CUDA_LINK_SEPARARABLE_COMPILATION_OBJECTS. The output is the following. Is $$CONFIG:Debug:-Xcompiler;$$CONFIG:Debug:-fPIC supposed to be that way? That looks weird.