[CMake] Question on pathes/names of generated lib (CMake 3.5.1, Visual Studio 2015 - x64)

2016-04-13 Thread Martin Maurer
Hi,

I am trying to use CMake on a open source project called cryptominisat
( https://github.com/msoos/cryptominisat )
which is initially developed under Linux, but is meanwhile partly ported to 
Windows.
Source can already compiled (with a batch file) and run, but not yet completely 
with cmake.

It is also executed via AppVeyor, steps and log output see here:

https://ci.appveyor.com/project/msoos/cryptominisat

Mainly it is doing the following steps, also tried it on my local machine with 
downloaded and locally installed
cmake 3.5.1 and Visual Studio 2015 in a x64 native tools command prompt:
(replaced the %P% with c:\abc and I don't used logger DLL)

cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=c:\abc
msbuild "INSTALL.vcxproj"

(I work in C:\projects\cryptominisat like AppVeyor)

cmake seems to run, generating the *.vcxproj.
During run these libs are generated: temp_lib_norm.lib and temp_lib_ipasir.lib
Then there is a exe, but it always tell me it can't find

..\lib\Release\cryptominisat4.lib

(using a different name then previous generated libs)

It is doing

Lib:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\Lib.exe 
/OUT:"temp_lib_norm.dir\Release\temp_lib_norm.lib" /NOLOGO /MACHINE:X64 
/machine:x64 temp_lib_norm.dir\Release\cnf.obj

-> This lib going to "temp_lib_norm.dir"

Link:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\link.exe 
/ERRORREPORT:QUEUE 
/OUT:"C:\projects\cryptominisat\cmsat4-src\Release\cryptominisat4.dll" 
/INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib 
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST 
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed 
/PDB:"C:/projects/cryptominisat/cmsat4-src/Release/cryptominisat4.pdb" 
/SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT 
/IMPLIB:"C:/projects/cryptominisat/lib/Release/cryptominisat4.lib" /MACHINE:X64 
/machine:x64 /DLL 
"C:\projects\cryptominisat\cmsat4-src\temp_lib_norm.dir\Release\cnf.obj"

-> This DLL going to 
"C:\projects\cryptominisat\cmsat4-src\Release\cryptominisat4.dll"

Link:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\link.exe 
/ERRORREPORT:QUEUE 
/OUT:"C:\projects\cryptominisat\cmsat4-src\Release\cryptominisat4ipasir.dll" 
/INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib 
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib 
..\lib\Release\cryptominisat4.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' 
uiAccess='false'" /manifest:embed 
/PDB:"C:/projects/cryptominisat/cmsat4-src/Release/cryptominisat4ipasir.pdb" 
/SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT 
/IMPLIB:"C:/projects/cryptominisat/lib/Release/cryptominisat4ipasir.lib" 
/MACHINE:X64 /machine:x64 /DLL 
"C:\projects\cryptominisat\cmsat4-src\temp_lib_ipasir.dir\Release\ipasir.obj"
LINK : fatal error LNK1181: cannot open input file 
'..\lib\Release\cryptominisat4.lib' 
[C:\projects\cryptominisat\cmsat4-src\libcryptominisat4ipasir.vcxproj]

-> This time "..\lib\Release\cryptominisat4.lib"

There seems to be a mixture of lib pathes and names, but interesting thing is, 
it seems to be working under Linux.

I see that temp_lib_norm.lib is built in "cmsat4-src\temp_lib_norm.dir",
but there seems to be no cryptominisat4.lib at all in these directories.

  I think this is the code for copying one lib to another:
  ( complete file see 
https://github.com/msoos/cryptominisat/blob/master/src/CMakeLists.txt line 151 )

  add_library(libcryptominisat4 SHARED ${cms_lib_objects_norm}) 



  target_link_libraries(libcryptominisat4 


  LINK_PUBLIC ${cryptoms_lib_link_libs} 


  ) 


whereas

list(APPEND cms_lib_objects_norm $)

and 

  add_library(temp_lib_norm OBJECT 


  ${cryptoms_lib_files} 


  cryptominisat.cpp 

  ) 


and 

  set(cryptoms_lib_files 


  cnf.cpp 


  propengine.cpp 

  varreplacer.cpp 

...
)

I am fairly new to cmake, just bought "mastering cmake" a few days ago and 
reading and trying a lot, 
but still don't know how to debug this and where to start at all. 

Can someone give me a hint? Where is the correct place to store this *.lib 
and/or *.dll?
Are there some which fail under Windows (with Visual Studio 2015) but work on 
Linux?

Many thanks for helping!

Best regards,

Martin




-- 

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-commits] CMake branch, master, updated. v3.5.1-449-g003d4e5

2016-04-13 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  003d4e57521a876b7340ed164a737d99eabb164d (commit)
  from  f5da19edd00e05eb39332fe416f0b2bb77abadaa (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=003d4e57521a876b7340ed164a737d99eabb164d
commit 003d4e57521a876b7340ed164a737d99eabb164d
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Thu Apr 14 00:01:06 2016 -0400
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Thu Apr 14 00:01:06 2016 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 1edf6b4..a42df4f 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 5)
-set(CMake_VERSION_PATCH 20160413)
+set(CMake_VERSION_PATCH 20160414)
 #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
http://public.kitware.com/mailman/listinfo/cmake-commits


[cmake-developers] [CMake 0016062]: Policy CMP0037 should only warn about "test" and "package" being reserved if CTest and CPack are being used

2016-04-13 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://cmake.org/Bug/view.php?id=16062 
== 
Reported By:Ben Boeckel
Assigned To:
== 
Project:CMake
Issue ID:   16062
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2016-04-13 15:37 EDT
Last Modified:  2016-04-13 15:37 EDT
== 
Summary:Policy CMP0037 should only warn about "test" and
"package" being reserved if CTest and CPack are being used
Description: 
Common complaint among those not using CTest for testing, but want "make test"
to use their test running infrastructure.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-04-13 15:37 Ben BoeckelNew Issue
==

-- 

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] Unable to download cmake-3.5.1 (a 403 error)

2016-04-13 Thread Bill Hoffman

On 4/13/2016 12:40 PM, Asiga Nael via CMake wrote:

Hi,

I'm trying to download the file cmake-3.5.1-Darwin-x86_64.dmg but it brings me to a page 
at public.kitware.com with a 403 error: "Permission Denied You do not have 
permission to retrieve the URL or link you requested."

Is there any mirror hosting cmake releases, so that I can download it from 
other place?

Should be fixed now.

-Bill
--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


Re: [cmake-developers] Automoc same source - More thoughts

2016-04-13 Thread Sebastian Holtermann

Am 13.04.2016 um 16:40 schrieb Brad King:

On 04/13/2016 10:08 AM, Sebastian Holtermann wrote:

Well, looking into the sources and there is already Tests/QtAutogen.
It covers various #include "moc_..." cases.


Perhaps, but as pointed out in the issue tracker entry I linked those
test cases were not sufficient to fail after the the incorrect fix
made and reverted there.  Please identify why and extend them.



Here is a patch that introduces the same-source-name test
in Tests/QtAutogen.
With the current git cmake the test fails.

The latest moc-directory-patch from earlier in this thread
(cmake_automoc_directory_fix-2016-04-12-3.patch)
fixes the issue.

-Sebastian


>From 3e8b56da1d10defa471bd8fa1f30393c16ad5745 Mon Sep 17 00:00:00 2001
From: Sebastian Holtermann 
Date: Wed, 13 Apr 2016 20:05:04 +0200
Subject: [PATCH] Tests/QtAutogen: New Same source name in different
 directories test

---
 Tests/QtAutogen/CMakeLists.txt | 19 +++
 Tests/QtAutogen/item.cpp   | 10 ++
 Tests/QtAutogen/item.hpp   | 17 +
 Tests/QtAutogen/sname.cpp  | 20 
 Tests/QtAutogen/sname/item.cpp |  6 ++
 Tests/QtAutogen/sname/item.hpp | 13 +
 Tests/QtAutogen/sname/sdA/item.cpp | 10 ++
 Tests/QtAutogen/sname/sdA/item.hpp | 17 +
 Tests/QtAutogen/sname/sdA/sdB/item.cpp | 12 
 Tests/QtAutogen/sname/sdA/sdB/item.hpp | 19 +++
 Tests/QtAutogen/sname/sdB/item.cpp | 10 ++
 Tests/QtAutogen/sname/sdB/item.hpp | 17 +
 Tests/QtAutogen/sname/sdB/sdA/item.cpp | 12 
 Tests/QtAutogen/sname/sdB/sdA/item.hpp | 19 +++
 Tests/QtAutogen/sname/sdC/item.cpp | 13 +
 Tests/QtAutogen/sname/sdC/item.hpp | 17 +
 16 files changed, 231 insertions(+)
 create mode 100644 Tests/QtAutogen/item.cpp
 create mode 100644 Tests/QtAutogen/item.hpp
 create mode 100644 Tests/QtAutogen/sname.cpp
 create mode 100644 Tests/QtAutogen/sname/item.cpp
 create mode 100644 Tests/QtAutogen/sname/item.hpp
 create mode 100644 Tests/QtAutogen/sname/sdA/item.cpp
 create mode 100644 Tests/QtAutogen/sname/sdA/item.hpp
 create mode 100644 Tests/QtAutogen/sname/sdA/sdB/item.cpp
 create mode 100644 Tests/QtAutogen/sname/sdA/sdB/item.hpp
 create mode 100644 Tests/QtAutogen/sname/sdB/item.cpp
 create mode 100644 Tests/QtAutogen/sname/sdB/item.hpp
 create mode 100644 Tests/QtAutogen/sname/sdB/sdA/item.cpp
 create mode 100644 Tests/QtAutogen/sname/sdB/sdA/item.hpp
 create mode 100644 Tests/QtAutogen/sname/sdC/item.cpp
 create mode 100644 Tests/QtAutogen/sname/sdC/item.hpp

diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
index d5aca55..7aad28b 100644
--- a/Tests/QtAutogen/CMakeLists.txt
+++ b/Tests/QtAutogen/CMakeLists.txt
@@ -110,6 +110,25 @@ set_target_properties(
   AUTOMOC TRUE
 )
 
+# Test AUTOMOC on source files with the same name but in different directories
+add_executable(same_name
+  sname/sdA/sdB/item.cpp
+  sname/sdA/item.cpp
+  sname/sdB/sdA/item.cpp
+  sname/sdB/item.cpp
+  sname/sdC/item.cpp
+  sname/item.cpp
+  item.cpp
+  sname.cpp
+  )
+target_include_directories(same_name PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
+target_link_libraries(same_name ${QT_LIBRARIES})
+set_target_properties(
+  same_name
+  PROPERTIES
+  AUTOMOC TRUE
+)
+
 include(GenerateExportHeader)
 # The order is relevant here. B depends on A, and B headers depend on A
 # headers both subdirectories use CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE and we
diff --git a/Tests/QtAutogen/item.cpp b/Tests/QtAutogen/item.cpp
new file mode 100644
index 000..0c96f34
--- /dev/null
+++ b/Tests/QtAutogen/item.cpp
@@ -0,0 +1,10 @@
+#include "item.hpp"
+
+namespace root {
+
+void
+Item::go ( )
+{
+}
+
+}
diff --git a/Tests/QtAutogen/item.hpp b/Tests/QtAutogen/item.hpp
new file mode 100644
index 000..bda4bb0
--- /dev/null
+++ b/Tests/QtAutogen/item.hpp
@@ -0,0 +1,17 @@
+#ifndef ROOT_ITEM_HPP
+#define ROOT_ITEM_HPP
+
+#include 
+
+namespace root {
+
+class Item : public QObject
+{
+  Q_OBJECT
+  Q_SLOT
+  void go ( );
+};
+
+}
+
+#endif
diff --git a/Tests/QtAutogen/sname.cpp b/Tests/QtAutogen/sname.cpp
new file mode 100644
index 000..fd125f9
--- /dev/null
+++ b/Tests/QtAutogen/sname.cpp
@@ -0,0 +1,20 @@
+#include "item.hpp"
+#include "sname/item.hpp"
+#include "sname/sdA/item.hpp"
+#include "sname/sdA/sdB/item.hpp"
+#include "sname/sdB/item.hpp"
+#include "sname/sdB/sdA/item.hpp"
+#include "sname/sdC/item.hpp"
+
+int main(int argv, char **args)
+{
+  // Object instances
+  ::root::Item ritem;
+  Item item;
+  ::sdA::Item itemA;
+  ::sdA::sdB::Item itemAB;
+  ::sdB::Item itemB;
+  ::sdB::sdA::Item itemBA;
+  ::sdC::Item itemC;
+  return 0;
+}
diff --git a/Tests/QtAutogen/sname/item.cpp b/Tests/QtAutogen/sname/item.cpp
new file mode 100644
index 000..508f6a6
--- /dev/null
+++ 

[CMake] Unable to download cmake-3.5.1 (a 403 error)

2016-04-13 Thread Asiga Nael via CMake
Hi,

I'm trying to download the file cmake-3.5.1-Darwin-x86_64.dmg but it brings me 
to a page at public.kitware.com with a 403 error: "Permission Denied You do not 
have permission to retrieve the URL or link you requested."

Is there any mirror hosting cmake releases, so that I can download it from 
other place?

Thanks!
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


Re: [CMake] how to add custom command/step to ExternalProject_Add ?

2016-04-13 Thread jagernicolas
 

Hi David, 

thx, I solve the problem with answer I got on stack, 

http://stackoverflow.com/questions/36506300/using-autogen-sh-with-externalproject-add
[1] 

regards, 

Nicolas 

On 2016-04-08 22:05, David Cole wrote: 

> This file has an example use which executes after download and before 
> configure: 
> 
> https://github.com/Kitware/CMake/blob/master/Tests/ExternalProjectLocal/CMakeLists.txt
>  [10]
> 
> HTH,
> David C. 
> 
> On Apr 8, 2016, at 6:39 PM, jagernico...@legtux.org wrote:
> 
>> Hi, 
>> 
>> my question is related to : 
>> http://stackoverflow.com/questions/36506300/using-autogen-sh-with-externalproject-add
>>  [1] 
>> 
>> I have to use ExternalProject_Add to compile 
>> https://github.com/fukuchi/libqrencode [2] as a gitmodule, it requires to 
>> run autogen.sh before running configure. 
>> 
>> I don't understand how to use ExternalProject_Add_Step to add a step before 
>> CONFIGURE_COMMAND. 
>> 
>> regards, 
>> 
>> Nicolas
> 
>> -- 
>> 
>> Powered by www.kitware.com [3]
>> 
>> Please keep messages on-topic and check the CMake FAQ at: 
>> http://www.cmake.org/Wiki/CMake_FAQ [4]
>> 
>> 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 [5]
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html [6]
>> CMake Training Courses: http://cmake.org/cmake/help/training.html [7]
>> 
>> Visit other Kitware open-source projects at 
>> http://www.kitware.com/opensource/opensource.html [8]
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake [9]

 

Links:
--
[1]
http://stackoverflow.com/questions/36506300/using-autogen-sh-with-externalproject-add
[2] https://github.com/fukuchi/libqrencode
[3] http://www.kitware.com
[4] http://www.cmake.org/Wiki/CMake_FAQ
[5] http://cmake.org/cmake/help/support.html
[6] http://cmake.org/cmake/help/consulting.html
[7] http://cmake.org/cmake/help/training.html
[8] http://www.kitware.com/opensource/opensource.html
[9] http://public.kitware.com/mailman/listinfo/cmake
[10]
https://github.com/Kitware/CMake/blob/master/Tests/ExternalProjectLocal/CMakeLists.txt-- 

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] Automoc same source - More thoughts

2016-04-13 Thread Sebastian Holtermann

Am 13.04.2016 um 16:40 schrieb Brad King:

On 04/13/2016 10:08 AM, Sebastian Holtermann wrote:

Well, looking into the sources and there is already Tests/QtAutogen.
It covers various #include "moc_..." cases.


Perhaps, but as pointed out in the issue tracker entry I linked those
test cases were not sufficient to fail after the the incorrect fix
made and reverted there.  Please identify why and extend them.


Ok, I think I've identifier the problem of the current test
(includer abc.cpp is not in a subdirectory of CMAKE_CURRENT_BINARY_DIR).
I will prepare another test that fails on the incorrect fix, too.

-Sebastian

--

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


[cmake-developers] [CMake 0016061]: define SOLARIS and CMAKE_HOST_SOLARIS as a cmake built-in

2016-04-13 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://public.kitware.com/Bug/view.php?id=16061 
== 
Reported By:Stefan Teleman
Assigned To:
== 
Project:CMake
Issue ID:   16061
Category:   CMake
Reproducibility:always
Severity:   trivial
Priority:   normal
Status: new
== 
Date Submitted: 2016-04-13 11:02 EDT
Last Modified:  2016-04-13 11:02 EDT
== 
Summary:define SOLARIS and CMAKE_HOST_SOLARIS as a cmake
built-in
Description: 
in ${top_srcdir}/Source/cmState.cxx:

void cmState::Snapshot::SetDefaultDefinitions()

several builtins are defined: WIN32/CMAKE_HOST_WIN32, APPLE/CMAKE_HOST_APPLE,
etc.

We would like to submit this patch to add corresponding definitions
for Solaris: SOLARIS/CMAKE_HOST_SOLARIS

Proposed patch - cmState.cxx-solaris.patch - attached.

The patch is based on cmake 3.5.0.


Steps to Reproduce: 
Always - the SOLARIS/CMAKE_HOST_SOLARIS definition is not present
in cmake.

== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-04-13 11:02 Stefan Teleman New Issue
2016-04-13 11:02 Stefan Teleman File Added: cmState.cxx-solaris.patch   

==

-- 

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


[Cmake-commits] CMake branch, next, updated. v3.5.1-926-g273c68fe

2016-04-13 Thread Brad King
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  273c68fe269b62f07081208763f77e7d2dbb8b5b (commit)
   via  6620b020665c65153146ac6ea87ed06046db4244 (commit)
   via  5db66c80eb39bf0113c60984a33f77d8e6f4d729 (commit)
  from  8c2d200d987eaf4f4261e65990b2feee41c328b3 (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=273c68fe269b62f07081208763f77e7d2dbb8b5b
commit 273c68fe269b62f07081208763f77e7d2dbb8b5b
Merge: 8c2d200 6620b02
Author: Brad King 
AuthorDate: Wed Apr 13 10:48:20 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Apr 13 10:48:20 2016 -0400

Merge topic 'refactor-cmListFileBacktrace' into next

6620b020 cmState: Avoid accumulating snapshot storage for backtraces
5db66c80 cmState: Add Snapshot method to get bottom of call stack


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6620b020665c65153146ac6ea87ed06046db4244
commit 6620b020665c65153146ac6ea87ed06046db4244
Author: Brad King 
AuthorDate: Tue Apr 12 17:07:08 2016 -0400
Commit: Brad King 
CommitDate: Wed Apr 13 10:00:59 2016 -0400

cmState: Avoid accumulating snapshot storage for backtraces

Changes during post-3.3/pre-3.4 development refactored storage of most
configure-time information, including variable bindings and function
scopes.  All scopes (even short-lived) were kept persistently for
possible future debugging features, causing huge accumulated memory
usage.  This was mostly addressed by commit v3.4.1~4^2 (cmState: Avoid
accumulating snapshot storage for short-lived scopes, 2015-11-24).

Since then we still keep short-lived scopes when they are needed for a
backtrace.  This is because since commit v3.4.0-rc1~378^2
(cmListFileBacktrace: Implement in terms of cmState::Snapshot,
2015-05-29) backtraces have been lightweight objects that simply point
into the snapshot tree.  While the intention of this approach was to
avoid duplicating the call stack file path strings, the cost turned out
to be holding on to the entire call stack worth of scope snapshots,
which is much worse.

Furthermore, since commit v3.4.0-rc2~1^2 (cmIfCommand: Issue CMP0054
warning with appropriate context, 2015-10-20) all conditions used in
`if()` commands hold a backtrace for use in diagnostic messages.  Even
though the backtrace is short-lived it still causes the scope snapshot
to be kept.  This means that code like

function(foo)
  if(0)
  endif()
endfunction()

foreach(i RANGE 100)
  foo()
endforeach()

accumulates storage for the function call scope snapshots.

Fix this by partially reverting commit v3.4.0-rc1~378^2 and saving the
entire call stack during cmListFileBacktrace construction.  This way
we can avoid keeping short-lived scope snapshot storage in all cases.

diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index d5d0184..f198ac3 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -400,13 +400,40 @@ bool cmListFileParser::AddArgument(cmListFileLexer_Token* 
token,
 
 cmListFileBacktrace::cmListFileBacktrace(cmState::Snapshot snapshot,
  cmCommandContext const& cc)
-  : Context(cc)
-  , Snapshot(snapshot)
+  : Snapshot(snapshot)
 {
-  if (this->Snapshot.IsValid())
+  if (!this->Snapshot.IsValid())
+{
+return;
+}
+
+  // Record the entire call stack now so that the `Snapshot` we
+  // save for later refers to a long-lived scope.  This avoids
+  // having to keep short-lived scopes around just to extract
+  // their backtrace information later.
+
+  cmListFileContext lfc =
+cmListFileContext::FromCommandContext(
+  cc, this->Snapshot.GetExecutionListFile());
+  this->push_back(lfc);
+
+  cmState::Snapshot parent = this->Snapshot.GetCallStackParent();
+  while (parent.IsValid())
 {
-this->Snapshot.Keep();
+lfc.Name = this->Snapshot.GetEntryPointCommand();
+lfc.Line = this->Snapshot.GetEntryPointLine();
+lfc.FilePath = parent.GetExecutionListFile();
+if (lfc.FilePath.empty())
+  {
+  break;
+  }
+this->push_back(lfc);
+
+this->Snapshot = parent;
+parent = parent.GetCallStackParent();
 }
+
+  this->Snapshot = this->Snapshot.GetCallStackBottom();
 }
 
 cmListFileBacktrace::~cmListFileBacktrace()
@@ -415,48 +442,30 @@ cmListFileBacktrace::~cmListFileBacktrace()
 
 void 

Re: [cmake-developers] Automoc same source - More thoughts

2016-04-13 Thread Brad King
On 04/13/2016 10:08 AM, Sebastian Holtermann wrote:
> Well, looking into the sources and there is already Tests/QtAutogen.
> It covers various #include "moc_..." cases.

Perhaps, but as pointed out in the issue tracker entry I linked those
test cases were not sufficient to fail after the the incorrect fix
made and reverted there.  Please identify why and extend them.

> What is missing is a same-name case.
> I will post an updated patch later.

Thanks!

-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://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] Automoc same source - More thoughts

2016-04-13 Thread Sebastian Holtermann

Am 12.04.2016 um 21:26 schrieb Brad King:

On 04/12/2016 03:12 PM, Sebastian Holtermann wrote:

Here it is. Please review/commit.

To test it insert #include "moc_item.cpp" in any or many
of the item.cpp files of the attached test project.


Thanks for working on this!

As requested in the issue tracker entry you linked,
in this comment:

   https://cmake.org/Bug/view.php?id=12873#c40513

please extend the CMake test suite with a case covering
this.  We need to test both the conflicting source name
use case and the #include "moc_..." use case.  Please
revise the patch to include such tests.



Thanks for the feedback.

Well, looking into the sources and there is already Tests/QtAutogen.
It covers various #include "moc_..." cases.
What is missing is a same-name case.
I will post an updated patch later.

Regards,
Sebastian

--

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


[Cmake-commits] CMake branch, next, updated. v3.5.1-923-g8c2d200

2016-04-13 Thread Brad King
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  8c2d200d987eaf4f4261e65990b2feee41c328b3 (commit)
   via  f5da19edd00e05eb39332fe416f0b2bb77abadaa (commit)
   via  eae4cee0b54502c87fdb219b200a048082e0cb79 (commit)
   via  6f2cc120f091c1c8461650db4fe7729424d33bea (commit)
   via  1dc78fecc774822b0f7fbdc84805fcbf5a0a32cf (commit)
   via  d0b2ec3e713b7b90f78ec56ca4e1eebffb328b93 (commit)
  from  8da2c33e96b2e118cca05e31e895c52b62b44345 (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=8c2d200d987eaf4f4261e65990b2feee41c328b3
commit 8c2d200d987eaf4f4261e65990b2feee41c328b3
Merge: 8da2c33 f5da19e
Author: Brad King 
AuthorDate: Wed Apr 13 09:58:39 2016 -0400
Commit: Brad King 
CommitDate: Wed Apr 13 09:58:39 2016 -0400

Merge branch 'master' into next


---

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
http://public.kitware.com/mailman/listinfo/cmake-commits


[Cmake-commits] CMake branch, master, updated. v3.5.1-448-gf5da19e

2016-04-13 Thread Brad King
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  f5da19edd00e05eb39332fe416f0b2bb77abadaa (commit)
   via  c54ed7813fa4efe2c6c95b6ba75c02b78b601a26 (commit)
  from  eae4cee0b54502c87fdb219b200a048082e0cb79 (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=f5da19edd00e05eb39332fe416f0b2bb77abadaa
commit f5da19edd00e05eb39332fe416f0b2bb77abadaa
Merge: eae4cee c54ed78
Author: Brad King 
AuthorDate: Wed Apr 13 09:58:21 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Apr 13 09:58:21 2016 -0400

Merge topic 'cmState-rename-include-snapshot'

c54ed781 cmState: Rename CallStack snapshots to IncludeFile


---

Summary of changes:
 Source/cmMakefile.cxx |2 +-
 Source/cmState.cxx|   10 +-
 Source/cmState.h  |   10 +-
 3 files changed, 11 insertions(+), 11 deletions(-)


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


[Cmake-commits] CMake branch, master, updated. v3.5.1-446-geae4cee

2016-04-13 Thread Brad King
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  eae4cee0b54502c87fdb219b200a048082e0cb79 (commit)
   via  bd581a373373ee9807fcab35dd3e83334b73174b (commit)
   via  82ef90fcfccb1eaf53e4d15884ff3464aa9072a3 (commit)
  from  6f2cc120f091c1c8461650db4fe7729424d33bea (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=eae4cee0b54502c87fdb219b200a048082e0cb79
commit eae4cee0b54502c87fdb219b200a048082e0cb79
Merge: 6f2cc12 bd581a3
Author: Brad King 
AuthorDate: Wed Apr 13 09:58:18 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Apr 13 09:58:18 2016 -0400

Merge topic 'try_compile-config-flags'

bd581a37 try_compile: Honor CMAKE__FLAGS_ changes (#16054)
82ef90fc cmCoreTryCompile: Factor out config lookup for re-use


---

Summary of changes:
 Help/release/dev/try_compile-config-flags.rst |7 +++
 Source/cmCoreTryCompile.cxx   |   13 +++--
 Tests/RunCMake/try_compile/CompileFlags.cmake |   17 +
 Tests/RunCMake/try_compile/RunCMakeTest.cmake |1 +
 Tests/RunCMake/try_compile/src.c  |3 +++
 5 files changed, 39 insertions(+), 2 deletions(-)
 create mode 100644 Help/release/dev/try_compile-config-flags.rst
 create mode 100644 Tests/RunCMake/try_compile/CompileFlags.cmake


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


[Cmake-commits] CMake branch, master, updated. v3.5.1-443-g6f2cc12

2016-04-13 Thread Brad King
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  6f2cc120f091c1c8461650db4fe7729424d33bea (commit)
   via  875490545da19859a4787f71422515ddefeec401 (commit)
  from  1dc78fecc774822b0f7fbdc84805fcbf5a0a32cf (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=6f2cc120f091c1c8461650db4fe7729424d33bea
commit 6f2cc120f091c1c8461650db4fe7729424d33bea
Merge: 1dc78fe 8754905
Author: Brad King 
AuthorDate: Wed Apr 13 09:58:14 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Apr 13 09:58:14 2016 -0400

Merge topic 'FindMPI-docs'

87549054 FindMPI: Improve documentation formatting


---

Summary of changes:
 Modules/FindMPI.cmake |   27 +++
 1 file changed, 15 insertions(+), 12 deletions(-)


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


[Cmake-commits] CMake branch, master, updated. v3.5.1-441-g1dc78fe

2016-04-13 Thread Brad King
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  1dc78fecc774822b0f7fbdc84805fcbf5a0a32cf (commit)
   via  5e62444cff5ead280a111c116a3fe810181379cf (commit)
  from  d0b2ec3e713b7b90f78ec56ca4e1eebffb328b93 (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=1dc78fecc774822b0f7fbdc84805fcbf5a0a32cf
commit 1dc78fecc774822b0f7fbdc84805fcbf5a0a32cf
Merge: d0b2ec3 5e62444
Author: Brad King 
AuthorDate: Wed Apr 13 09:58:08 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Apr 13 09:58:08 2016 -0400

Merge topic 'clang-tidy'

5e62444c Add options to run clang-tidy with the compiler


---

Summary of changes:
 Help/manual/cmake-properties.7.rst |1 +
 Help/manual/cmake-variables.7.rst  |1 +
 ...NCLUDE_WHAT_YOU_USE.rst => LANG_CLANG_TIDY.rst} |8 +-
 Help/release/dev/clang-tidy.rst|7 ++
 ...ILER_LAUNCHER.rst => CMAKE_LANG_CLANG_TIDY.rst} |6 +-
 Source/cmMakefileTargetGenerator.cxx   |   19 -
 Source/cmNinjaTargetGenerator.cxx  |   18 -
 Source/cmTarget.cxx|2 +
 Source/cmcmd.cxx   |   80 +++-
 Tests/RunCMake/CMakeLists.txt  |2 +
 Tests/RunCMake/ClangTidy/C-Build-stdout.txt|1 +
 Tests/RunCMake/ClangTidy/C-launch-Build-stdout.txt |1 +
 .../{CompilerLauncher => ClangTidy}/C-launch.cmake |0
 Tests/RunCMake/ClangTidy/C.cmake   |3 +
 .../{ToolchainFile => ClangTidy}/CMakeLists.txt|0
 Tests/RunCMake/ClangTidy/CXX-Build-stdout.txt  |1 +
 .../RunCMake/ClangTidy/CXX-launch-Build-stdout.txt |1 +
 .../CXX-launch.cmake   |0
 Tests/RunCMake/ClangTidy/CXX.cmake |3 +
 .../RunCMakeTest.cmake |   12 +--
 .../ClangTidy}/main.c  |0
 .../{CompilerLauncher => ClangTidy}/main.cxx   |0
 .../CommandLine/E___run_iwyu-no-iwyu-stderr.txt|2 +-
 Tests/RunCMake/pseudo_tidy.c   |   16 
 24 files changed, 143 insertions(+), 41 deletions(-)
 copy Help/prop_tgt/{LANG_INCLUDE_WHAT_YOU_USE.rst => LANG_CLANG_TIDY.rst} (63%)
 create mode 100644 Help/release/dev/clang-tidy.rst
 copy Help/variable/{CMAKE_LANG_COMPILER_LAUNCHER.rst => 
CMAKE_LANG_CLANG_TIDY.rst} (50%)
 create mode 100644 Tests/RunCMake/ClangTidy/C-Build-stdout.txt
 create mode 100644 Tests/RunCMake/ClangTidy/C-launch-Build-stdout.txt
 copy Tests/RunCMake/{CompilerLauncher => ClangTidy}/C-launch.cmake (100%)
 create mode 100644 Tests/RunCMake/ClangTidy/C.cmake
 copy Tests/RunCMake/{ToolchainFile => ClangTidy}/CMakeLists.txt (100%)
 create mode 100644 Tests/RunCMake/ClangTidy/CXX-Build-stdout.txt
 create mode 100644 Tests/RunCMake/ClangTidy/CXX-launch-Build-stdout.txt
 copy Tests/RunCMake/{CompilerLauncher => ClangTidy}/CXX-launch.cmake (100%)
 create mode 100644 Tests/RunCMake/ClangTidy/CXX.cmake
 copy Tests/RunCMake/{IncludeWhatYouUse => ClangTidy}/RunCMakeTest.cmake (75%)
 copy Tests/{CMakeOnly/LinkInterfaceLoop => RunCMake/ClangTidy}/main.c (100%)
 copy Tests/RunCMake/{CompilerLauncher => ClangTidy}/main.cxx (100%)
 create mode 100644 Tests/RunCMake/pseudo_tidy.c


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


[Cmake-commits] CMake branch, next, updated. v3.5.1-917-g8da2c33

2016-04-13 Thread Brad King
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  8da2c33e96b2e118cca05e31e895c52b62b44345 (commit)
   via  5e62444cff5ead280a111c116a3fe810181379cf (commit)
  from  eaadfd357c9a6a438f642dd892b8bea771279a90 (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=8da2c33e96b2e118cca05e31e895c52b62b44345
commit 8da2c33e96b2e118cca05e31e895c52b62b44345
Merge: eaadfd3 5e62444
Author: Brad King 
AuthorDate: Wed Apr 13 09:56:31 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Wed Apr 13 09:56:31 2016 -0400

Merge topic 'clang-tidy' into next

5e62444c Add options to run clang-tidy with the compiler


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e62444cff5ead280a111c116a3fe810181379cf
commit 5e62444cff5ead280a111c116a3fe810181379cf
Author: Daniel Pfeifer 
AuthorDate: Fri Apr 8 22:09:27 2016 +0200
Commit: Brad King 
CommitDate: Wed Apr 13 09:56:10 2016 -0400

Add options to run clang-tidy with the compiler

Create a _CLANG_TIDY target property (initialized by a
CMAKE__CLANG_TIDY variable) to specify a clang-tidy command line
to be run along with the compiler.

diff --git a/Help/manual/cmake-properties.7.rst 
b/Help/manual/cmake-properties.7.rst
index 73d1142..3403dcd 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -197,6 +197,7 @@ Properties on Targets
/prop_tgt/JOB_POOL_COMPILE
/prop_tgt/JOB_POOL_LINK
/prop_tgt/LABELS
+   /prop_tgt/LANG_CLANG_TIDY
/prop_tgt/LANG_COMPILER_LAUNCHER
/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE
/prop_tgt/LANG_VISIBILITY_PRESET
diff --git a/Help/manual/cmake-variables.7.rst 
b/Help/manual/cmake-variables.7.rst
index 3f73b32..7cf3a3d 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -259,6 +259,7 @@ Variables that Control the Build
/variable/CMAKE_INSTALL_RPATH
/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH
/variable/CMAKE_IOS_INSTALL_COMBINED
+   /variable/CMAKE_LANG_CLANG_TIDY
/variable/CMAKE_LANG_COMPILER_LAUNCHER
/variable/CMAKE_LANG_INCLUDE_WHAT_YOU_USE
/variable/CMAKE_LANG_VISIBILITY_PRESET
diff --git a/Help/prop_tgt/LANG_CLANG_TIDY.rst 
b/Help/prop_tgt/LANG_CLANG_TIDY.rst
new file mode 100644
index 000..2887e23
--- /dev/null
+++ b/Help/prop_tgt/LANG_CLANG_TIDY.rst
@@ -0,0 +1,13 @@
+_CLANG_TIDY
+-
+
+This property is implemented only when  is ``C`` or ``CXX``.
+
+Specify a :ref:`;-list ` containing a command
+line for the ``clang-tidy`` tool.  The :ref:`Makefile Generators`
+and the :generator:`Ninja` generator will run this tool along with the
+compiler and report a warning if the tool reports any problems.
+
+This property is initialized by the value of
+the :variable:`CMAKE__CLANG_TIDY` variable if it is set
+when a target is created.
diff --git a/Help/release/dev/clang-tidy.rst b/Help/release/dev/clang-tidy.rst
new file mode 100644
index 000..030a7c9
--- /dev/null
+++ b/Help/release/dev/clang-tidy.rst
@@ -0,0 +1,7 @@
+clang-tidy
+--
+
+* A :prop_tgt:`_CLANG_TIDY` target property and supporting
+  :variable:`CMAKE__CLANG_TIDY` variable were introduced to tell the
+  :ref:`Makefile Generators` and the :generator:`Ninja` generator to run
+  ``clang-tidy`` along with the compiler for ``C`` and ``CXX`` languages.
diff --git a/Help/variable/CMAKE_LANG_CLANG_TIDY.rst 
b/Help/variable/CMAKE_LANG_CLANG_TIDY.rst
new file mode 100644
index 000..492c12c
--- /dev/null
+++ b/Help/variable/CMAKE_LANG_CLANG_TIDY.rst
@@ -0,0 +1,6 @@
+CMAKE__CLANG_TIDY
+---
+
+Default value for :prop_tgt:`_CLANG_TIDY` target property.
+This variable is used to initialize the property on each target as it is
+created.  This is done only when  is ``C`` or ``CXX``.
diff --git a/Source/cmMakefileTargetGenerator.cxx 
b/Source/cmMakefileTargetGenerator.cxx
index eedc6ab..29708d9 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -667,10 +667,23 @@ cmMakefileTargetGenerator
 {
 std::string const iwyu_prop = lang + "_INCLUDE_WHAT_YOU_USE";
 const char *iwyu = this->GeneratorTarget->GetProperty(iwyu_prop);
-if (iwyu && *iwyu)
+std::string const tidy_prop = lang + "_CLANG_TIDY";
+const char *tidy = this->GeneratorTarget->GetProperty(tidy_prop);
+if ((iwyu && *iwyu) || (tidy && *tidy))
   {
-  std::string run_iwyu = "$(CMAKE_COMMAND) -E __run_iwyu --iwyu=";
-  run_iwyu += 

Re: [CMake] Setting properties from within a function

2016-04-13 Thread Michael Surette

On 13/04/16 09:20 AM, Tamás Kenéz wrote:

Okay, I see. The problem is that the ${DEF} is quoted so it won't fall
apart into separate arguments.
Tamás



Thanks, I'll give that a try tonight.

Mike


--

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] Setting properties from within a function

2016-04-13 Thread Tamás Kenéz
Okay, I see. The problem is that the ${DEF} is quoted so it won't fall
apart into separate arguments.
Tamás

On Wed, Apr 13, 2016 at 4:54 AM, Michael Surette 
wrote:

> On 2016-04-12 06:57 PM, Tamás Kenéz wrote:
>
>> I don't get how come the macro works because
>> `target_compile_definitions` needs at least 3 parameters. The second one
>> must be PRIVATE|PUBLIC|INTERFACE.
>> Tamas
>>
>> On Tue, Apr 12, 2016 at 7:43 AM, Michael Surette
>> > > wrote:
>>
>> I would like to use set target properties from within a function.  ie
>>
>> function(MINE TGT DEF)
>>target_compile_definitions("${TGT}" "${DEF}")
>> endfunction(MINE TGT DEF)
>>
>> This doesn't work.  If I change it to a macro, it does.
>>
>> macro(MINE TGT DEF)
>>target_compile_definitions("${TGT}" "${DEF}")
>> endmacro(MINE TGT DEF)
>>
>> Is there a way to extend the scope of TGT in the function so that
>> the function variant works?
>>
>
> Good catch.
>
> Actually, I have the (usually PRIVATE) part as the beginning of ${DEF}.
>
> To clarify, this is a question about scoping.  If the command in the
> function was a "set" I could do
>
> set("${TGT}" "${DEF}" PARENT_SCOPE)
>
> In my example, what I want to do is set the target_compile_definitions of
> the name "${TGT}".  A function is preferable to a macro so I can avoid
> namespace collisions.
>
> This is not all that this function does of course, or I would just call
> target_compile_definitions directly, but I cut out the other stuff to
> simplify the example.
>
> Upon further thought, perhaps you are on to something, let me do some
> testing.
>
> In the meantime, any more thoughts would be appreciated.
>
>
> Mike
>
> --
>
> 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] issue with target_link_libraries and MSVC

2016-04-13 Thread Benjamin Ballet via CMake
I'v found a way to enable openmp for a few target only with
target_link_libraries :
I created an imported interface OpenMP and setted the property
INTERFACE_COMPILE_OPTIONS

2016-04-13 12:16 GMT+02:00 Matějů Miroslav, Ing. :

> The page I linked says /openmp is a compiler flag (not linker flag), so
> adding it to CMAKE_CXX_FLAGS instead of LINK_FLAGS makes perfect sense.
>
>
>
> Miroslav
>
>
>
> *From:* Benjamin Ballet [mailto:bbal...@ivsweb.com]
> *Sent:* Wednesday, April 13, 2016 11:28 AM
> *To:* Matějů Miroslav, Ing.
> *Cc:* cmake@cmake.org
> *Subject:* Re: [CMake] issue with target_link_libraries and MSVC
>
>
>
> Ho yes, my bad, however there is still the same issue with forward slashes
>
>
>
> I receive the flag with FindOpenMP module. It's sad we can't do :
>
> target_link_libraries(... ${OpenMP_CXX_FLAGS}) for a few target
>
>
>
> In the end I add the flags for the whole project :
>
> set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
>
>
>
> 2016-04-13 7:54 GMT+02:00 Matějů Miroslav, Ing. :
>
> Hi Benjamin,
>
>
>
> MSVC flags start with “forward” slashes: / (However, MSVC also accepts
> hyphens (-) in my experience.)
>
> Documentation for /openmp flag:
> https://msdn.microsoft.com/library/fw509c3b.aspx
>
>
>
> Best regards,
>
> Miroslav
>
>
>
> *From:* CMake [mailto:cmake-boun...@cmake.org] *On Behalf Of *Benjamin
> Ballet via CMake
> *Sent:* Tuesday, April 12, 2016 5:30 PM
> *To:* cmake@cmake.org
> *Subject:* [CMake] issue with target_link_libraries and MSVC
>
>
>
> I'm trying to add the openmp flag to a target with target_link_libraries.
>
> \openmp is interpreted as a file name and visual try to link to \openmp.obj
>
>
>
> The documentation state that target_link_libraries see an item as a flag
> if it start with - but MSVC flags start with \
>
>
>
> Is there a way to add a link flags to a target with target_link_libraries
> and MSVC ?
>
>
>
> Thank you all
>
>
>
> --
>
> *Benjamin BALLET*
> Ingénieur R
>
>
> *ACTIVISU*
>
> 19, rue Klock - 92110 Clichy
>
> *> Standard Tél* :  01 44 69 37 37
>
> *>* www.activisu.com
>
>
>
>
>
> --
>
> *Benjamin BALLET*
> Ingénieur R
>
>
> *ACTIVISU*
>
> 19, rue Klock - 92110 Clichy
>
> *> Standard Tél* :  01 44 69 37 37
>
> *>* www.activisu.com
>



-- 
*Benjamin BALLET*
Ingénieur R

*ACTIVISU*
19, rue Klock - 92110 Clichy
*> Standard Tél* :  01 44 69 37 37
*>* www.activisu.com
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Re: [CMake] issue with target_link_libraries and MSVC

2016-04-13 Thread Matějů Miroslav , Ing .
The page I linked says /openmp is a compiler flag (not linker flag), so adding 
it to CMAKE_CXX_FLAGS instead of LINK_FLAGS makes perfect sense.

Miroslav

From: Benjamin Ballet [mailto:bbal...@ivsweb.com]
Sent: Wednesday, April 13, 2016 11:28 AM
To: Matějů Miroslav, Ing.
Cc: cmake@cmake.org
Subject: Re: [CMake] issue with target_link_libraries and MSVC

Ho yes, my bad, however there is still the same issue with forward slashes

I receive the flag with FindOpenMP module. It's sad we can't do :
target_link_libraries(... ${OpenMP_CXX_FLAGS}) for a few target

In the end I add the flags for the whole project :
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")

2016-04-13 7:54 GMT+02:00 Matějů Miroslav, Ing. 
>:
Hi Benjamin,

MSVC flags start with “forward” slashes: / (However, MSVC also accepts hyphens 
(-) in my experience.)
Documentation for /openmp flag: https://msdn.microsoft.com/library/fw509c3b.aspx

Best regards,
Miroslav

From: CMake [mailto:cmake-boun...@cmake.org] On 
Behalf Of Benjamin Ballet via CMake
Sent: Tuesday, April 12, 2016 5:30 PM
To: cmake@cmake.org
Subject: [CMake] issue with target_link_libraries and MSVC

I'm trying to add the openmp flag to a target with target_link_libraries.
\openmp is interpreted as a file name and visual try to link to \openmp.obj

The documentation state that target_link_libraries see an item as a flag if it 
start with - but MSVC flags start with \

Is there a way to add a link flags to a target with target_link_libraries and 
MSVC ?

Thank you all

--
Benjamin BALLET
Ingénieur R

ACTIVISU
19, rue Klock - 92110 Clichy
> Standard Tél :  01 44 69 37 37
> www.activisu.com


--
Benjamin BALLET
Ingénieur R

ACTIVISU
19, rue Klock - 92110 Clichy
> Standard Tél :  01 44 69 37 37
> www.activisu.com
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Re: [CMake] issue with target_link_libraries and MSVC

2016-04-13 Thread Benjamin Ballet via CMake
Ho yes, my bad, however there is still the same issue with forward slashes

I receive the flag with FindOpenMP module. It's sad we can't do :
target_link_libraries(... ${OpenMP_CXX_FLAGS}) for a few target

In the end I add the flags for the whole project :
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")

2016-04-13 7:54 GMT+02:00 Matějů Miroslav, Ing. :

> Hi Benjamin,
>
>
>
> MSVC flags start with “forward” slashes: / (However, MSVC also accepts
> hyphens (-) in my experience.)
>
> Documentation for /openmp flag:
> https://msdn.microsoft.com/library/fw509c3b.aspx
>
>
>
> Best regards,
>
> Miroslav
>
>
>
> *From:* CMake [mailto:cmake-boun...@cmake.org] *On Behalf Of *Benjamin
> Ballet via CMake
> *Sent:* Tuesday, April 12, 2016 5:30 PM
> *To:* cmake@cmake.org
> *Subject:* [CMake] issue with target_link_libraries and MSVC
>
>
>
> I'm trying to add the openmp flag to a target with target_link_libraries.
>
> \openmp is interpreted as a file name and visual try to link to \openmp.obj
>
>
>
> The documentation state that target_link_libraries see an item as a flag
> if it start with - but MSVC flags start with \
>
>
>
> Is there a way to add a link flags to a target with target_link_libraries
> and MSVC ?
>
>
>
> Thank you all
>
>
>
> --
>
> *Benjamin BALLET*
> Ingénieur R
>
>
> *ACTIVISU*
>
> 19, rue Klock - 92110 Clichy
>
> *> Standard Tél* :  01 44 69 37 37
>
> *>* www.activisu.com
>



-- 
*Benjamin BALLET*
Ingénieur R

*ACTIVISU*
19, rue Klock - 92110 Clichy
*> Standard Tél* :  01 44 69 37 37
*>* www.activisu.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