Hello all,

I am trying to develop a execute_process command that will first load the env 
variables set by the appropriate vcvarsall, and then run a compile command. See 
here for my progress so far:

set(cuda_generation_command cmd /c "\"call 
\"$ENV{VS${VS_IDE_VERSION}0COMNTOOLS}../../VC/vcvarsall.bat\" x86_amd64 && 
\"${CUDA_NVCC_EXECUTABLE}\" 
\"${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu\" \"--run\"\"")

execute_process( COMMAND ${cuda_generation_command}
                 WORKING_DIRECTORY 
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
                 RESULT_VARIABLE _nvcc_res OUTPUT_VARIABLE _nvcc_out
                 OUTPUT_STRIP_TRAILING_WHITESPACE)

When run at a command prompt, the command works as expected. When called from 
CMake, the output is:
The filename, directory name, or volume label syntax is incorrect.

Has anyone ever succeeded with something like this?

Cheers,
Adam
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to