[Cmake-commits] CMake branch, master, updated. v3.10.2-985-g70695e7

2018-01-31 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  70695e72a665e0491be056181464f261e836a844 (commit)
  from  a0c04e71eb2eb4b06c7a4fcfd9be21f9ac6a38ad (commit)

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

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=70695e72a665e0491be056181464f261e836a844
commit 70695e72a665e0491be056181464f261e836a844
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Thu Feb 1 00:01:10 2018 -0500
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Thu Feb 1 00:01:10 2018 -0500

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 3666d5c..7d735ea 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 10)
-set(CMake_VERSION_PATCH 20180131)
+set(CMake_VERSION_PATCH 20180201)
 #set(CMake_VERSION_RC 1)

---

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


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits


Re: [CMake] Relaying all command line arguments from SuperBuild to ExternalProject_Add

2018-01-31 Thread Saad Khattak
Thank you Don, that was it. Querying and storing the args before a call to
'project' and your loop and your conditional were the key.

On Wed, Jan 31, 2018 at 10:14 PM Don Hinton  wrote:

> Hi Saad:
>
> On Wed, Jan 31, 2018 at 6:47 PM, Saad Khattak 
> wrote:
>
>> Thanks J. I could use that to add preprocessor definitions.
>>
>> However, my question was how I could forward 'all' the command line
>> options that the user uses to generate the SuperBuild project. Suppose I
>> somehow managed to capture all the command line arguments which can include
>> variables specific to CMake and/or projects (i.e. nothing to do with
>> preprocessor definitions) in a variable called CL_CMAKE_ARGS.
>>
>
> The example you are using is close, but not quite correct.
>
> You need to harvest the comandline arguments before calling `project()`,
> just note that it won't work if CMakeCache.txt already exists.
>
> Some CMAKE variables will still have HELPSTRINGS, even if passed via the
> command line, and users can also set a random or blank HELPSTRING if they
> use a cache file.  To overcome these issues, just harvest all cache
> variables and exclude the invariant ones, e.g., CMAKE_COMMAND, etc., e.g.:
>
> $ cat ../CMakeLists.txt
> cmake_minimum_required(VERSION 3.5)
>
> message(STATUS "*** All CACHE_VARIABLES ***")
> get_cmake_property(vars CACHE_VARIABLES)
> foreach(var ${vars})
>   get_property(currentHelpString CACHE "${var}" PROPERTY HELPSTRING)
> message("${var} = [${${var}}]  --  ${currentHelpString}")
> endforeach()
>
> project(xxx)
> message(STATUS "project() called.")
>
> message(STATUS "*** Only CACHE_VARIABLES with HELPSTRING empty or matching
> \"No help,...\" ***")
> get_cmake_property(vars CACHE_VARIABLES)
> foreach(var ${vars})
>   get_property(currentHelpString CACHE "${var}" PROPERTY HELPSTRING)
> if("${currentHelpString}" MATCHES "No help, variable specified on
> the command line." OR "${currentHelpString}" STREQUAL "")
> message("${var} = [${${var}}]  --  ${currentHelpString}")
> endif()
> endforeach()
>
> $ rm -rf * && cmake -DFOO=1 -DCMAKE_BUILD_TYPE=Release -GNinja ..
> -- *** All CACHE_VARIABLES ***
> CMAKE_BUILD_TYPE = [Release]  --  No help, variable specified on the
> command line.
> CMAKE_COMMAND = [/opt/local/bin/cmake]  --  Path to CMake executable.
> CMAKE_CPACK_COMMAND = [/opt/local/bin/cpack]  --  Path to cpack program
> executable.
> CMAKE_CTEST_COMMAND = [/opt/local/bin/ctest]  --  Path to ctest program
> executable.
> CMAKE_EXTRA_GENERATOR = []  --  Name of external makefile project
> generator.
> CMAKE_GENERATOR = [Ninja]  --  Name of generator.
> CMAKE_GENERATOR_PLATFORM = []  --  Name of generator platform.
> CMAKE_GENERATOR_TOOLSET = []  --  Name of generator toolset.
> CMAKE_HOME_DIRECTORY = [/Users/dhinton/cmake_test]  --  Source directory
> with the top level CMakeLists.txt file for this project
> CMAKE_ROOT = [/opt/local/share/cmake-3.10]  --  Path to CMake installation.
> FOO = [1]  --  No help, variable specified on the command line.
> -- The C compiler identification is AppleClang 9.0.0.939
> -- The CXX compiler identification is AppleClang 9.0.0.939
> -- Check for working C compiler:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
> -- Check for working C compiler:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
> -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Detecting C compile features
> -- Detecting C compile features - done
> -- Check for working CXX compiler:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
> -- Check for working CXX compiler:
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
> -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> -- project() called.
> -- *** Only CACHE_VARIABLES with HELPSTRING empty or matching "No
> help,..." ***
> FOO = [1]  --  No help, variable specified on the command line.
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /Users/dhinton/cmake_test/build
>
> hth...
> don
>
>
>> If I do message(${CL_CMAKE_ARGS}) I get:
>>
>>  -DMY_OPTION_ONE=ON -DMY_OPTION_TWO=OFF -DSOME_VAR_1="Foo"
>>
>> Now, when I try something like this:
>>
>> ExternalProject_Add(target
>> ...
>> CMAKE_ARGS ${CL_CMAKE_ARGS}
>> ...
>> )
>>
>> One would expect CL_CMAKE_ARGS to be expanded and the arguments passed to
>> the ExternalProject_Add function, but that is not the case. I also tried:
>>
>> ExternalProject_Add(target
>> ...
>> CMAKE_ARGS "${CL_CMAKE_ARGS}"
>> ...
>> )
>>
>> Neither works. It seems like a bug in CMake but I wanted to confirm that
>> I am not missing something.
>>
>> On Wed, Jan 31, 2018 at 3:27 

Re: [CMake] Relaying all command line arguments from SuperBuild to ExternalProject_Add

2018-01-31 Thread Don Hinton
Hi Saad:

On Wed, Jan 31, 2018 at 6:47 PM, Saad Khattak  wrote:

> Thanks J. I could use that to add preprocessor definitions.
>
> However, my question was how I could forward 'all' the command line
> options that the user uses to generate the SuperBuild project. Suppose I
> somehow managed to capture all the command line arguments which can include
> variables specific to CMake and/or projects (i.e. nothing to do with
> preprocessor definitions) in a variable called CL_CMAKE_ARGS.
>

The example you are using is close, but not quite correct.

You need to harvest the comandline arguments before calling `project()`,
just note that it won't work if CMakeCache.txt already exists.

Some CMAKE variables will still have HELPSTRINGS, even if passed via the
command line, and users can also set a random or blank HELPSTRING if they
use a cache file.  To overcome these issues, just harvest all cache
variables and exclude the invariant ones, e.g., CMAKE_COMMAND, etc., e.g.:

$ cat ../CMakeLists.txt
cmake_minimum_required(VERSION 3.5)

message(STATUS "*** All CACHE_VARIABLES ***")
get_cmake_property(vars CACHE_VARIABLES)
foreach(var ${vars})
  get_property(currentHelpString CACHE "${var}" PROPERTY HELPSTRING)
message("${var} = [${${var}}]  --  ${currentHelpString}")
endforeach()

project(xxx)
message(STATUS "project() called.")

message(STATUS "*** Only CACHE_VARIABLES with HELPSTRING empty or matching
\"No help,...\" ***")
get_cmake_property(vars CACHE_VARIABLES)
foreach(var ${vars})
  get_property(currentHelpString CACHE "${var}" PROPERTY HELPSTRING)
if("${currentHelpString}" MATCHES "No help, variable specified on
the command line." OR "${currentHelpString}" STREQUAL "")
message("${var} = [${${var}}]  --  ${currentHelpString}")
endif()
endforeach()

$ rm -rf * && cmake -DFOO=1 -DCMAKE_BUILD_TYPE=Release -GNinja ..
-- *** All CACHE_VARIABLES ***
CMAKE_BUILD_TYPE = [Release]  --  No help, variable specified on the
command line.
CMAKE_COMMAND = [/opt/local/bin/cmake]  --  Path to CMake executable.
CMAKE_CPACK_COMMAND = [/opt/local/bin/cpack]  --  Path to cpack program
executable.
CMAKE_CTEST_COMMAND = [/opt/local/bin/ctest]  --  Path to ctest program
executable.
CMAKE_EXTRA_GENERATOR = []  --  Name of external makefile project generator.
CMAKE_GENERATOR = [Ninja]  --  Name of generator.
CMAKE_GENERATOR_PLATFORM = []  --  Name of generator platform.
CMAKE_GENERATOR_TOOLSET = []  --  Name of generator toolset.
CMAKE_HOME_DIRECTORY = [/Users/dhinton/cmake_test]  --  Source directory
with the top level CMakeLists.txt file for this project
CMAKE_ROOT = [/opt/local/share/cmake-3.10]  --  Path to CMake installation.
FOO = [1]  --  No help, variable specified on the command line.
-- The C compiler identification is AppleClang 9.0.0.939
-- The CXX compiler identification is AppleClang 9.0.0.939
-- Check for working C compiler:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- project() called.
-- *** Only CACHE_VARIABLES with HELPSTRING empty or matching "No help,..."
***
FOO = [1]  --  No help, variable specified on the command line.
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/dhinton/cmake_test/build

hth...
don


> If I do message(${CL_CMAKE_ARGS}) I get:
>
>  -DMY_OPTION_ONE=ON -DMY_OPTION_TWO=OFF -DSOME_VAR_1="Foo"
>
> Now, when I try something like this:
>
> ExternalProject_Add(target
> ...
> CMAKE_ARGS ${CL_CMAKE_ARGS}
> ...
> )
>
> One would expect CL_CMAKE_ARGS to be expanded and the arguments passed to
> the ExternalProject_Add function, but that is not the case. I also tried:
>
> ExternalProject_Add(target
> ...
> CMAKE_ARGS "${CL_CMAKE_ARGS}"
> ...
> )
>
> Neither works. It seems like a bug in CMake but I wanted to confirm that I
> am not missing something.
>
> On Wed, Jan 31, 2018 at 3:27 PM J Decker  wrote:
>
>>
>> (platfrom defines is a variable suitable for like ADD_DEFINITIONS(
>> ${PLATFORM_DEFINES} )
>>
>>
>>   string( REPLACE ";" " " PLATFORM_DEFINES_ARG "${PLATFORM_DEFINES}" )
>>   ExternalProject_Add( target
>> 
>> CMAKE_ARGS -DPLATFORM_DEFINES=${PLATFORM_DEFINES_ARG}
>> ..
>>  )
>>
>>
>> and in the target cmakelists to use the argument
>>
>>
>> 

Re: [CMake] Relaying all command line arguments from SuperBuild to ExternalProject_Add

2018-01-31 Thread Saad Khattak
Thanks J. I could use that to add preprocessor definitions.

However, my question was how I could forward 'all' the command line options
that the user uses to generate the SuperBuild project. Suppose I somehow
managed to capture all the command line arguments which can include
variables specific to CMake and/or projects (i.e. nothing to do with
preprocessor definitions) in a variable called CL_CMAKE_ARGS.

If I do message(${CL_CMAKE_ARGS}) I get:

 -DMY_OPTION_ONE=ON -DMY_OPTION_TWO=OFF -DSOME_VAR_1="Foo"

Now, when I try something like this:

ExternalProject_Add(target
...
CMAKE_ARGS ${CL_CMAKE_ARGS}
...
)

One would expect CL_CMAKE_ARGS to be expanded and the arguments passed to
the ExternalProject_Add function, but that is not the case. I also tried:

ExternalProject_Add(target
...
CMAKE_ARGS "${CL_CMAKE_ARGS}"
...
)

Neither works. It seems like a bug in CMake but I wanted to confirm that I
am not missing something.

On Wed, Jan 31, 2018 at 3:27 PM J Decker  wrote:

>
> (platfrom defines is a variable suitable for like ADD_DEFINITIONS(
> ${PLATFORM_DEFINES} )
>
>
>   string( REPLACE ";" " " PLATFORM_DEFINES_ARG "${PLATFORM_DEFINES}" )
>   ExternalProject_Add( target
> 
> CMAKE_ARGS -DPLATFORM_DEFINES=${PLATFORM_DEFINES_ARG}
> ..
>  )
>
>
> and in the target cmakelists to use the argument
>
>
> STRING( REPLACE " " ";" PLATFORM_DEFINES ${PLATFORM_DEFINES} )
>
> add_definitions( ${PLATFORM_DEFINES} )
>
>
>
> On Wed, Jan 31, 2018 at 9:36 AM, Saad Khattak 
> wrote:
>
>> I have the following setup:
>> Superbuild
>>- ExternalProject_Add(a...)
>>- ExternalProject_Add(b...)
>>- ExternalProject_Add(c...)
>>- ExternalProject_Add(d...)
>>
>> The SuperBuild is built from command line with some options e.g.
>> -DMY_OPTION=TRUE. I would like all these options to be passed to each of
>> the ExternalProject_Add CMAKE_ARGS.
>>
>> I tried to capture the arguments using the solution posted here:
>> https://stackoverflow.com/a/10218582/368599
>>
>> The arguments are captured properly (i.e. I printed them out to make sure
>> they are correct) but relaying them to ExternalProject_Add appears to be
>> problematic. I tried the following ways to forward the arguments (as
>> outlined in the stackoverflow solution):
>>
>> ExternalProject_Add(...
>>   CMAKE_ARGS ${CMAKE_ARGS}
>>   )
>>
>> ExternalProject_Add(...
>>   CMAKE_ARGS "${CMAKE_ARGS}" # quotes
>>   )
>>
>> ExternalProject_Add(...
>>   CMAKE_ARGS "${MY_CMAKE_ARGS}" # changed the variable name in case it
>> conflicts
>>   )
>>
>> None of that seems to work. CMake appears to ignore the commands
>> forwarded.
>>
>> Is there something I am missing?
>>
>> Thanks,
>> Saad
>>
>>
>> --
>>
>> 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:
>> https://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:
https://cmake.org/mailman/listinfo/cmake


Re: [cmake-developers] Adding backtraces to every command

2018-01-31 Thread Rich Chiodo via cmake-developers
Thanks for the link. I'll respond there. 

We still have backtraces in our fork, so I'll continue using them for now. Ben 
had a good point though. I think for our use case, the last value is the one 
needed. 

I don't think I can go into more detail other than we want to let the user 
navigate to where different things are set. 

-Original Message-
From: Brad King [mailto:brad.k...@kitware.com] 
Sent: Wednesday, January 31, 2018 11:43 AM
To: Rich Chiodo ; CMake Developers 

Subject: Re: [cmake-developers] Adding backtraces to every command

Hi Rich,

FYI there is discussion about providing backtraces from the server to clients 
here:

  
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kitware.com%2Fcmake%2Fcmake%2Fissues%2F17539=02%7C01%7Crchiodo%40microsoft.com%7C378e0befb60641901e2d08d568e2c87c%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636530245598201030=nVfucgI2ZfXqv519y8NNwj6yRtkdNw1PSw6o%2BBX9wuA%3D=0

It was originally done in CMake 3.10.0 but caused major memory bloat and so was 
reverted.

> One of the things we need is to be able to get the location of where a 
> property is set.
Threading that through everywhere for arbitrary properties will cause too much 
memory usage.  `cmTargetInternals` already has dedicated fields for backtraces 
of specific properties.  Something like that could be added for the properties 
you need.

Can you provide more details about the use case?

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


Re: [CMake] (no subject)

2018-01-31 Thread Kris Thielemans
You have to specify the full path to the locally installed cmake, or add its 
location to your PATH environment variables (before anything else)

 

ATB

Kris

From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of kartikay gupta
Sent: 31 January 2018 17:30
To: cmake@cmake.org
Subject: [CMake] (no subject)

 

Hi

 

I want to install cmake 3.10 to my institute high performace computing without 
root access, in local directory. I am able to install it, but still when I call 
the command 'cmake .. -DUSE_CUDA=ON' , it asks to upgrade cmake to atleast 3.5. 

What should be done to load cmake 3.10?

 

 

-- 

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


Re: [CMake] Relaying all command line arguments from SuperBuild to ExternalProject_Add

2018-01-31 Thread J Decker
(platfrom defines is a variable suitable for like ADD_DEFINITIONS(
${PLATFORM_DEFINES} )


  string( REPLACE ";" " " PLATFORM_DEFINES_ARG "${PLATFORM_DEFINES}" )
  ExternalProject_Add( target

CMAKE_ARGS -DPLATFORM_DEFINES=${PLATFORM_DEFINES_ARG}
..
 )


and in the target cmakelists to use the argument


STRING( REPLACE " " ";" PLATFORM_DEFINES ${PLATFORM_DEFINES} )

add_definitions( ${PLATFORM_DEFINES} )



On Wed, Jan 31, 2018 at 9:36 AM, Saad Khattak  wrote:

> I have the following setup:
> Superbuild
>- ExternalProject_Add(a...)
>- ExternalProject_Add(b...)
>- ExternalProject_Add(c...)
>- ExternalProject_Add(d...)
>
> The SuperBuild is built from command line with some options e.g.
> -DMY_OPTION=TRUE. I would like all these options to be passed to each of
> the ExternalProject_Add CMAKE_ARGS.
>
> I tried to capture the arguments using the solution posted here:
> https://stackoverflow.com/a/10218582/368599
>
> The arguments are captured properly (i.e. I printed them out to make sure
> they are correct) but relaying them to ExternalProject_Add appears to be
> problematic. I tried the following ways to forward the arguments (as
> outlined in the stackoverflow solution):
>
> ExternalProject_Add(...
>   CMAKE_ARGS ${CMAKE_ARGS}
>   )
>
> ExternalProject_Add(...
>   CMAKE_ARGS "${CMAKE_ARGS}" # quotes
>   )
>
> ExternalProject_Add(...
>   CMAKE_ARGS "${MY_CMAKE_ARGS}" # changed the variable name in case it
> conflicts
>   )
>
> None of that seems to work. CMake appears to ignore the commands forwarded.
>
> Is there something I am missing?
>
> Thanks,
> Saad
>
>
> --
>
> 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:
> https://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:
https://cmake.org/mailman/listinfo/cmake


Re: [cmake-developers] Adding backtraces to every command

2018-01-31 Thread Ben Boeckel
On Wed, Jan 31, 2018 at 18:53:39 +, Rich Chiodo via cmake-developers wrote:
> We're (Microsoft) investigating tighter integration with CMake -Server
> and the IDE.
> 
> One of the things we need is to be able to get the location of where a
> property is set.
> 
> CMake has a backtracing capability but it looks to me like properties
> don't actually keep track of their set location.
> 
> I think the easiest way for me to do this would be to add a backtrace
> to every command execute (not 100% sure yet), but I wanted to query
> the alias for advice
> 
>   1.  Is this a good approach for getting the location of every Set,
>   Link_Libraries, etc?

I don't think it'd be sufficient. What would the backtrace for the
`custom_prop` variable be in this case?

b/CMakeLists.txt:

add_library(foo ...)
set_property(TARGET foo PROPERTY custom_prop value1)

c/CMakeLists.txt (later):

set_property(TARGET foo APPEND PROPERTY custom_prop value2)

There could be multiple backtraces for each property and when it is
overwritten or deleted, should the previous backtraces be cleared out?
If appending was done manually using get_property(), list(APPEND), and
set_property() that approach would toss information out.

--Ben
-- 

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


Re: [cmake-developers] Adding backtraces to every command

2018-01-31 Thread Brad King
Hi Rich,

FYI there is discussion about providing backtraces from the server
to clients here:

  https://gitlab.kitware.com/cmake/cmake/issues/17539

It was originally done in CMake 3.10.0 but caused major memory bloat
and so was reverted.

> One of the things we need is to be able to get the location of where
> a property is set.
Threading that through everywhere for arbitrary properties will cause
too much memory usage.  `cmTargetInternals` already has dedicated
fields for backtraces of specific properties.  Something like that
could be added for the properties you need.

Can you provide more details about the use case?

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


[cmake-developers] Adding backtraces to every command

2018-01-31 Thread Rich Chiodo via cmake-developers
We're (Microsoft) investigating tighter integration with CMake -Server and the 
IDE.

One of the things we need is to be able to get the location of where a property 
is set.

CMake has a backtracing capability but it looks to me like properties don't 
actually keep track of their set location.

I think the easiest way for me to do this would be to add a backtrace to every 
command execute (not 100% sure yet), but I wanted to query the alias for advice


  1.  Is this a good approach for getting the location of every Set, 
Link_Libraries, etc?
  2.  Should I only do this in server mode so as to not affect normal execution 
with a bunch of extra tracing?

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


Re: [CMake] (no subject)

2018-01-31 Thread Marco Schuler
In your cmakelists.txt search for cmake_minumum_required and replace the
version with the version of cmake that you have installed. You might be
lucky and your program compiles.

P.S.: Please do not leave empty the subject of your e-mail...

Am 31.01.2018 18:29 schrieb "kartikay gupta" :

> Hi
>
> I want to install cmake 3.10 to my institute high performace computing
> without root access, in local directory. I am able to install it, but still
> when I call the command 'cmake .. -DUSE_CUDA=ON' , it asks to upgrade cmake
> to atleast 3.5.
> What should be done to load cmake 3.10?
>
>
>
> --
>
> 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:
> https://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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] (no subject)

2018-01-31 Thread kartikay gupta
yes, I got it. Thanks.

On Wed, Jan 31, 2018 at 11:16 PM, Eric Noulard 
wrote:

>
>
> 2018-01-31 18:29 GMT+01:00 kartikay gupta :
>
>> Hi
>>
>> I want to install cmake 3.10 to my institute high performace computing
>> without root access, in local directory. I am able to install it, but still
>> when I call the command 'cmake .. -DUSE_CUDA=ON' , it asks to upgrade cmake
>> to atleast 3.5.
>> What should be done to load cmake 3.10?
>>
>
> You should use the complete path to your locally installed cmake (or
> change your path).
>
> i.e. something like:
>
> /home/kartikay/local/cmake/bin/cmake .. -DUSE_CUDA=ON
>
>
> --
> Eric
>
-- 

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


Re: [CMake] (no subject)

2018-01-31 Thread Eric Noulard
2018-01-31 18:29 GMT+01:00 kartikay gupta :

> Hi
>
> I want to install cmake 3.10 to my institute high performace computing
> without root access, in local directory. I am able to install it, but still
> when I call the command 'cmake .. -DUSE_CUDA=ON' , it asks to upgrade cmake
> to atleast 3.5.
> What should be done to load cmake 3.10?
>

You should use the complete path to your locally installed cmake (or change
your path).

i.e. something like:

/home/kartikay/local/cmake/bin/cmake .. -DUSE_CUDA=ON


-- 
Eric
-- 

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


[CMake] Relaying all command line arguments from SuperBuild to ExternalProject_Add

2018-01-31 Thread Saad Khattak
I have the following setup:
Superbuild
   - ExternalProject_Add(a...)
   - ExternalProject_Add(b...)
   - ExternalProject_Add(c...)
   - ExternalProject_Add(d...)

The SuperBuild is built from command line with some options e.g.
-DMY_OPTION=TRUE. I would like all these options to be passed to each of
the ExternalProject_Add CMAKE_ARGS.

I tried to capture the arguments using the solution posted here:
https://stackoverflow.com/a/10218582/368599

The arguments are captured properly (i.e. I printed them out to make sure
they are correct) but relaying them to ExternalProject_Add appears to be
problematic. I tried the following ways to forward the arguments (as
outlined in the stackoverflow solution):

ExternalProject_Add(...
  CMAKE_ARGS ${CMAKE_ARGS}
  )

ExternalProject_Add(...
  CMAKE_ARGS "${CMAKE_ARGS}" # quotes
  )

ExternalProject_Add(...
  CMAKE_ARGS "${MY_CMAKE_ARGS}" # changed the variable name in case it
conflicts
  )

None of that seems to work. CMake appears to ignore the commands forwarded.

Is there something I am missing?

Thanks,
Saad
-- 

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


[CMake] (no subject)

2018-01-31 Thread kartikay gupta
Hi

I want to install cmake 3.10 to my institute high performace computing
without root access, in local directory. I am able to install it, but still
when I call the command 'cmake .. -DUSE_CUDA=ON' , it asks to upgrade cmake
to atleast 3.5.
What should be done to load cmake 3.10?
-- 

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


[CMake] Wrong MSVC with ExternalProject_Add

2018-01-31 Thread Gaƫl de Chalendar
Hi,

I encounter a problem using cmake (3.9 an 3.10) with Visual c++ 2015 under 
Windows 10. 

My build works with the "Visual Studio 14 2015 Win64" generator but I fail to 
build using the Ninja generator.

I first solved a first step with help from stackoverflow and a blog post:
https://stackoverflow.com/questions/47904633/how-to-use-together-buildbot-cmake-ninja-and-visual-studio-c-compiler

Now, the initial cmake step runs well:

cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_IGNORE_PATH=C:/Strawberry/c/
bin -DCMAKE_INSTALL_PREFIX=C:\disk\amose-buildbot-worker\lima-master-
windows-10\Dist\master\Release -DWITH_ARCH=ON -DLIMA_RESOURCES=build -
DLIMA_VERSION_RELEASE=master -DSHORTEN_POR_CORPUS_FOR_SVMLEARN=TRUE C:\disk
\amose-buildbot-worker\lima-master-windows-10\Sources
 in dir Z:\b (timeout 1200 secs)
 watching logfiles {}
 argv: [b'cmake', b'-G', b'Ninja', b'-DCMAKE_BUILD_TYPE=Release', b'-
DCMAKE_IGNORE_PATH=C:/Strawberry/c/bin', b'-DCMAKE_INSTALL_PREFIX=C:\\disk\
\amose-buildbot-worker\\lima-master-windows-10\\Dist\\master\\Release', b'-
DWITH_ARCH=ON', b'-DLIMA_RESOURCES=build', b'-DLIMA_VERSION_RELEASE=master', 
b'-DSHORTEN_POR_CORPUS_FOR_SVMLEARN=TRUE', b'C:\\disk\\amose-buildbot-worker\
\lima-master-windows-10\\Sources']
 environment:

-- The C compiler identification is MSVC 19.0.24210.0
-- The CXX compiler identification is MSVC 19.0.24210.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual 
Studio 14.0/VC/bin/amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual 
Studio 14.0/VC/bin/amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual 
Studio 14.0/VC/bin/amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual 
Studio 14.0/VC/bin/amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
SHORTEN_POR_CORPUS_FOR_SVMLEARN=TRUE
WITH_ASAN=OFF
WITH_ARCH=ON
Windows flags
PERL5LIB=C:/disk/amose-buildbot-worker/lima-master-windows-10/Sources/
lima_pelf/evalPosTagging/SVM/SVMTool-1.3.1/lib:
PATH=C:/disk/amose-buildbot-worker/lima-master-windows-10/Sources/lima_pelf/
evalPosTagging/SVM/SVMTool-1.3.1/bin:C:/Users/buildbot/Projets/externals
\bin;C:/Users/buildbot/Projets/externals\lib;C:\disk\amose-buildbot-worker
\lima-master-windows-10\Dist\master\Release\bin;C:\disk\amose-buildbot-worker
\lima-master-windows-10\Dist\master\Release\lib;C:\Program Files (x86)\MSBuild
\14.0\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN
\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Windows
\Microsoft.NET\Framework64\;C:\Program Files (x86)\Windows Kits\8.1\bin\x64;C:
\Program Files (x86)\Windows Kits\8.1\bin\x86;c:\d\bin;c:\d\share\apps\lima
\scripts;C:\Qt\Qt5.6.3\5.6.3\msvc2015_64\bin;%BOOST_LIBRARYDIR%;c:\msys64\usr
\bin;C:\ProgramData\chocolatey\lib\msys2;C:\tools\msys64;C:\tools\msys64\usr
\bin;C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs
\Microsoft.UniversalCRT.Debug\10.0.10240.0\Redist\Debug\x86;C:
\Python36\Scripts\;C:\Python36\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS
\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\ProgramData
\chocolatey\bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\Windows Kits
\8.1\Windows Performance Toolkit\;C:\local\boost_1_58_0\lib64-msvc-12.0;C:
\Program Files\CMake\bin;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:
\Strawberry\perl\bin;C:\Program Files\Java\jdk1.8.0_162\bin;C:\Users\buildbot
\AppData\Local\Microsoft\WindowsApps;c:\Qt\Qt5.6.3\5.6.3\msvc2015_64;;c:
\python36\lib\site-packages\pypiwin32_system32
Found Qt5 5.6.3
Adding module Core
Adding module Core
-- Configuring done
-- Generating done
-- Build files have been written to: Z:/b
program finished with exit code 0
elapsedTime=35.421545

But wen the build step runs, the configuration of the first ExternalProject_Add 
fails:

cmake --build . --config Release
 in dir Z:\b (timeout 3600 secs)
 watching logfiles {}
 argv: [b'cmake', b'--build', b'.', b'--config', b'Release']
 environment:

 using PTY: False
[1/55] Creating directories for 'lima_common'
[1/55] No download step for 'lima_common'
[2/55] No update step for 'lima_common'
[3/55] No patch step for 'lima_common'
[4/55] Performing configure step for 'lima_common'
-- The C compiler identification is MSVC 19.0.24210.0
-- The CXX compiler identification is MSVC
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual 
Studio 14.0/VC/bin/amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual 
Studio 14.0/VC/bin/amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual 
Studio 14.0/VC/bin/amd64/cl.exe
CMake Error at C:/Program 

[Cmake-commits] CMake branch, master, updated. v3.10.2-984-ga0c04e7

2018-01-31 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  a0c04e71eb2eb4b06c7a4fcfd9be21f9ac6a38ad (commit)
   via  c7cee1a11e1c18b48d026dfae9fc8a9ddcfa238f (commit)
  from  e2db8531f1ff1f0ea798023b58517f64a18c995a (commit)

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

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0c04e71eb2eb4b06c7a4fcfd9be21f9ac6a38ad
commit a0c04e71eb2eb4b06c7a4fcfd9be21f9ac6a38ad
Merge: e2db853 c7cee1a
Author: Brad King 
AuthorDate: Wed Jan 31 15:53:14 2018 +
Commit: Kitware Robot 
CommitDate: Wed Jan 31 10:53:21 2018 -0500

Merge topic 'windows-cmake-stack-size'

c7cee1a1 Windows: Increase stack size used by CMake binaries

Acked-by: Kitware Robot 
Merge-request: !1728


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c7cee1a11e1c18b48d026dfae9fc8a9ddcfa238f
commit c7cee1a11e1c18b48d026dfae9fc8a9ddcfa238f
Author: Brad King 
AuthorDate: Tue Jan 30 14:37:23 2018 -0500
Commit: Brad King 
CommitDate: Tue Jan 30 14:40:40 2018 -0500

Windows: Increase stack size used by CMake binaries

Deep regex matching logic can exceed the default 1MB stack size.  Until
a better regex engine is used, simply push the problem over a farther
horizon by increasing the stack size when built using a MSVC-compatible
linker.

Issue: #17659

diff --git a/CompileFlags.cmake b/CompileFlags.cmake
index 9834b04..32e7005 100644
--- a/CompileFlags.cmake
+++ b/CompileFlags.cmake
@@ -17,6 +17,10 @@ if(MSVC OR _INTEL_WINDOWS)
 else()
 endif()
 
+if(MSVC)
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stack:1000")
+endif()
+
 #silence duplicate symbol warnings on AIX
 if(CMAKE_SYSTEM_NAME MATCHES "AIX")
   if(NOT CMAKE_COMPILER_IS_GNUCXX)

---

Summary of changes:
 CompileFlags.cmake |4 
 1 file changed, 4 insertions(+)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.10.2-982-ge2db853

2018-01-31 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  e2db8531f1ff1f0ea798023b58517f64a18c995a (commit)
   via  45f6aa3235691dbbcedae082c2513cdf13ec2fd1 (commit)
  from  4499cc8bb65e217e1cb2959452ed391af82e757b (commit)

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

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e2db8531f1ff1f0ea798023b58517f64a18c995a
commit e2db8531f1ff1f0ea798023b58517f64a18c995a
Merge: 4499cc8 45f6aa3
Author: Brad King 
AuthorDate: Wed Jan 31 14:22:34 2018 +
Commit: Kitware Robot 
CommitDate: Wed Jan 31 09:22:43 2018 -0500

Merge topic 'windows-embed-cmake-gui-version'

45f6aa32 Windows: Embed version information into cmake-gui

Acked-by: Kitware Robot 
Merge-request: !1726


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=45f6aa3235691dbbcedae082c2513cdf13ec2fd1
commit 45f6aa3235691dbbcedae082c2513cdf13ec2fd1
Author: Brad King 
AuthorDate: Tue Jan 30 11:51:03 2018 -0500
Commit: Brad King 
CommitDate: Tue Jan 30 11:51:03 2018 -0500

Windows: Embed version information into cmake-gui

In commit 5b9da05b7a (Windows: Embed version information into CMake
binaries, 2017-10-25) we accidentally left out cmake-gui.

diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index 06d13ba..330b747 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -166,6 +166,10 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
 add_executable(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS} ${MANIFEST_FILE})
 target_link_libraries(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} 
${CMake_QT_LIBRARIES})
 
+if(WIN32)
+  target_sources(cmake-gui PRIVATE $)
+endif()
+
 # cmake-gui has not been updated for `include-what-you-use`.
 # Block the tool until this is done.
 set_target_properties(cmake-gui PROPERTIES

---

Summary of changes:
 Source/QtDialog/CMakeLists.txt |4 
 1 file changed, 4 insertions(+)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.10.2-980-g4499cc8

2018-01-31 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  4499cc8bb65e217e1cb2959452ed391af82e757b (commit)
   via  fa583869f7e75cdc4c7499f0dbfab2cdac5061bd (commit)
  from  a7ee918f197300ffed8f4ae0fafe6c3c2f4ea1b6 (commit)

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

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4499cc8bb65e217e1cb2959452ed391af82e757b
commit 4499cc8bb65e217e1cb2959452ed391af82e757b
Merge: a7ee918 fa58386
Author: Brad King 
AuthorDate: Wed Jan 31 13:36:18 2018 +
Commit: Kitware Robot 
CommitDate: Wed Jan 31 08:36:24 2018 -0500

Merge topic 'msvc_cuda_files_use_consistent_obj_names'

fa583869 CUDA: Use MSVC default pattern for naming object files

Acked-by: Kitware Robot 
Merge-request: !1722


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fa583869f7e75cdc4c7499f0dbfab2cdac5061bd
commit fa583869f7e75cdc4c7499f0dbfab2cdac5061bd
Author: Robert Maynard 
AuthorDate: Thu Jan 18 16:05:59 2018 -0500
Commit: Robert Maynard 
CommitDate: Tue Jan 30 09:14:02 2018 -0500

CUDA: Use MSVC default pattern for naming object files

The default that CUDA uses causes failures when you try to embed
CUDA obj's into another target.

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx 
b/Source/cmVisualStudio10TargetGenerator.cxx
index e15e833..7840e1f 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2078,9 +2078,15 @@ bool 
cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
 (*this->BuildFileStream) << firstString;
 firstString = "";
 hasFlags = true;
-this->WriteString("", 3);
-(*this->BuildFileStream) << "$(IntDir)/" << objectName
- << "\n";
+if (lang == "CUDA") {
+  this->WriteString("", 3);
+  (*this->BuildFileStream) << "$(IntDir)/" << objectName
+   << "\n";
+} else {
+  this->WriteString("", 3);
+  (*this->BuildFileStream) << "$(IntDir)/" << objectName
+   << "\n";
+}
   }
   for (std::string const& config : this->Configurations) {
 std::string configUpper = cmSystemTools::UpperCase(config);
@@ -2688,6 +2694,11 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions(
 cudaOptions.AddFlag("GPUDebugInfo", "false");
   }
 
+  // The extension on object libraries the CUDA gives isn't
+  // consistent with how MSVC generates object libraries for C+, so set
+  // the default to not have any extension
+  cudaOptions.AddFlag("CompileOut", "$(IntDir)%(Filename).obj");
+
   bool notPtx = true;
   if (this->GeneratorTarget->GetPropertyAsBool("CUDA_SEPARABLE_COMPILATION")) {
 cudaOptions.AddFlag("GenerateRelocatableDeviceCode", "true");
diff --git a/Tests/Cuda/ObjectLibrary/CMakeLists.txt 
b/Tests/Cuda/ObjectLibrary/CMakeLists.txt
index 276dc92..da5fb87 100644
--- a/Tests/Cuda/ObjectLibrary/CMakeLists.txt
+++ b/Tests/Cuda/ObjectLibrary/CMakeLists.txt
@@ -1,15 +1,18 @@
 cmake_minimum_required(VERSION 3.7)
 project (CudaObjectLibrary CUDA CXX)
 #Goal for this example:
-
-#build a object files some with cuda and some without than
-#embed these into an executable
+#
+#Build C++ and CUDA object files and than use them to make an executable
+#Make sure that CMake logic to handle object output when multiple files
+#with the same name works
+add_subdirectory(Conflicts)
 
 add_library(CudaMixedObjectLib OBJECT static.cu static.cpp)
 
 add_executable(CudaObjectLibrary
main.cpp
-   $)
+   $
+   $)
 
 if(APPLE)
   # Help the static cuda runtime find the driver (libcuda.dyllib) at runtime.
diff --git a/Tests/Cuda/ObjectLibrary/Conflicts/CMakeLists.txt 
b/Tests/Cuda/ObjectLibrary/Conflicts/CMakeLists.txt
new file mode 100644
index 000..1602f8a
--- /dev/null
+++ b/Tests/Cuda/ObjectLibrary/Conflicts/CMakeLists.txt
@@ -0,0 +1,2 @@
+
+add_library(CudaConflicts OBJECT static.cu)
diff --git a/Tests/Cuda/ObjectLibrary/static.cu 
b/Tests/Cuda/ObjectLibrary/Conflicts/static.cu
similarity index 62%
copy from Tests/Cuda/ObjectLibrary/static.cu
copy to Tests/Cuda/ObjectLibrary/Conflicts/static.cu
index aa35729..586e8c6 100644
--- a/Tests/Cuda/ObjectLibrary/static.cu
+++ b/Tests/Cuda/ObjectLibrary/Conflicts/static.cu
@@ -3,7 +3,7 @@
 #include 
 #include 
 
-int __host__ file1_sq_func(int x)
+int __host__ cu2_sq_func(int x)
 {
   cudaError_t err;
   int nDevices = 0;
@@ -13,9 +13,5 @@ int __host__ file1_sq_func(int x)
 std::cerr << 

[Cmake-commits] CMake branch, master, updated. v3.10.2-978-ga7ee918

2018-01-31 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  a7ee918f197300ffed8f4ae0fafe6c3c2f4ea1b6 (commit)
   via  3fd01be56bfa0215bcabbe27f1690654c3755b43 (commit)
   via  174693dafe2dcc7dad6394ed051791da39ff05b1 (commit)
   via  0a37b515affb386472758e43d53efa983dbe0701 (commit)
   via  efa5a26d021cf5476bebff54dd28f115c962ae9b (commit)
   via  063684503b5b5a696559b3c3cea2f1d3cc8dee29 (commit)
   via  a50828cc519d57016acc86074a446181532974ce (commit)
   via  aed227fd5ae6775a5bbdd54540666a70163c9fcb (commit)
   via  9e341f05b033e0a4835a43cf6c68b922dfd11f6e (commit)
   via  365e02e73ea9e6177ff5fb6de73e4187eded8afc (commit)
   via  4443adc1c0450a49a4413669a8ade5487f9f3026 (commit)
   via  1fe66c462b3232a6f549b868d2f9ccd73c8bd1d0 (commit)
   via  9f74aaeb7d6649241c4a478410e87d092c462960 (commit)
   via  f83330ed6cefc8ff6332db6bc9aca30b8c12c3e9 (commit)
   via  79f22e84089e3f7a29cfea3275af6fafc5d3c091 (commit)
  from  f5b5a72096236cbcac46bbcf57c6e39a1909bb90 (commit)

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

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a7ee918f197300ffed8f4ae0fafe6c3c2f4ea1b6
commit a7ee918f197300ffed8f4ae0fafe6c3c2f4ea1b6
Merge: 3fd01be aed227f
Author: Brad King 
AuthorDate: Wed Jan 31 13:34:41 2018 +
Commit: Kitware Robot 
CommitDate: Wed Jan 31 08:34:59 2018 -0500

Merge topic 'generate_speedup'

aed227fd cmLocalGenerator: change ImportedGeneratorTargets from vector to 
map
4443adc1 cmLocalGenerator: remove public GetImportedGeneratorTargets

Acked-by: Kitware Robot 
Acked-by: Attila Krasznahorkay 
Merge-request: !1717


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3fd01be56bfa0215bcabbe27f1690654c3755b43
commit 3fd01be56bfa0215bcabbe27f1690654c3755b43
Merge: 174693d 365e02e
Author: Brad King 
AuthorDate: Wed Jan 31 13:34:17 2018 +
Commit: Kitware Robot 
CommitDate: Wed Jan 31 08:34:24 2018 -0500

Merge topic 'source_group-TREE-args'

365e02e7 source_group: Fix TREE argument parsing

Acked-by: Kitware Robot 
Merge-request: !1713


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=174693dafe2dcc7dad6394ed051791da39ff05b1
commit 174693dafe2dcc7dad6394ed051791da39ff05b1
Merge: 0a37b51 9e341f0
Author: Brad King 
AuthorDate: Wed Jan 31 13:33:22 2018 +
Commit: Kitware Robot 
CommitDate: Wed Jan 31 08:33:29 2018 -0500

Merge topic 'CheckIPOSupported-doc-Fortran'

9e341f05 CheckIPOSupported: Document existing Fortran support

Acked-by: Kitware Robot 
Merge-request: !1727


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a37b515affb386472758e43d53efa983dbe0701
commit 0a37b515affb386472758e43d53efa983dbe0701
Merge: efa5a26 1fe66c4
Author: Brad King 
AuthorDate: Wed Jan 31 13:32:46 2018 +
Commit: Kitware Robot 
CommitDate: Wed Jan 31 08:33:00 2018 -0500

Merge topic 'vs-restore-order'

1fe66c46 VS: Restore the order of the AdditionalIncludeDirectories tag

Acked-by: Kitware Robot 
Merge-request: !1719


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=efa5a26d021cf5476bebff54dd28f115c962ae9b
commit efa5a26d021cf5476bebff54dd28f115c962ae9b
Merge: 0636845 79f22e8
Author: Brad King 
AuthorDate: Wed Jan 31 13:32:01 2018 +
Commit: Kitware Robot 
CommitDate: Wed Jan 31 08:32:27 2018 -0500

Merge topic 'dedup-ComputeObjectFilenames'

79f22e84 Makefile,Ninja: De-duplicate ComputeObjectFilenames method

Acked-by: Kitware Robot 
Merge-request: !1715


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=063684503b5b5a696559b3c3cea2f1d3cc8dee29
commit 063684503b5b5a696559b3c3cea2f1d3cc8dee29
Merge: a50828c f83330e
Author: Brad King 
AuthorDate: Wed Jan 31 13:31:19 2018 +
Commit: Kitware Robot 
CommitDate: Wed Jan 31 08:31:49 2018 -0500

Merge topic 'adsp-asmembler-identification'

f83330ed ASM: ADSP assembler identification

Acked-by: Kitware Robot 
Merge-request: !1723


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a50828cc519d57016acc86074a446181532974ce
commit a50828cc519d57016acc86074a446181532974ce
Merge: f5b5a72 9f74aae
Author: Brad King 

[CMake] Core-dumping CTest tests that fail

2018-01-31 Thread Rainer Poisel
Hello,

I have a few CTest tests that fail (e. g. SEGFAULT) or timeout on
Linux from time to time. The tests are performed in a Continuous
Integration (CI) environment and I would like to simplify the analysis
in case a test fails.

Is there a way to make failing CTest tests to dump their core? In my
CI I would then invoke gdb automatically to print a call-stack of all
involved threads.

Thanks and regards,
  Rainer
-- 

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


[CMake] How to get RPATH option (-Wl,-rpath,/path/to/local/lib) ?

2018-01-31 Thread Franck Houssen
How to get RPATH option (-Wl,-rpath,/path/to/local/lib) ? 

I would like to create a *.pc/cmake file for users to find a library I provide. 
As there is possibly a LOT of dependencies (libraries) I may not even be able 
to list, the most simple way to do that is to use RPATH. I know that for gcc, 
RPATH is set with "-Wl,-rpath". But what about others compilers (pgi, icc) ? 
This option could not be the same. 

Is it possible to "grab" the correct RPATH option (-Wl,-rpath) according to the 
compiler ? Something like a CMAKE_RPATH_OPTIONS to substitute in a 
*.pc/cmake.in template file ? (to create a *.pc/cmake file in the install 
directory using configure_file) 

Franck 
-- 

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


Re: [CMake] [Digital Signature Failure] Re: Hard to do if in Macro

2018-01-31 Thread Dvir Yitzchaki
You can add PARENT_SCOPE to set command to set the value on the calling code.

Regards,
Dvir

From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of J Decker
Sent: Tuesday, January 30, 2018 18:07
To: Petr Kmoch 
Cc: CMake Mail List 
Subject: [Digital Signature Failure] Re: [CMake] Hard to do if in Macro

Okay... but then with function I can't set external variables; but if( 
__ANDROID__ ) works.

`result` never changes.

---

set( __ANDROID__ 1 )

function( test __ANDROID__ RETVAL )

  if( ${__ANDROID__} EQUAL 1 OR ${__ANDROID__} STREQUAL "ON")
set( ${RETVAL} ${${RETVAL}} qwer2 )
message( "Included. " )
  endif( ${__ANDROID__} EQUAL 1 OR ${__ANDROID__} STREQUAL "ON")

  if( __ANDROID__ )
set( ${RETVAL} ${${RETVAL}} asdf )
message( "ALWAYS Included ${__ANDROID__}" )
  endif( __ANDROID__ )

endfunction( test )


set( result "default" )

test( __ANDROID__ "result" )
message( "REsult:${result}" )

test( ${__ANDROID__} "result" )
message( "REsult:${result}" )

test( OFF  "result")
message( "REsult:${result}" )

---




On Tue, Jan 30, 2018 at 12:35 AM, Petr Kmoch 
> wrote:
Macros aren't functions, and macro parameters aren't CMake variables. Expanding 
a macro parameter is effectively *textual* substitution, whereas dereferencing 
a CMake variable is a semantic one.
In other words, inside your macro, the text __ANDROID__ (when not expanded) 
never refers to the macro parameter. Macro parameters "don't exist" outside of 
expansion context. The `if(__ANDROID__)` bit therefore always refers to the 
variable __ANDROID__, never to the macro parameter __ANDROID__.
You still don't have to spell out the conditional as explicitly as you're doing 
it now, but you have to expand the parameter:
macro(test __ANDROID__)
  if(${__ANDROID__})
message( "Included. " )
  endif()
endmacro()
This is what the evaluation will look like based on how you call it:
test(__ANDROID__)   -> if(__ANDROID__) -> refers to the variable
set(__ANDROID__ 1)
test(${__ANDROID__})   -> if(1)
set(__ANDROID__ 0)
test(${__ANDROID__})   -> if(0)
test(OFF)   -> if(OFF)
CMake macros have a lot of specific and potentially weird/counterintuitive 
behaviour. In general, you should always write your commands as functions and 
only resort to macros if you explicitly need their specific behaviour.
Petr



On 30 January 2018 at 09:11, J Decker 
> wrote:
Why do I have to do

if( ${M__ANDROID__} EQUAL 1 OR ${M__ANDROID__} STREQUAL "ON")
endif( ${M__ANDROID__} EQUAL 1 OR ${M__ANDROID__} STREQUAL "ON")

in a macro like...
--

set( __ANDROID__ 1 )

macro( test __ANDROID__ )

  if( ${__ANDROID__} EQUAL 1 OR ${__ANDROID__} STREQUAL "ON")
message( "Included. " )
  endif( ${__ANDROID__} EQUAL 1 OR ${__ANDROID__} STREQUAL "ON")

  if( __ANDROID__ )
message( "ALWAYS Included ${__ANDROID__}" )
  endif( __ANDROID__ )

endmacro( test )

test( __ANDROID__ )
test( ${__ANDROID__} )
test( OFF )

--
Output

Included.
ALWAYS Included __ANDROID__
Included.
ALWAYS Included 1
ALWAYS Included OFF

--

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


Re: [CMake] Hard to do if in Macro

2018-01-31 Thread Petr Kmoch
When returning values from a function, you have to use the PARENT_SCOPE
argument of set():

function( test __ANDROID__ RETVAL )

  if( ${__ANDROID__} EQUAL 1 OR ${__ANDROID__} STREQUAL "ON")
set( ${RETVAL} ${${RETVAL}} qwer2 PASRENT_SCOPE)
message( "Included. " )
  endif( ${__ANDROID__} EQUAL 1 OR ${__ANDROID__} STREQUAL "ON")

  if( __ANDROID__ )
set( ${RETVAL} ${${RETVAL}} asdf PARENT_SCOPE)
message( "ALWAYS Included ${__ANDROID__}" )
  endif( __ANDROID__ )

endfunction( test )

Petr


On 30 January 2018 at 17:07, J Decker  wrote:

> Okay... but then with function I can't set external variables; but if(
> __ANDROID__ ) works.
>
> `result` never changes.
>
> ---
>
> set( __ANDROID__ 1 )
>
> function( test __ANDROID__ RETVAL )
>
>   if( ${__ANDROID__} EQUAL 1 OR ${__ANDROID__} STREQUAL "ON")
> set( ${RETVAL} ${${RETVAL}} qwer2 )
> message( "Included. " )
>   endif( ${__ANDROID__} EQUAL 1 OR ${__ANDROID__} STREQUAL "ON")
>
>   if( __ANDROID__ )
> set( ${RETVAL} ${${RETVAL}} asdf )
> message( "ALWAYS Included ${__ANDROID__}" )
>   endif( __ANDROID__ )
>
> endfunction( test )
>
>
> set( result "default" )
>
> test( __ANDROID__ "result" )
> message( "REsult:${result}" )
>
> test( ${__ANDROID__} "result" )
> message( "REsult:${result}" )
>
> test( OFF  "result")
> message( "REsult:${result}" )
>
> ---
>
>
>
>
> On Tue, Jan 30, 2018 at 12:35 AM, Petr Kmoch  wrote:
>
>> Macros aren't functions, and macro parameters aren't CMake variables.
>> Expanding a macro parameter is effectively *textual* substitution, whereas
>> dereferencing a CMake variable is a semantic one.
>>
>> In other words, inside your macro, the text __ANDROID__ (when not
>> expanded) never refers to the macro parameter. Macro parameters "don't
>> exist" outside of expansion context. The `if(__ANDROID__)` bit therefore
>> always refers to the variable __ANDROID__, never to the macro parameter
>> __ANDROID__.
>>
>> You still don't have to spell out the conditional as explicitly as you're
>> doing it now, but you have to expand the parameter:
>>
>> macro(test __ANDROID__)
>>   if(${__ANDROID__})
>> message( "Included. " )
>>   endif()
>> endmacro()
>>
>> This is what the evaluation will look like based on how you call it:
>>
>> test(__ANDROID__)   -> if(__ANDROID__) -> refers to the variable
>> set(__ANDROID__ 1)
>> test(${__ANDROID__})   -> if(1)
>> set(__ANDROID__ 0)
>> test(${__ANDROID__})   -> if(0)
>> test(OFF)   -> if(OFF)
>>
>> CMake macros have a lot of specific and potentially
>> weird/counterintuitive behaviour. In general, you should always write your
>> commands as functions and only resort to macros if you explicitly need
>> their specific behaviour.
>>
>> Petr
>>
>>
>>
>> On 30 January 2018 at 09:11, J Decker  wrote:
>>
>>> Why do I have to do
>>>
>>> if( ${M__ANDROID__} EQUAL 1 OR ${M__ANDROID__} STREQUAL "ON")
>>> endif( ${M__ANDROID__} EQUAL 1 OR ${M__ANDROID__} STREQUAL "ON")
>>>
>>> in a macro like...
>>> --
>>>
>>> set( __ANDROID__ 1 )
>>>
>>> macro( test __ANDROID__ )
>>>
>>>   if( ${__ANDROID__} EQUAL 1 OR ${__ANDROID__} STREQUAL "ON")
>>> message( "Included. " )
>>>   endif( ${__ANDROID__} EQUAL 1 OR ${__ANDROID__} STREQUAL "ON")
>>>
>>>   if( __ANDROID__ )
>>> message( "ALWAYS Included ${__ANDROID__}" )
>>>   endif( __ANDROID__ )
>>>
>>> endmacro( test )
>>>
>>> test( __ANDROID__ )
>>> test( ${__ANDROID__} )
>>> test( OFF )
>>>
>>> --
>>> Output
>>>
>>> Included.
>>> ALWAYS Included __ANDROID__
>>> Included.
>>> ALWAYS Included 1
>>> ALWAYS Included OFF
>>>
>>> --
>>>
>>> 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:
>>> https://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: