Fix some probleme with spaces in path on windows

PCHSupport.cmake edited online with Bitbucket

--HG--
branch : StudioEtrange/fix-some-probleme-with-spaces-in-path-on-1374699208398
This commit is contained in:
StudioEtrange 2013-07-24 20:53:33 +00:00
parent e5ddc9080d
commit 744267c63b

View file

@ -34,8 +34,8 @@ ENDIF(MSVC)
MACRO(PCH_SET_COMPILE_FLAGS _target)
SET(PCH_FLAGS)
SET(PCH_ARCHS)
SET(FLAGS)
LIST(APPEND _FLAGS ${CMAKE_CXX_FLAGS})
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" _UPPER_BUILD)
@ -81,10 +81,15 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
LIST(APPEND _FLAGS " ${_directory_flags}")
LIST(APPEND _FLAGS " ${_directory_definitions}")
STRING(REGEX REPLACE " +" " " _FLAGS ${_FLAGS})
# Format definitions
IF(MSVC)
# Fix path with space
SEPARATE_ARGUMENTS(_FLAGS UNIX_COMMAND "${_FLAGS}")
ELSE(MSVC)
STRING(REGEX REPLACE " +" " " _FLAGS ${_FLAGS})
SEPARATE_ARGUMENTS(_FLAGS)
ENDIF(MSVC)
IF(CLANG)
# Determining all architectures and get common flags