microsoft / vscode-cmake-tools

CMake integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools
MIT License
1.47k stars 451 forks source link

Custom CMAKE_MODULE_PATH #304

Closed KobNael closed 6 years ago

KobNael commented 6 years ago

Custom CMAKE_MODULE_PATH ?

I've seen that you used your own (build/CMakeTools) but it overrided my own parameter, hence I've not been able to successfully configure my project. Is there a way to provide its own path in addition to yours ?

vector-of-bool commented 6 years ago

What CMake version are you using? In the beta release, I've removed the functionality that required setting the module path. You'll still see full functionality if you are on CMake 3.7.2 or newer, and slightly reduced if you are running anything older than that.

KobNael commented 6 years ago

I use cmake 3.9.5. I've made a workaround by using an additional variable in my CMakeList. I'll test with the next release ;)

wenglorfranz commented 6 years ago

IMHO this seems to be a bug:

"cmake.configureSettings": { "CMAKE_MODULE_PATH":"\"/opt/toolchain/cmake\"",
},

Inside InitializeCache.cmake this expands to:

set(CMAKE_MODULE_PATH "\";/;o;p;t;/;t;o;o;l;c;h;a;i;n;/;c;m;a;k;e;\";/home/user/workspace/hilscher/_build/CMakeTools" CACHE STRING "Variable supplied by CMakeTools. Value is forced." FORCE)

no-realm commented 6 years ago

@wenglorfranz I have a project which uses a custom CMAKE_MODULE_PATH and it works without any problems in the latest 0.11.0-beat4.

no-realm commented 6 years ago

Closed. If this issues still persists in the current 0.11.0-beta4, feel free to reopen this one or create a new one.