diff options
author | Seth R Johnson <johnsonsr@ornl.gov> | 2021-05-03 17:30:32 (GMT) |
---|---|---|
committer | Seth R Johnson <johnsonsr@ornl.gov> | 2021-05-03 17:30:32 (GMT) |
commit | 229dd4215898ee61c941ed90a3f5175e58f01efb (patch) | |
tree | fcc7596a632fb099eeade69e16540fd48ae16cb1 /Modules/FindSWIG.cmake | |
parent | ff6f7b232fbe36d8cb237ca2508ca01632d9d9d2 (diff) | |
download | CMake-229dd4215898ee61c941ed90a3f5175e58f01efb.zip CMake-229dd4215898ee61c941ed90a3f5175e58f01efb.tar.gz CMake-229dd4215898ee61c941ed90a3f5175e58f01efb.tar.bz2 |
Change find_path scope and add quotes
Diffstat (limited to 'Modules/FindSWIG.cmake')
-rw-r--r-- | Modules/FindSWIG.cmake | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake index 73aec89..7c610d9 100644 --- a/Modules/FindSWIG.cmake +++ b/Modules/FindSWIG.cmake @@ -91,7 +91,7 @@ unset(_SWIG_NAMES) if(SWIG_EXECUTABLE AND NOT SWIG_DIR) # Find default value for SWIG library directory - execute_process(COMMAND ${SWIG_EXECUTABLE} -swiglib + execute_process(COMMAND "${SWIG_EXECUTABLE}" -swiglib OUTPUT_VARIABLE _swig_output ERROR_VARIABLE _swig_error RESULT_VARIABLE _swig_result) @@ -105,17 +105,17 @@ if(SWIG_EXECUTABLE AND NOT SWIG_DIR) endif() unset(_msg) else() - string(REGEX REPLACE "[\n\r]+" ";" _SWIGLIB ${_swig_output}) + string(REGEX REPLACE "[\n\r]+" ";" _SWIG_LIB ${_swig_output}) endif() -endif() -# Find SWIG library directory -find_path(SWIG_DIR swig.swg PATHS ${_SWIGLIB} NO_CMAKE_FIND_ROOT_PATH) -unset(_SWIGLIB) + # Find SWIG library directory + find_path(SWIG_DIR swig.swg PATHS ${_SWIG_LIB} NO_CMAKE_FIND_ROOT_PATH) + unset(_SWIG_LIB) +endif() if(SWIG_EXECUTABLE AND SWIG_DIR AND NOT SWIG_VERSION) # Determine SWIG version - execute_process(COMMAND ${SWIG_EXECUTABLE} -version + execute_process(COMMAND "${SWIG_EXECUTABLE}" -version OUTPUT_VARIABLE _swig_output ERROR_VARIABLE _swig_output RESULT_VARIABLE _swig_result) @@ -129,7 +129,7 @@ if(SWIG_EXECUTABLE AND SWIG_DIR AND NOT SWIG_VERSION) endif() if(SWIG_EXECUTABLE AND SWIG_FIND_COMPONENTS) - execute_process(COMMAND ${SWIG_EXECUTABLE} -help + execute_process(COMMAND "${SWIG_EXECUTABLE}" -help OUTPUT_VARIABLE _swig_output ERROR_VARIABLE _swig_error RESULT_VARIABLE _swig_result) |