Re: [CMake] ninja under windows

2015-08-03 Thread Miller, Frank
I suspect that ninja thinks its on a posix system because you compiled 
it in cygwin. Try building it in a windows "terminal". I routinely use 
cmake and ninja on windows with the msvc toolchain and it works great 
but I use msys instead of cygwin.


Hopefully that helps you.

Frank

On 8/3/2015 12:22 PM, Gonzalo Garramuño wrote:

I compiled Ninja on cygwin from git.  That now works fine it seems.
I am trying to compile for msvc.  However, when cmake runs, I get:

[1/123] Building CXX object 
'libACESclip\CMakeFiles\ACESclip.dir\src\ACESclipWriter.cpp.obj'ninja: 
fatal: unknown deps type 'msvc'


$ ninja --version
1.6.0.git

Is compiling under the microsoft compiler not an option for ninja 
files ( I can compile with NMake Makefiles just fine in the same 
project ).


--

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] ARGVx "inherited" by sub-functions?

2015-08-03 Thread David Cole via CMake
You could argue bug or feature depending on your point of view. (I'd lean
toward bug, as it is rather unexpected...) However, it has been that way
for quite some time, (ever since function was added?), so it may require a
new policy to fix, since some function calls from inside functions may be
accidentally depending on the current behavior.


D


On Monday, August 3, 2015, Paul Smith  wrote:

> Is this a known thing, or a bug (I'm using cmake 3.1.0):
>
> I create this CMakeLists.txt:
>
>   cmake_minimum_required(VERSION 3.1.0)
>   project(ArgTest)
>
>   function(FOO one two)
> message(STATUS "extra args are ${ARGN}")
> message(STATUS "third arg is ${ARGV2}")
>   endfunction()
>
>   function(BAR one)
> FOO(${one} TWO)
> message(STATUS "do something with ${ARGN}")
>   endfunction()
>
>   BAR(ONE N1 N2 N3 N4)
>
> Note how I invoke BAR() with 5 arguments, but BAR invokes FOO with only
> two arguments.  I would expect that the third argument ${ARGV3} would be
> empty in function FOO.
>
> However, when I run cmake on this file it shows:
>
>   -- extra args are
>   -- third arg is N2
>   -- do something with N1;N2;N3;N4
>
> So the ARGN for function FOO is correct (nothing there) but FOO has
> "inherited" the extra ARGVx arguments beyond the first two, that I
> passed to function BAR!
>
> That's rather unexpected.  Bug or feature?
>
> --
>
> 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] ARGVx "inherited" by sub-functions?

2015-08-03 Thread Paul Smith
Is this a known thing, or a bug (I'm using cmake 3.1.0):

I create this CMakeLists.txt:

  cmake_minimum_required(VERSION 3.1.0)
  project(ArgTest)

  function(FOO one two)
message(STATUS "extra args are ${ARGN}")
message(STATUS "third arg is ${ARGV2}")
  endfunction()

  function(BAR one)
FOO(${one} TWO)
message(STATUS "do something with ${ARGN}")
  endfunction()

  BAR(ONE N1 N2 N3 N4)

Note how I invoke BAR() with 5 arguments, but BAR invokes FOO with only
two arguments.  I would expect that the third argument ${ARGV3} would be
empty in function FOO.

However, when I run cmake on this file it shows:

  -- extra args are
  -- third arg is N2
  -- do something with N1;N2;N3;N4

So the ARGN for function FOO is correct (nothing there) but FOO has
"inherited" the extra ARGVx arguments beyond the first two, that I
passed to function BAR!

That's rather unexpected.  Bug or feature?

-- 

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] ninja under windows

2015-08-03 Thread Gonzalo Garramuño

I compiled Ninja on cygwin from git.  That now works fine it seems.
I am trying to compile for msvc.  However, when cmake runs, I get:

[1/123] Building CXX object 
'libACESclip\CMakeFiles\ACESclip.dir\src\ACESclipWriter.cpp.obj'ninja: 
fatal: unknown deps type 'msvc'


$ ninja --version
1.6.0.git

Is compiling under the microsoft compiler not an option for ninja files 
( I can compile with NMake Makefiles just fine in the same project ).

--

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] CDash problems

2015-08-03 Thread David Cole via CMake
OK, I finally have a build of boost I can rely on which enables me to
try this out for you again.

Using the following source tree, I am able to get a successful build &
test of Safe Numerics, other than a couple of warnings, and it
actually submits to the CDash dashboard, no problem.


Source tree:

davidcole@TRIVET /c/dev/repos/safe_numerics (master)
$ git log -1
commit 569dc083c96845f06c5bf7a9d9d6756fd45d43bd
Author: Robert Ramey 
Date:   Sun Feb 1 21:14:12 2015 -0800

updated html documentation


Script used to build and submit dashboard (w/ CMake 3.3.0, ninja, MS
compiler from Visual Studio 2013, and a boost install with "system"
layout):

@rem Windows cmd script "build-SafeNumerics.cmd"
setlocal

set build_dir=%~n0
rmdir /q /s "%build_dir%"
mkdir "%build_dir%"

pushd "%build_dir%"
cmake ^
  -DBOOST_ROOT=C:\dev\NSB\x86\Release\boost ^
  -DCMAKE_BUILD_TYPE=Release ^
  -G Ninja C:\dev\repos\safe_numerics\CMake
ninja Experimental
popd

endlocal


Results:

http://my.cdash.org/buildSummary.php?buildid=803237


When I update to most recent master (source at commit 78111d12), it
still submits, but there are build errors in it:

http://my.cdash.org/buildSummary.php?buildid=803238


The CMake/CDash stuff looks reasonable from my perspective. I haven't
dug into all the details or anything, but it basically works, provided
you have a boost install to point it to. I have no problems at all
submitting dashboards for this project. If you want, I actually have a
machine at work that is already submitting some open source dashboards
-- if you'd like, I can add a Nightly run for Safe Numerics in this
Windows/VS2013 environment since it is small and quick to run.


HTH,
David C.


On Thu, Jun 25, 2015 at 12:16 PM, David Cole  wrote:
> I cloned your project [Safe
> Numerics](https://github.com/robertramey/safe_numerics) to try to help
> you out by attempting to reproduce this problem.
>
> I see the most recent activity is in the "policies" branch, but I
> don't see anything in the whole repo, in either 'master' or 'policies'
> branches that refer to how to build it via CMake, or how to attempt to
> submit a CDash build...
>
> I browsed through the html docs and did a 'git grep -i experimental'
> to no avail.
>
> Do you have build instructions? Should I just configure using the
> "CMake/CMakeLists.txt" file and then try to build the Experimental
> target? Will it build ok on Windows with VS 2013, or Ninja plus that
> compiler?
>
>
> Thx,
> David C.
>
>
> On Thu, Jun 25, 2015 at 10:44 AM, Robert Ramey  wrote:
>> I set up a project on the cdash.org website.
>>
>> When I invoke the "experimental" target it runs the tests and uploads the
>> results to cdash.org.  So far so good. In my github project and
>> documentation I've encouraged uses of this project to use CMake to build it
>> and test it and run the "experimental" target so that their test results
>> will also appear on the cdash dashboard.  But when someone other than myself
>> tries to do this, I get an emal from ad...@cdhash.org which says:
>>
>> Object: Cannot create handler based on XML content
>> An XML submission from 42.156.137.83 to the project Safe Numerics cannot be
>> parsed. The content of the file is as follow:
>>
>> -CDash on my.cdash.org
>>
>> What do I have to do to find out the problem and fix this?
>>
>> The project is "Safe Numerics"
>>
>> http://my.cdash.org/index.php?project=Safe+Numerics
>>
>>
>> Robert Ramey
>>
>> --
>>
>> 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] ZERO_CHECK hangs for a MS Visual Studio 2010 project on Windows7

2015-08-03 Thread Tadeusz Andrzej Kadłubowski
Hello,

I have a piece of C++ and Fortran software that I'm porting to the CMake
build system. On my TeamCity continuous integration server I observe a
weird behaviour: whenever I modify a CMakeLists.txt in a way that might
mean ZERO_CHECK has something to update, building the ZERO_CHECK hangs
until it gets killed off by the CI server job scheduler some 6 hours later.
The project in question is definitely not big enough to make 6h of
ZERO_CHECK sound reasonable. Besides, when I restart the build job after it
gets killed, the second build works ok: it completes ZERO_CHECK promptly,
and carries on with its regular job of compiling, linking etc.etc.

Log sample:

[13:23:52][Step 4/4]
[13:23:52][Step 4/4] Microsoft (R) Visual Studio Version 10.0.40219.1.
[13:23:52][Step 4/4] Copyright (C) Microsoft Corp. All rights reserved.
[13:23:52][Step 4/4] 1>-- Build started: Project: ZERO_CHECK,
Configuration: RelWithDebInfo x64 --
[13:23:56][Step 4/4] 1>Build started 31.07.2015 13:23:54.

(it looks the same way even when I enable detailed logging in MSBuild)

This behavior seems to be 100% reproducible, and doing any trivial `echo
"#FOO!" >> CMakeLists.txt` dummy commit is enough to trigger it.

The same behavior seems to happen both when I run the build directly from
devenv.com and via IncrediBuild distributed build thingy.

Has any of you seen a ZERO_CHECK build that hangs in VisualStudio 2010? Any
ideas about how and why it might happen?

Is there any way to see some verbose logs of what was it that the
ZERO_CHECK build wanted to accomplish when it hanged? I tried looking
around with procmon, but I'm not very proficient with this tool, and didn't
see anything obvious.

Hoping to hear from you soon,
-- 
Tadeusz Andrzej Kadłubowski
-- 

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