How to set CMake variable of type list from command line

前端 未结 1 426
走了就别回头了
走了就别回头了 2020-12-21 19:24

I am trying to do something like this

cmake .. -G \"Visual Studio 15 2017 Win64\" -DCMAKE_CONFIGURATION_TYPES=ReleaseDebug

But the CM

相关标签:
1条回答
  • 2020-12-21 19:39

    Lists are special type of strings in CMake. When you write set(var a b c) it is equivalent to set(var "a;b;c"). The same applies to your case. CMake interprets CMAKE_CONFIGURATION_TYPES variable as a list, so you need to write -DCMAKE_CONFIGURATION_TYPES="Release;Debug" to properly set it from the command line.

    0 讨论(0)
提交回复
热议问题