asmodehn / wkcmake

Workshop CMake - For quick and easy CMake setup of project, based on simple folder and file naming conventions
BSD 2-Clause "Simplified" License
5 stars 2 forks source link

BINARY_DIR/include directory not cleaned #3

Open asmodehn opened 11 years ago

asmodehn commented 11 years ago

When a build happens, BINARY_DIR/include is copied from SOURCE_DIR/include.

However whenthe source is updated, and some fils where removed, these files are not removed from BINARY_DIR/include, and might lead to divergent behaviour on different build directories.

The BINARY_DIR/include directory should always match the SOURCE_DIR/include. either remove and recopy at each build, copy only differences, and/or remove it on clean target...

asmodehn commented 11 years ago

We were including the binary_dir/include folder when building just because of the generated WkPlatform header.

WkPlatform cmake generated code has now been put to CMakeFiles, which we now include on build.

The user's changes in the source_dir/include will therefore not be hidden by remaining old copy in binary_dir, as we do not need to include it anymore.

asmodehn commented 11 years ago

binary_dir/include folders seem to still be included by dependent project so i dont see any changes here, am i wrong ?

asmodehn commented 11 years ago

We need to think also about the case where someone build from the source directory. Even if it is discouraged, some might still do it.

At the moment the files are copied over themselves which messes up dependencies, IDE and stuff around, with no reason to doing so.

Still need to be fixed.