From 94fff7af35117b98219edeb07dd8fdcf34fe3d82 Mon Sep 17 00:00:00 2001 From: James Bigler Date: Tue, 6 Oct 2009 22:52:52 -0400 Subject: [PATCH] Fix Xcode build. Move the make_directory command to the main target, so that CMAKE_CFG_INTDIR will get expanded by the build tool. --- Modules/FindCUDA.cmake | 2 ++ Modules/FindCUDA/run_nvcc.cmake | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index a41fae2a8..34fcb9710 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -1027,6 +1027,8 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files) ${main_dep} DEPENDS ${CUDA_NVCC_DEPEND} DEPENDS ${custom_target_script} + # Make sure the output directory exists before trying to write to it. + COMMAND ${CMAKE_COMMAND} -E make_directory "${generated_file_path}" COMMAND ${CMAKE_COMMAND} ARGS -D verbose:BOOL=${verbose_output} ${ccbin_flags} diff --git a/Modules/FindCUDA/run_nvcc.cmake b/Modules/FindCUDA/run_nvcc.cmake index 2011e22eb..4a9a7d4d6 100644 --- a/Modules/FindCUDA/run_nvcc.cmake +++ b/Modules/FindCUDA/run_nvcc.cmake @@ -150,12 +150,6 @@ cuda_execute_process( COMMAND "${CMAKE_COMMAND}" -E remove "${generated_file}" ) -# Make sure the output directory is present -cuda_execute_process( - "Creating output directory: ${generated_file_path}" - COMMAND "${CMAKE_COMMAND}" -E make_directory "${generated_file_path}" - ) - # Generate the dependency file cuda_execute_process( "Generating dependency file: ${NVCC_generated_dependency_file}"