This reverts parts of commit 367fd39713dc8efe1edea95b5bafb4863b9b6d0b.
The use of enable_examples is in EXAMPLES/CMakeLists.txt. The advantage of the solution is that even with disabled enable_examples the examples can be manually built.
@xiaoyeli Your last change was a regression, the behavior is what you expect (or even better). If you need more detailed explanation, please let me know.
This reverts parts of commit 367fd39713dc8efe1edea95b5bafb4863b9b6d0b.
The use of
enable_examples
is in EXAMPLES/CMakeLists.txt. The advantage of the solution is that even with disabled enable_examples the examples can be manually built.