Re: [CMake] CMAKE_INSTALL_PREFIX problem

2014-09-23 Thread Petr Kmoch
I don't know why @ was inserted, but here's why it overrides the absolute
path: because it has no special meaning. The path then becomes "@/sbin",
which is not an absolute path (doesn't start with '/'), so the install
prefix is prepended normally. Bear in mind that Unix directory and file
names can contain any characters except '/' and NUL.

About variable substitution:

${var} is the normal way to expand variables.

@var@ is primarily intended for use with configure_file(). I believe it
works during normal CMake runs as well, but don't use it like that, it will
only add confusion.

Petr

P.S. Please keep the list in copy when replying.

On Wed, Sep 24, 2014 at 8:45 AM, Jeremy Ardley 
wrote:

>  It was
>
> set (BUILD_BIN /sbin)
>
> Removing that fixed the problem. Thanks!
>
> Curious why my IDE inserted the '@' (kdevelop 3) And more so why it
> overrides the absolute path?
>
> I need to discover more about value substitution :=(
>
> @somekey@ vs ${somekey}
>
>
> On 24/09/14 14:39, Petr Kmoch wrote:
>
>  Hi Jeremy.
>
>  Does ${BUILD_BIN} perhaps start with a slash? If so, it would be
> interpreted as an absolute path, which of course ignores
> CMAKE_INSTALL_PREFIX.
>
> Petr
>
> On Wed, Sep 24, 2014 at 7:58 AM, Jeremy Ardley 
> wrote:
>
>>  I am using cmake 2.8.9 on debian wheezy. I'm fairly new to using cmake.
>>
>> My CMakelists.txt file starts with
>>
>> cmake_minimum_required(VERSION 2.6)
>> SET(CMAKE_INSTALL_PREFIX /home/jeremy/Projects/local/)
>> project(myproject)
>>
>> 
>>
>> Finishing with
>>
>> INSTALL ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/@APPLICATION_NAME@ 
>> DESTINATION @${BUILD_BIN} )
>>
>> which installs in my target directory, but under a tree prefixed by the
>> '@' character. i.e. /home/jeremy/Projects/local/@/sbin and equivalent.
>>
>> I'm guessing that this is a result of the fragment
>>
>> @${BUILD_BIN}
>>
>> The problem is that if I remove the '@' the INSTALL ignores the
>> CMAKE_INSTALL_PREFIX
>>
>> I've experimented with different variations on the INSTALL lines to no
>> success.
>>
>> Any advice on how to get my INSTALLS ending up in
>> /home/jeremy/Projects/local/sbin and equivalent?
>>
>> Thanks
>>
>> --
>>  Jeremy Ardley
>>
>> --
>>
>> 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
>>
>
>
>
> --
>  Jeremy Ardley
>
-- 

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_INSTALL_PREFIX problem

2014-09-23 Thread Petr Kmoch
Hi Jeremy.

Does ${BUILD_BIN} perhaps start with a slash? If so, it would be
interpreted as an absolute path, which of course ignores
CMAKE_INSTALL_PREFIX.

Petr

On Wed, Sep 24, 2014 at 7:58 AM, Jeremy Ardley 
wrote:

>  I am using cmake 2.8.9 on debian wheezy. I'm fairly new to using cmake.
>
> My CMakelists.txt file starts with
>
> cmake_minimum_required(VERSION 2.6)
> SET(CMAKE_INSTALL_PREFIX /home/jeremy/Projects/local/)
> project(myproject)
>
> 
>
> Finishing with
>
> INSTALL ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/@APPLICATION_NAME@ DESTINATION 
> @${BUILD_BIN} )
>
> which installs in my target directory, but under a tree prefixed by the
> '@' character. i.e. /home/jeremy/Projects/local/@/sbin and equivalent.
>
> I'm guessing that this is a result of the fragment
>
> @${BUILD_BIN}
>
> The problem is that if I remove the '@' the INSTALL ignores the
> CMAKE_INSTALL_PREFIX
>
> I've experimented with different variations on the INSTALL lines to no
> success.
>
> Any advice on how to get my INSTALLS ending up in
> /home/jeremy/Projects/local/sbin and equivalent?
>
> Thanks
>
> --
>  Jeremy Ardley
>
> --
>
> 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] CMAKE_INSTALL_PREFIX problem

2014-09-23 Thread Jeremy Ardley
I am using cmake 2.8.9 on debian wheezy. I'm fairly new to using cmake.

My CMakelists.txt file starts with

cmake_minimum_required(VERSION 2.6)
SET(CMAKE_INSTALL_PREFIX /home/jeremy/Projects/local/)
project(myproject)



Finishing with

INSTALL ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/@APPLICATION_NAME@ DESTINATION 
@${BUILD_BIN} )

which installs in my target directory, but under a tree prefixed by the
'@' character. i.e. /home/jeremy/Projects/local/@/sbin and equivalent.

I'm guessing that this is a result of the fragment

@${BUILD_BIN}

The problem is that if I remove the '@' the INSTALL ignores the
CMAKE_INSTALL_PREFIX

I've experimented with different variations on the INSTALL lines to no
success.

Any advice on how to get my INSTALLS ending up in
/home/jeremy/Projects/local/sbin and equivalent?

Thanks

-- 
Jeremy Ardley
-- 

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] get windows import lib location

2014-09-23 Thread j s

What is the proper way to get the import lib location for a windows dll?

I've used
GET_TARGET_PROPERTY(FOOPATH foo LOCATION)

to get the location of the foo.dll, but I also need the path to foo.lib.

Thanks,

--

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] Object Library into Shared library

2014-09-23 Thread j s

Hello,

According to:
http://www.cmake.org/Wiki/CMake/Tutorials/Object_Library

it is possible to compile OBJECT libraries for use in other targets, as 
of CMake 2.8.8.  Unfortunately it doesn't document how to make the 
OBJECT position independent.  Is the proper cross platform method to set 
the POSITION_INDEPENDENT_CODE property ON on the OBJECT library?  What 
is the minimum version required to set the POSITION_INDEPENDENT_CODE 
property on an OBJECT library.


Thanks,

--

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] VTK compiling problem with CMake

2014-09-23 Thread lanhz
Thank everyone! I installed VS SP1 and it work! !



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/VTK-compiling-problem-with-CMake-tp7588569p7588577.html
Sent from the CMake mailing list archive at Nabble.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


Re: [CMake] CPack WIX examples

2014-09-23 Thread jmerkow
Thanks a lot for your help! Those examples are excellent.

I have a follow up questions for creating the installer, though.  We have a
number of registry entries that need to be created for the software to run
in 'release mode'.  In our current system we add registry entries into the
wxs, but I don't see a way to do that with cmake/cpack easily.
We add a few lines, such as:

We use these registry entries as anchors for the locations for software
assets.

It seems the best way to do this would be to override the template with a
number of configurable entries?
So I could add something like (there's about 15 of em):


I wanted to check to see if there was a way to handle this directly from
CMake.

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561p7588576.html
Sent from the CMake mailing list archive at Nabble.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


[CMake] Fwd: Re: ExternalProject_Add dependency graph (dot/graphviz?) ?

2014-09-23 Thread Micha Hergarden

Hello Nicholas,

I see what you mean. I have generated a build.ninja for an external
project depeding on an external project, and the dotfile does show the
dependency. The problem seems to be that the view is somewhat cluttered
by the intermediate dependencies on custom_target etc. I guess it
depends on the level of detail you need: you only want to see high level
dependencies, but a developer that wants to know exactly what
dependencies are generated will want to see the custom_target
dependencies as well. I don't see a quick solution to this. I guess not
generating the intermediates (if this is possible at all) would mean
adapt the ninja generator; not showing the intermediates would mean
adapt ninja? I'm not familiar enough with either to help you I'm afraid.

Maybe one of the ninja generator maintainers can help you?

With kind regards,
Micha Hergarden

On 09/23/2014 09:09 PM, Nicholas Yue wrote:
> Hi Micha,
>
>   My interest is in "show me the dependencies the external project
> depends on"
>
>   I am considering migrating an in-house build system to build
> opensource projects to using CMake.
>   As there are many external packages and versions (close to 100), I'd
> like to be able to visualize their dependency.
>   Once the new system based on CMake is working, I need to build them
> for different target OS to assist in migration from current OS to
> future OS version.
>
>   e.g.
>
> ExternalProject_Add ( python264_static
> 
>   )
>
> ExternalProject_Add ( python264
>   DEPENDS
>   python264_static
> 
>   )
>
> ExternalProject_Add ( boost_1_47_0
>   DEPENDS
>   python264
> 
>   )
>
> ExternalProject_Add ( alembic_1_5_5
>   DEPENDS
>   python264 boost_1_47_0
> 
>   )
>
> Cheers
>
>
> On 23 September 2014 11:58, Micha Hergarden  > wrote:
>
> On 09/22/2014 04:59 PM, Nicholas Yue wrote:
> > Hi,
> >
> > CMake has graphviz output capability for dependency within a
> project.
> >
> > Is there a way to graph dependency at the ExternalProject_Add()
> > level ?
> >
> > Cheers
> >
> Hello Nicholas,
>
> Can you clarify your question a bit more? Do you mean 'show me the
> external projects a target in my project depends on' or do you mean
> 'show me the dependencies the external project depens on', or
> something
> different altogether?
>
> With kind regards,
> Micha Hergarden
>
>
>
>
> -- 
> Nicholas Yue
> Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5
> Custom Dev - C++ porting, OSX, Linux, Windows
> http://au.linkedin.com/in/nicholasyue
> https://vimeo.com/channels/naiadtools





signature.asc
Description: OpenPGP digital signature
-- 

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] ExternalProject_Add dependency graph (dot/graphviz?) ?

2014-09-23 Thread Nicholas Yue
Hi Micha,

  My interest is in "show me the dependencies the external project depends
on"

  I am considering migrating an in-house build system to build opensource
projects to using CMake.
  As there are many external packages and versions (close to 100), I'd like
to be able to visualize their dependency.
  Once the new system based on CMake is working, I need to build them for
different target OS to assist in migration from current OS to future OS
version.

  e.g.

ExternalProject_Add ( python264_static

  )

ExternalProject_Add ( python264
  DEPENDS
  python264_static

  )

ExternalProject_Add ( boost_1_47_0
  DEPENDS
  python264

  )

ExternalProject_Add ( alembic_1_5_5
  DEPENDS
  python264 boost_1_47_0

  )

Cheers


On 23 September 2014 11:58, Micha Hergarden 
wrote:

> On 09/22/2014 04:59 PM, Nicholas Yue wrote:
> > Hi,
> >
> > CMake has graphviz output capability for dependency within a project.
> >
> > Is there a way to graph dependency at the ExternalProject_Add()
> > level ?
> >
> > Cheers
> >
> Hello Nicholas,
>
> Can you clarify your question a bit more? Do you mean 'show me the
> external projects a target in my project depends on' or do you mean
> 'show me the dependencies the external project depens on', or something
> different altogether?
>
> With kind regards,
> Micha Hergarden
>
>


-- 
Nicholas Yue
Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
http://au.linkedin.com/in/nicholasyue
https://vimeo.com/channels/naiadtools
-- 

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] ExternalProject_Add dependency graph (dot/graphviz?) ?

2014-09-23 Thread Micha Hergarden
On 09/22/2014 04:59 PM, Nicholas Yue wrote:
> Hi,
>
> CMake has graphviz output capability for dependency within a project.
>
> Is there a way to graph dependency at the ExternalProject_Add()
> level ?
>
> Cheers
>
Hello Nicholas,

Can you clarify your question a bit more? Do you mean 'show me the
external projects a target in my project depends on' or do you mean
'show me the dependencies the external project depens on', or something
different altogether?

With kind regards,
Micha Hergarden



signature.asc
Description: OpenPGP digital signature
-- 

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] VTK compiling problem with CMake

2014-09-23 Thread Daniel Schepler
1>LINK : fatal error LNK1123: failure during conversion to COFF: file 
invalid or corrupt

When we've seen this, it's usually been due to .NET being upgraded to 4.5, 
which is incompatible with the tools in the original version of Visual Studio 
2010.  Upgrading Visual Studio 2010 to SP1 usually resolves the issue.
-- 
Daniel Schepler

-- 

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] VTK compiling problem with CMake

2014-09-23 Thread Bill Hoffman

On 9/23/2014 1:16 PM, John Drescher wrote:

Did you try runing cmake-gui from a VisualStudio 2010 x64 command prompt?

John


This has to do with the version of cvtres.exe that you have installed on 
the machine:


http://stackoverflow.com/questions/10888391/error-link-fatal-error-lnk1123-failure-during-conversion-to-coff-file-inval

Thing to google for: "
1>LINK : fatal error LNK1123: failure during conversion to COFF: file
invalid or corrupt"



-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


Re: [CMake] VTK compiling problem with CMake

2014-09-23 Thread John Drescher
Did you try runing cmake-gui from a VisualStudio 2010 x64 command prompt?

John

On Tue, Sep 23, 2014 at 1:08 PM, lanhz  wrote:
> Hi,
>
> I'm trying use CMake to build VTK, but got error as below. I searched the
> internet and tried many ways suggested, but they didn't work. The OS is
> Windows 7 with Visual Studio 2010 Pro (up to date). I don't know how to
> solve. I'll appreciate your help.
>
> Error info from CMake-gui
> -
> The C compiler identification is MSVC 16.0.30319.1
> The CXX compiler identification is MSVC 16.0.30319.1
> Check for working C compiler using: Visual Studio 10 Win64
> Check for working C compiler using: Visual Studio 10 Win64 -- broken
> CMake Error at C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
> The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
> 10.0/VC/bin/x86_amd64/cl.exe" is not able to compile a simple test program.
>
> It fails with the following output:
>
> Change Dir: C:/Code/VTK-bin/CMakeFiles/CMakeTmp
>
> Run Build Command:C:\PROGRA~2\MICROS~2.0\Common7\IDE\devenv.com
> CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec696148031
>
>
> Microsoft (R) Visual Studio Version 10.0.30319.1.
>
>
> Copyright (C) Microsoft Corp. All rights reserved.
>
>
> 1>-- Build started: Project: cmTryCompileExec696148031, Configuration:
> Debug x64 --
>
>
> 1>Build started 9/10/2014 1:31:13 PM.
>
>
> 1>PrepareForBuild:
>
>
> 1> Creating directory "C:\Code\VTK-bin\CMakeFiles\CMakeTmp\Debug\".
>
>
> 1>InitializeBuildStatus:
>
>
> 1> Creating
> "cmTryCompileExec696148031.dir\Debug\cmTryCompileExec696148031.unsuccessfulbuild"
> because "AlwaysCreate" was specified.
>
>
> 1>ClCompile:
>
>
> 1> Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64
>
>
> 1> Copyright (C) Microsoft Corporation. All rights reserved.
>
>
> 1>
>
>
> 1> cl /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _DEBUG /D
> "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise
> /Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec696148031.dir\Debug\\"
> /Fd"cmTryCompileExec696148031.dir\Debug\vc100.pdb" /Gd /TC
> /errorReport:prompt testCCompiler.c
>
>
> 1>
>
>
> 1> testCCompiler.c
>
>
> 1>LINK : fatal error LNK1123: failure during conversion to COFF: file
> invalid or corrupt
>
>
> 1>
>
>
> 1>Build FAILED.
>
>
> 1>
>
>
> 1>Time Elapsed 00:00:00.26
>
>
> == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
> ==
>
>
> CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
> CMakeLists.txt:28 (project)
> Configuring incomplete, errors occurred!
> See also "C:/Code/VTK-bin/CMakeFiles/CMakeOutput.log".
> See also "C:/Code/VTK-bin/CMakeFiles/CMakeError.log".
>
>
> Best
> Lan
>
>
>
> --
> View this message in context: 
> http://cmake.3232098.n2.nabble.com/VTK-compiling-problem-with-CMake-tp7588569.html
> Sent from the CMake mailing list archive at Nabble.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



-- 
John M. Drescher
-- 

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] VTK compiling problem with CMake

2014-09-23 Thread lanhz
Hi, 

I'm trying use CMake to build VTK, but got error as below. I searched the
internet and tried many ways suggested, but they didn't work. The OS is
Windows 7 with Visual Studio 2010 Pro (up to date). I don't know how to
solve. I'll appreciate your help.

Error info from CMake-gui 
- 
The C compiler identification is MSVC 16.0.30319.1 
The CXX compiler identification is MSVC 16.0.30319.1 
Check for working C compiler using: Visual Studio 10 Win64 
Check for working C compiler using: Visual Studio 10 Win64 -- broken 
CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message): 
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio 
10.0/VC/bin/x86_amd64/cl.exe" is not able to compile a simple test program. 

It fails with the following output: 

Change Dir: C:/Code/VTK-bin/CMakeFiles/CMakeTmp 

Run Build Command:C:\PROGRA~2\MICROS~2.0\Common7\IDE\devenv.com 
CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec696148031 


Microsoft (R) Visual Studio Version 10.0.30319.1. 


Copyright (C) Microsoft Corp. All rights reserved. 


1>-- Build started: Project: cmTryCompileExec696148031, Configuration: 
Debug x64 -- 


1>Build started 9/10/2014 1:31:13 PM. 


1>PrepareForBuild: 


1> Creating directory "C:\Code\VTK-bin\CMakeFiles\CMakeTmp\Debug\". 


1>InitializeBuildStatus: 


1> Creating 
"cmTryCompileExec696148031.dir\Debug\cmTryCompileExec696148031.unsuccessfulbuild"
 
because "AlwaysCreate" was specified. 


1>ClCompile: 


1> Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64 


1> Copyright (C) Microsoft Corporation. All rights reserved. 


1> 


1> cl /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _DEBUG /D 
"CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise 
/Zc:wchar_t /Zc:forScope /Fo"cmTryCompileExec696148031.dir\Debug\\" 
/Fd"cmTryCompileExec696148031.dir\Debug\vc100.pdb" /Gd /TC 
/errorReport:prompt testCCompiler.c 


1> 


1> testCCompiler.c 


1>LINK : fatal error LNK1123: failure during conversion to COFF: file 
invalid or corrupt 


1> 


1>Build FAILED. 


1> 


1>Time Elapsed 00:00:00.26 


== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped 
== 


CMake will not be able to correctly generate this project. 
Call Stack (most recent call first): 
CMakeLists.txt:28 (project) 
Configuring incomplete, errors occurred! 
See also "C:/Code/VTK-bin/CMakeFiles/CMakeOutput.log". 
See also "C:/Code/VTK-bin/CMakeFiles/CMakeError.log". 


Best 
Lan



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/VTK-compiling-problem-with-CMake-tp7588569.html
Sent from the CMake mailing list archive at Nabble.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


[CMake] Abuse try_compile to get DLL dependencies for win32 NSIS packaging?

2014-09-23 Thread Richard Shaw
Ok, this may or may not work but I figured it was worth a try.

I'm running out of motivation to get a good method to determine which DLL's
I need to package with the install(SCRIPT...) / GetPrerequisites mess.

My current approach is to attempt to use try_compile to build a minimal
program I can link against and use GetPrerequisites with it.

 I crated an minimal do nothing c++ program and used the full linker flags
for the main program but it appears that the "-Wl,--no-whole-archive" is
"helping" me by not linking with things I don't need:

$ objdump -x getdeps.exe | grep "DLL Name:"
DLL Name: KERNEL32.dll
DLL Name: msvcrt.dll

Any ideas?

Thanks,
Richard
-- 

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] Problems resolving PTHREAD_* symbols.

2014-09-23 Thread Robert Maynard
To get information on why a try_compile is failing you can use the
--debug-trycompile option which will stop CMake from deleting the
try_compile build tree code. Now this flag is only useful on a single
try_compile at a time.

On Tue, Sep 23, 2014 at 10:50 AM, Rick McGuire  wrote:
> This is still driving us crazy.  Digging a little deeper into this, the
> symbols we need are defined as enums on Linux, which explains why
> check_symbol_exists() does not work there.  The OSX pthread.h header uses
> defines, but for some reason, the check_c_source_compiles method is still
> failing.  We've updated our script to use
>
> check_c_source_compiles("#include 
>  int main(int arg, char **argv) {
>  int tryme;
>  tryme = PTHREAD_MUTEX_ERRORCHECK;
>  return 0;}"
> HAVE_PTHREAD_MUTEX_ERRORCHECK)
> if (NOT DEFINED HAVE_PTHREAD_MUTEX_ERRORCHECK)
>check_symbol_exists(PTHREAD_MUTEX_ERRORCHECK "pthread.h"
> HAVE_PTHREAD_MUTEX_ERRORCHECK)
> endif ()
>
>
> to try both methods, but this is still failing on the Mac and a couple of
> the Linux versions we build for.
>
>
> This is driving us nuts, since we don't understand why the
> check_c_source_compiler check is not working.  Is there some way we can get
> debug information about why the compile fails?  That might give us some
> clues.
>
>
> Rick
>
>
> On Mon, Sep 22, 2014 at 12:06 PM, Rick McGuire 
> wrote:
>>
>> We have some semaphore code that has conditional compilation based on
>> #defines in config.h.  We're having problems with resolving the various
>> PTHREAD_* symbols to get the correct values in config.h.  Our first attempt
>> at this (done on Linux) used
>>
>> check_symbol_exists(PTHREAD_MUTEX_RECURSIVE "pthread.h"
>> HAVE_PTHREAD_MUTEX_RECURSIVE)
>>
>>
>> This did not pick the symbol up correctly.  Eventually, we got things to
>> work by using
>>
>>
>> check_c_source_compiles("#include 
>>  int main(int arg, char **argv) {
>>  int tryme;
>>  tryme = PTHREAD_MUTEX_RECURSIVE;
>>  return 0;}"
>> HAVE_PTHREAD_MUTEX_RECURSIVE)
>>
>> and got everything to build cleanly.  Over the weekend, we tried building
>> on OSX for the first time, and once again, we were not resolving that these
>> symbols existed.  What are we missing here?  Is there some technique we
>> should be using that will work across the various platforms?
>>
>>
>> Rick
>>
>>
>
>
> --
>
> 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] How to get custom commands to build in parallel ?

2014-09-23 Thread Robert Maynard
If you are using VS2013 you should look at the /maxcpucount flag which
allows msbuild to build multiple projects at the same time. You will
have to manually balance /MP and /maxcpucount as they cause a P*C
number of processes to execute.

On Tue, Sep 23, 2014 at 11:05 AM, Glenn Coombs  wrote:
> I have the following code in one of my CMakeLists.txt files:
>
> set(feature_files_h)
> set(feature_files_cpp)
>
> macro(create_feature_files NAME)
> add_custom_command(
> OUTPUT ${FEATURES_OUTPUT_DIR}/${NAME}.cpp
> ${FEATURES_OUTPUT_DIR}/${NAME}.h
> DEPENDS ${FEATURES_INPUT_DIR}/${NAME}.txt
> WORKING_DIRECTORY ${SIM_ROOT}/tools/features
> COMMAND perl ${FEATURES_PERL_PATH} "-s${FEATURES_INPUT_DIR}"
> "-d${FEATURES_OUTPUT_DIR}" "-f${NAME}"
> )
> list(APPEND feature_files_h   ${FEATURES_OUTPUT_DIR}/${NAME}.h)
> list(APPEND feature_files_cpp ${FEATURES_OUTPUT_DIR}/${NAME}.cpp)
> endmacro()
>
> create_feature_files(example_features)
> create_feature_files(fme_core_features)
> create_feature_files(fme_features)
> create_feature_files(front_end_features)
> create_feature_files(inloop_filter_features)
>
> add_library(${PROJECT_NAME} STATIC ${feature_files_cpp} ${feature_files_h}
> ${SIM_ROOT}/tools/features/cpp-code/cfeatures.cpp)
>
> which creates a library from an existing source file called cfeatures.cpp
> and from a bunch of auto-generated .cpp and .h files.  The whole thing works
> fine and runs the perl script to create each of the auto-generated files
> before creating the library.  The only problem I have with it is that it is
> quite slow and I would like to speed it up by having it run the perl
> commands to create the auto-generated files in parallel.  Currently, each of
> the auto-generated cpp files is generated sequentially, then they are all
> compiled in parallel and the library created in the final step.
>
> I'm using cmake 3.0.0 with Visual Studio 2013 Express Edition.  And I've
> added the /MP option so that Visual Studio will do parallel builds.  I've
> also set the "Projects and Solutions=>Build and Run=>maximum number of
> parallel project builds" option to 4.  This works well with all the normal
> cpp files in other projects and I easily see all 4 cpu cores maxxed out.
> But when building this project only 1 cpu core is used.
>
> Can anybody tell me how to change it so that the auto-geneated files are
> created in parallel as well ?
>
> --
> Glenn
>
>
> --
>
> 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] Ninja generator fail for QNX on Windows

2014-09-23 Thread Hendrik Sattler


On 23. September 2014 16:22:40 MESZ, Cristian Adam 
>>> QCC compiler generates for this project dependency files which look
>like:
>>>
>>> c:\projects\my_proj\include\/a.h \
>>> c:\projects\my_proj\src\/a.cpp \
>>> c:\projects\my_proj\other\..\/include/b.h \
>>> c:\projects\my_proj\other\..\/src/b.cpp \

To me it looks more like a bug in qcc.
Does qcc generates the same broken files when not used in context of CMake or 
ninja?
It should only use one kind of separator for directories.

HS

-- 

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] How to get custom commands to build in parallel ?

2014-09-23 Thread Glenn Coombs
I have the following code in one of my CMakeLists.txt files:

set(feature_files_h)
set(feature_files_cpp)

macro(create_feature_files NAME)
add_custom_command(
OUTPUT ${FEATURES_OUTPUT_DIR}/${NAME}.cpp
${FEATURES_OUTPUT_DIR}/${NAME}.h
DEPENDS ${FEATURES_INPUT_DIR}/${NAME}.txt
WORKING_DIRECTORY ${SIM_ROOT}/tools/features
COMMAND perl ${FEATURES_PERL_PATH} "-s${FEATURES_INPUT_DIR}"
"-d${FEATURES_OUTPUT_DIR}" "-f${NAME}"
)
list(APPEND feature_files_h   ${FEATURES_OUTPUT_DIR}/${NAME}.h)
list(APPEND feature_files_cpp ${FEATURES_OUTPUT_DIR}/${NAME}.cpp)
endmacro()

create_feature_files(example_features)
create_feature_files(fme_core_features)
create_feature_files(fme_features)
create_feature_files(front_end_features)
create_feature_files(inloop_filter_features)

add_library(${PROJECT_NAME} STATIC ${feature_files_cpp} ${feature_files_h}
${SIM_ROOT}/tools/features/cpp-code/cfeatures.cpp)

which creates a library from an existing source file called cfeatures.cpp
and from a bunch of auto-generated .cpp and .h files.  The whole thing
works fine and runs the perl script to create each of the auto-generated
files before creating the library.  The only problem I have with it is that
it is quite slow and I would like to speed it up by having it run the perl
commands to create the auto-generated files in parallel.  Currently, each
of the auto-generated cpp files is generated sequentially, then they are
all compiled in parallel and the library created in the final step.

I'm using cmake 3.0.0 with Visual Studio 2013 Express Edition.  And I've
added the /MP option so that Visual Studio will do parallel builds.  I've
also set the "Projects and Solutions=>Build and Run=>maximum number of
parallel project builds" option to 4.  This works well with all the normal
cpp files in other projects and I easily see all 4 cpu cores maxxed out.
But when building this project only 1 cpu core is used.

Can anybody tell me how to change it so that the auto-geneated files are
created in parallel as well ?

--
Glenn
-- 

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] Problems resolving PTHREAD_* symbols.

2014-09-23 Thread Rick McGuire
This is still driving us crazy.  Digging a little deeper into this, the
symbols we need are defined as enums on Linux, which explains why
check_symbol_exists() does not work there.  The OSX pthread.h header uses
defines, but for some reason, the check_c_source_compiles method is still
failing.  We've updated our script to use

check_c_source_compiles("#include 
 int main(int arg, char **argv) {
 int tryme;
 tryme = PTHREAD_MUTEX_ERRORCHECK;
 return 0;}"
HAVE_PTHREAD_MUTEX_ERRORCHECK)
if (NOT DEFINED HAVE_PTHREAD_MUTEX_ERRORCHECK)
   check_symbol_exists(PTHREAD_MUTEX_ERRORCHECK "pthread.h"
HAVE_PTHREAD_MUTEX_ERRORCHECK)
endif ()


to try both methods, but this is still failing on the Mac and a couple
of the Linux versions we build for.


This is driving us nuts, since we don't understand why the
check_c_source_compiler check is not working.  Is there some way we
can get debug information about why the compile fails?  That might
give us some clues.


Rick


On Mon, Sep 22, 2014 at 12:06 PM, Rick McGuire 
wrote:

> We have some semaphore code that has conditional compilation based on
> #defines in config.h.  We're having problems with resolving the various
> PTHREAD_* symbols to get the correct values in config.h.  Our first attempt
> at this (done on Linux) used
>
> check_symbol_exists(PTHREAD_MUTEX_RECURSIVE "pthread.h" 
> HAVE_PTHREAD_MUTEX_RECURSIVE)
>
>
> This did not pick the symbol up correctly.  Eventually, we got things to work 
> by using
>
>
> check_c_source_compiles("#include 
>  int main(int arg, char **argv) {
>  int tryme;
>  tryme = PTHREAD_MUTEX_RECURSIVE;
>  return 0;}"
> HAVE_PTHREAD_MUTEX_RECURSIVE)
>
> and got everything to build cleanly.  Over the weekend, we tried building on 
> OSX for the first time, and once again, we were not resolving that these 
> symbols existed.  What are we missing here?  Is there some technique we 
> should be using that will work across the various platforms?
>
>
> Rick
>
>
>
-- 

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] CPack WIX examples

2014-09-23 Thread Nils Gladitz

On 09/23/2014 04:34 PM, jmerkow wrote:

Hello

I am working on creating an msi installer using cpack with the WIX installer
(converting from old system).  Im having some trouble finding some good
resources to do this.
My project needs to set a number of registry entries. We have a few
components, and licenses that are installed along with our software. I also
don't completely understand the example for CPACK_WIX_PATCH_FILE in the
documentation for adding components, etc.
I thought it would be helpful to see some of this in action and I was hoping
someone could point me to an example or two of a project that uses CPack WIX
generators to get me going. I searched github and around the CMake website,
and couldn't find any projects that use WIX.


I've got some tiny example projects (actually manual test cases):
https://github.com/ngladitz/cmake-wix-testsuite

Each sub directory should contain a self contained project usually 
exercising one specific feature of the WIX generator.


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


[CMake] CPack WIX examples

2014-09-23 Thread jmerkow
Hello

I am working on creating an msi installer using cpack with the WIX installer
(converting from old system).  Im having some trouble finding some good
resources to do this. 
My project needs to set a number of registry entries. We have a few
components, and licenses that are installed along with our software. I also
don't completely understand the example for CPACK_WIX_PATCH_FILE in the
documentation for adding components, etc.
I thought it would be helpful to see some of this in action and I was hoping
someone could point me to an example or two of a project that uses CPack WIX
generators to get me going. I searched github and around the CMake website,
and couldn't find any projects that use WIX.

-Jameson



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561.html
Sent from the CMake mailing list archive at Nabble.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


Re: [CMake] Ninja generator fail for QNX on Windows

2014-09-23 Thread Cristian Adam
On 23 Sep 2014 15:27, "Bill Hoffman"  wrote:
>
>
> Seems that gmake supports that:
>
http://www.qnx.com/developers/docs/6.4.1/neutrino/prog/make_convent.html#Parallel
>

In theory it should work, but the mingw version they ship doesn't work.

I've upgraded to a version of make which does (one needs to pass
SHELL=cmd.exe as an additional parameter), but when you haven't changed
anything it still takes some time. This is where ninja comes into place.

>>
>> Found the problem though.
>>
>> QCC compiler generates for this project dependency files which look like:
>>
>> c:\projects\my_proj\include\/a.h \
>> c:\projects\my_proj\src\/a.cpp \
>> c:\projects\my_proj\other\..\/include/b.h \
>> c:\projects\my_proj\other\..\/src/b.cpp \
>>
>> The "\/" combination does not agree with ninja.
>>
> That would do it.   How are the depends being created?  Is it ninja or
CMake that is creating them on QNX?

CMake sets the right flags for qcc and qcc creates the dependency files.

Cheers,
Cristian.
-- 

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] Ninja generator fail for QNX on Windows

2014-09-23 Thread Bill Hoffman

On 9/23/2014 9:05 AM, Cristian Adam wrote:

On Mon, Sep 22, 2014 at 6:32 PM, Bill Hoffman mailto:bill.hoff...@kitware.com>> wrote:


Maybe if you looked at the very first older than in your output
instead of the dirty ones it might tell you what ninja thinks is out
of date. Could be some sort of path issue that has something to do
with the way the paths are constructed.  Again, without seeing the
details I can only guess.

Do makefiles work for you?  What if you try the "Unix Makefiles"
generator on the same machine does it have the same problem?

-Bill


Unix Makefiles work, but on the make provided by QNX doesn't support the
parallel -j flag.

Seems that gmake supports that:
http://www.qnx.com/developers/docs/6.4.1/neutrino/prog/make_convent.html#Parallel


Found the problem though.

QCC compiler generates for this project dependency files which look like:

c:\projects\my_proj\include\/a.h \
c:\projects\my_proj\src\/a.cpp \
c:\projects\my_proj\other\..\/include/b.h \
c:\projects\my_proj\other\..\/src/b.cpp \

The "\/" combination does not agree with ninja.

That would do it.   How are the depends being created?  Is it ninja or 
CMake that is creating them on QNX?



This looks like a ninja bug, I'll report it there.


Might be.

-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


Re: [CMake] Ninja generator fail for QNX on Windows

2014-09-23 Thread Cristian Adam
On Mon, Sep 22, 2014 at 6:32 PM, Bill Hoffman 
wrote:


> Maybe if you looked at the very first older than in your output instead of
> the dirty ones it might tell you what ninja thinks is out of date. Could be
> some sort of path issue that has something to do with the way the paths are
> constructed.  Again, without seeing the details I can only guess.
>
> Do makefiles work for you?  What if you try the "Unix Makefiles" generator
> on the same machine does it have the same problem?
>
> -Bill
>

Unix Makefiles work, but on the make provided by QNX doesn't support the
parallel -j flag.

Found the problem though.

QCC compiler generates for this project dependency files which look like:

c:\projects\my_proj\include\/a.h \
c:\projects\my_proj\src\/a.cpp \
c:\projects\my_proj\other\..\/include/b.h \
c:\projects\my_proj\other\..\/src/b.cpp \

The "\/" combination does not agree with ninja.

I've tried to hack disk_interface.cc:RealDiskInterface::Stat by removing
the "/" prefix.

  string dir = DirName(path);
>   string base(path.substr(dir.size() ? dir.size() + 1 : 0));
>
>   if (base[0] == '/' || base[0] == '\\')
>   {
> base.erase(0, 1);
>   }
>
>

But this fixes only the a.h and a.cpp case.

The other case with doesn't work though, since the path is no longer
present, Stat received only "include/b.h" and "src/b.cpp".

A workaround would be to search and replace all "\/" occurrences in
all dependency files.

This looks like a ninja bug, I'll report it there.

Thank you for the support.

Cheers,
Cristian.
-- 

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