From 744267c63b52d191f88fb8f804f5269235a6b321 Mon Sep 17 00:00:00 2001 From: StudioEtrange Date: Wed, 24 Jul 2013 20:53:33 +0000 Subject: [PATCH 1/2] 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 --- code/CMakeModules/PCHSupport.cmake | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/code/CMakeModules/PCHSupport.cmake b/code/CMakeModules/PCHSupport.cmake index d444bfa3d..0e33df4dc 100644 --- a/code/CMakeModules/PCHSupport.cmake +++ b/code/CMakeModules/PCHSupport.cmake @@ -33,9 +33,9 @@ ENDIF(MSVC) # Set PCH_FLAGS for common flags, PCH_ARCH_XXX_FLAGS for specific archs flags and PCH_ARCHS for archs MACRO(PCH_SET_COMPILE_FLAGS _target) SET(PCH_FLAGS) - SET(PCH_ARCHS) - + 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 - SEPARATE_ARGUMENTS(_FLAGS) + 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 From 0efa7c8aeeb0229f02fe5435adef70d3c4302dc5 Mon Sep 17 00:00:00 2001 From: StudioEtrange Date: Wed, 24 Jul 2013 21:57:52 +0000 Subject: [PATCH 2/2] PCHSupport.cmake edited online with Bitbucket --HG-- branch : StudioEtrange/fix-some-probleme-with-spaces-in-path-on-1374699208398 --- code/CMakeModules/PCHSupport.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/CMakeModules/PCHSupport.cmake b/code/CMakeModules/PCHSupport.cmake index 0e33df4dc..042f6b0cc 100644 --- a/code/CMakeModules/PCHSupport.cmake +++ b/code/CMakeModules/PCHSupport.cmake @@ -34,7 +34,7 @@ ENDIF(MSVC) MACRO(PCH_SET_COMPILE_FLAGS _target) SET(PCH_FLAGS) SET(PCH_ARCHS) - SET(FLAGS) + SET(_FLAGS) LIST(APPEND _FLAGS ${CMAKE_CXX_FLAGS})