Re: [CMake] add_compile_options query

2016-08-15 Thread Alexander Biddulph
I have tried specifying the parameters with both single and double quotes, both options raise errors on the command line. With no quotes: FAILED: /usr/bin/gcc -march=broadwell -mtune=broadwell -m64 -mabm -madx -maes -mavx -mavx2 -mbmi -mbmi2 -mcx16 -mf16c -mfma -mfsgsbase -mfxsr -mlzcnt -mmm

[CMake] Visual Studio - Change 'Character Set' property

2016-08-15 Thread Cosmin Dorcu via CMake
Hello, I am using CMake to build VTK for windows (specifically with Visual Studio 2015). My goal is to integrate VTK into an existing MFC C++ app, so I am interested in building and using the MFC module. That module is created by default with the CS (Character Set) flag set to "MBCS", and my pr

Re: [CMake] Private dependencies of static libraries exported as targets

2016-08-15 Thread Ivan Shapovalov
On 2016-08-15 at 21:46 -0400, Guillaume Dumont wrote: > As far as I know the PRIVATE > keyword > should have no effect on transitive linking when foo is static and we > call: > > target_link_libraries(foo PRIVATE bar) > > Hope this helps. Wow. I did not know that. Should've tested on sample proj

Re: [CMake] Private dependencies of static libraries exported as targets

2016-08-15 Thread Guillaume Dumont
If you export you targets using install(EXPORT ...) then the foo static library should contain a dependency to bar in its INTERFACE_LINK libraries. If bar is an imported target your config file should use find_dependency so that the bar imported target is resolved by consuming CMake based package

[CMake] Private dependencies of static libraries exported as targets

2016-08-15 Thread Ivan Shapovalov
Hello, So I'm trying to learn how to do CMake in a modern way. If I understand correctly, the "modern way" is to use IMPORTED targets. Preamble I have a project which builds a library `foo`. This library can be built as static or shared, depending on value of BUILD_SHARED_LIBS. My CMake

Re: [CMake] Bash on ubuntu on windows as target

2016-08-15 Thread Gilles Khouzam via CMake
That’s an interesting idea, I’m not sure why cmd is failing to invoke bash properly, but I will try and figure it out. Also, for addressing invoking bash.exe without copying it to SysWow64, you can reference it by C:\Windows\Sysnative\bash.exe from a 32-bit process. It still doesn’t make the t

Re: [CMake] [Visual Studio] Universal Windows Platform projects

2016-08-15 Thread Gilles Khouzam via CMake
Hi Adam, Nagy-Egri I’ve written most of the code to support Windows Universal Apps and would be happy to help you get this working. We have some very prominent customers who are using this functionality to publish their apps and games to the Windows Store. The support is not a pilot project and

[CMake] dependencies between external projects (not DEPENDS)

2016-08-15 Thread Neil Carlson
I'm struggling with how to handle dependencies between external projects in a superbuild. The issue is different than simply ensuring that one gets built before another using the DEPENDS keyword -- that's trivial. Suppose I have two external libraries A and B, where B depends on A. It is not alw