Organize CmakeLists.txt
add config validator and test.