From 7552d16d1a9ccfc86490b1052ed4719a704ae358 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 6 Dec 2016 16:22:25 -0500 Subject: CUDA: Fix default compiler flag initialization Since commit v3.7.0-rc1~392^2 (Honor CMAKE__FLAGS[_]_INIT set in toolchain files, 2016-07-05) our convention is to initialize compiler flag variables via `string(APPEND)` rather than `set()`. Fix the convention for `CMAKE_CUDA_FLAGS[_]_INIT`. --- Modules/Compiler/NVIDIA-CUDA.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/Compiler/NVIDIA-CUDA.cmake b/Modules/Compiler/NVIDIA-CUDA.cmake index e3ff5e3..605d555 100644 --- a/Modules/Compiler/NVIDIA-CUDA.cmake +++ b/Modules/Compiler/NVIDIA-CUDA.cmake @@ -10,11 +10,11 @@ set(CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS -shared) set(CMAKE_INCLUDE_SYSTEM_FLAG_CUDA -isystem=) set(CMAKE_CUDA_COMPILE_OPTIONS_VISIBILITY -Xcompiler=-fvisibility=) -set(CMAKE_CUDA_FLAGS_INIT " ") -set(CMAKE_CUDA_FLAGS_DEBUG_INIT " -g") -set(CMAKE_CUDA_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG") -set(CMAKE_CUDA_FLAGS_RELEASE_INIT " -O3 -DNDEBUG") -set(CMAKE_CUDA_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") +string(APPEND CMAKE_CUDA_FLAGS_INIT " ") +string(APPEND CMAKE_CUDA_FLAGS_DEBUG_INIT " -g") +string(APPEND CMAKE_CUDA_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG") +string(APPEND CMAKE_CUDA_FLAGS_RELEASE_INIT " -O3 -DNDEBUG") +string(APPEND CMAKE_CUDA_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") set(CMAKE_CUDA98_STANDARD_COMPILE_OPTION "") set(CMAKE_CUDA98_EXTENSION_COMPILE_OPTION "") -- cgit v0.12 From c1a55079177c256c83ba5ab4bd72555537ba69bf Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 7 Dec 2016 11:36:28 -0500 Subject: CUDA: Fix Cuda.Complex test case extern function signatures Make the return types of the extern function declared in `main.cpp` match those in the method implementations. --- Tests/Cuda/Complex/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/Cuda/Complex/main.cpp b/Tests/Cuda/Complex/main.cpp index a72ffd7..32312d0 100644 --- a/Tests/Cuda/Complex/main.cpp +++ b/Tests/Cuda/Complex/main.cpp @@ -3,8 +3,8 @@ #include "file1.h" #include "file2.h" -result_type call_cuda_seperable_code(int x); -result_type mixed_launch_kernel(int x); +int call_cuda_seperable_code(int x); +int mixed_launch_kernel(int x); int main(int argc, char** argv) { -- cgit v0.12