CLion on remote not using environment variables in CMakeLists

Hello,

I have an issue where I have packages and cmake_modules located in other places than default. I have set the environment variables such as CMAKE_MODULE_PATH in my CMakeLists but CLion does not look in that directory.

Everything works fine when compiling on remote, and all cmake-modules and pkg-config-packages are found. 

Do I need to do anything else to make it look in the specified directories?

Thanks

1

Hello!

Do you use the exact same CMakeLists.txt in CLion with remote toolchain and "when compiling on remote"?

0
Avatar
Permanently deleted user

Yes, it is exactly the same CMakeLists and toolchain used.

0
Avatar
Permanently deleted user

1. Could you please share the lines where you set CMAKE_MODULE_PATH.

2. Which cmake version do you use on remote machine?

BTW setting CMAKE_MODULE_PATH needs for CMake, not for CLion. I've just checked in follow way:

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/somedir")
message(${CMAKE_MODULE_PATH})

When I reload CMake Project, it writes correct message: /usr/somedir

 

 

0

请先登录再写评论。