[arrayfire] 02/41: Sort files for compilation. Compiles files in alphabetical order
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Mar 21 14:56:20 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/experimental
in repository arrayfire.
commit dd2d89f904793a973d94d57e3c631813531e7857
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date: Thu Mar 3 13:26:03 2016 -0500
Sort files for compilation. Compiles files in alphabetical order
---
examples/CMakeLists.txt | 1 +
src/api/unified/CMakeLists.txt | 7 +++++++
src/backend/cpu/CMakeLists.txt | 11 +++++++++++
src/backend/cuda/CMakeLists.txt | 16 ++++++++++++++++
src/backend/opencl/CMakeLists.txt | 28 +++++++++++++++++++++++++++-
5 files changed, 62 insertions(+), 1 deletion(-)
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index be0f640..ca78538 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -76,6 +76,7 @@ ENDMACRO()
# Collect the source
FILE(GLOB FILES "*/*.cpp")
+LIST(SORT FILES)
ADD_DEFINITIONS("-DASSETS_DIR=\"${ASSETS_DIR}\"")
# Next we build each example using every backend.
diff --git a/src/api/unified/CMakeLists.txt b/src/api/unified/CMakeLists.txt
index c44e43b..18d15c4 100644
--- a/src/api/unified/CMakeLists.txt
+++ b/src/api/unified/CMakeLists.txt
@@ -6,12 +6,17 @@ FILE(GLOB unified_headers
FILE(GLOB unified_sources
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
+LIST(SORT unified_headers)
+LIST(SORT unified_sources)
+
SOURCE_GROUP(api\\unified\\Headers FILES ${unified_headers})
SOURCE_GROUP(api\\unified\\Sources FILES ${unified_sources})
FILE(GLOB cpp_sources
"../cpp/*.cpp")
+LIST(SORT cpp_sources)
+
SOURCE_GROUP(api\\cpp\\Sources FILES ${cpp_sources})
FILE(GLOB common_sources
@@ -22,6 +27,8 @@ FILE(GLOB common_sources
"../../backend/util.cpp"
)
+LIST(SORT common_sources)
+
SOURCE_GROUP(common FILES ${common_sources})
IF(NOT UNIX)
diff --git a/src/backend/cpu/CMakeLists.txt b/src/backend/cpu/CMakeLists.txt
index 9387323..f7857ec 100644
--- a/src/backend/cpu/CMakeLists.txt
+++ b/src/backend/cpu/CMakeLists.txt
@@ -95,6 +95,9 @@ FILE(GLOB cpu_headers
FILE(GLOB cpu_sources
"*.cpp")
+LIST(SORT cpu_headers)
+LIST(SORT cpu_sources)
+
source_group(backend\\cpu\\Headers FILES ${cpu_headers})
source_group(backend\\cpu\\Sources FILES ${cpu_sources})
@@ -107,6 +110,9 @@ FILE(GLOB backend_sources
"../*.cpp"
)
+LIST(SORT backend_headers)
+LIST(SORT backend_sources)
+
source_group(backend\\Headers FILES ${backend_headers})
source_group(backend\\Sources FILES ${backend_sources})
@@ -119,6 +125,9 @@ FILE(GLOB c_sources
"../../api/c/*.cpp"
)
+LIST(SORT c_headers)
+LIST(SORT c_sources)
+
source_group(api\\c\\Headers FILES ${c_headers})
source_group(api\\c\\Sources FILES ${c_sources})
@@ -126,6 +135,8 @@ FILE(GLOB cpp_sources
"../../api/cpp/*.cpp"
)
+LIST(SORT cpp_sources)
+
source_group(api\\cpp\\Sources FILES ${cpp_sources})
# OS Definitions
diff --git a/src/backend/cuda/CMakeLists.txt b/src/backend/cuda/CMakeLists.txt
index ae0690d..ab29899 100644
--- a/src/backend/cuda/CMakeLists.txt
+++ b/src/backend/cuda/CMakeLists.txt
@@ -168,6 +168,12 @@ FILE(GLOB kernel_headers
FILE(GLOB ptx_sources
"JIT/*.cu")
+LIST(SORT cuda_headers)
+LIST(SORT cuda_sources)
+LIST(SORT jit_sources)
+LIST(SORT kernel_headers)
+LIST(SORT ptx_sources)
+
SOURCE_GROUP(backend\\cuda\\Headers FILES ${cuda_headers})
SOURCE_GROUP(backend\\cuda\\Sources FILES ${cuda_sources})
SOURCE_GROUP(backend\\cuda\\JIT FILES ${jit_sources})
@@ -181,6 +187,8 @@ IF(CUDA_LAPACK_CPU_FALLBACK)
SOURCE_GROUP(backend\\cuda\\cpu_lapack\\Headers FILES ${cpu_lapack_headers})
SOURCE_GROUP(backend\\cuda\\cpu_lapack\\Sources FILES ${cpu_lapack_sources})
+ LIST(SORT cpu_lapack_headers)
+ LIST(SORT cpu_lapack_sources)
ENDIF()
FILE(GLOB backend_headers
@@ -192,6 +200,9 @@ FILE(GLOB backend_sources
"../*.cpp"
)
+LIST(SORT backend_headers)
+LIST(SORT backend_sources)
+
SOURCE_GROUP(backend\\Headers FILES ${backend_headers})
SOURCE_GROUP(backend\\Sources FILES ${backend_sources})
@@ -204,6 +215,9 @@ FILE(GLOB c_sources
"../../api/c/*.cpp"
)
+LIST(SORT c_headers)
+LIST(SORT c_sources)
+
SOURCE_GROUP(api\\c\\Headers FILES ${c_headers})
SOURCE_GROUP(api\\c\\Sources FILES ${c_sources})
@@ -211,6 +225,8 @@ FILE(GLOB cpp_sources
"../../api/cpp/*.cpp"
)
+LIST(SORT cpp_sources)
+
SOURCE_GROUP(api\\cpp\\Sources FILES ${cpp_sources})
LIST(LENGTH COMPUTE_VERSIONS COMPUTE_COUNT)
diff --git a/src/backend/opencl/CMakeLists.txt b/src/backend/opencl/CMakeLists.txt
index bbe430d..2cb8ddf 100644
--- a/src/backend/opencl/CMakeLists.txt
+++ b/src/backend/opencl/CMakeLists.txt
@@ -142,6 +142,17 @@ FILE(GLOB cpu_headers
FILE(GLOB cpu_sources
"cpu/*.cpp")
+LIST(SORT opencl_headers)
+LIST(SORT opencl_sources)
+LIST(SORT jit_sources)
+LIST(SORT kernel_headers)
+LIST(SORT opencl_kernels)
+LIST(SORT kernel_sources)
+LIST(SORT conv_ker_headers)
+LIST(SORT conv_ker_sources)
+LIST(SORT cpu_headers)
+LIST(SORT cpu_sources)
+
source_group(backend\\opencl\\Headers FILES ${opencl_headers})
source_group(backend\\opencl\\Sources FILES ${opencl_sources})
source_group(backend\\opencl\\JIT FILES ${jit_sources})
@@ -160,6 +171,9 @@ IF(LAPACK_FOUND)
FILE(GLOB magma_headers
"magma/*.h")
+ LIST(SORT magma_headers)
+ LIST(SORT magma_sources)
+
source_group(backend\\opencl\\magma\\Sources FILES ${magma_sources})
source_group(backend\\opencl\\magma\\Headers FILES ${magma_headers})
ELSE()
@@ -175,6 +189,10 @@ FILE(GLOB backend_headers
FILE(GLOB backend_sources
"../*.cpp"
)
+
+LIST(SORT backend_headers)
+LIST(SORT backend_sources)
+
source_group(backend\\Headers FILES ${backend_headers})
source_group(backend\\Sources FILES ${backend_sources})
@@ -186,17 +204,25 @@ FILE(GLOB c_headers
FILE(GLOB c_sources
"../../api/c/*.cpp"
)
+
+LIST(SORT c_headers)
+LIST(SORT c_sources)
+
source_group(api\\c\\Headers FILES ${c_headers})
source_group(api\\c\\Sources FILES ${c_sources})
-
FILE(GLOB cpp_sources
"../../api/cpp/*.cpp"
)
+
+LIST(SORT cpp_sources)
+
source_group(api\\cpp\\Sources FILES ${cpp_sources})
FILE(GLOB kernel_src ${opencl_kernels} "kernel/KParam.hpp")
+LIST(SORT kernel_src)
+
CL_KERNEL_TO_H(
SOURCES ${kernel_src}
VARNAME kernel_files
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git
More information about the debian-science-commits
mailing list