[cmake-developers] [PATCH] Sort list of files for aux_source_directory() and file(glob,*)

2016-09-26 Thread Junghyun Kim


If aux_source_directory(. SRCS) or file(glob SRCS "*.c") is used, files in SRCS are not sorted.This can cause a list of files that has different order across machines.
Even though it does not have any correctness issue, there may be a problem.If we have a build infrastructure (e.g., OBS), the result binaries can be different on each machine.In this case, build results can be different on two different machines even if we have the same source files.For example,1. ld -o liba.a a.o b.o SRCS=a.c b.c2. ld -o libb.a b.o a.o SRCS=b.c a.cThen, liba.a and libb.a are different.
REASONThis is because of the system call readdir().The system call readdir() returns a file in the directory in any order.
SOLUTIONIntead of readdir(), scandir() is used with alphasort().This makes the list of files are sorted alphabetically.
Signed-off-by: Junghyun Kim --- Source/kwsys/Directory.cxx | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/Source/kwsys/Directory.cxx b/Source/kwsys/Directory.cxxindex 15480e1..2cebf09 100644--- a/Source/kwsys/Directory.cxx+++ b/Source/kwsys/Directory.cxx@@ -210,6 +210,8 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const std::string& name)  #include  #include +#include +#include   // PGI with glibc has trouble with dirent and large file support: //  http://www.pgroup.com/userforum/viewtopic.php?@@ -232,19 +234,22 @@ bool Directory::Load(const std::string& name) {   this->Clear();    -  DIR* dir = opendir(name.c_str());--  if (!dir)+  struct dirent** namelist;+  int num_entries = scandir(name.c_str(), &namelist, NULL, alphasort);+  if (num_entries == -1) {+    perror("scandir"); return 0; } -  for (kwsys_dirent* d = readdir(dir); d; d = readdir(dir) )+  for(int i = 0; i < num_entries; ++i)  {-    this->Internal->Files.push_back(d->d_name);+    this->Internal->Files.push_back(namelist[i]->d_name);+    free(namelist[i]); }++  free(namelist);   this->Internal->Path = name;-  closedir(dir);   return 1; } -- 1.9.1
 
-
Junghyun Kim
Senior Engineer, Ph.D.
Developer Experience Lab.
Software Center
Samsung Electronics Co.,Ltd.
- 

0001-Sort-list-of-files-for-aux_source_directory-and-file.patch
Description: Binary data
-- 

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] Android Support

2016-09-26 Thread Bill Hoffman

On 9/26/2016 5:50 PM, David Neto via cmake-developers wrote:


I agree.  I work for Google but not in this area, and I don't know who
is doing this support.  I suspect this is just an accidental duplication
of effort.  I've pinged someone to see about finding the right person to
coordinate with.
Brad has been working with the team at Google.  He can elaborate more 
tomorrow.  Just wanted to let folks sleep easy tonight.  :)


-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-developers


Re: [cmake-developers] Android Support

2016-09-26 Thread David Neto via cmake-developers
On Mon, Sep 26, 2016 at 5:23 PM Florent Castelli 
wrote:

>
> Have you tried working it out with Google? Maybe dropping your
> implementation and integrate theirs as they released it first and
> started documenting it?
>
> I just don't want to have 2 toolchains to support, that would be really
> terrible :(
>

I agree.  I work for Google but not in this area, and I don't know who is
doing this support.  I suspect this is just an accidental duplication of
effort.  I've pinged someone to see about finding the right person to
coordinate with.

david
-- 

Powered by www.kitware.com

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

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

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

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

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

Re: [cmake-developers] Android Support

2016-09-26 Thread Florent Castelli

On 12/09/2016 15:09, Brad King wrote:

On 09/09/2016 04:04 PM, Robert Dailey wrote:

Currently nightly builds are tagged 3.6.2. Are there no nightly builds
for 3.7 or am I missing something?

They are 3.6.2.$date, indicating post-3.6 feature development.
See the documentation of CMAKE_VERSION:

  https://cmake.org/cmake/help/v3.6/variable/CMAKE_VERSION.html

-Brad


Resurrecting this!

I've seen that the Android Gradle build tools now have an official CMake 
plugin that has a custom 3.6 version with a custom toolchain and Android 
platform support.

https://developer.android.com/ndk/guides/cmake.html#variables

The problem is that they have a set of configuration options for their 
toolchain that is similar to what you have, but incompatible.


Have you tried working it out with Google? Maybe dropping your 
implementation and integrate theirs as they released it first and 
started documenting it?


I just don't want to have 2 toolchains to support, that would be really 
terrible :(



/Orphis

--

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] semantics of ctest_build(APPEND)

2016-09-26 Thread Brad King
On 09/26/2016 10:07 AM, Daniel Pfeifer wrote:
> the documentation of the ctest_build command states "Append semantics
> are defined by the dashboard server in use." I think this is not
> precise enough.
> 
> The client side effect of APPEND is that CTest creates an
> Append="true" attribute in the XML. It does not append anything to the
> already existing file. The existing file is overwritten.
> 
> For append to work as expected, it is necessary to call
> ctest_submit(PARTS Build) between the ctest_build commands. This is
> not documented.

Yes.  Please add this to anywhere in the documentation you expected
to see it.

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] Adding GLSL to SPIR-V compilation support

2016-09-26 Thread David Neto via cmake-developers
Thanks for the quick reply.  I completely understand the move to Gitlab;
it's a much nicer flow.
I've posted https://gitlab.kitware.com/cmake/cmake/merge_requests/124 for
review.

cheers,
david

On Mon, Sep 26, 2016 at 9:59 AM Brad King  wrote:

> On 09/23/2016 06:17 PM, David Neto via cmake-developers wrote:
> > I've attached a patch to add GLSL language support, compiling down to
> SPIR-V.
> > It's based on master from this morning.
>
> Thanks!
>
> We are currently experimenting with a GitLab workflow on
>
>   https://gitlab.kitware.com/cmake/cmake
>
> but haven't updated CONTRIBUTING.rst yet.  This change/feature is
> substantial enough to warrant review over there.  Please submit a
> merge request on our GitLab for this.
>
> FYI, we're close to the Oct 3 freeze for the 3.7 release, so detailed
> review and integration of substantial features like adding a new
> language will likely be delayed until after that.  Please rebase
> on `master` once post-3.7 development is announced.
>
> 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

[cmake-developers] semantics of ctest_build(APPEND)

2016-09-26 Thread Daniel Pfeifer
Hi,

the documentation of the ctest_build command states "Append semantics
are defined by the dashboard server in use." I think this is not
precise enough.

The client side effect of APPEND is that CTest creates an
Append="true" attribute in the XML. It does not append anything to the
already existing file. The existing file is overwritten.

For append to work as expected, it is necessary to call
ctest_submit(PARTS Build) between the ctest_build commands. This is
not documented.

Cheers, Daniel
-- 

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] Adding GLSL to SPIR-V compilation support

2016-09-26 Thread Brad King
On 09/23/2016 06:17 PM, David Neto via cmake-developers wrote:
> I've attached a patch to add GLSL language support, compiling down to SPIR-V.
> It's based on master from this morning.

Thanks!

We are currently experimenting with a GitLab workflow on

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

but haven't updated CONTRIBUTING.rst yet.  This change/feature is
substantial enough to warrant review over there.  Please submit a
merge request on our GitLab for this.

FYI, we're close to the Oct 3 freeze for the 3.7 release, so detailed
review and integration of substantial features like adding a new
language will likely be delayed until after that.  Please rebase
on `master` once post-3.7 development is announced.

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