What does --target option mean in CMake?

前端 未结 1 835
一个人的身影
一个人的身影 2021-01-01 12:26
C:\\blah\\duh\\bin\\Android>\"C:\\Program Files (x86)\\CMake\\bin\\cmake.exe\" --build . --target SysTest --use-stderr -- -j 8    

I have this a

相关标签:
1条回答
  • 2021-01-01 12:59

    If I have

    add_executable(hello hello.cpp)
    
    add_executable(goodbye goodbye.cpp)
    

    then CMake creates 'build targets' for each executable. It also creates other build targets, such as the 'all' build target, which builds everything.

    By default, if the target is not specified, the 'all' target is executed, meaning both hello and goodbye are built.

    You can specify the target to build if you only want to build one of them.

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