sandialabs / CACTUS

CACTUS (Code for Axial and Cross-flow TUrbine Simulation) is a turbine performance simulation code, based on a free wake vortex method, to study wind turbines and marine hydrokinetic (MHK) devices.
BSD 3-Clause "New" or "Revised" License
18 stars 12 forks source link

Fix bug with path separators in Windows #22

Closed whophil closed 4 years ago

whophil commented 4 years ago

@kmruehl found some issues with file output on Windows. The root cause was improper file separators on Windows machines. Apparently the call to system('mkdir [...]') on Windows requires the \ file separator be used.

Here, CMake is used to supply the appropriate path separator. This seemed easier than messing around with all kinds of compiler preproc directives. It's also cleaner than parsing the PATH env var, which was the old solution and clearly didn't work for native Windows execution.

@kmruehl this is an alternative to https://github.com/SNL-WaterPower/CACTUS/pull/21