View Issue Details

IDProjectCategoryView StatusLast Update
0003645Spring engineGeneralpublic2013-03-31 05:50
ReporterPixelOfDeath Assigned Toabma  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version94.1 
Summary0003645: Can't build if source directory has white spaces
DescriptionThere are a lot of includes that are not in parentheses. So the build will break if the directory contains any white spaces.
Steps To ReproducePut source in directory with white space and try to compile.
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

PixelOfDeath

2013-03-30 20:43

reporter   ~0010327

This fixes it for me, based on current git master

diff --git a/AI/Interfaces/Java/CMakeLists.txt b/AI/Interfaces/Java/CMakeLists.txt
index 6a2bc81..e8a5536 100644
--- a/AI/Interfaces/Java/CMakeLists.txt
+++ b/AI/Interfaces/Java/CMakeLists.txt
@@ -190,7 +190,7 @@ macro (ConfigureCMakeOrMavenJavaSkirmishAI requireMaven wrapperNames)
             endif (EXISTS "${mySrcArgFile}")
             set(mySrcArgFile "${myBuildDir}/sourceFiles.txt")
             foreach (srcFile ${mySources})
- file(APPEND "${mySrcArgFile}" "${srcFile}\n")
+ file(APPEND "${mySrcArgFile}" "\"${srcFile}\"\n")
             endforeach (srcFile)
 
             # Compile and pack the library
@@ -632,7 +632,7 @@ if (BUILD_${myName}_AIINTERFACE)
         file(REMOVE "${mySrcArgFile}")
     endif (EXISTS "${mySrcArgFile}")
     foreach (srcFile ${myJavaSources} ${myJavaGeneratedSources})
- file(APPEND "${mySrcArgFile}" "${srcFile}\n")
+ file(APPEND "${mySrcArgFile}" "\"${srcFile}\"\n")
     endforeach (srcFile)
 
     add_custom_command(
diff --git a/AI/Wrappers/JavaOO/CMakeLists.txt b/AI/Wrappers/JavaOO/CMakeLists.txt
index ce28a41..1851376 100644
--- a/AI/Wrappers/JavaOO/CMakeLists.txt
+++ b/AI/Wrappers/JavaOO/CMakeLists.txt
@@ -303,7 +303,7 @@ if (BUILD_${myName}_AIWRAPPER)
         file(REMOVE "${mySrcArgFile}")
     endif (EXISTS "${mySrcArgFile}")
     foreach (srcFile ${mySources} ${myGeneratedSources})
- file(APPEND "${mySrcArgFile}" "${srcFile}\n")
+ file(APPEND "${mySrcArgFile}" "\"${srcFile}\"\n")
     endforeach (srcFile)
 
     # compile and pack library
diff --git a/rts/lib/streflop/CMakeLists.txt b/rts/lib/streflop/CMakeLists.txt
index d5e53a3..5e48441 100644
--- a/rts/lib/streflop/CMakeLists.txt
+++ b/rts/lib/streflop/CMakeLists.txt
@@ -68,7 +68,7 @@ SET(libm_flt32_source
     "libm/flt-32/w_expf.cpp"
     )
 
-SET(cxxflags "-I${CMAKE_CURRENT_SOURCE_DIR}/libm/headers")
+SET(cxxflags "-I\"${CMAKE_CURRENT_SOURCE_DIR}/libm/headers\"")
 if (NOT MSVC)
     SET(cxxflags "${cxxflags} -w -O3")
     if (NOT $ENV{CXX} MATCHES "icpc")

zerver

2013-03-31 00:13

reporter   ~0010329

thanks, will fix this and the cmake files for MT

abma

2013-03-31 05:50

administrator   ~0010333

@PixelOfDeath:

can you please make a pull request next time? this way you'll take the kudos & fame :)


(also its less error-prone for us to apply a patch)

Issue History

Date Modified Username Field Change
2013-03-26 18:06 PixelOfDeath New Issue
2013-03-30 20:43 PixelOfDeath Note Added: 0010327
2013-03-30 22:17 zerver Assigned To => zerver
2013-03-30 22:17 zerver Status new => assigned
2013-03-31 00:13 zerver Note Added: 0010329
2013-03-31 05:47 abma Changeset attached => spring develop 26176b07
2013-03-31 05:47 abma Assigned To zerver => abma
2013-03-31 05:47 abma Status assigned => resolved
2013-03-31 05:47 abma Resolution open => fixed
2013-03-31 05:50 abma Note Added: 0010333