Detect clion in cmake
已完成
I'd like to run a execute a command in cmake ONLY if it is clion that has triggered the cmake configuration. Is there any variable I can query to determine this?
I do know that it would be possible to pass `-DCLION_BUILD` to the cmake arguments, but I would like to find a more automated way.
Thanks all
请先登录再写评论。
You can also do something among the lines of:
if ($ENV{JETBRAINS_IDE})
set(JETBRAINS_CLION_IDE True CACHE BOOL "Build under CLion")
endif ($ENV{JETBRAINS_IDE})
Great idea. Thanks!