[CMake] exclude build project from solution

Andrea Galeazzi Galeazzi at korg.it
Tue May 3 10:59:50 EDT 2011


I've a project made up of multiple executable target:
add_executable(TARGET_NAME1 ${SOURCES1})
add_executable(TARGET_NAME2 ${SOURCES2})
add_executable(TARGET_NAME3 ${SOURCES3})

...........
Now I'd like to build just only TARGET_NAME1 when I press F7 (build 
solution) in visual studio. I tried to add
set_target_properties(TARGET_NAME2 PROPERTIES EXCLUDE_FROM_ALL "TRUE")
set_target_properties(TARGET_NAME3 PROPERTIES EXCLUDE_FROM_ALL "TRUE")
......
but it only remove the dependency from ALL_BUILD project.
So, is it possible to generate a such kind of solution?


More information about the CMake mailing list