Closed Dobiasd closed 3 years ago
You are right, I was annoyed when testing this yesterday.
The custom target auto_generate (added with pull/230) produces include/fplus/fwd_instances.autogenerated_defines and include/fplus/curry_instances.autogenerated_defines, which are inputs for the unit tests.
Nice catch, and sorry if I missed this in the original PR! I will propose a PR that solves this (auto_generate.py will touch nothing when no change is detected)
I think the generated files should not be kept in the source tree, because CMake will always consider them changed when the timestamps don't match. Autogenerated sources and the single header should be kept only in the build directory.
What about providing a single header for people to just download then?The single header could be provided on the Releases page.
I guess you'll need to list all the files the python script uses to generate its output in the DEPENDS
argument.
The first call to
cmake --build FunctionalPlus/build
is supposed to build all (Building CXX object CMakeFiles/foo_test.dir/foo_test.cpp.o
), but the second and third ones should not do anything. Instead, they rebuild everything. The superfluous waiting time can be annoying when locally modifying only one of the unit tests.The custom target
auto_generate
(added with pull/230) producesinclude/fplus/fwd_instances.autogenerated_defines
andinclude/fplus/curry_instances.autogenerated_defines
, which are inputs for the unit tests.auto_generate
depends onALL
. Does that mean, that it is also triggered (overwrites theautogenerated_defines
files) when the tests were built? (Then, the next build needs to re-build the tests, and the cycle continues.)If so, I guess it would make sense to run
auto_generate
before (and independent of) the tests to break the cycle. This would make additional sense because the tests actually do depend on the content of theautogenerated_defines
files but not vice versa./cc @friendlyanon @pthom