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  374e984b7e143008d38b7d148b1700cadbccbb59 (commit)
       via  097ac761334e18758e7f81ec46486ea200317eec (commit)
       via  cdd559eab5df6972ce89dbc6e24b6ab1b6081254 (commit)
      from  7f3e96623e6d1bc22e447926926409c2836e7d6a (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=374e984b7e143008d38b7d148b1700cadbccbb59
commit 374e984b7e143008d38b7d148b1700cadbccbb59
Merge: 7f3e966 097ac76
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Jan 11 10:27:28 2017 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Wed Jan 11 10:27:28 2017 -0500

    Merge topic 'cuda-windows' into next
    
    097ac761 CUDA: Enable CudaOnly.SeparateCompilation test runtime calls
    cdd559ea CUDA: Port test cases to Windows with MSVC host compiler


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=097ac761334e18758e7f81ec46486ea200317eec
commit 097ac761334e18758e7f81ec46486ea200317eec
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Dec 15 15:17:08 2016 -0500
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Wed Jan 11 10:26:54 2017 -0500

    CUDA: Enable CudaOnly.SeparateCompilation test runtime calls
    
    Uncomment the calls in `main.cpp` (and fix the signatures).

diff --git a/Tests/CudaOnly/SeparateCompilation/main.cu 
b/Tests/CudaOnly/SeparateCompilation/main.cu
index d4520ae..5c8e150 100644
--- a/Tests/CudaOnly/SeparateCompilation/main.cu
+++ b/Tests/CudaOnly/SeparateCompilation/main.cu
@@ -4,12 +4,12 @@
 #include "file1.h"
 #include "file2.h"
 
-// result_type file4_launch_kernel(int x);
-// result_type file5_launch_kernel(int x);
+int file4_launch_kernel(int x);
+int file5_launch_kernel(int x);
 
 int main(int argc, char **argv)
 {
-  // file4_launch_kernel(42);
-  // file5_launch_kernel(42);
+  file4_launch_kernel(42);
+  file5_launch_kernel(42);
   return 0;
 }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cdd559eab5df6972ce89dbc6e24b6ab1b6081254
commit cdd559eab5df6972ce89dbc6e24b6ab1b6081254
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Dec 7 11:45:44 2016 -0500
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Wed Jan 11 10:26:53 2017 -0500

    CUDA: Port test cases to Windows with MSVC host compiler

diff --git a/Tests/Cuda/Complex/dynamic.cpp b/Tests/Cuda/Complex/dynamic.cpp
index d579f1e..3848ce7 100644
--- a/Tests/Cuda/Complex/dynamic.cpp
+++ b/Tests/Cuda/Complex/dynamic.cpp
@@ -1,5 +1,11 @@
 
-int dynamic_base_func(int x)
+#ifdef _WIN32
+#define EXPORT __declspec(dllexport)
+#else
+#define EXPORT
+#endif
+
+EXPORT int dynamic_base_func(int x)
 {
   return x * x;
 }
diff --git a/Tests/Cuda/Complex/dynamic.cu b/Tests/Cuda/Complex/dynamic.cu
index ea52acb..a23dc25 100644
--- a/Tests/Cuda/Complex/dynamic.cu
+++ b/Tests/Cuda/Complex/dynamic.cu
@@ -3,9 +3,15 @@
 #include <cuda.h>
 #include <iostream>
 
+#ifdef _WIN32
+#define EXPORT __declspec(dllexport)
+#else
+#define EXPORT
+#endif
+
 int dynamic_base_func(int);
 
-int __host__ cuda_dynamic_host_func(int x)
+EXPORT int __host__ cuda_dynamic_host_func(int x)
 {
   return dynamic_base_func(x);
 }
@@ -16,7 +22,7 @@ void DetermineIfValidCudaDevice()
 {
 }
 
-void cuda_dynamic_lib_func()
+EXPORT void cuda_dynamic_lib_func()
 {
   DetermineIfValidCudaDevice <<<1,1>>> ();
   cudaError_t err = cudaGetLastError();
diff --git a/Tests/Cuda/Complex/main.cpp b/Tests/Cuda/Complex/main.cpp
index 32312d0..5a3f820 100644
--- a/Tests/Cuda/Complex/main.cpp
+++ b/Tests/Cuda/Complex/main.cpp
@@ -3,8 +3,14 @@
 #include "file1.h"
 #include "file2.h"
 
-int call_cuda_seperable_code(int x);
-int mixed_launch_kernel(int x);
+#ifdef _WIN32
+#define IMPORT __declspec(dllimport)
+#else
+#define IMPORT
+#endif
+
+IMPORT int call_cuda_seperable_code(int x);
+IMPORT int mixed_launch_kernel(int x);
 
 int main(int argc, char** argv)
 {
diff --git a/Tests/Cuda/Complex/mixed.cpp b/Tests/Cuda/Complex/mixed.cpp
index 205f091..bd32e51 100644
--- a/Tests/Cuda/Complex/mixed.cpp
+++ b/Tests/Cuda/Complex/mixed.cpp
@@ -1,6 +1,14 @@
 
+#ifdef _WIN32
+#define EXPORT __declspec(dllexport)
+#define IMPORT __declspec(dllimport)
+#else
+#define EXPORT
+#define IMPORT
+#endif
+
 int dynamic_base_func(int);
-int cuda_dynamic_host_func(int);
+IMPORT int cuda_dynamic_host_func(int);
 int file3_launch_kernel(int);
 
 int dynamic_final_func(int x)
@@ -8,7 +16,7 @@ int dynamic_final_func(int x)
   return cuda_dynamic_host_func(dynamic_base_func(x));
 }
 
-int call_cuda_seperable_code(int x)
+EXPORT int call_cuda_seperable_code(int x)
 {
   return file3_launch_kernel(x);
 }
diff --git a/Tests/Cuda/Complex/mixed.cu b/Tests/Cuda/Complex/mixed.cu
index 45b412f..7051de0 100644
--- a/Tests/Cuda/Complex/mixed.cu
+++ b/Tests/Cuda/Complex/mixed.cu
@@ -4,10 +4,18 @@
 #include "file1.h"
 #include "file2.h"
 
+#ifdef _WIN32
+#define EXPORT __declspec(dllexport)
+#define IMPORT __declspec(dllimport)
+#else
+#define EXPORT
+#define IMPORT
+#endif
+
 result_type __device__ file1_func(int x);
 result_type_dynamic __device__ file2_func(int x);
 
-void __host__ cuda_dynamic_lib_func();
+IMPORT void __host__ cuda_dynamic_lib_func();
 
 static
 __global__
@@ -17,7 +25,7 @@ void mixed_kernel(result_type& r, int x)
   result_type_dynamic rd = file2_func(x);
 }
 
-int mixed_launch_kernel(int x)
+EXPORT int mixed_launch_kernel(int x)
 {
   cuda_dynamic_lib_func();
 
diff --git a/Tests/CudaOnly/EnableStandard/main.cu 
b/Tests/CudaOnly/EnableStandard/main.cu
index 83e9dfd..f7144e6 100644
--- a/Tests/CudaOnly/EnableStandard/main.cu
+++ b/Tests/CudaOnly/EnableStandard/main.cu
@@ -1,8 +1,14 @@
 
 #include <iostream>
 
+#ifdef _WIN32
+#define IMPORT __declspec(dllimport)
+#else
+#define IMPORT
+#endif
+
 int static_cuda11_func(int);
-int shared_cuda11_func(int);
+IMPORT int shared_cuda11_func(int);
 
 void test_functions()
 {
diff --git a/Tests/CudaOnly/EnableStandard/shared.cu 
b/Tests/CudaOnly/EnableStandard/shared.cu
index 28555b3..ccdd0b2 100644
--- a/Tests/CudaOnly/EnableStandard/shared.cu
+++ b/Tests/CudaOnly/EnableStandard/shared.cu
@@ -1,9 +1,15 @@
 
 #include <type_traits>
 
+#ifdef _WIN32
+#define EXPORT __declspec(dllexport)
+#else
+#define EXPORT
+#endif
+
 using tt = std::true_type;
 using ft = std::false_type;
-int __host__ shared_cuda11_func(int x)
+EXPORT int __host__ shared_cuda11_func(int x)
 {
   return x * x + std::integral_constant<int, 17>::value;
 }
diff --git a/Tests/CudaOnly/WithDefs/CMakeLists.txt 
b/Tests/CudaOnly/WithDefs/CMakeLists.txt
index c4ca8b9..6c4011c 100644
--- a/Tests/CudaOnly/WithDefs/CMakeLists.txt
+++ b/Tests/CudaOnly/WithDefs/CMakeLists.txt
@@ -4,7 +4,12 @@ project (CudaOnlyWithDefs CUDA)
 
 #verify that we can pass explicit cuda arch flags
 set(CMAKE_CUDA_FLAGS "-gencode arch=compute_30,code=compute_30")
-set(debug_compile_flags --generate-code arch=compute_20,code=sm_20 
-Xcompiler=-Werror)
+set(debug_compile_flags --generate-code arch=compute_20,code=sm_20)
+if(CMAKE_CUDA_SIMULATE_ID STREQUAL "MSVC")
+  list(APPEND debug_compile_flags -Xcompiler=-WX)
+else()
+  list(APPEND debug_compile_flags -Xcompiler=-Werror)
+endif()
 set(release_compile_defs DEFREL)
 
 #Goal for this example:
diff --git a/Tests/CudaOnly/WithDefs/main.notcu 
b/Tests/CudaOnly/WithDefs/main.notcu
index 33a49d2..67bf10c 100644
--- a/Tests/CudaOnly/WithDefs/main.notcu
+++ b/Tests/CudaOnly/WithDefs/main.notcu
@@ -2,12 +2,21 @@
 #include <cuda_runtime.h>
 #include <iostream>
 
+#ifndef PACKED_DEFINE
+#error "PACKED_DEFINE not defined!"
+#endif
+
 static
 __global__
 void DetermineIfValidCudaDevice()
 {
 }
 
+#ifdef _MSC_VER
+#pragma pack(push,1)
+#undef PACKED_DEFINE
+#define PACKED_DEFINE
+#endif
 struct PACKED_DEFINE result_type
 {
   bool valid;
@@ -16,6 +25,9 @@ struct PACKED_DEFINE result_type
 #error missing DEFREL flag
 #endif
 };
+#ifdef _MSC_VER
+#pragma pack(pop)
+#endif
 
 result_type can_launch_kernel()
 {
diff --git a/Tests/RunCMake/try_compile/CudaStandardNoDefault.cmake 
b/Tests/RunCMake/try_compile/CudaStandardNoDefault.cmake
new file mode 100644
index 0000000..ea22152
--- /dev/null
+++ b/Tests/RunCMake/try_compile/CudaStandardNoDefault.cmake
@@ -0,0 +1,9 @@
+enable_language(CUDA)
+try_compile(result ${CMAKE_CURRENT_BINARY_DIR}
+  SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src.cu
+  CUDA_STANDARD 3 # bogus, but not used
+  OUTPUT_VARIABLE out
+  )
+if(NOT result)
+  message(FATAL_ERROR "try_compile failed:\n${out}")
+endif()
diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake 
b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
index 5452e6d..6a1bc64 100644
--- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake
+++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
@@ -36,7 +36,11 @@ elseif(DEFINED CMAKE_CXX_STANDARD_DEFAULT)
   run_cmake(CxxStandardNoDefault)
 endif()
 if(CMake_TEST_CUDA)
-  run_cmake(CudaStandard)
+  if(CMAKE_HOST_WIN32)
+    run_cmake(CudaStandardNoDefault)
+  else()
+    run_cmake(CudaStandard)
+  endif()
 endif()
 if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION 
VERSION_LESS 4.4)
   run_cmake(CStandardGNU)

-----------------------------------------------------------------------

Summary of changes:


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

Reply via email to