浏览代码

Fix Xcode build.

Move the make_directory command to the main target, so that CMAKE_CFG_INTDIR
will get expanded by the build tool.
James Bigler 16 年之前
父节点
当前提交
94fff7af35
共有 2 个文件被更改,包括 2 次插入6 次删除
  1. 2 0
      Modules/FindCUDA.cmake
  2. 0 6
      Modules/FindCUDA/run_nvcc.cmake

+ 2 - 0
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}

+ 0 - 6
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}"