# Path error when building with Conan and CMake

I recently encountered a mysterious path error when attempting to build a C++ project on Windows using Conan and CMake. The main error message wasn’t particularly helpful though:

 ERROR: conanfile.py (my-project/1.0@None/None): Error in build() method, line 71
cmake.configure(source_folder=".")
ConanException: Error 1 while executing cd C:\path\to\repo\build && cmake -G "Visual Studio 15 2017 Win64" ...
20190718 15:00:46 : ERROR : Problem: conan_build: 1
20190718 15:00:46 : ERROR : Exit: 1

I’ve edited the message for brevity and to avoid sharing details of exactly which project it was. The main point is that Conan encountered the error when it was trying to run a shell command. The shell command was attempting to enter a build directory and invoke CMake. I tried to run the command manually and it worked correctly so something strange was going on behind the scenes.

Read more Path error when building with Conan and CMake

# Workaround for nvcc pthread issue

I recently upgraded various pieces of software on my work PC. Afterwards, I found that our C++/CUDA projects wouldn’t build. The following error was reported:

nvcc fatal   : Unknown option 'pthread'

I was attempting to build it in CLion 2018.2.5 using the bundled CMake 3.12.2. My OS is Ubuntu 18.04 and I’m using CUDA 9.1.

So far, I haven’t been able to find a proper solution. However, I have found a simple workaround. If you know of a better solution then please let me know in the comments!