<div dir="ltr"><div dir="ltr">thanks for the anwer....<div>quite not... I'm using cmake 3.14.2 (so, far away from 3.6....) and have a look, in main.cpp, there is #include <filesystem>:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>$ find /usr/include/ -name filesystem</div><div>/usr/include/c++/5/experimental/filesystem</div><div>/usr/include/c++/7/experimental/filesystem</div><div>/usr/include/c++/8/filesystem</div><div>/usr/include/c++/8/experimental/filesystem</div><div>$ sudo touch /usr/include/c++/5/experimental/filesystem /usr/include/c++/7/experimental/filesystem /usr/include/c++/8/filesystem /usr/include/c++/8/experimental/filesystem</div><div>$ make</div><div>[100%] Built target FileSync</div><div>$ touch ../main.cxx </div><div>$ make</div><div>Scanning dependencies of target FileSync</div><div>[ 50%] Building CXX object CMakeFiles/FileSync.dir/main.cxx.o</div><div>[100%] Linking CXX executable FileSync</div><div>[100%] Built target FileSync</div></blockquote><div><br></div><div>=> cmake don't create "full include dependency" which IS a mistake.... updating system g++ can just assume the target is uptodate and in fact just create a broken build...</div><div><br></div><div>in cmake cxx.includecache</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>#IncludeRegexLine: ^[ <span style="white-space:pre"> </span>]*[#%][ <span style="white-space:pre"> </span>]*(include|import)[ <span style="white-space:pre"> </span>]*[<"]([^">]+)([">])</div><div>#IncludeRegexScan: ^.*$</div><div>#IncludeRegexComplain: ^$</div><div>#IncludeRegexTransform: </div><div>/home/orange/crypt/Devel/projets/FileSync/main.cxx</div><div>cstdio</div><div>-</div><div>io.h</div><div>-</div><div>fcntl.h</div><div>-</div><div>locale</div><div>-</div><div>clocale</div><div>-</div><div>fstream</div><div>-</div><div>iostream</div><div>-</div><div>filesystem</div><div>-</div><div><br></div></blockquote>$ /usr/bin/gcc-8 -M ../main.cxx <br>main.o: ../main.cxx /usr/x86_64-linux-gnu/include/stdc-predef.h \<br> /usr/include/c++/8/cstdio \<br> /usr/include/x86_64-linux-gnu/c++/8/bits/c++config.h \<br> /usr/include/x86_64-linux-gnu/c++/8/bits/os_defines.h \<br> /usr/x86_64-linux-gnu/include/features.h \<br> /usr/x86_64-linux-gnu/include/sys/cdefs.h \<br> /usr/x86_64-linux-gnu/include/bits/wordsize.h \<br> /usr/x86_64-linux-gnu/include/bits/long-double.h \<br> /usr/x86_64-linux-gnu/include/gnu/stubs.h \<br> /usr/x86_64-linux-gnu/include/gnu/stubs-64.h \<br> /usr/include/x86_64-linux-gnu/c++/8/bits/cpu_defines.h \<br> /usr/x86_64-linux-gnu/include/stdio.h \<br> /usr/x86_64-linux-gnu/include/bits/libc-header-start.h \<br> /usr/lib/gcc/x86_64-linux-gnu/8/include/stddef.h \<br> /usr/x86_64-linux-gnu/include/bits/types.h \<br> /usr/x86_64-linux-gnu/include/bits/typesizes.h \<br> /usr/x86_64-linux-gnu/include/bits/types/__FILE.h \<br> /usr/x86_64-linux-gnu/include/bits/types/FILE.h \<br> /usr/x86_64-linux-gnu/include/bits/libio.h \<br> /usr/x86_64-linux-gnu/include/bits/_G_config.h \<br> /usr/x86_64-linux-gnu/include/bits/types/__mbstate_t.h \<br> /usr/lib/gcc/x86_64-linux-gnu/8/include/stdarg.h \<br> /usr/x86_64-linux-gnu/include/bits/stdio_lim.h \<br> /usr/x86_64-linux-gnu/include/bits/sys_errlist.h \<br> /usr/include/c++/8/locale /usr/include/c++/8/bits/localefwd.h \<br> /usr/include/x86_64-linux-gnu/c++/8/bits/c++locale.h \<br> /usr/include/c++/8/clocale /usr/x86_64-linux-gnu/include/locale.h \<br> /usr/x86_64-linux-gnu/include/bits/locale.h \<br> /usr/x86_64-linux-gnu/include/bits/types/locale_t.h \<br> /usr/x86_64-linux-gnu/include/bits/types/__locale_t.h \<br> /usr/include/c++/8/iosfwd /usr/include/c++/8/bits/stringfwd.h \<br> /usr/include/c++/8/bits/memoryfwd.h /usr/include/c++/8/bits/postypes.h \<br> /usr/include/c++/8/cwchar /usr/x86_64-linux-gnu/include/wchar.h \<br> /usr/x86_64-linux-gnu/include/bits/floatn.h \<br> /usr/x86_64-linux-gnu/include/bits/floatn-common.h \<br> /usr/x86_64-linux-gnu/include/bits/wchar.h \<br> /usr/x86_64-linux-gnu/include/bits/types/wint_t.h \<br> /usr/x86_64-linux-gnu/include/bits/types/mbstate_t.h \<br> /usr/include/c++/8/cctype /usr/x86_64-linux-gnu/include/ctype.h \<br> /usr/x86_64-linux-gnu/include/endian.h \<br> /usr/x86_64-linux-gnu/include/bits/endian.h \<br> /usr/x86_64-linux-gnu/include/bits/byteswap.h \<br> /usr/x86_64-linux-gnu/include/bits/byteswap-16.h \<br> /usr/x86_64-linux-gnu/include/bits/uintn-identity.h \<br> /usr/include/c++/8/bits/locale_classes.h /usr/include/c++/8/string \<br> /usr/include/c++/8/bits/char_traits.h \<br> /usr/include/c++/8/bits/stl_algobase.h \<br> /usr/include/c++/8/bits/functexcept.h \<br> /usr/include/c++/8/bits/exception_defines.h \<br> /usr/include/c++/8/bits/cpp_type_traits.h \<br> /usr/include/c++/8/ext/type_traits.h \<br> /usr/include/c++/8/ext/numeric_traits.h \<br> /usr/include/c++/8/bits/stl_pair.h /usr/include/c++/8/bits/move.h \<br> /usr/include/c++/8/bits/concept_check.h /usr/include/c++/8/type_traits \<br> /usr/include/c++/8/bits/stl_iterator_base_types.h \<br> /usr/include/c++/8/bits/stl_iterator_base_funcs.h \<br> /usr/include/c++/8/debug/assertions.h \<br> /usr/include/c++/8/bits/stl_iterator.h \<br> /usr/include/c++/8/bits/ptr_traits.h /usr/include/c++/8/debug/debug.h \<br> /usr/include/c++/8/bits/predefined_ops.h /usr/include/c++/8/cstdint \<br> /usr/lib/gcc/x86_64-linux-gnu/8/include/stdint.h \<br> /usr/x86_64-linux-gnu/include/stdint.h \<br> /usr/x86_64-linux-gnu/include/bits/stdint-intn.h \<br> /usr/x86_64-linux-gnu/include/bits/stdint-uintn.h \<br> /usr/include/c++/8/bits/allocator.h \<br> /usr/include/x86_64-linux-gnu/c++/8/bits/c++allocator.h \<br> /usr/include/c++/8/ext/new_allocator.h /usr/include/c++/8/new \<br> /usr/include/c++/8/exception /usr/include/c++/8/bits/exception.h \<br> /usr/include/c++/8/bits/exception_ptr.h \<br> /usr/include/c++/8/bits/cxxabi_init_exception.h \<br> /usr/include/c++/8/typeinfo /usr/include/c++/8/bits/hash_bytes.h \<br> /usr/include/c++/8/bits/nested_exception.h \<br> /usr/include/c++/8/bits/ostream_insert.h \<br> /usr/include/c++/8/bits/cxxabi_forced.h \<br> /usr/include/c++/8/bits/stl_function.h \<br> /usr/include/c++/8/backward/binders.h \<br> /usr/include/c++/8/bits/range_access.h \<br> /usr/include/c++/8/initializer_list \<br> /usr/include/c++/8/bits/basic_string.h \<br> /usr/include/c++/8/ext/atomicity.h \<br> /usr/include/x86_64-linux-gnu/c++/8/bits/gthr.h \<br> /usr/include/x86_64-linux-gnu/c++/8/bits/gthr-default.h \<br> /usr/x86_64-linux-gnu/include/pthread.h \<br> /usr/x86_64-linux-gnu/include/sched.h \<br> /usr/x86_64-linux-gnu/include/bits/types/time_t.h \<br> /usr/x86_64-linux-gnu/include/bits/types/struct_timespec.h \<br> /usr/x86_64-linux-gnu/include/bits/sched.h \<br> /usr/x86_64-linux-gnu/include/bits/cpu-set.h \<br> /usr/x86_64-linux-gnu/include/time.h \<br> /usr/x86_64-linux-gnu/include/bits/time.h \<br> /usr/x86_64-linux-gnu/include/bits/timex.h \<br> /usr/x86_64-linux-gnu/include/bits/types/struct_timeval.h \<br> /usr/x86_64-linux-gnu/include/bits/types/clock_t.h \<br> /usr/x86_64-linux-gnu/include/bits/types/struct_tm.h \<br> /usr/x86_64-linux-gnu/include/bits/types/clockid_t.h \<br> /usr/x86_64-linux-gnu/include/bits/types/timer_t.h \<br> /usr/x86_64-linux-gnu/include/bits/types/struct_itimerspec.h \<br> /usr/x86_64-linux-gnu/include/bits/pthreadtypes.h \<br> /usr/x86_64-linux-gnu/include/bits/thread-shared-types.h \<br> /usr/x86_64-linux-gnu/include/bits/pthreadtypes-arch.h \<br> /usr/x86_64-linux-gnu/include/bits/setjmp.h \<br> /usr/include/x86_64-linux-gnu/c++/8/bits/atomic_word.h \<br> /usr/include/c++/8/ext/alloc_traits.h \<br> /usr/include/c++/8/bits/alloc_traits.h \<br> /usr/include/c++/8/ext/string_conversions.h /usr/include/c++/8/cstdlib \<br> /usr/x86_64-linux-gnu/include/stdlib.h \<br> /usr/x86_64-linux-gnu/include/bits/waitflags.h \<br> /usr/x86_64-linux-gnu/include/bits/waitstatus.h \<br> /usr/x86_64-linux-gnu/include/sys/types.h \<br> /usr/x86_64-linux-gnu/include/sys/select.h \<br> /usr/x86_64-linux-gnu/include/bits/select.h \<br> /usr/x86_64-linux-gnu/include/bits/types/sigset_t.h \<br> /usr/x86_64-linux-gnu/include/bits/types/__sigset_t.h \<br> /usr/x86_64-linux-gnu/include/sys/sysmacros.h \<br> /usr/x86_64-linux-gnu/include/bits/sysmacros.h \<br> /usr/x86_64-linux-gnu/include/alloca.h \<br> /usr/x86_64-linux-gnu/include/bits/stdlib-float.h \<br> /usr/include/c++/8/bits/std_abs.h /usr/include/c++/8/cerrno \<br> /usr/x86_64-linux-gnu/include/errno.h \<br> /usr/x86_64-linux-gnu/include/bits/errno.h \<br> /usr/x86_64-linux-gnu/include/linux/errno.h \<br> /usr/x86_64-linux-gnu/include/asm/errno.h \<br> /usr/x86_64-linux-gnu/include/asm-generic/errno.h \<br> /usr/x86_64-linux-gnu/include/asm-generic/errno-base.h \<br> /usr/include/c++/8/bits/functional_hash.h \<br> /usr/include/c++/8/bits/basic_string.tcc \<br> /usr/include/c++/8/bits/locale_classes.tcc \<br> /usr/include/c++/8/bits/locale_facets.h /usr/include/c++/8/cwctype \<br> /usr/x86_64-linux-gnu/include/wctype.h \<br> /usr/x86_64-linux-gnu/include/bits/wctype-wchar.h \<br> /usr/include/x86_64-linux-gnu/c++/8/bits/ctype_base.h \<br> /usr/include/c++/8/bits/ios_base.h /usr/include/c++/8/system_error \<br> /usr/include/x86_64-linux-gnu/c++/8/bits/error_constants.h \<br> /usr/include/c++/8/stdexcept /usr/include/c++/8/streambuf \<br> /usr/include/c++/8/bits/streambuf.tcc \<br> /usr/include/c++/8/bits/streambuf_iterator.h \<br> /usr/include/x86_64-linux-gnu/c++/8/bits/ctype_inline.h \<br> /usr/include/c++/8/bits/locale_facets.tcc \<br> /usr/include/c++/8/bits/locale_facets_nonio.h /usr/include/c++/8/ctime \<br> /usr/include/x86_64-linux-gnu/c++/8/bits/time_members.h \<br> /usr/include/x86_64-linux-gnu/c++/8/bits/messages_members.h \<br> /usr/x86_64-linux-gnu/include/libintl.h \<br> /usr/include/c++/8/bits/codecvt.h \<br> /usr/include/c++/8/bits/locale_facets_nonio.tcc \<br> /usr/include/c++/8/bits/locale_conv.h \<br> /usr/include/c++/8/bits/unique_ptr.h /usr/include/c++/8/utility \<br> /usr/include/c++/8/bits/stl_relops.h /usr/include/c++/8/tuple \<br> /usr/include/c++/8/array /usr/include/c++/8/bits/uses_allocator.h \<br> /usr/include/c++/8/bits/invoke.h /usr/include/c++/8/fstream \<br> /usr/include/c++/8/istream /usr/include/c++/8/ios \<br> /usr/include/c++/8/bits/basic_ios.h \<br> /usr/include/c++/8/bits/basic_ios.tcc /usr/include/c++/8/ostream \<br> /usr/include/c++/8/bits/ostream.tcc /usr/include/c++/8/bits/istream.tcc \<br> /usr/include/x86_64-linux-gnu/c++/8/bits/basic_file.h \<br> /usr/include/x86_64-linux-gnu/c++/8/bits/c++io.h \<br> /usr/include/c++/8/bits/fstream.tcc /usr/include/c++/8/iostream \<br> /usr/include/c++/8/filesystem<br></div><div><br></div><div><br></div><div>amazing, no? cmake find only 9 dependencies against 100+ real ones (and I don't even speak of errors that can be caused in parsing if some -D option is changed.... </div><div><br></div><div>thanks and regards</div><div>JLM</div><div> </div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 24 juin 2019 à 14:14, Robert Maynard <<a href="mailto:robert.maynard@kitware.com">robert.maynard@kitware.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It look that starting with CMake 3.6 modification of system headers<br>
will cause CMake to recompile projects. What version of CMake and your<br>
compiler are you using?<br>
<br>
On Mon, Jun 17, 2019 at 9:40 AM jl forums <<a href="mailto:jlmxyz.forums@gmail.com" target="_blank">jlmxyz.forums@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
> I want to create a full tag file and for this require to know the compiler full include path... there is a way to had custom includes path but didn't found any variables for the include path....<br>
> for example :<br>
> $ gcc-8 -v -x c -E /dev/null<br>
> Using built-in specs.<br>
> [....]<br>
> ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"<br>
> #include "..." search starts here:<br>
> #include <...> search starts here:<br>
> /usr/lib/gcc/x86_64-linux-gnu/8/include<br>
> /usr/local/include<br>
> /usr/lib/gcc/x86_64-linux-gnu/8/include-fixed<br>
> /usr/x86_64-linux-gnu/include<br>
> /usr/include/x86_64-linux-gnu<br>
> /usr/include<br>
> End of search list.<br>
> [...]<br>
><br>
> $ gcc -v -x c -E /dev/null<br>
> Using built-in specs.<br>
> [...]<br>
> ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"<br>
> #include "..." search starts here:<br>
> #include <...> search starts here:<br>
> /usr/lib/gcc/x86_64-linux-gnu/7/include<br>
> /usr/local/include<br>
> /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed<br>
> /usr/x86_64-linux-gnu/include<br>
> /usr/include/x86_64-linux-gnu<br>
> /usr/include<br>
> End of search list.<br>
> [...]<br>
><br>
> I tried to<br>
><br>
><br>
> get_target_property(moggle_interface_includes FileSync INTERFACE_INCLUDE_DIRECTORIES)<br>
> message("Moggle interface includes: ${moggle_interface_includes}")<br>
><br>
> get_target_property(motor_includes FileSync INCLUDE_DIRECTORIES)<br>
> message("MOTOR includes ${motor_includes}")<br>
><br>
> but I get<br>
><br>
> Moggle interface includes: moggle_interface_includes-NOTFOUND<br>
> MOTOR includes motor_includes-NOTFOUND<br>
><br>
><br>
> there is also some issue because cmake strip dependencies from system's include, which means that updating a system software won't cause rebuild and consider that the build is uptodate, causing unexpected results<br>
> seems that there is ways to workaround this : <a href="https://stackoverflow.com/questions/7461000/handling-header-files-dependencies-with-cmake" rel="noreferrer" target="_blank">https://stackoverflow.com/questions/7461000/handling-header-files-dependencies-with-cmake</a> but this is ugly... would be better to let the user choose with an option<br>
><br>
> thanks and regards<br>
> JLM<br>
> --<br>
><br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
><br>
> CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div>