Re: [CMake] using source files in build directory

2015-10-23 Thread Johannes Zarl-Zierl
Hi,

For header files, that's quite a normal thing to do - you just need to add the 
CMAKE_CURRENT_BINARY_DIR to your include directories.

For .cpp files, you can write your target so that it is referencing the source 
file in the binary directory. I.e.:

configure_file(
  ${CMAKE_CURRENT_SOURCE_DIRECTORY}/file1.cpp.in
  ${CMAKE_CURRENT_BINARY_DIRECTORY}/file1.cpp COPYONLY)
add_executable( target1 ${CMAKE_CURRENT_BINARY_DIRECTORY}/file1.cpp)

Is that sufficient for your needs?

If you rather need a real wildcard way to override arbitrary source files, 
then you're probably out of luck. You could still write a wrapper around 
add_executable and add_library that inspects source directory and binary 
directory, but that might not be worth the effort...

  Johannes

On Thursday 22 October 2015 15:13:08 Srinath Vadlamani wrote:
> Hello All,
>   I am aware of out-of-source builds.  I want to add modified source files
> to the out of source build directory and have CMake use these modified
> files.
> 
> Below is my example:
> $pwd
> 
> $ls
> CmakeLists.txt CMake README src tests doc ...
> $mkdir build1
> $cd build1
> $cp ../src/file1.cpp .
> $ 
> $ccmake  
> $make -j N
> $ 
> 
> Now I want to make another build directory that houses a few other modified
> files:
> 
> $cd 
> $mkdir build2
> $cd build2
> $cp ../src/file1.cpp . && cp ../src/file2.cpp .
> $
> $ccmake  
> $make -j N
> $ but file2 mods helped>
> 
> 
> . and so on.  The point is that the build directory allowing for
> modified source files helps preserve executables and the dependent source
> files for code management.  Some may now chime in with opinions on version
> control usage, but I'm trying to understand if it is possible to do what I
> described and is possible with Autotools.
> 
> Thank you for your time,
> <>Srinath
> 
> =
> Srinath Vadlamani
> =
> 
> On Thu, Oct 22, 2015 at 3:02 PM, Gonzalo  wrote:
> > El 21/10/15 a las 17:45, Srinath Vadlamani escribió:
> > 
> > Hello All,
> > 
> >   Is it possible to have CMake use source files in some particular order
> > 
> > that are placed in the out-of-source build directory?  This is allows for
> > the convenience of having multiple builds in different build directories
> > due to a few file changes while preserving the files themselves?
> > 
> > You are aware that you can do out of source builds, right?
> > 
> > $ mkdir build-linux64
> > $ cd build-linux64
> > $ cmake .. # plus any options you want
> > $ make
> > 
> > --
> > Gonzalo Garramuñoggarr...@gmail.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-developers] CMake 3.4.0-rc2 ctest hangs with 100% CPU

2015-10-23 Thread Nils Gladitz

On 23.10.2015 16:52, Brad King wrote:

Thanks.  Fixed:

  CTest: Fix regression in handling of a RUN_SERIAL test that fails
  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e61973e1

I've queued this for merge to 'release' for 3.4.0-rc3.

-Brad


Thanks!

Nils

--

Powered by www.kitware.com

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

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

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

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

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


Re: [CMake] Finding debug Qt libraries without CMAKE_BUILD_TYPE set to None

2015-10-23 Thread Tom Kacvinsky
Here is what I tried for Qt4 (that is what I am using), using cmake 3.3.2
on Windows 7

  find_package(Qt4 4.8.5 REQUIRED QtCore QtGui QtXml Qt3Support QtWebKit
QtSql QtSvg QtNetwork QAxContainer)

  set_target_properties(Qt4::QtCore PROPERTIES MAP_IMPORTED_CONFIG_COVERAGE
"DEBUG")
  set_target_properties(Qt4::QtGui PROPERTIES MAP_IMPORTED_CONFIG_COVERAGE
"DEBUG")
  set_target_properties(Qt4::QtXml PROPERTIES MAP_IMPORTED_CONFIG_COVERAGE
"DEBUG")
  set_target_properties(Qt4::Qt3Support PROPERTIES
MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
  set_target_properties(Qt4::QtWebKit PROPERTIES
MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
  set_target_properties(Qt4::QtSql PROPERTIES MAP_IMPORTED_CONFIG_COVERAGE
"DEBUG")
  set_target_properties(Qt4::QtSvg PROPERTIES MAP_IMPORTED_CONFIG_COVERAGE
"DEBUG")
  set_target_properties(Qt4::QtNetwork PROPERTIES
MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
  set_target_properties(Qt4::QAxContainer PROPERTIES
MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")

  set(QT_LIBS Qt4::QtCore Qt4::QtGui Qt4::QtXml Qt4::Qt3Support
Qt4::QtWebKit Qt4::QtSql Qt4::QtSvg Qt4::QtNetwork Qt4::QAxContainer)

But apparently the set_target_properties trick only works with the FindQt5
module, as I am still getting the release version of the libraries.  Any
idea what I can do?  I am guessing

   MAP_IMPORTED_CONFIG_COVERAGE

is not the target property I want to set.

Thanks,

Tom


On Thu, Oct 22, 2015 at 1:40 PM, Tom Kacvinsky  wrote:

> I have need to find the debug version of Qt libraries.  From the
> documentation I read, the libraries found are based on the CMAKE_BUILD_TYPE
> vale.  So it it is set to Release, the release versions are found, and if
> set to DEBUG, the debug versions are found.  Unfortunately, due to use of
> Ada support from PLPlot, I cannot set it to eitehr of those values as then
> our Ada support craps out.
>
> So, how can I find the debug version of the libraries if CMAKE_BUILD_TYPE
> is set to NONE?
>
> Thanks,
>
> Tom
>
-- 

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] [ANNOUNCE] CMake 3.4.0-rc1 is now ready!

2015-10-23 Thread Brad King
On 10/07/2015 12:45 PM, Orion Poplawski wrote:
> There also appears to be a similar issue with building Paraview where the
> MPI_INLCUDE_PATH is no longer being passed to the compile line.

Can you provide any more detail on this problem?  There was only one
change to FindMPI between 3.3.2 and 3.4.0-rc1 and I don't think it
could cause this.  Also ParaView and VTK are not using the internal
CMake interface where the  placeholder was added.

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


[Cmake-commits] CMake branch, next, updated. v3.4.0-rc2-903-g786a5bb

2015-10-23 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  786a5bbd1612a6da3487aae97ae99a88f20ea272 (commit)
   via  e61973e1ab2c01f9ae5df145bfdc14e83a0cf1d9 (commit)
  from  36f0c5e076363d2fbc66dc474f977c1ba32f461d (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=786a5bbd1612a6da3487aae97ae99a88f20ea272
commit 786a5bbd1612a6da3487aae97ae99a88f20ea272
Merge: 36f0c5e e61973e
Author: Brad King 
AuthorDate: Fri Oct 23 10:04:45 2015 -0400
Commit: CMake Topic Stage 
CommitDate: Fri Oct 23 10:04:45 2015 -0400

Merge topic 'fix-test-RUN_SERIAL-failure-regression' into next

e61973e1 CTest: Fix regression in handling of a RUN_SERIAL test that fails


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e61973e1ab2c01f9ae5df145bfdc14e83a0cf1d9
commit e61973e1ab2c01f9ae5df145bfdc14e83a0cf1d9
Author: Brad King 
AuthorDate: Fri Oct 23 09:25:25 2015 -0400
Commit: Brad King 
CommitDate: Fri Oct 23 09:55:25 2015 -0400

CTest: Fix regression in handling of a RUN_SERIAL test that fails

Refactoring in commit v3.4.0-rc1~390^2~1 (cmCTestMultiProcessHandler:
Refactor RUN_SERIAL implementation, 2015-06-01) forgot to update a code
path for cleaning up after a failed RUN_SERIAL test.  This causes an
infinite loop after a RUN_SERIAL test fails.  Fix it and add a test.

diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx 
b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 4832186..7c7f5df 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -198,6 +198,10 @@ void cmCTestMultiProcessHandler::UnlockResources(int index)
 {
 this->LockedResources.erase(*i);
 }
+  if (this->Properties[index]->RunSerial)
+{
+this->SerialTestRunning = false;
+}
 }
 
 //-
@@ -451,11 +455,6 @@ bool cmCTestMultiProcessHandler::CheckOutput()
 this->WriteCheckpoint(test);
 this->UnlockResources(test);
 this->RunningCount -= GetProcessorsUsed(test);
-if (this->Properties[test]->RunSerial)
-  {
-  this->SerialTestRunning = false;
-  }
-
 delete p;
 }
   return true;
diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake 
b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
index 00895cc..2bc3693 100644
--- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake
@@ -78,6 +78,21 @@ endfunction()
 
 run_LabelCount()
 
+function(run_SerialFailed)
+  set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/SerialFailed)
+  set(RunCMake_TEST_NO_CLEAN 1)
+  file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+  file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+  file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" "
+add_test(NoSuchCommand no_such_command)
+set_tests_properties(NoSuchCommand PROPERTIES RUN_SERIAL ON)
+add_test(Echo \"${CMAKE_COMMAND}\" -E echo \"EchoTest\")
+")
+
+  run_cmake_command(SerialFailed ${CMAKE_CTEST_COMMAND} -V)
+endfunction()
+run_SerialFailed()
+
 function(run_TestLoad name load)
   set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TestLoad)
   set(RunCMake_TEST_NO_CLEAN 1)
diff --git a/Tests/RunCMake/CTestCommandLine/SerialFailed-result.txt 
b/Tests/RunCMake/CTestCommandLine/SerialFailed-result.txt
new file mode 100644
index 000..45a4fb7
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/SerialFailed-result.txt
@@ -0,0 +1 @@
+8
diff --git a/Tests/RunCMake/CTestCommandLine/SerialFailed-stderr.txt 
b/Tests/RunCMake/CTestCommandLine/SerialFailed-stderr.txt
new file mode 100644
index 000..cafe565
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/SerialFailed-stderr.txt
@@ -0,0 +1 @@
+Unable to find executable: no_such_command
diff --git a/Tests/RunCMake/CTestCommandLine/SerialFailed-stdout.txt 
b/Tests/RunCMake/CTestCommandLine/SerialFailed-stdout.txt
new file mode 100644
index 000..d7144f7
--- /dev/null
+++ b/Tests/RunCMake/CTestCommandLine/SerialFailed-stdout.txt
@@ -0,0 +1,10 @@
+Could not find executable no_such_command
+.*
+2/2 Test #2: Echo .   Passed +[0-9.]+ sec
++
+50% tests passed, 1 tests failed out of 2
++
+Total Test time \(real\) = +[0-9.]+ sec
++
+The following tests FAILED:
+[   ]+1 - NoSuchCommand \(Not Run\)$

---

Summary of changes:
 Source/CTest/cmCTestMultiProcessHandler.cxx |9 -
 

Re: [CMake] Finding debug Qt libraries without CMAKE_BUILD_TYPE set to None

2015-10-23 Thread Tom Kacvinsky
That was it, I had to replace

  MAP_IMPORTED_CONFIG_COVERAGE

with

  MAP_IMPORTED_CONFIG_NONE

as I have

  set(CMAKE_BUILD_TYPE NONE)

I hope this is useful to others.


On Fri, Oct 23, 2015 at 9:38 AM, Tom Kacvinsky  wrote:

> Here is what I tried for Qt4 (that is what I am using), using cmake 3.3.2
> on Windows 7
>
>   find_package(Qt4 4.8.5 REQUIRED QtCore QtGui QtXml Qt3Support QtWebKit
> QtSql QtSvg QtNetwork QAxContainer)
>
>   set_target_properties(Qt4::QtCore PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::QtGui PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::QtXml PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::Qt3Support PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::QtWebKit PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::QtSql PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::QtSvg PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::QtNetwork PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>   set_target_properties(Qt4::QAxContainer PROPERTIES
> MAP_IMPORTED_CONFIG_COVERAGE "DEBUG")
>
>   set(QT_LIBS Qt4::QtCore Qt4::QtGui Qt4::QtXml Qt4::Qt3Support
> Qt4::QtWebKit Qt4::QtSql Qt4::QtSvg Qt4::QtNetwork Qt4::QAxContainer)
>
> But apparently the set_target_properties trick only works with the FindQt5
> module, as I am still getting the release version of the libraries.  Any
> idea what I can do?  I am guessing
>
>MAP_IMPORTED_CONFIG_COVERAGE
>
> is not the target property I want to set.
>
> Thanks,
>
> Tom
>
>
> On Thu, Oct 22, 2015 at 1:40 PM, Tom Kacvinsky <
> tom.kacvin...@vectorcast.com> wrote:
>
>> I have need to find the debug version of Qt libraries.  From the
>> documentation I read, the libraries found are based on the CMAKE_BUILD_TYPE
>> vale.  So it it is set to Release, the release versions are found, and if
>> set to DEBUG, the debug versions are found.  Unfortunately, due to use of
>> Ada support from PLPlot, I cannot set it to eitehr of those values as then
>> our Ada support craps out.
>>
>> So, how can I find the debug version of the libraries if CMAKE_BUILD_TYPE
>> is set to NONE?
>>
>> Thanks,
>>
>> Tom
>>
>
>
-- 

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] CMake 3.4.0-rc2 cpack xz compressed debian packages broken

2015-10-23 Thread Raffi Enficiaud

Le 23/10/15 11:22, Nils Gladitz a écrit :

Given this test case:
   cmake_minimum_required(VERSION 3.3)

   project(Foo NONE)

   install(FILES CMakeLists.txt DESTINATION tmp)

   set(CPACK_DEBIAN_COMPRESSION_TYPE "xz")
   set(CPACK_PACKAGE_CONTACT "f...@bar.com")

   include(CPack)

A debian package created with:
 cpack -G DEB

Fails during installation with dpkg -i with:
   tar: Archive is compressed. Use -J option
   tar: Error is not recoverable: exiting now
   dpkg-deb: error: subprocess tar returned error exit status 2

The breaking commit seems to be:
 7044e8ee4baa8250fd9c4e915b13d53c7f543ea3 CPackDeb: use of
libarchive and removal of fakeroot

 From the looks of it the contained "control.tar.gz" is now XZ
compressed as well while it previously was gzip compressed.

Nils


Fix attached! (based on current master a03c13a)
Thank you for the report.

Best,
Raffi

PS.: I will add the test later today
>From fd9693db2b4dcdf6cc9ce5320c009b7e20533756 Mon Sep 17 00:00:00 2001
From: Raffi Enficiaud 
Date: Fri, 23 Oct 2015 12:01:35 +0200
Subject: [PATCH] fixup! CPackDEB proper compression scheme for control.tar.gz

---
 Source/CPack/cmCPackDebGenerator.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Source/CPack/cmCPackDebGenerator.cxx 
b/Source/CPack/cmCPackDebGenerator.cxx
index 93c94e2..04efb71 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -570,7 +570,7 @@ int cmCPackDebGenerator::createDeb()
   return 0;
   }
 cmArchiveWrite control_tar(fileStream_control_tar,
-   tar_compression_type,
+   cmArchiveWrite::CompressGZip,
"paxr");
 
 // sets permissions and uid/gid for the files
-- 
2.0.1

-- 

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 3.4.0-rc2 cpack xz compressed debian packages broken

2015-10-23 Thread Nils Gladitz

Given this test case:
  cmake_minimum_required(VERSION 3.3)

  project(Foo NONE)

  install(FILES CMakeLists.txt DESTINATION tmp)

  set(CPACK_DEBIAN_COMPRESSION_TYPE "xz")
  set(CPACK_PACKAGE_CONTACT "f...@bar.com")

  include(CPack)

A debian package created with:
cpack -G DEB

Fails during installation with dpkg -i with:
  tar: Archive is compressed. Use -J option
  tar: Error is not recoverable: exiting now
  dpkg-deb: error: subprocess tar returned error exit status 2

The breaking commit seems to be:
7044e8ee4baa8250fd9c4e915b13d53c7f543ea3 CPackDeb: use of 
libarchive and removal of fakeroot


From the looks of it the contained "control.tar.gz" is now XZ 
compressed as well while it previously was gzip compressed.


Nils
--

Powered by www.kitware.com

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

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

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

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

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


[Cmake-commits] CMake branch, next, updated. v3.4.0-rc2-921-g88b9b0a

2015-10-23 Thread Stephen Kelly
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  88b9b0a6f138fa933cd9d286c02fe5a7e255080a (commit)
   via  636bcd6428f4c05ff7c0c7d41668e306e2d1789e (commit)
   via  8766741e7fefceb2302243e8fcc16def63756c64 (commit)
   via  4283faa2f135cafba8481a0ba617b81ee126dd9b (commit)
   via  55e1200a87f9775d159906d52955c2055e30560a (commit)
   via  c0389992b2be8bd4e458a86e066c28380d26ea96 (commit)
   via  0fef3c54a68b279bd8f7bc4135886ceb01ea10c7 (commit)
   via  dd2a1c8d230d2e142aa4ff81f4e1c34c938dd4fe (commit)
   via  96e918c6b10483cae8a67b7afd44bcabca39ced4 (commit)
   via  065e54e569f7bb47665ec69564e3fccf3dfa0db9 (commit)
   via  8778d695e411d65611e38a4cb6e258dba14c93bd (commit)
   via  b09b42f168772d781d6e80568ed8c986343cf915 (commit)
   via  7b9ac9cc4805d2be79364ce2a18baf66e7415110 (commit)
   via  650938a289cc5da9304aeaaab6ee3fb85710a204 (commit)
  from  22bded47beb0417d004d152ab35e2b57b9e3c338 (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=88b9b0a6f138fa933cd9d286c02fe5a7e255080a
commit 88b9b0a6f138fa933cd9d286c02fe5a7e255080a
Merge: 22bded4 636bcd6
Author: Stephen Kelly 
AuthorDate: Fri Oct 23 12:31:56 2015 -0400
Commit: CMake Topic Stage 
CommitDate: Fri Oct 23 12:31:56 2015 -0400

Merge topic 'use-generator-target' into next

636bcd64 VS: Port interface to cmGeneratorTarget
8766741e VS: Port WriteUtilityDepends to cmGeneratorTarget
4283faa2 VS: Port utility depends to cmGeneratorTarget
55e1200a VS: Port target depends to cmGeneratorTarget
c0389992 VS: Port PorjectDepends to cmGeneratorTarget.
0fef3c54 VS: Port TargetIsFortranOnly to cmGeneratorTarget
dd2a1c8d VS: Port WriteProject to cmGeneratorTarget
96e918c6 VS: Port loop to cmGeneratorTarget
065e54e5 VS: Port ImplibDir to cmGeneratorTarget
8778d695 VS: Port LinkClosure to cmGeneratorTarget
b09b42f1 VS: Port ComputeLongestObjectDirectory to cmGeneratorTarget
7b9ac9cc VS7: Port to cmGeneratorTarget
650938a2 VS10: Port to cmGeneratorTarget.


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=636bcd6428f4c05ff7c0c7d41668e306e2d1789e
commit 636bcd6428f4c05ff7c0c7d41668e306e2d1789e
Author: Stephen Kelly 
AuthorDate: Fri Oct 23 18:26:48 2015 +0200
Commit: Stephen Kelly 
CommitDate: Fri Oct 23 18:30:52 2015 +0200

VS: Port interface to cmGeneratorTarget

diff --git a/Source/cmGlobalVisualStudio7Generator.h 
b/Source/cmGlobalVisualStudio7Generator.h
index bc91e87..6a0e5e9 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -94,7 +94,8 @@ public:
 
   /** Return true if the target project file should have the option
   LinkLibraryDependencies and link to .sln dependencies. */
-  virtual bool NeedLinkLibraryDependencies(cmTarget&) { return false; }
+  virtual bool NeedLinkLibraryDependencies(cmGeneratorTarget*)
+  { return false; }
 
   const char* GetIntelProjectVersion();
 
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx 
b/Source/cmGlobalVisualStudio8Generator.cxx
index 9b8b9fd..e185c8e 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -460,14 +460,15 @@ void cmGlobalVisualStudio8Generator::WriteProjectDepends(
 
 //
 bool cmGlobalVisualStudio8Generator::NeedLinkLibraryDependencies(
-  cmTarget& target)
+cmGeneratorTarget *target)
 {
   // Look for utility dependencies that magically link.
   for(std::set::const_iterator ui =
-target.GetUtilities().begin();
-  ui != target.GetUtilities().end(); ++ui)
+target->Target->GetUtilities().begin();
+  ui != target->Target->GetUtilities().end(); ++ui)
 {
-if(cmTarget* depTarget = this->FindTarget(ui->c_str()))
+if(cmGeneratorTarget* depTarget =
+this->FindGeneratorTarget(ui->c_str()))
   {
   if(depTarget->GetType() != cmState::INTERFACE_LIBRARY
   && depTarget->GetProperty("EXTERNAL_MSPROJECT"))
diff --git a/Source/cmGlobalVisualStudio8Generator.h 
b/Source/cmGlobalVisualStudio8Generator.h
index c05e5fa..b3093cc 100644
--- a/Source/cmGlobalVisualStudio8Generator.h
+++ b/Source/cmGlobalVisualStudio8Generator.h
@@ -60,7 +60,7 @@ public:
 
   /** Return true if the target project file should have the option
   LinkLibraryDependencies and link to .sln dependencies. */
-  virtual bool NeedLinkLibraryDependencies(cmTarget& target);
+  virtual bool 

[Cmake-commits] CMake branch, next, updated. v3.4.0-rc2-923-g8fbc8e4

2015-10-23 Thread Gregor Jasny via Cmake-commits
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  8fbc8e473b347d69331cd120aea3dd6c33e98599 (commit)
   via  601e6e1ad10b83dcb5ad09d061b04e6974cda283 (commit)
  from  88b9b0a6f138fa933cd9d286c02fe5a7e255080a (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=8fbc8e473b347d69331cd120aea3dd6c33e98599
commit 8fbc8e473b347d69331cd120aea3dd6c33e98599
Merge: 88b9b0a 601e6e1
Author: Gregor Jasny 
AuthorDate: Fri Oct 23 13:30:42 2015 -0400
Commit: CMake Topic Stage 
CommitDate: Fri Oct 23 13:30:42 2015 -0400

Merge topic 'xcode-optimization-flags' into next

601e6e1a Xcode: Use regular expression to extract all optimisation flags 
(#15794)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=601e6e1ad10b83dcb5ad09d061b04e6974cda283
commit 601e6e1ad10b83dcb5ad09d061b04e6974cda283
Author: Gregor Jasny 
AuthorDate: Sun Oct 18 21:53:12 2015 +0200
Commit: Gregor Jasny 
CommitDate: Fri Oct 23 19:29:09 2015 +0200

Xcode: Use regular expression to extract all optimisation flags (#15794)

diff --git a/Source/cmGlobalXCodeGenerator.cxx 
b/Source/cmGlobalXCodeGenerator.cxx
index bc05aea..0e3af88 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1612,6 +1612,39 @@ std::string cmGlobalXCodeGenerator::ExtractFlag(const 
char* flag,
 }
 
 //
+// This function removes each matching occurrence of the expression and
+// returns the last one (i.e., the dominant flag in GCC)
+std::string cmGlobalXCodeGenerator::ExtractFlagRegex(const char* exp,
+ int matchIndex,
+ std::string& flags)
+{
+  std::string retFlag;
+
+  cmsys::RegularExpression regex(exp);
+  assert(regex.is_valid());
+  if(!regex.is_valid())
+{
+return retFlag;
+}
+
+  std::string::size_type offset = 0;
+
+  while(regex.find(flags.c_str() + offset))
+{
+const std::string::size_type startPos = offset + regex.start(matchIndex);
+const std::string::size_type endPos = offset + regex.end(matchIndex);
+const std::string::size_type size = endPos - startPos;
+
+offset = startPos + 1;
+
+retFlag.assign(flags, startPos, size);
+flags.replace(startPos, size, size, ' ');
+}
+
+  return retFlag;
+}
+
+//
 void
 cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
 cmTarget& target,
@@ -2227,9 +2260,7 @@ void 
cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
   bool same_gflags = true;
   std::map gflags;
   std::string const* last_gflag = 0;
-  char optLevel[2];
-  optLevel[0] = '0';
-  optLevel[1] = 0;
+  std::string optLevel = "0";
 
   // Minimal map of flags to build settings.
   for (std::set::iterator li = languages.begin();
@@ -2237,14 +2268,15 @@ void 
cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
 {
 std::string& flags = cflags[*li];
 std::string& gflag = gflags[*li];
-std::string oflag = this->ExtractFlag("-O", flags);
-if(oflag.size() == 3)
+std::string oflag =
+  this->ExtractFlagRegex("(^| )(-Ofast|-Os|-O[0-9]*)( |$)", 2, flags);
+if(oflag.size() == 2)
   {
-  optLevel[0] = oflag[2];
+  optLevel = "1";
   }
-if(oflag.size() == 2)
+else if(oflag.size() > 2)
   {
-  optLevel[0] = '1';
+  optLevel = oflag.substr(2);
   }
 gflag = this->ExtractFlag("-g", flags);
 // put back gdwarf-2 if used since there is no way
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index 9daf0ab..791324d 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -151,6 +151,8 @@ private:
cmXCodeObject* buildSettings,
const std::string& buildType);
   std::string ExtractFlag(const char* flag, std::string& flags);
+  std::string ExtractFlagRegex(const char* exp, int matchIndex,
+   std::string& flags);
   void SortXCodeObjects();
   // delete all objects in the this->XCodeObjects vector.
   void ClearXCodeObjects();
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake 
b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index 8ab618b..7901ec0 100644
--- 

[Cmake-commits] CMake branch, master, updated. v3.4.0-rc2-317-g66fcb15

2015-10-23 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  66fcb15bb46a6e24bf513d3f703c1a08bb20aa8d (commit)
  from  a03c13a710fc4c65035e92749720b559cbeeff2e (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=66fcb15bb46a6e24bf513d3f703c1a08bb20aa8d
commit 66fcb15bb46a6e24bf513d3f703c1a08bb20aa8d
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Sat Oct 24 00:01:07 2015 -0400
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Sat Oct 24 00:01:07 2015 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 7bed54b..fce16dd 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 4)
-set(CMake_VERSION_PATCH 20151023)
+set(CMake_VERSION_PATCH 20151024)
 #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


Re: [CMake] using source files in build directory

2015-10-23 Thread J Decker
That's really more of a job for source control
if you add like if( exists  ) for each potential file you want
to experiment with it could be done.



On Fri, Oct 23, 2015 at 2:07 AM, Johannes Zarl-Zierl
 wrote:
> Hi,
>
> For header files, that's quite a normal thing to do - you just need to add the
> CMAKE_CURRENT_BINARY_DIR to your include directories.
>
> For .cpp files, you can write your target so that it is referencing the source
> file in the binary directory. I.e.:
>
> configure_file(
>   ${CMAKE_CURRENT_SOURCE_DIRECTORY}/file1.cpp.in
>   ${CMAKE_CURRENT_BINARY_DIRECTORY}/file1.cpp COPYONLY)
> add_executable( target1 ${CMAKE_CURRENT_BINARY_DIRECTORY}/file1.cpp)
>
> Is that sufficient for your needs?
>
> If you rather need a real wildcard way to override arbitrary source files,
> then you're probably out of luck. You could still write a wrapper around
> add_executable and add_library that inspects source directory and binary
> directory, but that might not be worth the effort...
>
>   Johannes
>
> On Thursday 22 October 2015 15:13:08 Srinath Vadlamani wrote:
>> Hello All,
>>   I am aware of out-of-source builds.  I want to add modified source files
>> to the out of source build directory and have CMake use these modified
>> files.
>>
>> Below is my example:
>> $pwd
>> 
>> $ls
>> CmakeLists.txt CMake README src tests doc ...
>> $mkdir build1
>> $cd build1
>> $cp ../src/file1.cpp .
>> $ 
>> $ccmake  
>> $make -j N
>> $ 
>>
>> Now I want to make another build directory that houses a few other modified
>> files:
>>
>> $cd 
>> $mkdir build2
>> $cd build2
>> $cp ../src/file1.cpp . && cp ../src/file2.cpp .
>> $
>> $ccmake  
>> $make -j N
>> $> but file2 mods helped>
>>
>>
>> . and so on.  The point is that the build directory allowing for
>> modified source files helps preserve executables and the dependent source
>> files for code management.  Some may now chime in with opinions on version
>> control usage, but I'm trying to understand if it is possible to do what I
>> described and is possible with Autotools.
>>
>> Thank you for your time,
>> <>Srinath
>>
>> =
>> Srinath Vadlamani
>> =
>>
>> On Thu, Oct 22, 2015 at 3:02 PM, Gonzalo  wrote:
>> > El 21/10/15 a las 17:45, Srinath Vadlamani escribió:
>> >
>> > Hello All,
>> >
>> >   Is it possible to have CMake use source files in some particular order
>> >
>> > that are placed in the out-of-source build directory?  This is allows for
>> > the convenience of having multiple builds in different build directories
>> > due to a few file changes while preserving the files themselves?
>> >
>> > You are aware that you can do out of source builds, right?
>> >
>> > $ mkdir build-linux64
>> > $ cd build-linux64
>> > $ cmake .. # plus any options you want
>> > $ make
>> >
>> > --
>> > Gonzalo Garramuñoggarr...@gmail.com
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

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

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

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

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

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

[Cmake-commits] CMake branch, next, updated. v3.4.0-rc2-925-gaddb1da

2015-10-23 Thread Gregor Jasny via Cmake-commits
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  addb1dad4f1f99e054f3fc3e0f94d571ef8842c8 (commit)
   via  a91eebebdb2a012c233db7869ec0ade534c4dd57 (commit)
  from  8fbc8e473b347d69331cd120aea3dd6c33e98599 (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=addb1dad4f1f99e054f3fc3e0f94d571ef8842c8
commit addb1dad4f1f99e054f3fc3e0f94d571ef8842c8
Merge: 8fbc8e4 a91eebe
Author: Gregor Jasny 
AuthorDate: Fri Oct 23 16:21:11 2015 -0400
Commit: CMake Topic Stage 
CommitDate: Fri Oct 23 16:21:11 2015 -0400

Merge topic 'xcode-watch-and-tvos' into next

a91eebeb Xcode: Recognise Watch and TV OS as embedded platforms


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a91eebebdb2a012c233db7869ec0ade534c4dd57
commit a91eebebdb2a012c233db7869ec0ade534c4dd57
Author: Gregor Jasny 
AuthorDate: Fri Oct 23 22:19:43 2015 +0200
Commit: Gregor Jasny 
CommitDate: Fri Oct 23 22:19:43 2015 +0200

Xcode: Recognise Watch and TV OS as embedded platforms

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index a1f143a..148b4a8 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2407,10 +2407,23 @@ bool cmMakefile::PlatformIsAppleIos() const
   sdkRoot = this->GetSafeDefinition("CMAKE_OSX_SYSROOT");
   sdkRoot = cmSystemTools::LowerCase(sdkRoot);
 
-  return sdkRoot.find("iphoneos") == 0 ||
- sdkRoot.find("/iphoneos") != std::string::npos ||
- sdkRoot.find("iphonesimulator") == 0 ||
- sdkRoot.find("/iphonesimulator") != std::string::npos;
+  const std::string embedded[] =
+{
+"appletvos", "appletvsimulator",
+"iphoneos", "iphonesimulator",
+"watchos", "watchsimulator",
+};
+
+  for(size_t i = 0; i < sizeof(embedded) / sizeof(embedded[0]); ++i)
+{
+if(sdkRoot.find(embedded[i]) == 0 ||
+   sdkRoot.find(std::string("/") + embedded[i]) != std::string::npos)
+  {
+  return true;
+  }
+}
+
+   return false;
 }
 
 const char* cmMakefile::GetSONameFlag(const std::string& language) const
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake 
b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index 8ab618b..3b7b9f4 100644
--- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
@@ -55,6 +55,38 @@ if(NOT XCODE_VERSION VERSION_LESS 5)
 endif()
 
 if(NOT XCODE_VERSION VERSION_LESS 7)
+  set(RunCMake_TEST_BINARY_DIR 
${RunCMake_BINARY_DIR}/XcodeBundlesWatchOS-build)
+  set(RunCMake_TEST_NO_CLEAN 1)
+  set(RunCMake_TEST_OPTIONS "-DTEST_WATCHOS=ON")
+
+  file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+  file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+  run_cmake(XcodeBundles)
+  run_cmake_command(XcodeBundles-build ${CMAKE_COMMAND} --build .)
+
+  unset(RunCMake_TEST_BINARY_DIR)
+  unset(RunCMake_TEST_NO_CLEAN)
+  unset(RunCMake_TEST_OPTIONS)
+endif()
+
+if(NOT XCODE_VERSION VERSION_LESS 7.1)
+  set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesTvOS-build)
+  set(RunCMake_TEST_NO_CLEAN 1)
+  set(RunCMake_TEST_OPTIONS "-DTEST_TVOS=ON")
+
+  file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+  file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
+
+  run_cmake(XcodeBundles)
+  run_cmake_command(XcodeBundles-build ${CMAKE_COMMAND} --build .)
+
+  unset(RunCMake_TEST_BINARY_DIR)
+  unset(RunCMake_TEST_NO_CLEAN)
+  unset(RunCMake_TEST_OPTIONS)
+endif()
+
+if(NOT XCODE_VERSION VERSION_LESS 7)
   set(RunCMake_TEST_OPTIONS 
"-DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/osx.cmake")
   run_cmake(XcodeTbdStub)
   unset(RunCMake_TEST_OPTIONS)
diff --git a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake 
b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
index 2cbccfa..0fdc6af 100644
--- a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
@@ -10,6 +10,22 @@ if(TEST_IOS)
   set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")
 endif(TEST_IOS)
 
+if(TEST_WATCHOS)
+  set(CMAKE_OSX_SYSROOT watchos)
+  set(CMAKE_OSX_ARCHITECTURES "armv7k")
+  set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
+  set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
+  set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES")
+endif()
+
+if(TEST_TVOS)
+  set(CMAKE_OSX_SYSROOT appletvos)
+  set(CMAKE_OSX_ARCHITECTURES "arm64")
+  set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
+  set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
+  set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES")
+endif()
+
 # App Bundle
 
 add_executable(AppBundle MACOSX_BUNDLE main.m)
@@ 

Re: [CMake] add_dependencies being ignored for add_custom_command?

2015-10-23 Thread Iosif Neitzke
The command "add_dependencies" [0] only works on targets.

See the CMake Tutorial for how to generate files as part of the build
that later targets rely on. [1].

[0] https://cmake.org/cmake/help/v2.8.12/cmake.html#command:add_dependencies

[1] https://cmake.org/cmake-tutorial/#s5

On Fri, Oct 23, 2015 at 7:35 PM, Martin Braun  wrote:
> Hey,
>
> I'm at a loss here:
>
> I have a command that's run with add_custom_command(). I need to run it
> before compiling a library that I add with add_library(), because it
> generates some header files.
>
> This was my first try:
>
> file1:
> {{{
> add_custom_command(
> OUTPUT foo.hpp
> COMMAND bar
> )
> }}}
>
> file2:
> {{{
> add_library(baz ${sources})
> add_dependencies(baz ${CMAKE_BINARY_DIR}/path/to/foo.hpp)
> }}}
>
> ==> This didn't work. If I run make -j4, it will always try and compile
> my ${sources} before it ran the command. Maybe I'm specifying targets
> the wrong way?
>
> Next try:
>
> file1:
> {{{
> add_custom_command(TARGET baz
> PRE_BUILD
> OUTPUT foo.hpp
> COMMAND bar
> )
> }}}
>
> file2:
> {{{
> add_library(baz ${sources})
> }}}
>
>
> ==> Same behaviour.
>
> I'm using CMake 2.8.2.12. Really, I need something that works with CMake
> 2.8.0 because that's the minimum we guarantee our customers.
>
> Any ideas? Thanks in advance!
>
> Cheers,
> 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
-- 

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] CMake 3.4.0-rc2 cpack xz compressed debian packages broken

2015-10-23 Thread Brad King
On 10/23/2015 06:04 AM, Raffi Enficiaud wrote:
> Fix attached! (based on current master a03c13a)

Thanks.  I backported it to 'release' and applied:

 CPackDEB: Use proper compression scheme for control.tar.gz
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=66178ae5

> PS.: I will add the test later today

Great.  We can add that when ready.

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] CMake 3.4.0-rc2 ctest hangs with 100% CPU

2015-10-23 Thread Brad King
On 10/23/2015 03:23 AM, Nils Gladitz wrote:
> I reduced it to this test case:
> 
>cmake_minimum_required(VERSION 3.4)
> 
>project(Foo NONE)
> 
>enable_testing()
> 
>add_test(NAME foo COMMAND command_not_found)
>set_property(TEST foo PROPERTY RUN_SERIAL ON)
> 
>add_test(NAME bar COMMAND ${CMAKE_COMMAND} -E echo let_me_run)
> 
> The issue seems to exist for sequential ctest runs as well.
> 
> The breaking commit seems to be:
>  07c550caa20d4b1d6ebc08269d744ff6a45c0a6d 
> cmCTestMultiProcessHandler: Refactor RUN_SERIAL implementation

Thanks.  Fixed:

 CTest: Fix regression in handling of a RUN_SERIAL test that fails
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e61973e1

I've queued this for merge to 'release' for 3.4.0-rc3.

-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


[Cmake-commits] CMake branch, next, updated. v3.4.0-rc2-905-g9a24d6a

2015-10-23 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  9a24d6a269df453ce684bfe856b7a3570f5b141f (commit)
   via  96a151398387fae00dde98c2a626f38b635e114c (commit)
  from  786a5bbd1612a6da3487aae97ae99a88f20ea272 (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=9a24d6a269df453ce684bfe856b7a3570f5b141f
commit 9a24d6a269df453ce684bfe856b7a3570f5b141f
Merge: 786a5bb 96a1513
Author: Brad King 
AuthorDate: Fri Oct 23 10:39:10 2015 -0400
Commit: CMake Topic Stage 
CommitDate: Fri Oct 23 10:39:10 2015 -0400

Merge topic 'update-libarchive' into next

96a15139 libarchive: Test for Clang builtin before using it


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=96a151398387fae00dde98c2a626f38b635e114c
commit 96a151398387fae00dde98c2a626f38b635e114c
Author: Brad King 
AuthorDate: Fri Oct 23 10:24:47 2015 -0400
Commit: Brad King 
CommitDate: Fri Oct 23 10:24:47 2015 -0400

libarchive: Test for Clang builtin before using it

The __builtin_bswap16 builtin is not available on Clang 2.1.

diff --git 
a/Utilities/cmlibarchive/libarchive/archive_read_support_format_lha.c 
b/Utilities/cmlibarchive/libarchive/archive_read_support_format_lha.c
index c359d83..eff02d8 100644
--- a/Utilities/cmlibarchive/libarchive/archive_read_support_format_lha.c
+++ b/Utilities/cmlibarchive/libarchive/archive_read_support_format_lha.c
@@ -1712,10 +1712,13 @@ lha_crc16(uint16_t crc, const void *pp, size_t len)
for (;len >= 8; len -= 8) {
/* This if statement expects compiler optimization will
 * remove the stament which will not be executed. */
+#ifndef __has_builtin
+#  define __has_builtin(x) 0
+#endif
 #if defined(_MSC_VER) && _MSC_VER >= 1400  /* Visual Studio */
 #  define bswap16(x) _byteswap_ushort(x)
 #elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 8) \
-  || defined(__clang__)
+  || (defined(__clang__) && __has_builtin(__builtin_bswap16))
 #  define bswap16(x) __builtin_bswap16(x)
 #else
 #  define bswap16(x) x) >> 8) & 0xff) | ((x) << 8))

---

Summary of changes:
 .../cmlibarchive/libarchive/archive_read_support_format_lha.c |5 -
 1 file changed, 4 insertions(+), 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 3.4.0-rc2 ctest hangs with 100% CPU

2015-10-23 Thread Nils Gladitz
I switched from 3.2.1 to 3.4.0-rc2 on a Windows and a Linux dashboard 
client for a custom project.


On the Linux client parallel testing now loops with 100% CPU somewhere 
in cmCTestMultiProcessHandler::StartNextTests and 
cmCTestMultiProcessHandler::CheckOutput.


I don't have a proper stack trace on the windows client but it seems to 
hang there too.


Nils
--

Powered by www.kitware.com

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

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

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

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

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


Re: [cmake-developers] CMake 3.4.0-rc2 ctest hangs with 100% CPU

2015-10-23 Thread Nils Gladitz

On 10/23/2015 09:10 AM, Nils Gladitz wrote:
I switched from 3.2.1 to 3.4.0-rc2 on a Windows and a Linux dashboard 
client for a custom project.


On the Linux client parallel testing now loops with 100% CPU somewhere 
in cmCTestMultiProcessHandler::StartNextTests and 
cmCTestMultiProcessHandler::CheckOutput.




I reduced it to this test case:

  cmake_minimum_required(VERSION 3.4)

  project(Foo NONE)

  enable_testing()

  add_test(NAME foo COMMAND command_not_found)
  set_property(TEST foo PROPERTY RUN_SERIAL ON)

  add_test(NAME bar COMMAND ${CMAKE_COMMAND} -E echo let_me_run)

The issue seems to exist for sequential ctest runs as well.

The breaking commit seems to be:
07c550caa20d4b1d6ebc08269d744ff6a45c0a6d 
cmCTestMultiProcessHandler: Refactor RUN_SERIAL implementation


Nils
--

Powered by www.kitware.com

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

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

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

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

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


[CMake] add_dependencies being ignored for add_custom_command?

2015-10-23 Thread Martin Braun
Hey,

I'm at a loss here:

I have a command that's run with add_custom_command(). I need to run it
before compiling a library that I add with add_library(), because it
generates some header files.

This was my first try:

file1:
{{{
add_custom_command(
OUTPUT foo.hpp
COMMAND bar
)
}}}

file2:
{{{
add_library(baz ${sources})
add_dependencies(baz ${CMAKE_BINARY_DIR}/path/to/foo.hpp)
}}}

==> This didn't work. If I run make -j4, it will always try and compile
my ${sources} before it ran the command. Maybe I'm specifying targets
the wrong way?

Next try:

file1:
{{{
add_custom_command(TARGET baz
PRE_BUILD
OUTPUT foo.hpp
COMMAND bar
)
}}}

file2:
{{{
add_library(baz ${sources})
}}}


==> Same behaviour.

I'm using CMake 2.8.2.12. Really, I need something that works with CMake
2.8.0 because that's the minimum we guarantee our customers.

Any ideas? Thanks in advance!

Cheers,
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


Re: [cmake-developers] Patch: install universal iOS libraries

2015-10-23 Thread Gregor Jasny via cmake-developers
On 08/10/15 02:37, Ruslan Baratov wrote:
>>> export CORRESPONDING_DEVICE_PLATFORM_NAME=iphoneos
>>> export CORRESPONDING_DEVICE_SDK_NAME=iphoneos9.0
>>> export SDK_NAME=iphonesimulator9.0
>> Could you use those variables to avoid hardcoding iphoneos/simulator in
>> the module?
> I see CORRESPONDING_*_SDK_NAME variables in Xcode 7.0 but not in 6.4.

At least in Xcode 6.2 I the following variable defined:
SUPPORTED_PLATFORMS="iphonesimulator iphoneos"

It also seems to be set with Xcode 7.1
SUPPORTED_PLATFORMS="watchsimulator watchos"
SUPPORTED_PLATFORMS="appletvos appletvsimulator"

I'd really like to avoid coding any form of database into CMake.
Same for the architectures: In the end the user (or the Xcode default)
sets a list of VALID_ARCHS for device and simulator. Maybe you could use
this for filtering.

I'll reserve a day next week to exclusively work on this topic.

Thanks,
Gregor
-- 

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] Obtaining build time stamps

2015-10-23 Thread Tom Kacvinsky
Is there a way of tracking the time individual compiles take using cmake?
What I am after is a cmake variable to set, or a cmake invocation option
that will in the end generate Makefiles that output the time it takes for
each compile/link.  I am trying to track down a build performance issue and
having this timing data to see what compiles are taking abnormally long
would be extremely useful.

Thanks,

Tom
-- 

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