0027365: Configuration, CMake - file writing error appears if 3RDPARTY_DIR is empty CR0-OCCT7 V7_0_0
authoribs <ibs@opencascade.com>
Thu, 7 Apr 2016 20:38:03 +0000 (23:38 +0300)
committerabv <abv@opencascade.com>
Fri, 8 Apr 2016 03:23:13 +0000 (06:23 +0300)
3RDPARTY_DIR and INSTALL_DIR are quoted in a file TO_CMAKE_PATH command to avoid error when variable is empty

CMakeLists.txt

index 76a4d6f..a628ff9 100644 (file)
@@ -75,7 +75,7 @@ if (NOT DEFINED INSTALL_DIR)
   endif()
   set (INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE PATH "${INSTALL_DIR_DESCR}")
 else()
-  file (TO_CMAKE_PATH ${INSTALL_DIR} INSTALL_DIR)
+  file (TO_CMAKE_PATH "${INSTALL_DIR}" INSTALL_DIR)
   set (INSTALL_DIR "${INSTALL_DIR}" CACHE PATH "${INSTALL_DIR_DESCR}" FORCE)
 endif()
 
@@ -381,7 +381,7 @@ if (NOT DEFINED 3RDPARTY_DIR)
   set (3RDPARTY_DIR "" CACHE PATH ${3RDPARTY_DIR_DESCR})
   get_filename_component (3RDPARTY_DIR "${3RDPARTY_DIR}" ABSOLUTE)
 else()
-  file (TO_CMAKE_PATH ${3RDPARTY_DIR} 3RDPARTY_DIR)
+  file (TO_CMAKE_PATH "${3RDPARTY_DIR}" 3RDPARTY_DIR)
   set (3RDPARTY_DIR "${3RDPARTY_DIR}" CACHE PATH "${3RDPARTY_DIR_DESCR}" FORCE)
 endif()