minor fixes
add stage selection support
add CTEST_WITH_SUBMIT option