project(SimpleExclude C) set(EXECUTABLE_OUTPUT_PATH "${SimpleExclude_BINARY_DIR}" CACHE INTERNAL "" FORCE) set(LIBRARY_OUTPUT_PATH "${SimpleExclude_BINARY_DIR}" CACHE INTERNAL "" FORCE) add_subdirectory(dirC EXCLUDE_FROM_ALL) add_subdirectory(dirD)