Re: [CMake] errors with add_custom_command and add_custom_target

2016-01-26 Thread Petr Kmoch
Normally, you would want to keep your source tree clean from any build-time
modifications (CMake *strongly discourages* in-source builds, with good
reason).
Therefore, you'd want to generate the files in CMAKE_CURRENT_BINARY_DIR.
Assuming the generator always writes them into its current directory, you'd
do this:

set(EXIST_SOURCES A.cc B.cc C.cc)
set(GEN_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/X.cc
${CMAKE_CURRENT_BINARY_DIR}/Y.cc ${CMAKE_CURRENT_BINARY_DIR}/Z.cc)
add_custom_command(OUTPUT ${GEN_SOURCES}
   COMMAND generator
   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
   MAIN_DEPENDENCY gendir/generator)
add_library(mylib OBJECT ${EXIST_SOURCES} ${GEN_SOURCES} )

Petr


On Tue, Jan 26, 2016 at 10:07 AM, Vania Joloboff 
wrote:

> Hi Petr,
>
> Thanks, indeed I had unset the property !
> Cmake works fine with removing the line. But I have now a doubt.
> My generator generates the files in the current dir.
> Should I indicate the working directory in add_custom_command ?
> so that the generated sources are added in CMAKE_CURRENT_SOURCE_DIR
> or it will automatically add them in the source dir and not the build dir ?
> Vania
>
>
>
> On 01/26/2016 09:43 AM, Petr Kmoch wrote:
>
>> Hi, Vania.
>>
>> You should remove this line:
>>
>> set_property(SOURCE ${GEN_SOURCES} PROPERTY GENERATED )
>>
>> CMake will mark the files as generated automatically.
>>
>> What your line is actually doing is setting them as *not* generated,
>> because you didn't pass any argument to set the property to, so it's
>> implicitly unset. What you probably wanted would have been this:
>>
>> set_property(SOURCE ${GEN_SOURCES} PROPERTY GENERATED TRUE)
>>
>> But again, remove the line altogether, it's unnecessary.
>>
>> You should also remove the quotes from your `add_library` call. The way
>> you have it would look for a single file named "A.cc;B.cc;C.cc
>> X.cc;Y.cc;Z.cc".
>>
>> Petr
>>
>> On Tue, Jan 26, 2016 at 9:36 AM, Vania Joloboff > > wrote:
>>
>> Hi
>>
>> I have a generator that generates some, but not all of the source
>> files.
>> My understanding was that I should use add_custom_command for that
>>
>> When I do
>> set(EXIST_SOURCES A.cc B.cc C.cc)
>> set(GEN_SOURCES X.cc Y.cc Z.cc)
>> add_custom_command(OUTPUT ${GEN_SOURCES}
>>COMMAND generator
>>MAIN_DEPENDENCY gendir/generator   )
>> set_property(SOURCE ${GEN_SOURCES} PROPERTY GENERATED )
>> add_library(mylib OBJECT "${EXIST_SOURCES} ${GEN_SOURCES}" )
>>
>> I get error "Cannot find source file : X.cc"
>>
>> So, I tried
>>
>> set(EXIST_SOURCES A.cc B.cc C.cc)
>> set(GEN_SOURCES X.cc Y.cc Z.cc)
>> add_custom_target(generate
>>   COMMAND generator
>>   COMMENT "Generate"
>>   DEPENDS gendir/generator   )
>> set_property(SOURCE ${GEN_SOURCES} PROPERTY GENERATED )
>> add_library(mylib OBJECT "${EXIST_SOURCES} ${GEN_SOURCES}" )
>> add_dependencies(mylib generate)
>>
>> I get same error "Cannot find source file : X.cc"
>>
>> I just don't get it...
>>
>> Vania
>>
>> --
>> 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 various services to support the CMake community.
>> For more information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake
>>
>>
>>
>
-- 

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] errors with add_custom_command and add_custom_target

2016-01-26 Thread Vania Joloboff

Hi Petr,

Thanks, indeed I had unset the property !
Cmake works fine with removing the line. But I have now a doubt.
My generator generates the files in the current dir.
Should I indicate the working directory in add_custom_command ?
so that the generated sources are added in CMAKE_CURRENT_SOURCE_DIR
or it will automatically add them in the source dir and not the build dir ?
Vania



On 01/26/2016 09:43 AM, Petr Kmoch wrote:

Hi, Vania.

You should remove this line:

set_property(SOURCE ${GEN_SOURCES} PROPERTY GENERATED )

CMake will mark the files as generated automatically.

What your line is actually doing is setting them as *not* generated, 
because you didn't pass any argument to set the property to, so it's 
implicitly unset. What you probably wanted would have been this:


set_property(SOURCE ${GEN_SOURCES} PROPERTY GENERATED TRUE)

But again, remove the line altogether, it's unnecessary.

You should also remove the quotes from your `add_library` call. The 
way you have it would look for a single file named "A.cc;B.cc;C.cc 
X.cc;Y.cc;Z.cc".


Petr

On Tue, Jan 26, 2016 at 9:36 AM, Vania Joloboff 
> wrote:


Hi

I have a generator that generates some, but not all of the source
files.
My understanding was that I should use add_custom_command for that

When I do
set(EXIST_SOURCES A.cc B.cc C.cc)
set(GEN_SOURCES X.cc Y.cc Z.cc)
add_custom_command(OUTPUT ${GEN_SOURCES}
   COMMAND generator
   MAIN_DEPENDENCY gendir/generator   )
set_property(SOURCE ${GEN_SOURCES} PROPERTY GENERATED )
add_library(mylib OBJECT "${EXIST_SOURCES} ${GEN_SOURCES}" )

I get error "Cannot find source file : X.cc"

So, I tried

set(EXIST_SOURCES A.cc B.cc C.cc)
set(GEN_SOURCES X.cc Y.cc Z.cc)
add_custom_target(generate
  COMMAND generator
  COMMENT "Generate"
  DEPENDS gendir/generator   )
set_property(SOURCE ${GEN_SOURCES} PROPERTY GENERATED )
add_library(mylib OBJECT "${EXIST_SOURCES} ${GEN_SOURCES}" )
add_dependencies(mylib generate)

I get same error "Cannot find source file : X.cc"

I just don't get it...

Vania

-- 


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 various services to support the CMake community.
For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake




--

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[cmake-developers] [CMake 0015936]: UseJava add_jar incorrect documentation for target property

2016-01-26 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://cmake.org/Bug/view.php?id=15936 
== 
Reported By:Erik Hanspers
Assigned To:
== 
Project:CMake
Issue ID:   15936
Category:   Modules
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2016-01-26 06:50 EST
Last Modified:  2016-01-26 06:50 EST
== 
Summary:UseJava add_jar incorrect documentation for target
property
Description: 
The UseJava module documents a CLASS_DIR target property being set. The code
actually sets a property CLASSDIR, without the underscore.

Steps to Reproduce: 
add_jar(foo SOURCES blah.java)

get_target_property(foo_classdir foo CLASS_DIR) -> not set
get_target_property(foo_classdir foo CLASSIER) -> we got the path!

Additional Information: 
Suggest revising documentation not to break currently successful use of the
CLASSDIR property.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-01-26 06:50 Erik Hanspers  New Issue
==

-- 

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[Cmake-commits] CMake branch, master, updated. v3.4.3-909-g30e294f

2016-01-26 Thread Kitware Robot
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  30e294f68fb78a4d813fa0f9df668e543e4cf991 (commit)
  from  e7eab0ec40f19a1fc81920bdd0dcf356a5b362d4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=30e294f68fb78a4d813fa0f9df668e543e4cf991
commit 30e294f68fb78a4d813fa0f9df668e543e4cf991
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Wed Jan 27 00:01:03 2016 -0500
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Wed Jan 27 00:01:03 2016 -0500

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 18f52bf..02a3de8 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 4)
-set(CMake_VERSION_PATCH 20160126)
+set(CMake_VERSION_PATCH 20160127)
 #set(CMake_VERSION_RC 1)

---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [CMake] What is the best way to handle Boost dependencies in a package config file

2016-01-26 Thread Michi Henning
We use this, which works fine for me on Ubuntu:

find_package(Boost COMPONENTS system filesystem regex serialization thread log 
REQUIRED)

Cheers,

Michi.

> On 27 Jan 2016, at 12:54 , Johnson, Matt (GE Healthcare) 
>  wrote:
> 
> I like package config files.  I want to use more of them.  However, I have a 
> dependency on boost.  While boost has a Find module, it doesn't have a 
> package config file.  I'm not going to be able to depend on the users of my 
> package building boost via cmake (also, is that still an active thing?).
> 
> It seems like the best I could hope for is to generate the package config 
> file, then hack it up to deal with the boost stuff.  Has anyone already 
> solved this problem or have any tips?  I found this Hunter package manager 
> (https://github.com/ruslo/hunter), but it seems a bit heavyweight when all I 
> want is boost.  Also, I can't have my build system going out and downloading 
> the packages - they all have to come from an internal source.  
> 
> Thanks,
> Matt
> 
> 
> -- 
> 
> 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 various services to support the CMake community. For more 
> information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake

-- 

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] What is the best way to handle Boost dependencies in a package config file

2016-01-26 Thread Ruslan Baratov via CMake

On 27-Jan-16 09:54, Johnson, Matt (GE Healthcare) wrote:

I like package config files.  I want to use more of them.  However, I have a 
dependency on boost.  While boost has a Find module, it doesn't have a package 
config file.  I'm not going to be able to depend on the users of my package 
building boost via cmake (also, is that still an active thing?).

It seems like the best I could hope for is to generate the package config file, 
then hack it up to deal with the boost stuff.  Has anyone already solved this 
problem or have any tips?  I found this Hunter package manager 
(https://github.com/ruslo/hunter), but it seems a bit heavyweight when all I 
want is boost.

--

Also, I can't have my build system going out and downloading the packages - 
they all have to come from an internal source.

Just for your information you can use "file://" links instead of regular 
"http://; in both hunter.cmake and HunterGate so there is no need to "go 
out" - you can be completely offline.


Ruslo
--

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] What is the best way to handle Boost dependencies in a package config file

2016-01-26 Thread Johnson, Matt (GE Healthcare)
I like package config files.  I want to use more of them.  However, I have a 
dependency on boost.  While boost has a Find module, it doesn't have a package 
config file.  I'm not going to be able to depend on the users of my package 
building boost via cmake (also, is that still an active thing?).

It seems like the best I could hope for is to generate the package config file, 
then hack it up to deal with the boost stuff.  Has anyone already solved this 
problem or have any tips?  I found this Hunter package manager 
(https://github.com/ruslo/hunter), but it seems a bit heavyweight when all I 
want is boost.  Also, I can't have my build system going out and downloading 
the packages - they all have to come from an internal source.  

Thanks,
Matt


-- 

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] errors with add_custom_command and add_custom_target

2016-01-26 Thread Vania Joloboff

Hi

I have a generator that generates some, but not all of the source files.
My understanding was that I should use add_custom_command for that

When I do
set(EXIST_SOURCES A.cc B.cc C.cc)
set(GEN_SOURCES X.cc Y.cc Z.cc)
add_custom_command(OUTPUT ${GEN_SOURCES}
   COMMAND generator
   MAIN_DEPENDENCY gendir/generator   )
set_property(SOURCE ${GEN_SOURCES} PROPERTY GENERATED )
add_library(mylib OBJECT "${EXIST_SOURCES} ${GEN_SOURCES}" )

I get error "Cannot find source file : X.cc"

So, I tried

set(EXIST_SOURCES A.cc B.cc C.cc)
set(GEN_SOURCES X.cc Y.cc Z.cc)
add_custom_target(generate
  COMMAND generator
  COMMENT "Generate"
  DEPENDS gendir/generator   )
set_property(SOURCE ${GEN_SOURCES} PROPERTY GENERATED )
add_library(mylib OBJECT "${EXIST_SOURCES} ${GEN_SOURCES}" )
add_dependencies(mylib generate)

I get same error "Cannot find source file : X.cc"

I just don't get it...

Vania

--

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] errors with add_custom_command and add_custom_target

2016-01-26 Thread Petr Kmoch
Hi, Vania.

You should remove this line:

set_property(SOURCE ${GEN_SOURCES} PROPERTY GENERATED )

CMake will mark the files as generated automatically.

What your line is actually doing is setting them as *not* generated,
because you didn't pass any argument to set the property to, so it's
implicitly unset. What you probably wanted would have been this:

set_property(SOURCE ${GEN_SOURCES} PROPERTY GENERATED TRUE)

But again, remove the line altogether, it's unnecessary.

You should also remove the quotes from your `add_library` call. The way you
have it would look for a single file named "A.cc;B.cc;C.cc X.cc;Y.cc;Z.cc".

Petr

On Tue, Jan 26, 2016 at 9:36 AM, Vania Joloboff 
wrote:

> Hi
>
> I have a generator that generates some, but not all of the source files.
> My understanding was that I should use add_custom_command for that
>
> When I do
> set(EXIST_SOURCES A.cc B.cc C.cc)
> set(GEN_SOURCES X.cc Y.cc Z.cc)
> add_custom_command(OUTPUT ${GEN_SOURCES}
>COMMAND generator
>MAIN_DEPENDENCY gendir/generator   )
> set_property(SOURCE ${GEN_SOURCES} PROPERTY GENERATED )
> add_library(mylib OBJECT "${EXIST_SOURCES} ${GEN_SOURCES}" )
>
> I get error "Cannot find source file : X.cc"
>
> So, I tried
>
> set(EXIST_SOURCES A.cc B.cc C.cc)
> set(GEN_SOURCES X.cc Y.cc Z.cc)
> add_custom_target(generate
>   COMMAND generator
>   COMMENT "Generate"
>   DEPENDS gendir/generator   )
> set_property(SOURCE ${GEN_SOURCES} PROPERTY GENERATED )
> add_library(mylib OBJECT "${EXIST_SOURCES} ${GEN_SOURCES}" )
> add_dependencies(mylib generate)
>
> I get same error "Cannot find source file : X.cc"
>
> I just don't get it...
>
> Vania
>
> --
>
> 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 various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-- 

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Checking whether particular *linker* flags are supported

2016-01-26 Thread Guy Harris
On Jan 22, 2016, at 12:24 PM, Guy Harris  wrote:

> CMake has the macros CHECK_C_COMPILER_FLAG and CHECK_CXX_COMPILER_FLAG, which 
> allow checking for whether a given C or C++ compiler flag is supported by the 
> compiler being used.
> 
> However, there's no CHECK_LINKER_FLAG macro, so that you can check whether a 
> given *linker* flag is supported by the linker being used, so there doesn't 
> seem to be a good way to use a flag, such as the --as-needed flag, if it's 
> not *required*, but is "nice to have", but isn't available on all platforms.
> 
> So what's the best way to do such a check?
> 
> (I'm assuming here that, for all generators on UN*X platforms, linking is 
> done by using the compiler driver, so that you don't have to worry about, for 
> example, using -Wl,{linker flag} with some generators and just {linker flag} 
> with other generators.)

Bug 0015934:

https://public.kitware.com/Bug/view.php?id=15934

filed.


-- 

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] CMake 3.4.3 available for download

2016-01-26 Thread Brad King
On 01/25/2016 04:12 PM, Gonzalo Garramuño wrote:
> Does this one have the fix for the FLTK_WRAP_UI?

No, sorry.  3.4.3 was released only as a quick fix to 3.4.2's problems
on Windows 10.  3.5 will have the fltk fix, and the freeze for that is
next week.

-Brad

-- 

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] include_external_msproject

2016-01-26 Thread Lars
Appreciate some help understanding include_external_msproject.
Using Windows 7 and cmake 3.3  
 
This is what has been done so far,
 
1. Opened Visual Studio 2012 and created a new project (Windows Forms 
Application) and saved it under c:\temp\test.
 
2. Used the following to an cmake;
include_external_msproject(ext_test c:/test/test/test.sln)
 
This generates an error MSB4126: The specified solution configuration 
"Debug|x86" is invalid. Please specify a valid solution configuration using the 
configuration and platform properties...
 
3. So update the cmake file (below), clear build folder and build again;
include_external_msproject(ext_test c:/test/test/test.sln PLATFORM "Any CPU")
 
This generate the exact same error message as above. So the PLATFORM keyword 
does not appear to be used in this context. Anyone care to explain how PLATFORM 
works and howto specify correct configuration and platform?
 
4. To workaround the problem we open the visual studio project and added the 
configuration and platform combo "Debug" and "x86" which cmake appears to 
require. We use the original cmake script (below), clear build folder and build 
again.
include_external_msproject(ext_test c:/test/test/test.sln)
 
The following error is produced;
c:\temp\test\test\test.sln.metaproj : error MSB4057: The target 
"GetNativeManifest" does not exists in the project.
 
Searched all files in source and build directory and cannot find any reference 
to "GetNativeManifest". See some issue online in regards to build order but 
cannot see how that applies to this simple example. Really do not understand 
this issue. Any ideas?
 
6. Update cmake and use .csproj instead of the solution file and it works. The 
test.exe file is build. The cmake looks like this
include_external_msproject(ext_test c:/test/test/test.csproj)
 
Does include_external_msproject support solution files?
 
  -- 

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] include_external_msproject

2016-01-26 Thread iosif neitzke
No, I do not believe so.

https://cmake.org/cmake/help/v3.4/command/include_external_msproject.html

Keyword being 'project'.

On Tue, Jan 26, 2016 at 8:43 AM, Lars  wrote:
> Appreciate some help understanding include_external_msproject.
> Using Windows 7 and cmake 3.3
>
> This is what has been done so far,
>
> 1. Opened Visual Studio 2012 and created a new project (Windows Forms
> Application) and saved it under c:\temp\test.
>
> 2. Used the following to an cmake;
> include_external_msproject(ext_test c:/test/test/test.sln)
>
> This generates an error MSB4126: The specified solution configuration
> "Debug|x86" is invalid. Please specify a valid solution configuration using
> the configuration and platform properties...
>
> 3. So update the cmake file (below), clear build folder and build again;
> include_external_msproject(ext_test c:/test/test/test.sln PLATFORM "Any
> CPU")
>
> This generate the exact same error message as above. So the PLATFORM keyword
> does not appear to be used in this context. Anyone care to explain how
> PLATFORM works and howto specify correct configuration and platform?
>
> 4. To workaround the problem we open the visual studio project and added the
> configuration and platform combo "Debug" and "x86" which cmake appears to
> require. We use the original cmake script (below), clear build folder and
> build again.
> include_external_msproject(ext_test c:/test/test/test.sln)
>
> The following error is produced;
> c:\temp\test\test\test.sln.metaproj : error MSB4057: The target
> "GetNativeManifest" does not exists in the project.
>
> Searched all files in source and build directory and cannot find any
> reference to "GetNativeManifest". See some issue online in regards to build
> order but cannot see how that applies to this simple example. Really do not
> understand this issue. Any ideas?
>
> 6. Update cmake and use .csproj instead of the solution file and it works.
> The test.exe file is build. The cmake looks like this
> include_external_msproject(ext_test c:/test/test/test.csproj)
>
> Does include_external_msproject support solution files?
>
>
> --
>
> 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 various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
-- 

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] WINDOWS_EXPORT_ALL_SYMBOLS

2016-01-26 Thread Bill Hoffman

On 1/26/2016 5:12 AM, Micha Renner wrote:

It prevents that I can link the library to a program since there is no
__local_stdio_printf_options etc.

May be there exists an explanation.

Greetings

Michael


cmake 3.4.2 Windows 10 VS Express 15

So, I am able to get this to work with Visual Studio 14 2015.  CMake 3.4.3

$ cat TLib.dir/Debug/exportall.def
EXPORTS
testCall1_1
__local_stdio_printf_options
_vfprintf_l
vprintf
printf
_vsnprintf_l
vsprintf

Those symbols show up in the .def file but get resolved by system libraries.

Here is my link line:
(output from cmake --build .)

Link:
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe 
/ERRORREPORT:QUEUE 
/OUT:"C:\Users\hoffman\Documents\BuildDll\BuildDLL-44\src\b\Debug\TLib.dll" 
/INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib 
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib 
/DEF:"TLib.dir\Debug\exportall.def" /MANIFEST 
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG 
/PDB:"C:/Users/hoffman/Documents/BuildDll/BuildDLL-44/src/b/Debug/TLib.pdb" 
/SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT 
/IMPLIB:"C:/Users/hoffman/Documents/BuildDll/BuildDLL-44/src/b/Debug/TLib.lib" 
/MACHINE:X86 /SAFESEH  /machine:X86 /debug /DLL TLib.dir\Debug\tlib.obj


You can see I get the dll and .lib file here:
$ ls Debug/
TLib.dll  TLib.exp  TLib.ilk  TLib.lib  TLib.pdb

I am running the community edition...  Maybe there is some difference 
with express?


-Bill


--

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] Importing a static library, then adding dependencies. Should the dependencies be transitive? They aren't for me!

2016-01-26 Thread Johnson, Matt (GE Healthcare)
I'm using the Visual Studio 2013 generator and cmake 3.4.3.
Example:
add_library(NS::a_lib STATIC IMPORTED)
set_target_properties(NS::a_lib PROPERTIES IMPORTED_LOCATION ${a_lib_location})
set_target_properties(NS::a_lib PROPERTIES INTERFACE_LINK_LIBRARIES 
"/path/to/a/another_lib.lib")
set_target_properties(NS::a_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES 
"an/include/dir")

add_library(NS::b_lib STATIC IMPORTED)
set_target_properties(NS::b_lib PROPERTIES IMPORTED_LOCATION ${b_lib_location})
add_dependencies(NS::b_lib NS::a_lib)

add_executable(test_exe main.cpp)
target_link_libraries(test_exe NS::b_lib) #I expect to pull in all of A's stuff 
too.  Howver, it doesn't for me.

Assume I have two libraries, A and B.  A has some libraries that it links to.  
B depends on A.  I add import targets for both A and B.  I use add_dependencies 
to signal the B->A dependency.  When I use target_link_libraries for an 
executable and only list B, should it auto pull in A and A's dependencies?  For 
me, all I get is B.  I don't get any of its dependencies.  Nor do I get A's 
include directories.  Am I doing something wrong or misunderstanding the usage 
of these functions?

I've done a lot of googling and searching the mailing list.  I do see a couple 
of bugs that revolved around this, but all of them seem to indicate that they 
are fixed and this is supported.  Am I wrong?  Do I have to manually set the 
INTERFACE_LINK_LIBRARIES of B?

Thanks for your help!
Matt
  
-- 

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Importing a static library, then adding dependencies. Should the dependencies be transitive? They aren't for me!

2016-01-26 Thread Nils Gladitz

On 26.01.2016 21:25, Johnson, Matt (GE Healthcare) wrote:

I'm using the Visual Studio 2013 generator and cmake 3.4.3.
Example:
add_library(NS::a_lib STATIC IMPORTED)
set_target_properties(NS::a_lib PROPERTIES IMPORTED_LOCATION ${a_lib_location})
set_target_properties(NS::a_lib PROPERTIES INTERFACE_LINK_LIBRARIES 
"/path/to/a/another_lib.lib")
set_target_properties(NS::a_lib PROPERTIES INTERFACE_INCLUDE_DIRECTORIES 
"an/include/dir")

add_library(NS::b_lib STATIC IMPORTED)
set_target_properties(NS::b_lib PROPERTIES IMPORTED_LOCATION ${b_lib_location})
add_dependencies(NS::b_lib NS::a_lib)

add_executable(test_exe main.cpp)
target_link_libraries(test_exe NS::b_lib) #I expect to pull in all of A's stuff 
too.  Howver, it doesn't for me.

Assume I have two libraries, A and B.  A has some libraries that it links to.  B 
depends on A.  I add import targets for both A and B.  I use add_dependencies to 
signal the B->A dependency.  When I use target_link_libraries for an executable 
and only list B, should it auto pull in A and A's dependencies?  For me, all I get 
is B.  I don't get any of its dependencies.  Nor do I get A's include directories. 
 Am I doing something wrong or misunderstanding the usage of these functions?

I've done a lot of googling and searching the mailing list.  I do see a couple 
of bugs that revolved around this, but all of them seem to indicate that they 
are fixed and this is supported.  Am I wrong?  Do I have to manually set the 
INTERFACE_LINK_LIBRARIES of B?


Yes you have to set INTERFACE_LINK_LIBRARIES.
add_dependencies() is for order (not link) dependencies.

Nils

--

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [cmake-developers] Anyone going to FOSDEM?

2016-01-26 Thread Benjamin Eikel

Hi Steve,

Zitat von Stephen Kelly :


Benjamin Eikel wrote:


Hi Gregor,

Am Mittwoch, 30. Dezember 2015, 14:33:08 schrieb Gregor Jasny via cmake-
developers:

Hello,

I wonder if any of you CMake Developers go to FOSDEM [1] this year?


I am not a CMake developer, but, more or less, an advanced user, but I
will go to FOSDEM next year. ;-)
At least Stephen Kelly [2] will be there, too.


Yep. Maybe we could arrange to meet in the Sunday evening. I leave on the
Monday.


unfortunately, I will leave already on Sunday. But we can have a chat  
directly after your talk.


Cheers
Benjamin



Thanks,

Steve.


--

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 various services to support the CMake community. For  
more information on each offering, please visit:


CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at  
http://www.kitware.com/opensource/opensource.html


Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers




--

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMake daemon for user tools

2016-01-26 Thread Vladimir Prus

On 26-Jan-16 12:14 AM, Stephen Kelly wrote:

Vladimir Prus wrote:



http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/12658/focus=13004


Hi Stephen,

this sounds very much like what I has proposed for Boost.Build, see:

http://vladimirprus.com/talks/boosting-cdt-builds/


Yes, I'm familiar with that. It is listed as prior art in the gmane link you
quoted :)


:-)


I am scheduled to give a talk at FOSDEM about the feature and how user
tools can interact with it:



https://fosdem.org/2016/schedule/event/enabling_gui_tools_for_cmake_code

...

Is anyone interested enough in this potential cmake feature to
join the development effort?


You can guess I'm not very interested in cmake, but maybe we can discuss
the protocol, so that an IDE can work with different build systems? Think
we can have a chat at FOSDEM?


Yep, sounds good to me. I don't have a schedule decided yet for which talks
I'll attend, but I should be reachable by email to arrange to meet. I assume
you've seen

  https://steveire.wordpress.com/2016/01/24/cmake-daemon-for-user-tools/


Yes, that is quite impressive. I don't have a schedule yet either, but I am
going to attend your talk, so we can sync there.

--
Vladimir Prus
http://vladimirprus.com

--

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[cmake-developers] Improve FindGit.cmake

2016-01-26 Thread Christoph Grüninger
Dear CMake devs,
please find attached a patch to slightly improve FindGit.cmake.

I did test it, but did not understand why GIT_FOUND was set in the first
place.

Bye
Christoph
>From c29c384565b7d976e36156f9351af8400cd60dc4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= 
Date: Tue, 26 Jan 2016 21:53:16 +0100
Subject: [PATCH] FindGit: Document Git_FOUND, unset internal var

* Git is called Git, not git.
* FindGit sets Git_FOUND, too.
* Unset internal variable git_names
---
 Modules/FindGit.cmake | 17 +
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/Modules/FindGit.cmake b/Modules/FindGit.cmake
index 2c3e5fd..2b3a5d6 100644
--- a/Modules/FindGit.cmake
+++ b/Modules/FindGit.cmake
@@ -8,21 +8,21 @@
 #
 # ::
 #
-#GIT_EXECUTABLE - path to git command line client
-#GIT_FOUND - true if the command line client was found
-#GIT_VERSION_STRING - the version of git found (since CMake 2.8.8)
+#GIT_EXECUTABLE - path to Git command line client
+#Git_FOUND / GIT_FOUND - true if the Git command line client was found
+#GIT_VERSION_STRING - the version of Git found
 #
 # Example usage:
 #
 # ::
 #
 #find_package(Git)
-#if(GIT_FOUND)
-#  message("git found: ${GIT_EXECUTABLE}")
+#if(Git_FOUND)
+#  message("Git found: ${GIT_EXECUTABLE}")
 #endif()
 
 #=
-# Copyright 2010 Kitware, Inc.
+# Copyright 2016 Kitware, Inc.
 # Copyright 2012 Rolf Eike Beer 
 #
 # Distributed under the OSI-approved BSD License (the "License");
@@ -57,10 +57,11 @@ find_program(GIT_EXECUTABLE
   NAMES ${git_names}
   PATHS ${github_path} ${_git_sourcetree_path}
   PATH_SUFFIXES Git/cmd Git/bin
-  DOC "git command line client"
+  DOC "Git command line client"
   )
 mark_as_advanced(GIT_EXECUTABLE)
 
+unset(git_names)
 unset(_git_sourcetree_path)
 
 if(GIT_EXECUTABLE)
@@ -74,7 +75,7 @@ if(GIT_EXECUTABLE)
   unset(git_version)
 endif()
 
-# Handle the QUIETLY and REQUIRED arguments and set GIT_FOUND to TRUE if
+# Handle the QUIETLY and REQUIRED arguments and set Git_FOUND to TRUE if
 # all listed variables are TRUE
 
 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-- 
2.6.2

-- 

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 various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers