mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Workaround a cmake bug that was only visible on a newly installed Philip's machine.
CMake 2.8.4 crashed on this line IF(something AND IS_DIRECTORY(something_else)) when both "something" and "something_else" were empty. Changing the line slightly (using cascading "IF" instead) solved the crash.
This commit is contained in:
parent
73f78f7766
commit
7aba87b72f
1 changed files with 10 additions and 6 deletions
|
@ -304,10 +304,12 @@ ENDFUNCTION()
|
|||
|
||||
FUNCTION(TRAVERSE_DIRECTORIES dir topdir file prefix)
|
||||
FILE(RELATIVE_PATH rel ${topdir} ${dir})
|
||||
IF(rel AND IS_DIRECTORY "${f}")
|
||||
MAKE_WIX_IDENTIFIER("${rel}" id)
|
||||
GET_FILENAME_COMPONENT(name ${dir} NAME)
|
||||
FILE(APPEND ${file} "${prefix}<Directory Id='D.${id}' Name='${name}'>\n")
|
||||
IF(rel)
|
||||
IF (IS_DIRECTORY "${f}")
|
||||
MAKE_WIX_IDENTIFIER("${rel}" id)
|
||||
GET_FILENAME_COMPONENT(name ${dir} NAME)
|
||||
FILE(APPEND ${file} "${prefix}<Directory Id='D.${id}' Name='${name}'>\n")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
FILE(GLOB all_files ${dir}/*)
|
||||
FOREACH(f ${all_files})
|
||||
|
@ -315,8 +317,10 @@ FUNCTION(TRAVERSE_DIRECTORIES dir topdir file prefix)
|
|||
TRAVERSE_DIRECTORIES(${f} ${topdir} ${file} "${prefix} ")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
IF(rel AND IS_DIRECTORY "${f}")
|
||||
FILE(APPEND ${file} "${prefix}</Directory>\n")
|
||||
IF(rel)
|
||||
IF(IS_DIRECTORY "${f}")
|
||||
FILE(APPEND ${file} "${prefix}</Directory>\n")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDFUNCTION()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue