niessner / Opt

Opt DSL
Other
254 stars 68 forks source link

Make createwrapper.t more robust to different types of path #129

Closed straywarrior closed 6 years ago

straywarrior commented 6 years ago

Intuition

I use a CMakeList.txt for Opt to handle the building step, which is more flexible to integrate the Opt project with my own project. However, the path in CMake always has forward slashes (even in Windows) so the command executed in createwrapper.t is like this: cmd /c dir /d API/src It's known that Windows can handle the path with forward slashes but in this case, the path is not in quotes and the slash is seen as a parameter switch. It will generate an error like this:

Parameter format not correct - "src"

To avoid the error, I just put the path in quotes and I have verified that it works fine both for Linux and Windows.

Main changes

Mx7f commented 6 years ago

Thanks, merged!