Re: [CMake] Generator-independent incremental CMake run

2014-08-14 Thread David Cole via CMake

We have a fairly large project with about 400 targets.
  $ cmake %builddir%
  - takes about 5 minutes for a No-op

  $ cmake --build %builddir% --target ZERO_CHECK
  - takes 20 seconds for No-op


This is the problem.

cmake %builddir% should be as fast as possible for a no-op... If it's 
not, it would be good to solve the real underlying problem that causes 
it to take 5 minutes for nothing rather than write elaborate scripts 
to try to workaround it.


Is your project publicly available so CMake devs can try to figure out 
why it takes so long?


Or... can you produce a generated repro case that demonstrates a long 
no-op time?


There must be something in your project's CMake code that triggers the 
performance problem.


Does it still happen with the latest release (CMake 3.0.1)?


D

--

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 and install dir

2014-08-13 Thread David Cole via CMake
If x is a CMake-driven project, you'll also need to explicitly set 
CMAKE_INSTALL_PREFIX when configuring. If not, there's likely a 
--prefix arg for configuring... One of those also has to be set to 
install to a non-default location.


The PREFIX arg for ExternalProject is only used to organize the 
source/build/install directory values for the custom target. It's still 
up to you to configure and build it properly for a non-default install 
location.



HTH,
David C.

--

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 and install dir

2014-08-13 Thread David Cole via CMake

See, for example:

https://github.com/OpenChemistry/openchemistry/blob/master/CMakeLists.txt#L24

A common CMAKE_INSTALL_PREFIX is used for all OpenChemistry 
ExternalProject builds that are driven by 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] Cmake issue regarding conversion of existing Visual Studio .targets files to cmake

2014-08-12 Thread David Cole via CMake
From
http://www.cmake.org/cmake/help/v3.0/command/add_custom_command.html :

If COMMAND specifies an executable target (created by ADD_EXECUTABLE)
it will automatically be replaced by the location of the executable
created at build time. Additionally a target-level dependency will be
added so that the executable target will be built before any target
using this custom command. However this does NOT add a file-level
dependency that would cause the custom command to re-run whenever the
executable is recompiled.

So... if TestVersion.exe is created as a result of an
add_executable(TestVersion ... call, then you should be able to use

add_custom_command(
TARGET ${TARGETNAME}
POST_BUILD
COMMAND TestVersion \$(VersionPath)\
COMMENT Check if $(VersionPath) has version information...)

If you must pass the full path to TestVersion as an argument to a batch
file, you should be able to use

$TARGET_FILE:TestVersion

(again, assuming TestVersion is the name of your add_executable target)


By the way, the error message 'TestVer\TestVersion.exe' is not
recognized ... is probably happening because the working directory is
not set correctly relative to the name TestVer\TestVersion.exe - a
simple pushd/popd combination to the correct directory in the batch
file may solve this.


HTH,
David


-- 

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 really change CMake linker

2014-08-12 Thread David Cole via CMake
Unless it is overridden somewhere else along the way, the following is
used to create the link command line for a C++ executable:

(found in Modules/CMakeCXXInformation.cmake)

if(NOT CMAKE_CXX_LINK_EXECUTABLE)
  set(CMAKE_CXX_LINK_EXECUTABLE
 CMAKE_CXX_COMPILER  FLAGS CMAKE_CXX_LINK_FLAGS
LINK_FLAGS OBJECTS  -o TARGET LINK_LIBRARIES)
endif()

As you can see, by default, the C++ compiler is used as a front end to
link C++ executables...

Similarly for other types of targets, there are
CMAKE_CXX_CREATE_SHARED_LIBRARY and CMAKE_CXX_CREATE_SHARED_MODULE. And
for other languages, there are CMAKE_${LANG}_CREATE_... variables too.

In order to use the linker you want, you would have to define a custom
CMAKE_CXX_LINK_EXECUTABLE that uses CMAKE_LINKER in its definition
of the linker command line.


HTH,
David C.


-- 

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] Removing the original CDash admin

2014-08-12 Thread David Cole via CMake
You can always brute force it and go in and remove that user from the 
database table with MySQL or phpMyAdmin...


HTH,
David C.

--

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] Removing the original CDash admin

2014-08-12 Thread David Cole via CMake
I think you should be ok... just make another user admin before you do 
it, of course. You can always put the user back by brute force, too, if 
you discover you need it for something. I'm not aware of anything 
special about the user besides its admin-ness.


Good luck, and let us know if you find anything that doesn't work after 
you remove it.



D

--

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] Why there is not MSI installer for CMake?

2014-08-11 Thread David Cole via CMake
If silently installing is your objective, you may do so with an NSIS 
built *.exe installer.


See this old blog post for details:

   http://www.kitware.com/blog/home/post/186


HTH,
David C.

--

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 version/feature detection

2014-08-07 Thread David Cole via CMake
Specifically, for the OBJECT library feature, I figured out what
version of CMake introduced it like this:

gitk -- Tests/ObjectLibrary/CMakeLists.txt

leads to finding this first commit of that file: 69d3d183 [1]

gitk 69d3d183

leads to b87d7a60 [2] (4 parent commits up) which introduced the
feature itself. Then,

git describe --contains b87d7a60

yields:

v2.8.8~29^2~15

So OBJECT libraries were introduced in CMake v2.8.8. Also, in all
the gitk views for these commits, it tells you Follows: v2.8.7 and
Precedes: v2.8.8.


You could therefore write code like:

if (${CMAKE_VERSION} VERSION_LESS 2.8.8)
  # avoid OBJECT libraries
else()
  # ok to use OBJECT libraries
endif()


HTH,
David C.


[1] http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=69d3d183
[2] http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b87d7a60


-- 

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 issue regarding conversion of existing Visual Studio .targets files to cmake

2014-08-07 Thread David Cole via CMake
If it works, do it.

Custom commands are the easiest way to do MIDL stuff driven by CMake if
you need things to work with any generator.

Alternatively, if you are guaranteed to be using Visual Studio
generators, you can try just adding the idl file as a source file of
the library or executable that contains it, as the VSMidl test does:
[1] -- but it may only work with source/build tree names that contain
no spaces depending on your VS version. The parent CMakeLists that
builds it arranges for this to be the case: [2]

HTH,
David C.

[1]
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/VSMidl/src/CMakeLists.txt;h=86c04ed9;hb=029edcdf

[2]
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/VSMidl/CMakeLists.txt;h=432506c3;hb=029edcdf


-- 

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] Combining several static libraries into a single static library

2014-08-06 Thread David Cole via CMake
Seems like your best bet using CMake would be to use OBJECT libraries 
for your Project01 through Project99 -- and then use STATIC libraries 
for your ReleaseLibraries, which combine the objects of the appropriate 
project libraries...


You may need to use dummy source files for the static libs, depending 
on your build environment. See the Tests/ObjectLibrary/CMakeLists.txt 
in the CMake source tree for an example of all the different 
workarounds there are for older Visual Studios and Xcode...


http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/ObjectLibrary/CMakeLists.txt;h=0aeefaa48753feec0c5e0af2f850b32d6cd28279;hb=55d6aa36a522f2dd7849ccd53d9e743a88f8c7a1

Another alternative would be to use STATIC libraries all the way 
through and let CMake do its transitive linking thing via 
target_link_libraries, but then your executables that link to them 
would need access to all of the static libraries including the 
Project01 to Project99 ones, even at the very client level where you 
are no doubt trying to simplify the build experience for those that 
require your release libraries. Good luck!



HTH,
David C.

--

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 Path Issues

2014-08-06 Thread David Cole via CMake

What's in your toolchain file?

Is the file at C:/software/propgcc/bin/propeller-elf-gcc named 
propeller-elf-gcc.exe? Should there be a .exe in the compiler file 
name?


What GNU make are you using? (The primary ones well tested for use 
with CMake on Windows are MinGW and MSYS...)


Can you build anything with Unix Makefiles in a non-MSYS-shell 
Windows environment?


Seems like you'd want to use either MSYS Makefiles or MinGW 
Makefiles depending on your environment.



HTH,
David C.

--

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] Defining a function in a macro

2014-08-03 Thread David Cole via CMake

Ouch... my brain hurts...

Another idea would be to write the generated functions out to a file, 
and then, after all functions are written to the file, include the file.


Might result in something you can actually look at in an editor (and 
make sense of) without your brain hurting too much, too.


;-)

D


-Original Message-
From: Walter Gray chrysal...@gmail.com
To: cmake cmake@cmake.org
Sent: Fri, Aug 1, 2014 8:32 pm
Subject: [CMake] Defining a function in a macro


Hey List -
Just wanted to put this out there for posterity, and in case anyone 
runs

into the same question I had.  I had a bunch of nearly identical
functions, so I wanted to write a function to define them for me to
reduce code repetition.  The problem I ran into was that if you write

macro(_define_function name)
  function(namespaced_${function_name} ...)
  message(${ARGV} from ${name})
  endfunction()
endmacro()

_define_function(foo)
namespaced_foo(Message)

you actually wind up printing foo from foo, since all variable
references to a macro are expanded first.  I also couldn't use a
function, since there would be no way to access ${name} from inside the
function (that I'm aware of - please correct me on this if I'm wrong)

The solution I came up with was, if I wanted to reference the 
function's
argv, I would do a double-dereference of a string containing ARGV 
like so:


macro(_define_function name)
  function(namespaced_${function_name} ...)
  set(my_argv ARGV)
  message(${${my_argv}} from ${name})
  endfunction()
endmacro()

This produced the correct results.  If any of you know of a cleaner way
to do this, I'd love to hear about it.  If not, have fun writing
functions to write your functions!

As a relatively useless, but I thought entertaining aside:

macro(_define_function name my_argv)
  function(namespaced_${function_name} ...)
  message(${my_argv} from ${name})
  endfunction()
endmacro()
_define_function(foo \${ARGV})
namespaced_foo(Message)

The result is foo Message from foo because ${my_argv} gets expand to
${ARGV}, which then expands to foo ${ARGV}.

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

 
--


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 issue regarding conversion of existing Visual Studio .targets files to cmake

2014-08-01 Thread David Cole via CMake

First try this:


-Original Message-
From: Ravi Raman ravi.ra...@xoriant.com
To: David Cole dlrd...@aol.com
Cc: cmake cmake@cmake.org
Sent: Fri, Aug 1, 2014 7:49 am
Subject: RE: [CMake] Cmake issue regarding conversion of existing 
Visual Studio .targets files to cmake




Hi David,
 
We are executing the following POST_BUILD commands using 
add_custom_command() call in cmake.

 
add_custom_command(
    TARGET ${TARGETNAME}
    POST_BUILD COMMAND ${TBIN}/VerCheck.exe \$(TargetPath)\
    POST_BUILD COMMAND copy \$(TargetPath)\ 
\$(TargetPath).vercheck_dummy_target\

    COMMENT Checking if $(TargetPath) has version info...)
 
The issue we are facing is with the execution of the post-build command 
${TBIN}/VerCheck.exe \$(TargetPath)\. It gives the following error:

 
  C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(134,5):

error MSB3073: The command setlocal\r [E:\RaviRaman\Project\Auto
Desk\Source\AutoDesk_Project\autodesk_project\XoriantRepo\components\glob
al\src\objectdbx\build\x64\versioninfo\GenVerInfo.vcxproj]
C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(134,5):

error MSB3073: ..\..\..\..\..\..\..\develop\tools\bin\VerCheck.exe
E:\RaviRaman\Project\AutoDesk\Source\AutoDesk_Project\autodesk_project\X
oriantRepo\components\global\src\objectdbx\build\x64\versioninfo\Debug\Ge
nVerInfo_d.exe\r 
[E:\RaviRaman\Project\AutoDesk\Source\AutoDesk_Project\autodesk_project\X

oriantRepo\components\global\src\objectdbx\build\x64\versioninfo\GenVerIn
fo.vcxproj]
 
Also, note the following:
1. The execution is successful and there is no error when I keep only 
the copy command and comment out the command ${TBIN}/VerCheck.exe 
\$(TargetPath)\
2. VerCheck.exe is a project specific executable which checks the 
version of the specified target
3. All the variables above in ${...} are getting correctly replaced. 
So, that is not an issue.
4. We are able to execute both the commands ${TBIN}/VerCheck.exe and 
copy successfully from the DOS command line.

 
 
Thanks  Regards
 
Ravi Raman
Xoriant Solutions Pvt. Ltd
4th Floor, Winchester, Hiranandani Business Park, Powai, Mumbai 400076, 
INDIA.
Tel: +91 22 30511000,9930100026 Extn: 2144 Voip No. 4088344495/96/97/98 
Voip Extn:1178| Fax: +91 22 3051

ravi.ra...@xoriant.com| http://www.xoriant.com
 
 
-Original Message-
From: Ravi Raman
Sent: Thursday, July 31, 2014 5:07 PM
To: 'David Cole'
Cc: cmake@cmake.org
Subject: RE: [CMake] Cmake issue regarding conversion of existing 
Visual Studio .targets files to cmake

 
Hi David,
 
Thanks for the reply. Understood.
Will use the cmake function add_custom_command() with POST_BUILD option 
in case of after build and PRE_BUILD option in case of before build.

 
Thanks  Regards
 
Ravi Raman
Xoriant Solutions Pvt. Ltd
4th Floor, Winchester, Hiranandani Business Park, Powai, Mumbai 400076, 
INDIA.
Tel: +91 22 30511000,9930100026 Extn: 2144 Voip No. 4088344495/96/97/98 
Voip Extn:1178| Fax: +91 22 3051

ravi.ra...@xoriant.com| http://www.xoriant.com
 
 
-Original Message-
From: David Cole [mailto:dlrd...@aol.com]
Sent: Thursday, July 31, 2014 4:55 PM
To: Ravi Raman
Cc: cmake@cmake.org
Subject: Re: [CMake] Cmake issue regarding conversion of existing 
Visual Studio .targets files to cmake

 
So from the example you've sent, it seems like the stuff in your
targets file is just a bunch of custom commands that you'd need to run.
There are plenty of examples of projects using add_custom_command and
add_custom_target out there, and if you have specific questions about
how those commands work, do send more emails and ask those questions.
 
I don't think there's anything out there that will help you automate
this task but if there is, hopefully somebody who can point you to
them will show up here.
 
Otherwise, it's just roll up your sleeves time, and do the work
manually to convert targets files into CMakeLists that use
add_custom_command.
 
 
Cheers,
David C.
 
 


--

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 issue regarding conversion of existing Visual Studio .targets files to cmake

2014-08-01 Thread David Cole via CMake
Sorry about the premature send on that last email...

First try this:

add_custom_command(
TARGET ${TARGETNAME}
POST_BUILD
  COMMAND ${TBIN}/VerCheck.exe \$(TargetPath)\
   COMMAND copy \$(TargetPath)\
\$(TargetPath).vercheck_dummy_target\
COMMENT Checking if $(TargetPath) has version info...)

i.e. -- just say POST_BUILD once, then a sequence of COMMAND lines.
(I think it's passing your second POST_BUILD as an argument to
VerCheck...)


If that still doesn't work, try:

add_custom_command(
TARGET ${TARGETNAME}
POST_BUILD
  COMMAND VerCheckAndCopy.bat ${TBIN} $(TargetPath)
COMMENT Checking if $(TargetPath) has version info...)

and delegate it to a batch script that takes arguments which internally
does the sequence of commands you want. If you go this route, you may
still need nested quotes around $(TargetPath) -- CMake doesn't know
about expanding those VS values, and whether or not they'll need quotes
around them.

HTH,
David C.




-- 

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] setup enviroment for all tests

2014-07-31 Thread David Cole via CMake
CMake itself does this to include a file at ctest time that applies to
*all* tests:

  set_directory_properties(PROPERTIES
TEST_INCLUDE_FILE
${CMake_BINARY_DIR}/Tests/EnforceConfig.cmake)

It results in this line being generated in CTestTestfile.cmake at the
very top of the file:

   include(C:/n/d/Nightly/cmake
Win32-ninja-cl11-Debug/Tests/EnforceConfig.cmake)

If you wrote/configured a file that had this in it (can be in your
build tree, as CMake's is...):

  set(ENV{PATH} /actual/value/of/_BINDIR:$ENV{PATH})

...and then set that file as your TEST_INCLUDE_FILE, it should do what
you want in this case.

The documentation is sparse, but there:

  http://www.cmake.org/cmake/help/v3.0/prop_dir/TEST_INCLUDE_FILE.html


HTH,
David C.

-- 

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 issue regarding conversion of existing Visual Studio .targets files to cmake

2014-07-31 Thread David Cole via CMake
So from the example you've sent, it seems like the stuff in your 
targets file is just a bunch of custom commands that you'd need to run. 
There are plenty of examples of projects using add_custom_command and 
add_custom_target out there, and if you have specific questions about 
how those commands work, do send more emails and ask those questions.


I don't think there's anything out there that will help you automate 
this task but if there is, hopefully somebody who can point you to 
them will show up here.


Otherwise, it's just roll up your sleeves time, and do the work 
manually to convert targets files into CMakeLists that use 
add_custom_command.



Cheers,
David C.

--

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 issue regarding conversion of existing Visual Studio .targets files to cmake

2014-07-30 Thread David Cole via CMake
The problem as reported, is that you're trying to use add_custom_target 
with a target named test -- but you can't do that with CMake because 
test is a built-in well-known predefined target name.


Other so-called well-known target names include all install 
package and package_source. And there may be others. If I can find 
a definitive documented list, I'll forward it...


You can use any other name you like, but you should avoid the 
pre-defined target names that CMake already uses.



HTH,
David C.


-Original Message-
From: Ravi Raman ravi.ra...@xoriant.com
To: cmake cmake@cmake.org
Sent: Wed, Jul 30, 2014 12:35 am
Subject: [CMake] Cmake issue regarding conversion of existing Visual 
Studio .targets files to cmake




Hi all,
 
We have reported an issue. It is regarding conversion of existing 
Visual Studio .targets files to cmake.

The link for the reported issues is as follows.
http://www.cmake.org/Bug/view.php?id=15044
 
Kindly let us know if this can be done in cmake.
 
Thanks  Regards
 
Ravi Raman
Xoriant Solutions Pvt. Ltd
4th Floor, Winchester, Hiranandani Business Park, Powai, Mumbai 400076, 
INDIA.
Tel: +91 22 30511000,9930100026 Extn: 2144 Voip No. 4088344495/96/97/98 
Voip Extn:1178| Fax: +91 22 3051

ravi.ra...@xoriant.com| http://www.xoriant.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

 
--


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] Ctest and custom measurements

2014-07-30 Thread David Cole via CMake

Unfortunately, I always have to resort to source code analysis to
figure this stuff out... NamedMeasurement is only mentioned in the file
Source/CTest/cmCTestTestHandler.cxx :
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/CTest/cmCTestTestHandler.cxx;hb=refs/heads/master 




(search the page for NamedMeasurement, and see the function
cmCTestTestHandler::GenerateRegressionImages in particular...)

Transform your output (if you can) into using DartMeasurement style
XML tags as shown in this post from 4 years ago:
http://www.cmake.org/pipermail/cmake/2010-April/036574.html

Quoting from that 4-year-old post:
To send a number (for example, 42) as a measurement named Simple, try
printing output like this on stdout:
DartMeasurement name=Simple
type=numeric/integer42/DartMeasurement
DartMeasurement name=pi
type=numeric/double3.14159/DartMeasurement

CTest should parse the DartMeasurement tags from the output and
generate the NamedMeasurement XML that CDash is expecting.

It is a little bit ridiculous to use the legacy format in the output,
which ctest recognizes, and then transforms into what CDash needs, but
it is what is necessary at the moment. You are trying to send what
CDash needs directly, but it gets encoded into the output of the
test, rather than recognized like the legacy format

One of these days, perhaps an easier way will find its way into the
source code.

For now, try the legacy technique and let us know if it works out for
you.


HTH,
David C.




-Original Message-
From: ycollette.nospam ycollette.nos...@free.fr
To: cmake cmake@cmake.org
Sent: Tue, Jul 29, 2014 10:44 am
Subject: [CMake] Ctest and custom measurements


Hello,

I've got an executable built using cmake.
I use ctest to test my executable. Each time the executable is
executed, a log
file on std::cout is produced.
I the log file, I added the following XML tags:

NamedMeasurement name=my measure
type=numeric/doubleValue0.33/Value/NamedMeasurement

I don't see these named measurements in the xml file produced by ctest
-D
NighlyStart ; ctest -D NighlyTest

I use cmake-2.8.12.2 under Fedora 20 64 bits.

Is it possible to add custom measurements in the xml file generated by
ctest ?

Best regards,

YC

--

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] Ctest and custom measurements

2014-07-30 Thread David Cole via CMake
 By the way, this should be better documented in the cmake / ctest
 documentation.
 And we should be allowed to add measurements like these in the log:
 Log message - date - DartMeasurement ...0.1/DartMeasurement

I agree on both points. I would go even farther and say what you were
trying to do originally should have just worked...


 Do I fill a bug report for this ?

You can. Although it would be more effective if you could contribute a
patch to improve the docs, or to implement the code required to improve
the DartMeasurement parsing so it's not necessarily at the beginning of
the line, or even to accept NamedMeasurement values directly from the
output...

Are you able to submit patches that do any of this? Do you have the
time or the inclination?


:-)
David C.



-- 

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 issue regarding conversion of existing Visual Studio .targets files to cmake

2014-07-30 Thread David Cole via CMake
To the best of my knowledge, CMake does not do anything with .targets 
files. It doesn't know what they are, and it doesn't generate any of 
them...


What is the function of the .targets files in your non-CMake build 
system?


Perhaps somebody else who is more familiar with .targets files is 
listening and can chime in. I'm not sure what to recommend for you. 
add_custom_target and add_custom_command are commands you can use to 
organize and execute custom build steps (as opposed to compiling source 
files as part of an add_library or add_executable)


Maybe with the build system you can generate using CMake, you won't 
even need the .targets files anymore. If you do need them, I'd be 
curious to learn what it is your .targets file do and why you still 
need them.



HTH,
David C.

--

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] Typo in cmake-packages(7)

2014-07-28 Thread David Cole via CMake
In fact, it's not just a documentation typo.. It occurs three times 
in cmake 'next' and 'master':


$ git grep COPY_ONLY
Help/manual/cmake-packages.7.rst:COPY_ONLY
Modules/Qt4Macros.cmake:  configure_file(${infile} 
${out_depends} COPY_ONLY)
Source/kwsys/CMakeLists.txt:${PROJECT_BINARY_DIR}/kwsysPrivate.h 
COPY_ONLY IMMEDIATE)





-Original Message-
From: Johannes Zarl johannes.z...@jku.at
To: cmake cmake@cmake.org
Sent: Mon, Jul 28, 2014 5:06 am
Subject: [CMake] Typo in cmake-packages(7)


Hi,

In cmake-packages(7) [1], there is a typo that prevents the example 
from

working correctly.

The command

configure_file(cmake/ClimbingStatsConfig.cmake
  

${CMAKE_CURRENT_BINARY_DIR}/ClimbingStats/ClimbingStatsConfig.cmake

  COPY_ONLY
)


should use COPYONLY, not COPY_ONLY.

Cheers,
 Johannes



P.S.: I really like the new documentation website. Kudos to whoever had 
the

idea for this!


[1] http://www.cmake.org/cmake/help/git-master/manual/cmake-
packages.7.html#creating-packages
--

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-developers] LZMA support

2014-07-23 Thread David Cole via cmake-developers
Wow! Fantastic!

Thanks to Daniel, great work on this contribution... This is a ton of
tedious work, but it will be very useful. Thank you *very much*.

Two minor comments -- in the commit at the tip of this topic:

http://public.kitware.com/gitweb?p=stage/cmake.git;a=commitdiff;h=5201fb2e62fb06609b02c83278da6546561a9e9f

I think the extensions should be alphabetized, and they should also
include 7z so folks can use the typically smaller 7z files with
ExternalProject as well.

Would you like me to amend and update the topic? Or would you mind
doing the minor edit for that?

BTW, I just submitted an Experimental dashboard for this topic using
ninja and the VS2012 compiler on Windows 8.1, and it was all green:
http://open.cdash.org/buildSummary.php?buildid=3420600


Thanks,
David C.

-- 

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] LZMA support

2014-07-23 Thread David Cole via cmake-developers

Thanks.  Actually I think adding xz is incorrect anyway.  We
support compressed tarballs, not arbitrary compressed files.
Therefore the list should be

  7z|bz2|tar\\.gz|tar\\.xz|tgz|txz|zip

correct?


Well, then it should be tar.bz2, too. And since this is a regex 

anyway:


   7z|tar\\.bz2|tar\\.[gx]z|t[xg]z|zip


Yes, correct.

I still like the original list all the extensions separately and 
explicitly technique rather than 'simplifying' the regex -- because 
the first one is an easier to parse as a human being regex. Also, 
it's more greppable if somebody is looking for .gz or .xz or tgz or 
txz.



D

--

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] [Cdash] Show results from the bullseye coverage in CDash

2014-07-15 Thread David Cole via CMake
 There is an option (which should be on by default) in the
 Miscellaneous section of the project settings, which is
 called: Show coverage code.

 Thanks, this solves the problem. The option wasn't checked.

The option should be *OFF* by default.

If the intent is not to show your code (because it's private, for
example), then having it OFF is the safe default. Having it OFF by
default and making a mistake results in emails like this... along with
a quick and easy solution to the problem. Having it ON by default and
making a mistake would result in the loss of privacy, which is by far a
worse consequence, with no solution whatsoever. Please keep the default
value *OFF*.


Thanks,
David C.


-- 

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 Visual Studio Configuration Single

2014-06-30 Thread David Cole via CMake
You can set CMAKE_CONFIGURATION_TYPES to your own list of 
configurations (including limiting it to a single configuration) as 
long as you set it *before* the project command in your CMakeLists.txt 
file. This technique works with the Visual Studio and Xcode generators. 
See the following bug reports for reference.


   http://www.cmake.org/Bug/view.php?id=6788
   http://www.cmake.org/Bug/view.php?id=8914

I'm not sure why you would recommend anything related to 
CMAKE_BUILD_TYPE for the Visual Studio generators. I would be curious 
to know exactly how you are using it, because internally, 
CMAKE_BUILD_TYPE (to the best of my knowledge) is completely ignored by 
the Visual Studio generators. Any positive things happening in your 
project because of your use of it must be because of the way you use it 
in your CMakeLists files... I'm thinking it's probably only used at 
CMake time, unless you're passing it as args to custom commands or 
something... in which case, you'll be passing the same CMake configure 
time CMAKE_BUILD_TYPE value regardless of what config your end user 
chooses to build in Visual Studio. Which would be confusing at best.


VS and Xcode use a list of configurations, with the active 
configuration chosen at build time by the developer. Makefile and ninja 
systems use CMAKE_BUILD_TYPE -- VS and Xcode do not.



HTH,
David C.

--

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 use the cmake functions get_prerequisites and get_filename_component for target dependency installation?

2014-06-24 Thread David Cole via CMake
Answered on stack overflow. Copied/pasted here for mailing list 
archives:


The references that get_prerequisites returns are not absolute full 
path references, and they are also not resolve-able to absolute 
references via a simple get_filename_component call. (On Mac, they may 
contain @executable_path, for instance.)


However, there is another function in the GetPrerequisites.cmake module 
called gp_resolve_item that can help you here.


Try this:

get_prerequisites(${MY_BINARY_LOCATION} DEPENDENCIES 0 0  )

foreach(DEPENDENCY_FILE ${DEPENDENCIES})
  gp_resolve_item(${MY_BINARY_LOCATION} ${DEPENDENCY_FILE}   
resolved_file)

 message(resolved_file='${resolved_file}')
endforeach()

That should convert DLL names into full path locations of the DLLs, 
assuming they are in your PATH. If they are in some other directories, 
you may need to provide those as the dirs arguments to 
get_prerequisites and gp_resolve_item.


The documentation for the GetPrerequisites.cmake module is here: 
http://www.cmake.org/cmake/help/v3.0/module/GetPrerequisites.html


Also, possibly dig into the BundleUtilities.cmake module to see how it 
uses GetPrerequisites.



HTH,
David C.



-Original Message-
From: Stefan Dänzer stefan.daen...@gmail.com
To: cmake cmake@cmake.org
Sent: Tue, Jun 24, 2014 4:43 am
Subject: [CMake] how to use the cmake functions get_prerequisites and 
get_filename_component for target dependency installation?




Dear list members,

we have set up a cmake project with external shared library 
dependencies. We want to package the binaries and dependencies of our 
project using CPack. However we are getting different results on 
windows and linux systems when trying to find dependencies of our 
targets.


We had a look at the GetPrerequisites Module of CMake (2.8.12).We have 
successfully used the following CMake code to get the full path of a 
CMake target (BINARY) dependency (_libFile) on linux, however we don't 
get a the full path of the dependency on windows. On Windows the 
variable dependency_realpath holds something like 
${CMAKE_SOURCE_DIR}/DEPENDENCY_FILE, which is not the correct path to 
the dependency.


string(TOUPPER ${CMAKE_BUILD_TYPE} CONFIG)
GET_TARGET_PROPERTY(MY_BINARY_LOCATION ${BINARY} LOCATION_${CONFIG} )
GET_PREREQUISITES(${MY_BINARY_LOCATION} DEPENDENCIES 0 0  )

foreach( DEPENDENCY_FILE ${DEPENDENCIES})
    get_filename_component( dependency_realpath ${DEPENDENCY_FILE} 
REALPATH)


So the question would be: Why are we getting different results for the 
dependency locations on windows and linux?


Disclaimer: this is a clone question also asked 
on http://stackoverflow.com/questions/24367033/how-to-use-the-cmake-funct

ions-get-prerequisites-and-get-filename-component-for
Regards,
Stefan



--

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] Running OSX Bundle via open after creation with CMake/CPack

2014-06-23 Thread David Cole via CMake

Well, there's this information about unknown error -10810:

   http://www.thexlab.com/faqs/error-10810.html

Does your app launch a lot of sub-processes at startup?

Are you saying that you *can* run the app from the terminal window, but 
that you cannot run the app by double-clicking or by using open? (And 
that it's the exact same executable...?) What command line do you use 
if you're not using open?


Is there an environment difference (maybe LD_LIBRARY_PATH or 
DYLD_LIBRARY_PATH?) between your Terminal, and your overall environment?


Can you launch a debug build in a debugger?

--

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] Running OSX Bundle via open after creation with CMake/CPack

2014-06-23 Thread David Cole via CMake
Also, you may find extra hints about what's going wrong in the output 
of the Console application. (Usually found in 
/Applications/Utilities) -- see if there's anything in the 
system.log in there, or poke around and see if it has a crash report 
related to your app.



HTH,
David C.

--

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] 138% progress when building both all and not-in-all target?

2014-06-20 Thread David Cole via CMake

138%
make -j4 all examples_noinst



I've seen this too but never noticed a pattern about when it happens.


Does it always happen when naming more than one target with make -j?

I thought you were not supposed to name more than one target with make 
-j... (but I don't understand fully exactly why that's a bad thing...)


--

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] Feature suggestion: cmake -E do_nothing -- useful to simulate configuration-specific commands

2014-06-19 Thread David Cole via CMake

cmake -E echo

with no further arguments is already pretty darned close to cmake -E 
do_nothing...


For the configuration-specific custom commands, keep your eye on 
http://public.kitware.com/Bug/view.php?id=9974 and its related bugs. 
Eventually, I expect it will be possible. Sooner, if  you have time to 
work on CMake source code yourself. :-)



HTH,
David

--

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] Cygwin drive paths are killing me

2014-06-17 Thread David Cole via CMake
 I am sure you will reply to some of my points, ...

Nope. I'm done for now. :-)


 but I would like to say
 in advance that I appreciate your different point of view even though
 I might not always agree with it, and I am sure vice versa.

Same here. Our society desperately needs more reasoned discourse.

Say hi to the Victoria Clipper for me: sometimes I miss the Pacific
Northwest.


Cheers,
David



-- 

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] Cygwin drive paths are killing me

2014-06-15 Thread David Cole
 Why are you holding back so much from giving us your real opinion of
 Cygwin?  :-)

Sorry about that, I'll have to try harder ;-)


 Seriously though, I wonder if some of your complaints have an answer.

I'm sure they do.


 Also, I think it is important for Windows users to have access to Unix
 distributions (plural) of free software, where Unix refers to
 containing all the core command-line Unix tools that Unix developers
 know and love, and distribution is defined as a substantial body of
 software beyond those core tools that is built with a consistent set
 of (Unix) build tools.

Thanks to Virtual Box (and others like it), they do have such access.
Windows users can install any Linux distribution they want into a VM on
top of Windows...

The thing I will never understand is people's refusal to learn how to
use the tools at their disposal. If you're on Windows, learn how to use
the tools that work on Windows. Don't be all crippled without your
usual toolset: learn something new!


 If you accept that premise...

I don't. I completely disagree. Windows is Windows. If you don't like
it, don't use it.


 ... then Cygwin is a really important example
 of such a Unix distribution, and the only other competitors for it
 that I am aware of at the present moment on Windows platforms are (1)
 MinGW+MSYS (a much simplified fork of an ancient Cygwin version) and
 (2) MinGW_w64+MSYS2 (a much simplified fork of modern Cygwin).

I have msys Git installed, and in its bash prompt, I have every Unix-y
tool I ever use on Windows. Mostly just grep really. And I wouldn't
even have that installed except for requiring access to git repos.


 My opinion is that MinGW+MSYS days are numbered because
 MinGW_w64+MSYS2 reportedly fixes bugs much quicker...

But isn't MSYS2 really the evolution of MSYS? (i.e. shouldn't MSYS days
be numbered if there's an MSYS2? CMake 2.8's days are numbered as well,
now that CMake 3 is out...)

And really, aren't Windows's days numbered anyhow? The writing's on the
wall. PC's will only be necessary for developers and high-volume data
crunchers in another decade.


 Dave, I well understand that since you have had trouble in the past
 with Cygwin it is all too easy for you to completely give up on it.

It was not only what I've mentioned specifically in this email it
was much more than that. It takes quite a lot for me to give up on
something entirely. The more includes: slowest file access and tools
ever, unsupportive (in demonstrable instances, even anti-supportive)
community, ... I had a whole structured rant at one point on a wiki I
used to have access to. I should have published it before I lost
access. This discussion is really just the tip of the iceberg...


 But I thought I should add my
 own suggestions and feelings to balance yours for those here who would
 like to give Cygwin (or MinGW+MSYS or MinGW_w64+MSYS2) a try without
 being too affected by our different prejudices.  :-)

Thanks for providing an alternate point of view. Multiple opinions are
very useful when somebody new is learning, and trying to make a
decision related to the discussion.

Hopefully I haven't poisoned anyone irreparably with my rhetoric here.
Take my comments with a grain of salt, and do your own research. I'm
confident you are a smart person, and can make your own conclusions
based on the evidence just fine.


Happy Father's Day to all you Dads out there...

David C.


-- 

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] Cygwin drive paths are killing me

2014-06-14 Thread David Cole
 I finally got it working.

Good!


 - I ditched Cygwin. (But I learned that CMake later on for Unix
 Makefiles complains about Cygwin sh.exe being in my path, and
 uninstalling Cygwin is kind of hard.)

Good!

The difficulty of uninstalling it, and the difficulty of replicating a
cygwin environment that is on one machine *exactly* on another machine
with *all* the same components at *all* the same versions ... these are
but 2 of the reasons I will NEVER rely on cygwin again for anything.
It's just too painful, and there's absolutely NO upside.


 This whole thing took more time to set up than Mac + iOS + Linux +
 Windows combined. But it works so I'm relieved.

You are persistent... One of the keys to your success, I'm sure. But,
out of curiosity... if you have Linux and Mac environments all set up
already, why not build the Android stuff from one of those platforms??
Why go through all the pain of getting an Android build working from
Windows?


Cheers,
David C.

-- 

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] Should try_run have a timeout value? [demo CMakeLists.txt in body of email]

2014-06-12 Thread David Cole
#
# CMakeLists.txt
#
# PROBLEM:
#
# This file demonstrates a problem with CMake 3.0 and Visual Studio
# compiler x64 builds... If configured for a build with the x64
# compiler, CMake will hang until user intervention with a
# cmTryCompileExec123...789.exe has stopped working
# crash dialog.
#
# The problem has existed forever, it's not new to CMake 3.0
#
# QUESTION:
#
#   Should try_run have a timeout value, defaulting to a few seconds (or
#   something more reasonable than NEVER) or is there a way for CMake to
#   detect this condition and kill it as an unsuccessful try_run...?
#
cmake_minimum_required(VERSION 3.0)
project(subtle_pointer_error C)

set(source_file ${CMAKE_CURRENT_BINARY_DIR}/spe.c)

file(WRITE ${source_file}.in
# OMG - long bracket argument syntax is beautiful for including
# unescaped entire other http://sscce.org/ files within a
# CMakeLists.txt!!
[=[
/*
  The problem with this code (and why it crashes on Windows x64
  builds) is malloc is used without declaring it, so the C compiler
  assumes it is extern returning int... But int is too small for a
  pointer on x64 builds, so the value that ends up in ptr is not
  the whole pointer, but only sizeof(int) bytes of it. The fix is
  obviously to include the header that declares malloc (and memcpy,
  and anything else used), but this was hard to diagnose, and
  annoying as heck on automated dashboard machines -- a failed
  try_run due to excessive attempted run time would have been a most
  welcome assist.

  Fix this problem and prove the crash goes away by adding:
#include stdlib.h
#include string.h
*/

#include stdio.h

int main(void)
{
  double value = 1234.56;
  void *ptr = malloc(sizeof(value));
  printf(before memcpy\n);
  fflush(stdout);
  memcpy(ptr, value, sizeof(value));
  printf(after memcpy\n);
  return 0;
}
]=]
)

configure_file(${source_file}.in ${source_file} COPYONLY)

try_run(
  run_result
  compile_result
  ${CMAKE_CURRENT_BINARY_DIR}/TryRun001
  ${source_file}
  COMPILE_OUTPUT_VARIABLE compile_output
  RUN_OUTPUT_VARIABLE run_output
  )

message(compile_result='${compile_result}')
message(run_result='${run_result}')
message(compile_output='${compile_output}')
message(run_output='${run_output}')

add_executable(spe ${source_file})

#
# Thanks for your opinions, and taking a look...
#
#David C.
#

-- 

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Should try_run have a timeout value? [demo CMakeLists.txt in body of email]

2014-06-12 Thread David Cole
Would you also be satisfied if the crash dialog was disabled in the 

try_run()?

That is done for ctest by cmCTest::BlockTestErrorDiagnostics().


Sure, as long as the try_run doesn't hang, and indicates failed run 
in the run result.


I'm easy.


D

--

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Should try_run have a timeout value?

2014-06-12 Thread David Cole

 Nice literate programming!


Thank you.



-- 

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] Feature Request: CMAKE_GENERATOR environment variable for default generator

2014-06-12 Thread David Cole

If you *really* wanna save on typing:

alias c=''\''C:/Program Files (x86)/CMake/bin/cmake.exe'\'' -G 
Ninja'


(or the equivalent on your machine...)


:-)

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Mac @loader_path for @rpath questions

2014-06-11 Thread David Cole
If BundleUtilities works for you (sounds like it doesn't, though...), 
you can easily add a call to the script as a custom build step instead 
of doing it at install time. It's just a cmake script to run, so you 
can run it anytime you like...


HTH,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Cygwin drive paths are killing me

2014-06-11 Thread David Cole

I am currently in this unholy trinity of needing to use Android on
Windows through Cygwin.


Rule: NEVER use cygwin on Windows. Period.

If something says you have to use it for some reason, call bullsh*t, 
and refuse to do it. Figure out what you have to do to avoid it.



:-)

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Return value of cmake string find

2014-06-09 Thread David Cole
 What is returned if string(FIND) matches a substring, and what is
 returned if it doesn't match anything?

The documentation says:
http://cmake.org/cmake/help/v2.8.12/cmake.html#command:string
http://www.cmake.org/cmake/help/v3.0/command/string.html
string(FIND string substring output variable [REVERSE])
FIND will return the position where the given substring was found in
the supplied string.

Wow, that's on the light side.

When the documentation is insufficient, experimentation is your
friend... (or source code analysis)
This script:
string(FIND this is a haystack, purely hay needle pos1)
message(pos1='${pos1}')

string(FIND needle resting right on a haystack needle pos2)
message(pos2='${pos2}')

string(FIND a haystack on top of a needle needle pos3)
message(pos3='${pos3}')

 string(FIND a haystack with a needle buried in the middle of it
needle pos4)
message(pos4='${pos4}')

 string(FIND needle hay hay needle hay hay needle hay hay needle
needle pos5)
message(pos5='${pos5}')

string(FIND this is a haystack, purely hay needle pos6 REVERSE)
message(pos6='${pos6}')

 string(FIND needle resting right on a haystack needle pos7
REVERSE)
message(pos7='${pos7}')

string(FIND a haystack on top of a needle needle pos8 REVERSE)
message(pos8='${pos8}')

 string(FIND a haystack with a needle buried in the middle of it
needle pos9 REVERSE)
message(pos9='${pos9}')

 string(FIND needle hay hay needle hay hay needle hay hay needle
needle pos10 REVERSE)
message(pos10='${pos10}')

Produces this output:
pos1='-1'
pos2='0'
pos3='23'
pos4='18'
pos5='0'
pos6='-1'
pos7='0'
pos8='23'
pos9='18'
pos10='45'

The C++ source code implementation uses std::string::find, or if the
REVERSE option is used, std::string::rfind. The returned value is
exactly what find or rfind returns if the substring is found, or it is
exactly -1 if it is not found. So: a zero-based offset from the
beginning of the string, where a value of zero means the
substring occurs starting at the very first character of the string.


HTH,
David C.




-- 

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Running a function as a build target

2014-06-09 Thread David Cole
 Is it possible to invoke a script function as part of a target?

No, because the variable values are all gone after CMake finishes
running. And the custom build targets do not run until later at build
time.


  I have a build step where I need to process a bunch of variable
 values before building a particular target.  All of the custom
 targets
 require a COMMAND, not a function.  I thought maybe I could push this
 off to a script invoked by cmake -P, but a quick test revealed that
 the
 script does not inherit the variable environment and the variables
 I'm
 working with cannot be easily passed using -D values on the command
 line.  

Running a script is probably the right approach. Perhaps you could
write out a file at CMake configure time that contains sufficient
information that your script could read at build time.

It might not be easy, but it should be possible.


HTH,
David C.

-- 

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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Bracket Argument

2014-06-03 Thread David Cole
 Are there some good examples of why one would use bracket arguments?


I think one of the major use cases for bracket arguments is in
file(WRITE so you can embed literal python code (or Lua, or
javascript, or ...) directly in the argument to the file command and
have a section of your CMakeLists that looks like an entirely different
language.

It's also a look-far-ahead feature for integrating the CMake language
with a better language, say one where arithmetic is more easily
expressed, down the line somewhere.


D



-- 

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] String option recognized as boolean

2014-05-30 Thread David Cole

The cache is telling you:

   //No help, variable specified on the command line.

If you want the help string from your sources to appear in the 
CMakeCache.txt, then don't specify a value for it on the command line...


Delete the cache, and try again without giving the arg on the command 
line, and it should pick up the doc string from the source.



HTH,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] ExternalPackage_Add with Non-CMake project that runs differently then equivalent shell script

2014-05-29 Thread David Cole

Chad,

What is the value of CMAKE_BUILD_TOOL?

i.e. output of:

message(STATUS CMAKE_BUILD_TOOL='${CMAKE_BUILD_TOOL}')

Why are you using ${CMAKE_BUILD_TOOL} anyhow when the command lines 
you're giving will only work with 'make'?



--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Use of variables in generator expressions

2014-05-29 Thread David Cole
It's allowed, but it will have the value of target_name from the 
context of the CMake configure process. (i.e. ${target_name} is 
evaluated at configure time, and then the evaluated result is what's 
used at generate time within the generator expression.)


HTH,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [cmake-developers] [PATCH] Fix error in compiling C++ files generating by protobuf compiler when .proto files are organized in a directory hierarchy

2014-05-26 Thread David Cole
 Hi everybody there,

 Subject says it all. See the attached patch please.

 (Didn't care enough to leave hg for git to generate the patch. Sorry.)


FILE_PATH is likely to contain C: or some other drive letter on
Windows. It is therefore unsuitable for using to construct a sub-path
underneath CMAKE_CURRENT_BINARY_DIR.

You don't have to care enough to leave hg, but we do have to care
enough to make sure CMake still works on all the platforms it's
intended to work on.

This patch may fix your particular use case, but it is not generally
correct, and therefore, unlikely to be adopted into upstream CMake.
There must be a better solution, that will work on all platforms...


David C.


-- 

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [PATCH] Fix error in compiling C++ files generating by protobuf compiler when .proto files are organized in a directory hierarchy

2014-05-26 Thread David Cole
Maybe I'm missing something. Is it guaranteed that all callers of 
PROTOBUF_GENERATE_CPP will pass non-full-path names for the .proto 
source files?


If so, then I retract my statement. But I don't think you can guarantee 
that.



David C.

--

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [PATCH] Fix error in compiling C++ files generating by protobuf compiler when .proto files are organized in a directory hierarchy

2014-05-26 Thread David Cole

... Long story short I think it is safe to assume ...



It is never safe to assume anything. I don't have personal experience 
with protobuf


But in general, inputs to CMake are allowed to be full path or not, and 
when not, they're usually treated relative to CMAKE_CURRENT_SOURCE_DIR. 
Consult the documentation on individual functions for details. After 
this, I'll be quiet on this, but I wouldn't accept the patch as is 
without a guarantee that relative paths are the only ones allowed as 
input.


Hopefully, Philip Lowman is listening, and he can chime in. He's listed 
as the FindProtobuf module maintainer here: 
http://www.cmake.org/Wiki/CMake:Module_Maintainers



Cheers,
David C.

--

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] CustomCommand and collapsible paths.

2014-05-22 Thread David Cole
This topic itself looks simple enough, and it fixes the problem you've 
observed. I guess my question is, are there still other instances of 
this problem, and why wouldn't we want to do this for inputs *not* 
specified by full path? Shouldn't we infer the correct full path at 
add_custom_command time if it's not specified by full path? And 
shouldn't that too be normalized?


D

--

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] cdash/ctest multi test reports

2014-05-22 Thread David Cole
Where there's a will, there's a way...

Lucky for you CDash is open source.

:-)

-- 

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] PDB generation

2014-05-21 Thread David Cole
 However, if the target of your project IS a static library that you
 supply to customers for integration into their toosl, you NEED to
 supply the pdb otherwise they are stuck getting the “pdb not found”
 warning message.


Rather than having a separate pdb file, for debug static libraries, you
could just build the debugging info into the library itself with the
compiler's /Z7 flag.

http://msdn.microsoft.com/en-us/library/958x11bc.aspx

I've been using it for static library debug builds of VTK and ITK to
link into my app, and it's been working really well for me.

(And I don't know the answer to your original question, ... hopefully
somebody else will chime in with something useful.)


HTH,
David C.


-- 

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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Info.plist with per-configuration information

2014-05-14 Thread David Cole

Hi Tim,

I just created a test project t2 with Xcode itself, and in the 
projects source file t2-Info.plist, I added a Get info string key 
with a value of This is the ${CONFIGURATION} build.


Then, after I build the Debug config, and inspect the generated bundle, 
the Info.plist inside of it contains the string This is the Debug 
build.


Perhaps you could use a single all-config custom 
MACOSX_BUNDLE_INFO_PLIST and use similar strings inside it? Or do you 
need more than just the configuration value as a string to be different 
in the resulting file?



HTH,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to find vcvarsall.bat (e.g. at C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC)? CMAKE_LINKER?

2014-05-12 Thread David Cole

Thanks David, but my cache entry for MY_VCVARSALL_BAT looks fine
already
...
So any .. has been resolved automatically by find_file, even
without explicitly specifying ABSOLUTE  :-)

...it does not seem to make a difference in this case. Right?


Right. Then you are good to go. I have not relied on find_* in 
relation to using these in my scripts, and typically just construct a 
cache var from using get_filename_component. If you actually do find 
the file, then you end up with either a full path, or a NOTFOUND, so, 
of course, you are all set in your situation. Sorry for the noise.


D

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to find vcvarsall.bat (e.g. at C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC)? CMAKE_LINKER?

2014-05-09 Thread David Cole
 Does CMAKE_CXX_COMPILER always provide the full path name of the
 compiler, when we use the current version of CMake (2.8.12.2)? In the
 past it did not, apparently, as a CMakeCache.txt file generated by
 CMake 2.8.8 simply had cl as compiler file path

I think now it does, but I'm not 100% certain if it's guaranteed to be
true. Or, if guaranteed, what version of CMake it started being that
way. Maybe Brad will chime in and confirm or deny, and mention the
version if he knows it...

The thing I do know is that since the compiler ID stuff was refactored
and re-architected, there is a directory in your build tree named
CMakeFiles/${CMAKE_VERSION} and it contains the file
CMakeCXXCompiler.cmake (among others) with all of the information
about the enabled C++ compiler in it. This file is loaded by CMake even
if that information does not appear in your CMakeCache.txt, so the
variable CMAKE_CXX_COMPILER should have a consistent value from run to
run, even if it's not stored in the cache file directly.

Be aware that this file will be re-generated by the next version of
CMake if you upgrade CMake and run it in a pre-existing build
directory, it will create all of its own support files like those in
its very own version-named directory, and the ones from the older
version of CMake are ignored. For this, and many other reasons, it is
always best to start with a clean build tree when switching versions of
CMake.


HTH,
David C.

-- 

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to find vcvarsall.bat (e.g. at C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC)? CMAKE_LINKER?

2014-05-09 Thread David Cole

Also, one more comment on your technique:

If you use get_filename_component in conjunction with paths that 
contain .. or Windows-style component separators (\), you can 
always clean up the resulting string with the ABSOLUTE argument to 
get_filename_component. It will collapse any /../ or /./ bits of 
the path, and convert all the \ to ?

/ in the resulting variable.

It's just easier to read the values (as a person) if you don't have to 
think about any .. resolution mentally when looking at cache entries 
and variable values. So as input to find_*, I would recommend using 
only ABSOLUTE paths as the hints and paths for such calls.



HTH,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to find vcvarsall.bat (e.g. at C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC)? CMAKE_LINKER?

2014-05-08 Thread David Cole

How about:

   if(EXISTS $ENV{VS110COMNTOOLS}../../VC)
  get_filename_component(VC11_DIR $ENV{VS110COMNTOOLS}../../VC 
ABSOLUTE)

   endif()
   if(EXISTS $ENV{VS120COMNTOOLS}../../VC)
  get_filename_component(VC12_DIR $ENV{VS120COMNTOOLS}../../VC 
ABSOLUTE)

   endif()
   message(STATUS VC11_DIR='${VC11_DIR}')
   message(STATUS VC12_DIR='${VC12_DIR}')


HTH,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to find vcvarsall.bat (e.g. at C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC)? CMAKE_LINKER?

2014-05-08 Thread David Cole
In CMakeCache.txt, for a Visual Studio based build where C and/or C++ 
has been enabled:


//CXX compiler
CMAKE_CXX_COMPILER:FILEPATH=C:/Program Files (x86)/Microsoft Visual 
Studio 11.0/VC/bin/cl.exe


//C compiler
CMAKE_C_COMPILER:FILEPATH=C:/Program Files (x86)/Microsoft Visual 
Studio 11.0/VC/bin/cl.exe


Those are as rock solid a basis as you'll get for a typical visual 
studio build. I think it would be wiser to depend on those than on the 
CMAKE_LINKER variable.


Microsoft has a habit of assuming things like this are internal 
implementation details, though, and they often move things around from 
version to version.


So nothing is guaranteed.

But I would think the compiler variables would be better suited if you 
don't want to rely on ENV or registry... I would point out however, 
that you don't need to rely on any cmake vars or any cmake commands 
having been run if you go with ENV or registry.



HTH,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [cmake-developers] Review Request: Topic ExternalProject_labels

2014-04-29 Thread David Cole

ExternalProject: Set LABELS property to targets
his is useful for using CDash subprojects.

ExternalProject: Set FOLDER property to targets
This is useful when using the USE_FOLDERS global property



Seems like something this simple is not quite flexible enough to make 
it worthwhile. You could do the same thing with set_property calls in 
your own code immediately after an ExternalProject_Add.


If we go to the trouble to actually incorporate this into 
ExternalProject, shouldn't we make it flexible, so that callers can 
pass in LABELS of their choice, and a FOLDER name of their choice? 
Simply hard-coding it to the name of the project, and the string 
ExternalProjectTargets may make it possible to organize, but not 
everybody will be happy with the resulting names and organization.


I think if we're going to add something like this to EP, it should be 
flexible enough to allow LABELS and FOLDER values to be passed in from 
the caller.



David C.

--

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] Explanation....

2014-04-28 Thread David Cole
 I'm always happy to learn something new. How would you manage to make
 the following if statement trigger?

 set( arg value)
 if ( ${arg} STREQUAL  TOTO )
   message ( arg equals 'TOTO', and arg equals 'value' )
 endif()


By having a variable named  value that you didn't know about...

This makes it print out:

set( value  TOTO)

set( arg value)
if ( ${arg} STREQUAL  TOTO )
  message ( arg equals 'TOTO', and arg equals 'value' )
endif()

:-)

Ridiculous, I know, but possible, and therefore, I'm sure somebody has
seen the unexpected as a result of this feature...


Cheers,
David C.

-- 

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Alternative for INCLUDE_EXTERMAL_MSPROJECT for Visual Studio 2012 generator

2014-04-26 Thread David Cole
A simple example:

  Sln1/CMakeLists.txt --
 cmake_minimum_required(VERSION 2.8)
   project(project1)
   ADD_LIBRARY (project1 STATIC main.cpp)

  Sln2/CMakeLists.txt --
 cmake_minimum_required(VERSION 2.8)
   project(project1)
   ADD_LIBRARY (project1 STATIC main.cpp)

   include(ExternalProject)
 ExternalProject_Add(project1 SOURCE_DIR ../Sln1)



I get the following error when building your simple example. I'm
uncertain why you *don't* get the same error, because I knew I was
going to get something like this error when I just read your code. You
can't have both a library *and* a custom target with the same name...
In this case, you're using project1 for both the library and the
external project name.

C:\dev\dcole\tmp\b2cmake ..\Sln2
-- Building for: Visual Studio 11
-- The C compiler identification is MSVC 17.0.61030.0
-- The CXX compiler identification is MSVC 17.0.61030.0
-- Check for working C compiler using: Visual Studio 11
-- Check for working C compiler using: Visual Studio 11 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 11
-- Check for working CXX compiler using: Visual Studio 11 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/ExternalProject.cmake:1760
(add_custom_target):
   add_custom_target cannot create target project1 because another
target
   with the same name already exists.  The existing target is a static
library
   created in source directory C:/dev/dcole/tmp/Sln2.  See
documentation for
  policy CMP0002 for more details.
Call Stack (most recent call first):
  CMakeLists.txt:7 (ExternalProject_Add)


If I change 2 lines in Sln2/CMakeLists.txt, like this:

project(project2)
ADD_LIBRARY (project2 STATIC main.cpp)

Then I get a project2.sln file that builds project1 and project2 just
fine, but there is a problem with the INSTALL step of project1. To
avoid the problem with the install step, I added an empty
INSTALL_COMMAND to the ExternalProject_Add call, like this:

ExternalProject_Add(project1 SOURCE_DIR ../Sln1 INSTALL_COMMAND )


After those changes, it all works just as I think you're intending it
to work. (I used cmake 2.8.12.2 here... make sure you're using that, or
the latest release candidate of the upcoming CMake 3.0...)


Hope this helps,
David C.



-- 

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://www.cmake.org/mailman/listinfo/cmake


Re: [cmake-developers] Please restore --help-full cmake option for version 3

2014-04-24 Thread David Cole
 So even though the cmake binary can no longer generate the html and
 manpage documentation itself it is still available.

To search the 3.0 rc4 help for find package, you can:

http://www.cmake.org/cmake/help/v3.0/search.html?q=find+package

And if you don't trust the web based search, you can install the
pre-built binaries for CMake, and grep down in the doc/cmake-3.0/html
directory of the installation.


Just my opinion always makes people smile or cringe. There's rarely a
non-reaction... Glad you admired it and smiled this morning... ;-)

HTH,
David C.

-- 

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] Explanation....

2014-04-24 Thread David Cole
 You sure? When I checked, this did not work. Also, the following
 gives me a syntax error:

 set ( foo Evil!)
 message( ${ foo})


But you *can* still do it indirectly (even with the 3.0 RCs):

set ( variable with spaces Evil too!)
set (varname  variable with spaces)
message(${${varname}})

(Sorry, but I refuse to use foo in example code...)

You'll notice that in your original example, the error was reported on
the message command. The parser simply could not parse a directly
coded variable name containing spaces inside the context of ${}... but
de-referencing indirectly, as is commonly done, still makes it possible
to end up with weirdly named variables if you're not extremely careful
with your variable naming schemes.

I, for one, would fully support breaking backwards compatibility to fix
this, and be strict with variable and macro and function name
identifiers.

It's just ridiculous to waste time trying to justify the existing
behavior. It's more confusing than useful, and ought to be changed.


Just my opinion,
David C.



-- 

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CDash questions

2014-04-23 Thread David Cole
 The way I’m doing this now is the following:

 a) I edit the CMakeList.txt file(s) and follow
   the procedure to create an Xcode IDE project.
   This project contains a bunch of targets
   including ALL_BUILD, RUN_TESTS, and
  Experimental - among others

You should not have to edit the CMakeLists file to create an Xcode IDE
project... The CMakeLists file should be written so that it may be used
with any CMake generator, and then, to create an Xcode project, you
would simply run:

  cd /path/to/build
  cmake -G Xcode /path/to/source


 a) I expect to see a list of all the test runs - or
 at least the the last run from each site.
 ...
 What do I have to do to get a list of all test
 runs from all sites for all dates.

By default, the main CDash page shows only results that have been
submitted since the most recently past nightly start time. To show
other days, you click on previous and next. To show multiple days, you
have to use a filtered view with a Build Time field.

Click on Show Filters
Use a filter of Build Time is before now
Click Apply
Click Create Hyperlink to create a link to this filtered view

(Yields something like this:
http://my.cdash.org/index.php?project=Safe+Numericsfiltercount=1showfilters=1field1=buildstarttime/datecompare1=84value1=now
)

You won't want to see *everything* after you have more than a few
hundred submissions to your project's CDash page... it will be too slow
to retrieve and render all the results unless you use a limit.

Use Build Time is after 2 weeks ago to see everything from the
last two weeks.


 b) The whole setup is quite confusing.
 I would like to think that if if users of
 this library include the CTestConfig.cmake
 file that I give them
 ...
 They will be able to submit their test
 results in the same way I just did.
 Am I correct in my understanding of this?

Yes, that's correct. They don't have to include anything -- you can
just have the CTestConfig file next to the CMakeLists file, and
include(CTest) in your CMakeLists file.


 Also I have some other questions which are
 not really related to my specific problem but
 rather to what the purpose of CDash actually is.

 a) Is it a system for gathering and recording
   the results of test runs made from
   different client configurations
 b) or is it a system for running tests on the
   actual server hardware
 c) or is it a system for automatically
   downloading projects to a client machine
   and running the tests and posting the results.  

Alas, it is only a) -- none of your code is run on the CDash server.
CDash simply stores, organizes and presents the results you send it
from a
machine that does the building and testing. You can set up a
CDash@home client machine... a machine that connects to the cdash
server and requests a job. But then you also have to run something that
schedules builds for these client machines, or ping the server through
a CDash api call to instruct it to farm out a job to a waiting client.


 It seems that it’s all three - but this is not at all
 clear from the documentation.

Do you mean the wiki pages? Or something on cdash.org?


 I sort of conclude this from the information that the
 myCDash server requests regarding how to run the
 tests, where is the code repository, etc.

The code repository info is so CDash can show links to changes (on the
viewUpdates and viewChanges pages) if there's a web viewer for the
repo. It's also used when constructing scripts to send to the
CDash@home clients.


 a) I have a programming library for Safe integegers
   see http://rrsd.com/blincubator.com/bi_library/safe-numerics/
 b) I want users to be able to download the library, run
   the tests, check the results, if they want, submit
   them to the my.cdash server
 c) I want all other users to see these results so we
   can get an idea of the variety of platforms the
   tests have been run and where they might
   have failed.

 Am I doing this right? Am I missing anything?

Seems reasoanble to me. You're on the right track... Let us know if you
have further questions.

HTH,
David C.



-- 

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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Custom Commands and Environmnt Settings for PATH and LD_LIBRARY_PATH

2014-04-21 Thread David Cole
fyi...

see also:

https://github.com/Kitware/CMake/pull/31

http://public.kitware.com/Bug/view.php?id=5145

http://public.kitware.com/Bug/view.php?id=14306

http://public.kitware.com/Bug/view.php?id=10901


-- 

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] get_directory_property and get_property

2014-04-18 Thread David Cole

Hey guys,

Here's an example script that may (or may not!) illuminate things 
somewhat:


   https://gist.github.com/dlrdave/10977804

I think the main point of having VARIABLE in the get_property signature 
is to test whether or not a variable is SET or DEFINED with the uniform 
api of get_property. It may have been added/implemented simply because 
it was easy to do given its implementation.


I agree it's a weird way to set a variable... But it is a nice way to 
test for a variable's set-ness without worrying about the whole 
confusion that arises from using if tests with variable names and 
strings in the cmake language. Especially if a variable contains 
another variable's name as its contents...



HTH,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [cmake-developers] [PATCH] remove x placeholder from STREQUAL operands

2014-04-14 Thread David Cole
 Hmm..
 It is a little bit confusing for newcommers that you can not do
 simple comparision for text word
 if some variable with this name exists.

Oh, it's confusing and confounding to old-timers, too... :-)

-- 

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] Why does build_command() return a command that ignores errors?

2014-04-11 Thread David Cole

Here's a guess:

For dashboard submissions, some prefer to see *as many errors as
possible* at once in one go, so as to have the least turnaround time in
fixing errors on a remote system without having direct access to that
system.

To accommodate such a preference, the default flags have included -i
for years now...

So changing it now would be a behavioral change / backwards 
compatibility issue.


However, looks like this becomes a moot question as of 3.0:


http://www.cmake.org/cmake/help/v3.0/release/3.0.0.html#other-changes


(search the page for build_command)


HTH,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] install(QUIET ...)

2014-04-07 Thread David Cole

On 6. Apr 2014, at 16:48, David Cole dlrd...@aol.com wrote:

 The patch says it's based on 

9dadcae57bc8545d1af66ede4c91c06eaa49f9d6 but I

 don't see that commit in CMake 'master' or 'next' branches..
 Where is that commit?

It's my local commit containing the changes. I don't think I have 

push rights to

the remote repo.


Ah, right. Sorry -- I thought that was supposed to be the parent commit 



D

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] install(QUIET ...)

2014-04-06 Thread David Cole
The patch says it's based on 9dadcae57bc8545d1af66ede4c91c06eaa49f9d6 
but I don't see that commit in CMake 'master' or 'next' branches..


Where is that commit?


Thx,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [cmake-developers] [CMake] Fwd: [PATCH] Add support for Metro apps

2014-04-01 Thread David Cole
 From: Dan Kegel d...@kegel.com
 Sent: Mon, Mar 31, 2014 10:20 am

 On Mon, Mar 31, 2014 at 7:13 AM, David Cole dlrd...@aol.com wrote:
 It will be cool to be able to build Metro apps using CMake.

 Well, aside from the obvious problem :-)


Well .. obviously.  ;-)

-- 

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [CMake] Fwd: [PATCH] Add support for Metro apps

2014-04-01 Thread David Cole
 From: Dan Kegel d...@kegel.com
 Sent: Mon, Mar 31, 2014 10:20 am

 On Mon, Mar 31, 2014 at 7:13 AM, David Cole dlrd...@aol.com wrote:
 It will be cool to be able to build Metro apps using CMake.

 Well, aside from the obvious problem :-)


Well .. obviously.  ;-)

-- 

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://www.cmake.org/mailman/listinfo/cmake


Re: [cmake-developers] [CMake] Fwd: [PATCH] Add support for Metro apps

2014-03-31 Thread David Cole
Thanks for working on this. It will be cool to be able to build Metro 
apps using CMake.


One thing I think is crucial here is to include somewhere an example or 
test project that actually builds a Metro app, and shows how you have 
to construct the CMakeLists for it, and any special considerations 
needed when running CMake to generate the project. Without that, I have 
no clue where to start on evaluating whether these patches are 
sufficient or not.


Ideally, the example/test will be:
- here, use something like this CMakeLists.txt (and then show one)
- run CMake with the XXX generator
- build as usual

Could you add a test/example somewhere that shows how to use this?


And now, the following is no criticism of your patch, or your attempts 
to get this functionality into CMake,  *but*:


- there are too many ways to cross compile for CMake already, and it 
would be nice if this way was like one of the other ways rather than 
something entirely different.


Right now, CMake already supports:
- true cross-compiling using a makefile based generator and a 
toolchain file

- building universal binaries on OSX, but not with a toolchain file
- building iOS apps on OSX, but with special variables and properties 
that need setting
- building 32-bit and 64-bit windows apps from the same source tree, 
but with VS generators, using 2 different build trees each with a 
different generator, or with non-VS generators, using 2 different build 
trees, and different environments to define the tools


And now there's this. Which I guess is closest to the VS different 
generator approach.


It would be super awesome if somebody could come up with a coherent way 
to unify all this. (Steve and Eric: hopefully you are considering 
making the Android stuff you're about to work on blend in closely with 
one of these existing models rather than introducing yet another 
cross-compiling model)


My 2 cents -- again: thanks for your contribution and keep up the good 
work. Overall, CMake is still squarely the best way to build 
cross-platform C++ based projects. And supporting as many platforms as 
feasible is one of the contributing factors that makes it so.



David C.


-Original Message-
From: Minmin Gong minmin.g...@gmail.com
To: cmake-developers cmake-developers@cmake.org; cmake 
cm...@cmake.org

Sent: Mon, Mar 31, 2014 2:35 am
Subject: [CMake] Fwd:  [PATCH] Add support for Metro apps




Hi cmake developers and users,
This is a extend discussion of this ticket: 
http://www.cmake.org/Bug/view.php?id=13511.




In our project, we need to build an Win8+ Metro app. Currently the 
CMake do support VS_WINRT_EXTENSIONS. However, if you want to build an 
exe instead of dll or lib, even with x86 or x64, it always fails 
because lacking of some tags in vcxproj and sln.




So I made this patch for WinRT/Metro apps, based on the master branch 
of CMake. In this patch, 



1. WinRT-ARM, WinRT-x86, WinRT-x64 generators are added for generating 
WinRT special projects. CMAKE_VS_WINRT_VERSION is defined inside.



2. Add AppContainerApplication, ApplicationType, 
MinimumVisualStudioVersion and ApplicationTypeRevision tags to vcxproj 
in WinRT project.

3. Recognize AppxManifest file type.
4. A dedicated boolean source file property VS_WINRT_CONTENT is 
added. Generator expressions is also supported here.
5. Add Deploy.0 in .sln for deploy WinRT apps by default, as WinCE 
apps do.
6. Add PackageCertificateKeyFile tag to vcxproj for package 
certification.



Thanks for advices from Martell Malone, Daniel Pfeifer, Brad King, 
Patrick R. Gansterer, and other developers and users of CMake. More 
comments are welcomed.





--
Minmin Gong

--

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://www.cmake.org/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/cgi-bin/mailman/listinfo/cmake-developers

Re: [CMake] Fwd: [PATCH] Add support for Metro apps

2014-03-31 Thread David Cole
Thanks for working on this. It will be cool to be able to build Metro 
apps using CMake.


One thing I think is crucial here is to include somewhere an example or 
test project that actually builds a Metro app, and shows how you have 
to construct the CMakeLists for it, and any special considerations 
needed when running CMake to generate the project. Without that, I have 
no clue where to start on evaluating whether these patches are 
sufficient or not.


Ideally, the example/test will be:
- here, use something like this CMakeLists.txt (and then show one)
- run CMake with the XXX generator
- build as usual

Could you add a test/example somewhere that shows how to use this?


And now, the following is no criticism of your patch, or your attempts 
to get this functionality into CMake,  *but*:


- there are too many ways to cross compile for CMake already, and it 
would be nice if this way was like one of the other ways rather than 
something entirely different.


Right now, CMake already supports:
- true cross-compiling using a makefile based generator and a 
toolchain file

- building universal binaries on OSX, but not with a toolchain file
- building iOS apps on OSX, but with special variables and properties 
that need setting
- building 32-bit and 64-bit windows apps from the same source tree, 
but with VS generators, using 2 different build trees each with a 
different generator, or with non-VS generators, using 2 different build 
trees, and different environments to define the tools


And now there's this. Which I guess is closest to the VS different 
generator approach.


It would be super awesome if somebody could come up with a coherent way 
to unify all this. (Steve and Eric: hopefully you are considering 
making the Android stuff you're about to work on blend in closely with 
one of these existing models rather than introducing yet another 
cross-compiling model)


My 2 cents -- again: thanks for your contribution and keep up the good 
work. Overall, CMake is still squarely the best way to build 
cross-platform C++ based projects. And supporting as many platforms as 
feasible is one of the contributing factors that makes it so.



David C.


-Original Message-
From: Minmin Gong minmin.g...@gmail.com
To: cmake-developers cmake-develop...@cmake.org; cmake 
cmake@cmake.org

Sent: Mon, Mar 31, 2014 2:35 am
Subject: [CMake] Fwd:  [PATCH] Add support for Metro apps




Hi cmake developers and users,
This is a extend discussion of this ticket: 
http://www.cmake.org/Bug/view.php?id=13511.




In our project, we need to build an Win8+ Metro app. Currently the 
CMake do support VS_WINRT_EXTENSIONS. However, if you want to build an 
exe instead of dll or lib, even with x86 or x64, it always fails 
because lacking of some tags in vcxproj and sln.




So I made this patch for WinRT/Metro apps, based on the master branch 
of CMake. In this patch, 



1. WinRT-ARM, WinRT-x86, WinRT-x64 generators are added for generating 
WinRT special projects. CMAKE_VS_WINRT_VERSION is defined inside.



2. Add AppContainerApplication, ApplicationType, 
MinimumVisualStudioVersion and ApplicationTypeRevision tags to vcxproj 
in WinRT project.

3. Recognize AppxManifest file type.
4. A dedicated boolean source file property VS_WINRT_CONTENT is 
added. Generator expressions is also supported here.
5. Add Deploy.0 in .sln for deploy WinRT apps by default, as WinCE 
apps do.
6. Add PackageCertificateKeyFile tag to vcxproj for package 
certification.



Thanks for advices from Martell Malone, Daniel Pfeifer, Brad King, 
Patrick R. Gansterer, and other developers and users of CMake. More 
comments are welcomed.





--
Minmin Gong

--

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://www.cmake.org/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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] ExternalProject_Add show sources in Visual Studio

2014-03-19 Thread David Cole

Well, that sounds like the perfect way to use ExternalProject.

But why do you want to show the sources in Visual Studio? Just for ease 
of looking at them?


As I said in my earlier reply... even if we showed the sources, editing 
them would not trigger a rebuild of the external project. The 
dependencies are tracked via custom commands and stamp files that 
indicate last successful run time of those custom commands. They are 
not tracked by Visual Studio on a per-source-file/per-obj-file basis as 
they are in a normal VS project.


The main goal of ExternalProject is to provide an easy-to-use way of 
*building*, *installing* and depending on an external project... It is 
most definitely NOT to provide an easy way to do active development on 
a project.


If you need to see the sources for something that you're building 
within Visual Studio, then to me, that's a big red flag that it should 
not be an external project.



HTH,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] ExternalProject_Add show sources in Visual Studio

2014-03-19 Thread David Cole

That's one workaround. Two more come to mind:

(1) Another would be to force the configure/build steps of an external 
project to run *always* rather than when the stamp file indicates they 
are out of date. You could take a look at the open chemistry super 
build to see an example.


Specifically, check out the code here:


https://github.com/OpenChemistry/openchemistry/blob/master/CMakeLists.txt#L32


And here:


https://github.com/OpenChemistry/openchemistry/blob/master/cmake/External_avogadrolibs.cmake#L20


Then, when forced, a build of the outer project will always trigger the 
build of the external project and make sure it's up to date with 
respect to its own source tree.


But, if you have a lot of these, it just slows your build down in the 
normal case of not changing anything in the external projects. So use 
it sparingly, not globally.


(2) One more workaround worth mentioning: the manual one. 
ExternalProject_Add will generate VS projects for the sub-projects if 
they are CMake-based and your containing project is using a VS 
generator, and then open the generated sub-projects directly to see the 
normal view of things. Make mods in there, and build/install in 
there, then go back to your containing project, and it's already up to 
date.


To each his own... Good luck.


HTH,
David C.



-Original Message-
From: NoRulez noru...@me.com
To: David Cole dlrd...@aol.com
Cc: cmake cmake@cmake.org
Sent: Wed, Mar 19, 2014 9:48 am
Subject: Re: [CMake] ExternalProject_Add show sources in Visual Studio


Ok, so the only workaround to archive this is to use 
file(GLOB_RECURS...)

and rebuild the changed external project. Right?

Best Regards


Am 19.03.2014 um 12:44 schrieb David Cole dlrd...@aol.com:

Well, that sounds like the perfect way to use ExternalProject.

But why do you want to show the sources in Visual Studio? Just for 

ease of
looking at them?


As I said in my earlier reply... even if we showed the sources, 

editing them
would not trigger a rebuild of the external project. The dependencies 
are
tracked via custom commands and stamp files that indicate last 
successful run
time of those custom commands. They are not tracked by Visual Studio on 
a

per-source-file/per-obj-file basis as they are in a normal VS project.


The main goal of ExternalProject is to provide an easy-to-use way of
*building*, *installing* and depending on an external project... It is 
most
definitely NOT to provide an easy way to do active development on a 
project.


If you need to see the sources for something that you're building 

within
Visual Studio, then to me, that's a big red flag that it should not be 
an

external project.



HTH,
David C.



 
--


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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] ExternalProject_Add show sources in Visual Studio

2014-03-17 Thread David Cole

Why do you want to do that?

The ExternalProject will not rebuild correctly when you modify these 
source files... Unless you are forcing the build step to run every 
single time.


You are using ExternalProject as if it were NOT external. Why not just 
use add_subdirectory instead and have an internal project?



D

--

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://www.cmake.org/mailman/listinfo/cmake


[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-1098-g71777c1

2014-03-17 Thread David Cole
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project CMake.

The branch, next has been updated
   via  71777c1077af54fb8b0fc87ea8c43f8a771a9c9c (commit)
   via  629037c35d386fb45a3ec09e86e08c3d711cfb07 (commit)
   via  6313be44aa465ea883e3578b3a0424ae0c217d5c (commit)
   via  2eb158caf0bee12d5d74e0b50b9ea2bad9a0c7fc (commit)
  from  fe76eadb81e89374967c3aebbd762e43108c56fe (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 -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=71777c1077af54fb8b0fc87ea8c43f8a771a9c9c
commit 71777c1077af54fb8b0fc87ea8c43f8a771a9c9c
Merge: fe76ead 629037c
Author: David Cole dc...@neocisinc.com
AuthorDate: Mon Mar 17 08:52:46 2014 -0400
Commit: CMake Topic Stage kwro...@kitware.com
CommitDate: Mon Mar 17 08:52:46 2014 -0400

Merge topic 'fix-out-of-date-CTestTestMemcheck' into next

629037c3 - Prevent unnecessary rebuilds
6313be44 CMake Nightly Date Stamp
2eb158ca CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=629037c35d386fb45a3ec09e86e08c3d711cfb07
commit 629037c35d386fb45a3ec09e86e08c3d711cfb07
Author: David Cole dlrd...@aol.com
AuthorDate: Mon Mar 17 07:32:35 2014 -0400
Commit: David Cole dlrd...@aol.com
CommitDate: Mon Mar 17 08:47:46 2014 -0400

- Prevent unnecessary rebuilds

Repeated cmake .  ninja calls were resulting in rebuilds every time.

Change the test so that it uses file(WRITE to generate a .in file and
then configure_file to copy if different that .in file to the final
generated source file.

Now, rebuilds will only occur if there are changes to the generated source
file on cmake . runs after the first one.

diff --git a/Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt 
b/Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt
index c5aa2cd..47d6a24 100644
--- a/Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt
+++ b/Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt
@@ -1,7 +1,12 @@
 # A dummy checker implementation that does not write the requested output file
 # so it triggers an error for every checker.
 
-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ret0.c int main(){return 0;}\n)
+file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ret0.c.in int main(){return 0;}\n)
+
+configure_file(
+  ${CMAKE_CURRENT_BINARY_DIR}/ret0.c.in
+  ${CMAKE_CURRENT_BINARY_DIR}/ret0.c
+  )
 
 foreach(_pseudo IN ITEMS valgrind purify BC)
   add_executable(pseudonl_${_pseudo} ${CMAKE_CURRENT_BINARY_DIR}/ret0.c)

---

Summary of changes:
 Source/CMakeVersion.cmake|2 +-
 Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt |7 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)


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


Re: [CMake] CMAKE_CURRENT_LIST_DIR equivalent 2.8.2

2014-03-14 Thread David Cole
I do this to avoid using CMAKE_CURRENT_LIST_DIR in projects that must 
still work with older CMake versions:


 get_filename_component(_self_dir ${CMAKE_CURRENT_LIST_FILE} PATH)

After that call, the variable _self_dir has equivalent content to the 
present-day CMAKE_CURRENT_LIST_DIR.


CMAKE_CURRENT_LIST_FILE has been around for much longer.


HTH,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] add_custom_command( NOT REQUIRED ) ?

2014-03-10 Thread David Cole
If a custom command fails, it stops the build. It's equivalent to a 
failed compile of a source file.


If you want to avoid it, then wrap the command in a script, and make 
the script eat the error, and return success to its caller.



If you don't care if the command fails, then why are you running it at 
all? Wouldn't it be faster to run nothing, and pretend that it ran, 
but failed... ??


;-)



-Original Message-
From: J Decker d3c...@gmail.com
To: cmake cmake@cmake.org
Sent: Mon, Mar 10, 2014 11:52 pm
Subject: [CMake] add_custom_command( NOT REQUIRED ) ?


Is there no way to specify 'I don't care if this command fails?' since 
I don't have an OUTPUT anyway?



the thing is, I had a copy(all in directory, including subdirectories) 
and I had an RM (things that don't belong) which included anything that 
was a directory, but it didn't have a -f option and I didn't really 
care if it was there (warn but don't stop? )



--

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://www.cmake.org/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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Xcode cannot open generated project

2014-02-27 Thread David Cole
You can search the bug tracker http://public.kitware.com/Bug for known 
CMake bugs related to Xcode... I don't recall anything like this being 
reported recently.


What version of Xcode?

What error message do you get when trying to open the project with 
Xcode?



D

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Xcode cannot open generated project

2014-02-27 Thread David Cole

Anybody else out there using Xcode 5.0.2 with CMake yet?

Perhaps open a bug report, and attach the generated Xcode project 
files. Or send a minimal CMakeLists.txt file that reproduces the 
problem. Does it happen with the very simplest CMakeLists file? (For 
example, the one from the tutorial test in the CMake test suite?)


--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] install TARGETS given unknown argument EXPORT. with cmake 2.8.9

2014-02-24 Thread David Cole

Sure it should -- can you edit the wiki page, and correct it?



I don't have an account to edit the WIKI, so it might be faster
if somebody who already does have an account does so.


Actually, I never should have sent my request.. :-)

Chuck Atkins already had done it and replied that it was done. I just 
read my email in the wrong order that day


It's all set now:


http://www.cmake.org/Wiki/index.php?title=CMake%2FTutorials%2FPackagingaction=historysubmitdiff=55164oldid=46008



Cheers,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-19 Thread David Cole
That's just the quick brain dump version. If necessary, I can 

actually

look at old commits, or the current code to try to refresh my memory.



I think that's needed. Can you do that research into the commits and
discussion?



Please see the results of my research (aka, old commits detective 
work) in the newly added note to the mantis bug report here:


   http://public.kitware.com/Bug/view.php?id=14758#c35153

Sorry I don't have more time to spend on this for a while, but the 
links are in the bug note if anybody wants to investigate ways to 
reverse the effects of postponing de-duplication.



Cheers,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Help debug crazy Windows MSVC issue

2014-02-16 Thread David Cole

How can I structure my cmake file to avoid
this double build?



Put the custom command in a custom target, and make the libraries using 
the generated file depend on the custom target.


That works, even for parallel builds.

Google around for examples and similar advice. You'll end up using 
add_custom_target and add_dependencies in addition to what you already 
have.



HTH,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [cmake-developers] Objective-C support

2014-02-15 Thread David Cole

Right, so what Sean was saying is:

standard library version-to-version incompatibilities == ABI 
instability



--

Powered by www.kitware.com

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

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

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


Re: [CMake] cmake release and process

2014-02-12 Thread David Cole

#1. The cmake roadmap informs me that 100% of version 3.0
is complete. Any news on when this will be released?

 
Soon:-)

(Although, disclaimer: I'm not responsible for it anymore, so I can't 
be more precise than that...)




#2. How does the development team decide which issues
are included in any given release?


There will periodically be an email request on this list for what 
features/bugs are intereseting to you? -- if you see that fly by, 
that's your chance to speak up and say Hey, how about this one? Other 
than that, it's whatever each developer is most interested in / 
bothered by.




As an example, I reported a feature request some months back
(http://www.cmake.org/Bug/view.php?id=14580) and it looks
un-touched since. Obviously I do not expect it to be fixed
just curious about the process.
How do I know whether the issue has been reviewed and the
outcome of the review? Should I provide more information?
This is not a criticism of the work being done, just trying
to understand.


If it had been looked at seriously by anybody, I think they would have 
added a note to the issue, or discussed something about it on this list.


Adding more information will probably not help much... Getting a 
developer interested in tackling it (or becoming that developer 
yourself) is the best way to address feature requests in CMake right 
now. Most of the contributors are working on CMake only part of the 
time, and many new features take quite a lot of effort. There are more 
feature requests and people making feature requests than developers to 
work on them, so not all of them can be addressed in a timely fashion.



HTH,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-12 Thread David Cole
That's just the quick brain dump version. If necessary, I can 

actually

look at old commits, or the current code to try to refresh my memory.



I think that's needed. Can you do that research into the commits and
discussion?



I know it's been a week now I'm still getting to this. Will re-open 
the discussion as soon as I've gotten through the review/research.


--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-12 Thread David Cole
 Should I file this as a bug in the issue tracker then?


 Sure. Especially if you have an easy way to reproduce. (Either
 reference an external, publicly available project we can just
 build and get it to happen, or attach a CMakeLists that
 demonstrates the issue if possible.)

 That way, we can reproduce it ourselves, and verify that any fix
 we propose actually improves the situation for the reproduce case.


 For what it's worth. This problem is related to another issue I
 reported: http://public.kitware.com/Bug/view.php?id=14094. Here I also
 got a quite long, but still manageable list of include directories.


Thanks for the link.

-- 

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-10 Thread David Cole

Should I file this as a bug in the issue tracker then?



Sure. Especially if you have an easy way to reproduce. (Either 
reference an external, publicly available project we can just build 
and get it to happen, or attach a CMakeLists that demonstrates the 
issue if possible.)


That way, we can reproduce it ourselves, and verify that any fix we 
propose actually improves the situation for the reproduce case.



Thanks,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Unnecessary rebuild of ExternalProject_Add target

2014-02-09 Thread David Cole
What does your call to ExternalProject_Add look like now?

-- 

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Unnecessary rebuild of ExternalProject_Add target

2014-02-08 Thread David Cole
When you give a git repo for ExternalProject, it will *always* execute 
the UPDATE_COMMAND by default. And then, all the steps after update 
will re-execute since update re-ran.


If you want to use a git repo, but prevent this behavior, you can say:

   UPDATE_COMMAND 

to eliminate the default update step.

You can also snap to a known commit in the repo by using GIT_TAG.


HTH,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-03 Thread David Cole
I think it's mostly just a speed/space trade-off. If you don't want to 
consume the RAM temporarily (and in this case, I think it's a given, 
that we really don't want to consume 14G of RAM.) then we'll have 
to spend the time doing the de-duplication on the way in.


Although, the data structures may not be in the right places already, 
they could easily be added.


I can't remember, though: is there a reason why we wouldn't want or be 
able to expand an input to an absolute path at the time it's given 
(current directory issue, or something else?) -- because a prerequisite 
to de-duplicating is referring to the directories in their full path 
canonical fashion.


That's just the quick brain dump version. If necessary, I can actually 
look at old commits, or the current code to try to refresh my memory.



D



-Original Message-
From: Brad King brad.k...@kitware.com
To: Marcel Loose lo...@astron.nl
Cc: cmake cmake@cmake.org; David Cole dlrd...@aol.com; Stephen 
Kelly steve...@gmail.com

Sent: Mon, Feb 3, 2014 11:51 am
Subject: Re: [CMake] include_directories(...) versus 
set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)



On 01/30/2014 03:08 AM, Marcel Loose wrote:

cmake was consuming a whopping 14GB(!) of RAM memory.

[snip]

include_directories() is used inside a macro that is called
quite a lot in order to resolve cross-dependencies. This never was a
problem, because CMake automatically performed de-duplication of 

include

paths; until version 2.8.8.


IIUC it still does de-duplication but delays doing so until the
generation step.  Therefore in this use case the configuration
step buffers the duplicates.

Steve, David, having worked on these changes, what do you think
about teaching include_directories and target_include_directories
to skip appending a path that already exists in each dir/target
property?

-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://www.cmake.org/mailman/listinfo/cmake


Re: [cmake-developers] Introductions and questions

2014-01-28 Thread David Cole
 Awesome, welcome!

 Seconded!

Thirded!

-- 

Powered by www.kitware.com

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

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

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


Re: [cmake-developers] Review Request for ExternalProjects: Only update certain git submodules

2014-01-10 Thread David Cole

Attached is a patch for the ExternalProject test that simply passes

an

empty list.


Thanks, that's completely reasonable for a first-time contributor to 
CMake. I understand it's not easy to jump right in and understand how 
all the tests operate...




I'd like to pass further testing, i.e. checking against a submodule
being another local git, to someone who is more familiar with this
testing setup...


Also completely reasonable. I wouldn't hold up getting it into CMake 
for this, but if anybody else has time to work on a test with git 
submodules, but no network requirements, that would be most welcome.




We have an external project with many submodules (- boost...) and
confirm that only the submodules given in the option are cloned and
updated.
However I guess, you want a confirmation from somebody else... :-)


Not that I'm a skeptic (well, ok, maybe a smidge...) but I would 
like to have *independent* confirmation from somebody else that it at 
least works for them before we merge this into CMake.



Thanks,
David

--

Powered by www.kitware.com

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

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

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


Re: [CMake] Fwd: Visual Studio command line from CMake

2014-01-10 Thread David Cole
This approach should work... *but* you should always use the full path 
name to any custom commands. So the runthis.bat should be: 
${CMAKE_CURRENT_BINARY_DIR}/runthis.bat or SOURCE_DIR/runthis.bat


Glad you got it working with CMake, though.



-Original Message-
From: Rob McDonald rob.a.mcdon...@gmail.com
To: CMake ML cmake@cmake.org
Sent: Thu, Jan 9, 2014 6:48 pm
Subject: Re: [CMake] Fwd: Visual Studio command line from CMake


All,

Thanks for all the help, I'm getting closer.  My current approach does 
this


CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
INCLUDE( ExternalProject )


SET( VS_MAKEFILE_ZIP vsnet-makefiles.0.85.zip )

IF( MSVC )
  IF( MSVC_VERSION EQUAL 1200 )
    SET( VS_TOOLS_PATH $ENV{VS60COMNTOOLS} )
    SET( VS_ENV_BAT ${VS_TOOLS_PATH}vsvars32.bat )
  ELSEIF( MSVC_VERSION EQUAL 1300 )
    SET( VS_TOOLS_PATH $ENV{VS70COMNTOOLS} )
    SET( VS_ENV_BAT ${VS_TOOLS_PATH}vsvars32.bat )
  ELSEIF( MSVC_VERSION EQUAL 1310  )
    SET( VS_TOOLS_PATH $ENV{VS71COMNTOOLS} )
    SET( VS_ENV_BAT ${VS_TOOLS_PATH}vsvars32.bat )
  ELSEIF( MSVC_VERSION EQUAL 1400 )
    SET( VS_TOOLS_PATH $ENV{VS80COMNTOOLS} )
    SET( VS_ENV_BAT ${VS_TOOLS_PATH}vsvars32.bat )
  ELSEIF( MSVC_VERSION EQUAL 1500 )
    SET( VS_TOOLS_PATH $ENV{VS90COMNTOOLS} )
    SET( VS_ENV_BAT ${VS_TOOLS_PATH}vsvars32.bat )
  ELSEIF( MSVC_VERSION EQUAL 1600 )
    SET( VS_TOOLS_PATH $ENV{VS100COMNTOOLS} )
    SET( VS_ENV_BAT ${VS_TOOLS_PATH}vsvars32.bat )
  ELSEIF( MSVC_VERSION EQUAL 1700 )
    SET( VS_TOOLS_PATH $ENV{VS110COMNTOOLS} )
    SET( VS_ENV_BAT ${VS_TOOLS_PATH}VsDevCmd.bat )
  ELSEIF( MSVC_VERSION EQUAL 1800 )
    SET( VS_TOOLS_PATH $ENV{VS120COMNTOOLS} )
    SET( VS_ENV_BAT ${VS_TOOLS_PATH}VsDevCmd.bat )
  ENDIF( MSVC_VERSION EQUAL 1200 )
ENDIF ( MSVC )

file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/opts.txt
R
V)

file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/runthis.bat
call \${VS_ENV_BAT}\
gmake  opts.txt)

ExternalProject_Add( FLTK
  URL ${CMAKE_SOURCE_DIR}/fltk-1.3.2-source.tar
  UPDATE_COMMAND
    ${CMAKE_COMMAND} -E copy_if_different
    ${CMAKE_SOURCE_DIR}/${VS_MAKEFILE_ZIP}
    SOURCE_DIR/${VS_MAKEFILE_ZIP}
  COMMAND
    ${CMAKE_COMMAND} -E tar -xzf SOURCE_DIR/${VS_MAKEFILE_ZIP}
  COMMAND
    ${CMAKE_COMMAND} -E copy_if_different
    ${CMAKE_CURRENT_BINARY_DIR}/opts.txt
    SOURCE_DIR/opts.txt
  COMMAND
    ${CMAKE_COMMAND} -E copy_if_different
    ${CMAKE_CURRENT_BINARY_DIR}/runthis.bat
    SOURCE_DIR/runthis.bat

  PATCH_COMMAND 
  CONFIGURE_COMMAND runthis.bat
  BUILD_COMMAND 
  INSTALL_COMMAND 
  BUILD_IN_SOURCE 1
)


It doesn't fully work.


-- I create the opts.txt and runthis.bat files in 
CMAKE_CURRENT_BINARY_DIR and then copy them to SOURCE_DIR.  I 
couldn't figure out how to write them within ExternalProject_Add and 
SOURCE_DIR doesn't exist before unless I want to reset its value. 
 Suggestions Welcome.



-- opts.txt and runthis.bat end up where I want them and contain what I 
want.


-- If you double-click runthis.bat, it successfully builds FLTK.


-- However, running 'runthis.bat' from inside ExternalProject fails. 
 I've tried 'cmd runthis.bat' 'SOURCE_DIR/runthis.bat' and a few 
other things, none work.



I think it may be a problem with the command to run the batch program 
doesn't create a new environment, or doesn't keep the environment 
variables set by vsvars32.bat.



Suggestions Welcome.


Rob


P.S.  The mess of IF code to detect the MSVC version and use the 
environment variable has not been vetted and is mostly a guess at this 
point.  From all the googling I could do, it is probably closeish to 
right.



P.P.S.  vsvarsall.bat Is special because it lets you set 32/64/arm 
target and also 32/64 host environments.  I would like to support 32/64 
target, but you can't set target without knowing the host environment. 
 Is there a CMake way to detect whether the Visual Studio host 
environment is 32/64 bit?






On Thu, Jan 9, 2014 at 10:48 AM, Rob McDonald 
rob.a.mcdon...@gmail.com wrote:


Correct, this is one of the concerns that makes it more complex than 

just searching for the first vcvarsall.bat you come to.


I'd like to match up the vcvarsall to the version of visual studio 

currently in use by CMake.


I think there are now enough pieces that I can write a CMake 
'FindVSEnvironment.cmake'.  While I can't test it for a large number of 
MSVC versions, I'll post it and hopefully others can help out.


Rob


On Thu, Jan 9, 2014 at 6:44 AM, John Drescher dresche...@gmail.com 

wrote:


 Why not just write your own batch ('buildit.bat') file that does:

    call vcvarsall.bat
    nmake

 (or whatever the command to build in the VS command prompt is...)

 And then your command to build is:

    C:/full/path/to/buildit.bat

 It's presumably in a Windows-specific chunk of your CMakeLists 

anyway, so

 that should work fairly simply.

I think the part of problem would be figuring out what vcvarsall.bat
to run especially if you have more than 1 version of Visual Studio.

John







--

Powered by 

Re: [cmake-developers] Request to review topic codelite-ide-generator

2014-01-09 Thread David Cole
If all the tests pass for you locally, and you are pretty sure they 
will all pass on other machines too, then you can do it whenever you 
think it's ready. (Unless somebody else has given you feedback that you 
need to address first...)


The primary thing is to monitor the Continuous dashboards for the hour 
or two after you do so, and then the check on the Nightly dashboards 
the next day.


If any build or test failures occur on dashboard builds, you should get 
emails from the CDash server, but it doesn't hurt to check the 
dashboard yourself and get in the habit of checking there frequently.


And then: just be ready to update the topic with any fixes necessary 
for other platforms in a timely fashion.


If you don't have time to monitor the dashboards for the day or two 
after you merge a topic, then you should wait until you do have time. 
Or have a coding buddy that can help you make tweaks to the topic to 
get it right on all platforms.



Hope this helps,
David C.


--

Powered by www.kitware.com

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

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

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


Re: [cmake-developers] Review Request for ExternalProjects: Only update certain git submodules

2014-01-09 Thread David Cole
This looks like a reasonable patch to me (just by eye, have not tried 
it personally). *Although* it would be even better if there were an 
additional case added in the ExternalProject test that handles passing 
in (1) an empty git submodule list, and (2) a valid list. Although, 
unless you add code to the setup of the test git repo for that test, it 
won't have any submodules in it. And we don't want to introduce any 
network dependencies to the test suite, so no referencing a real live 
git repo on the internet.


I'd like to see a follow up patch to this one that adds *some* testing, 
too, even if just of the empty list smoke test variety...


Does anybody listening here have a project with some git submodules, 
and some time to give this a test drive? If so, please do, and let us 
know the results. If they're positive, we could take the follow up to 
this patch and get it into CMake 'next'.



Thanks,
David C.

--

Powered by www.kitware.com

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

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

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


Re: [CMake] Fwd: Visual Studio command line from CMake

2014-01-09 Thread David Cole

Why not just write your own batch ('buildit.bat') file that does:

   call vcvarsall.bat
   nmake

(or whatever the command to build in the VS command prompt is...)

And then your command to build is:

   C:/full/path/to/buildit.bat

It's presumably in a Windows-specific chunk of your CMakeLists anyway, 
so that should work fairly simply.



HTH,
David C.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Fwd: Visual Studio command line from CMake

2014-01-09 Thread David Cole
I've got a batch file that does something like this to detect the most 
recent available Visual Studio:


@rem ** Add Developer Command Prompt for VS2013, 2012 or 2010 
environment:

@set _vsver=

@set _vs12env=%VS120COMNTOOLS%VsDevCmd.bat
@if %_vsver% equ  if exist %_vs12env% set _vsver=12

@set _vs11env=%VS110COMNTOOLS%VsDevCmd.bat
@if %_vsver% equ  if exist %_vs11env% set _vsver=11

@set _vs10env=%VS100COMNTOOLS%vsvars32.bat
@if %_vsver% equ  if exist %_vs10env% set _vsver=10

@if %_vsver% equ 10 set _vsenv=%_vs10env%
@if %_vsver% equ 10 set _vstools=%VS100COMNTOOLS%

@if %_vsver% equ 11 set _vsenv=%_vs11env%
@if %_vsver% equ 11 set _vstools=%VS110COMNTOOLS%

@if %_vsver% equ 12 set _vsenv=%_vs12env%
@if %_vsver% equ 12 set _vstools=%VS120COMNTOOLS%

@if exist %_vsenv% call %_vsenv%

--

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://www.cmake.org/mailman/listinfo/cmake


<    1   2   3   4   5   6   7   8   9   10   >