Re: [CMake] Source is not rebuild when header changes
Am 01.08.2017 um 21:18 schrieb David Cole: > And in your file "src/CMakeLists.txt" do you add > "${CMAKE_CURRENT_SOURCE_DIR}" (or anything else which resolves to the > "src" directory) to your include directories? No, there is none. I do not added one, since it built correctly. I have no added include_directories(${CMAKE_CURRENT_SOURCE_DIR}), but it still does not get changes to the header. The complete src/CMakeLists.txt: https://pastebin.com/tnQPF2Gj Again, ./CMakeLists.txt: https://pastebin.com/vfReTM1N % grep PetRadial CMakeFiles/precice.dir/* CMakeFiles/precice.dir/CXX.includecache:mapping/PetRadialBasisFctMapping.hpp CMakeFiles/precice.dir/CXX.includecache:/home/florian/precice/src/mapping/config/mapping/PetRadialBasisFctMapping.hpp > > The line which includes the header is > #include "mapping/..." > but there is no local subdirectory "mapping" relative to that file > (which is down in the mapping/config dir) Yes, the include is relative to ./src. Best Thanks, Florian > > > > > On Tue, Aug 1, 2017 at 6:47 AM, Florian Lindnerwrote: >> Hi, >> >> Am 01.08.2017 um 18:32 schrieb David Cole via CMake: >>> What source files include the header? >> >> It's included by src/mapping/config/MappingConfiguration.cpp >> >> https://github.com/precice/precice/blob/develop/src/mapping/config/MappingConfiguration.cpp >> >> https://github.com/precice/precice/blob/develop/src/mapping/PetRadialBasisFctMapping.hpp >> >>> Is one of them listed as a file in your project? >> >> Yes, it's also in the CMakeFiles: >> >> % ll >> build/cmake-debug/CMakeFiles/precice.dir/src/mapping/config/MappingConfiguration.cpp.o >> >> -rw-r--r-- 1 florian florian 1517472 1. Aug 15:08 >> build/cmake-debug/CMakeFiles/precice.dir/src/mapping/config/MappingConfiguration.cpp.o >> >>> Does the **including** file exist at CMake configure time, or is it >>> generated later by a build step? >> >> No, it's a standard plain file. >> >>> What do the lines of code that include the header look like? >> >> #include "mapping/PetRadialBasisFctMapping.hpp" >> >>> >>> CMake uses its own analysis of the source files to determine the >>> depends information, since it needs to generate it without invoking >>> the compiler. This leads to a less-than-100% rate of correctness in >>> the depends information, although usually, it is misses "in the other >>> direction" due to depending on a header file which is included in some >>> conditionally compiled block. (So the typical problem is an extra >>> dependency, not a missing one...) >> >> The header file is (not the including file or the #include itself) is >> guarded by a define >> >> #ifndef PRECICE_NO_PETSC >> >> which is not set. The build also contains the functionality which is guarded >> thereof. >> >>> Perhaps passing along the includers and the exact lines and context of >>> being included will give us a hint about why the dependency is not >>> generated properly in your case. >> >> I'm happy to provide whatever information I can. >> >> If you want to download the entire source of the project, tell me. Right now >> the CMake files are not yet in the >> repository, but I can create a branch and add them there. >> >> My CMake version is 3.8.2. >> >> Best, >> Florian >> >> >>> >>> >>> >>> On Tue, Aug 1, 2017 at 5:18 AM, Florian Lindner wrote: Hello, on my project, which I'm currently testing with cmake, I just noticed, that when I modify a header, the project is not rebuilt. The CMakeLists.txt in the root dir is here: https://pastebin.com/vfReTM1N The other CMakeLists.txt resides in root/src and lists all the source (*.cpp) files using GLOBS and adds them to the parent scope: set (sourcesAllNoMain ${sourcesAllNoMain} PARENT_SCOPE) set (sourcesTests ${sourcesTests} PARENT_SCOPE) set (sourcesTarchTests ${sourcesTarchTests} PARENT_SCOPE) the questionable header file was not added recently, so I don't think its related to the GLOBs. The header file is also not listed in depends.make file. What other information can I give? Thanks, Florian -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ
Re: [CMake] Source is not rebuild when header changes
And in your file "src/CMakeLists.txt" do you add "${CMAKE_CURRENT_SOURCE_DIR}" (or anything else which resolves to the "src" directory) to your include directories? The line which includes the header is #include "mapping/..." but there is no local subdirectory "mapping" relative to that file (which is down in the mapping/config dir) On Tue, Aug 1, 2017 at 6:47 AM, Florian Lindnerwrote: > Hi, > > Am 01.08.2017 um 18:32 schrieb David Cole via CMake: >> What source files include the header? > > It's included by src/mapping/config/MappingConfiguration.cpp > > https://github.com/precice/precice/blob/develop/src/mapping/config/MappingConfiguration.cpp > > https://github.com/precice/precice/blob/develop/src/mapping/PetRadialBasisFctMapping.hpp > >> Is one of them listed as a file in your project? > > Yes, it's also in the CMakeFiles: > > % ll > build/cmake-debug/CMakeFiles/precice.dir/src/mapping/config/MappingConfiguration.cpp.o > > -rw-r--r-- 1 florian florian 1517472 1. Aug 15:08 > build/cmake-debug/CMakeFiles/precice.dir/src/mapping/config/MappingConfiguration.cpp.o > >> Does the **including** file exist at CMake configure time, or is it >> generated later by a build step? > > No, it's a standard plain file. > >> What do the lines of code that include the header look like? > > #include "mapping/PetRadialBasisFctMapping.hpp" > >> >> CMake uses its own analysis of the source files to determine the >> depends information, since it needs to generate it without invoking >> the compiler. This leads to a less-than-100% rate of correctness in >> the depends information, although usually, it is misses "in the other >> direction" due to depending on a header file which is included in some >> conditionally compiled block. (So the typical problem is an extra >> dependency, not a missing one...) > > The header file is (not the including file or the #include itself) is guarded > by a define > > #ifndef PRECICE_NO_PETSC > > which is not set. The build also contains the functionality which is guarded > thereof. > >> Perhaps passing along the includers and the exact lines and context of >> being included will give us a hint about why the dependency is not >> generated properly in your case. > > I'm happy to provide whatever information I can. > > If you want to download the entire source of the project, tell me. Right now > the CMake files are not yet in the > repository, but I can create a branch and add them there. > > My CMake version is 3.8.2. > > Best, > Florian > > >> >> >> >> On Tue, Aug 1, 2017 at 5:18 AM, Florian Lindner wrote: >>> Hello, >>> >>> on my project, which I'm currently testing with cmake, I just noticed, that >>> when I modify a header, the project is not >>> rebuilt. >>> >>> The CMakeLists.txt in the root dir is here: https://pastebin.com/vfReTM1N >>> >>> The other CMakeLists.txt resides in root/src and lists all the source >>> (*.cpp) files using GLOBS and adds them to the >>> parent scope: >>> >>> set (sourcesAllNoMain ${sourcesAllNoMain} PARENT_SCOPE) >>> set (sourcesTests ${sourcesTests} PARENT_SCOPE) >>> set (sourcesTarchTests ${sourcesTarchTests} PARENT_SCOPE) >>> >>> >>> the questionable header file was not added recently, so I don't think its >>> related to the GLOBs. >>> >>> The header file is also not listed in depends.make file. >>> >>> What other information can I give? >>> >>> Thanks, >>> Florian >>> -- >>> >>> Powered by www.kitware.com >>> >>> Please keep messages on-topic and check the CMake FAQ at: >>> http://www.cmake.org/Wiki/CMake_FAQ >>> >>> Kitware offers various services to support the CMake community. For more >>> information on each offering, please visit: >>> >>> CMake Support: http://cmake.org/cmake/help/support.html >>> CMake Consulting: http://cmake.org/cmake/help/consulting.html >>> CMake Training Courses: http://cmake.org/cmake/help/training.html >>> >>> Visit other Kitware open-source projects at >>> http://www.kitware.com/opensource/opensource.html >>> >>> Follow this link to subscribe/unsubscribe: >>> http://public.kitware.com/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Source is not rebuild when header changes
Hi, Am 01.08.2017 um 18:32 schrieb David Cole via CMake: > What source files include the header? It's included by src/mapping/config/MappingConfiguration.cpp https://github.com/precice/precice/blob/develop/src/mapping/config/MappingConfiguration.cpp https://github.com/precice/precice/blob/develop/src/mapping/PetRadialBasisFctMapping.hpp > Is one of them listed as a file in your project? Yes, it's also in the CMakeFiles: % ll build/cmake-debug/CMakeFiles/precice.dir/src/mapping/config/MappingConfiguration.cpp.o -rw-r--r-- 1 florian florian 1517472 1. Aug 15:08 build/cmake-debug/CMakeFiles/precice.dir/src/mapping/config/MappingConfiguration.cpp.o > Does the **including** file exist at CMake configure time, or is it > generated later by a build step? No, it's a standard plain file. > What do the lines of code that include the header look like? #include "mapping/PetRadialBasisFctMapping.hpp" > > CMake uses its own analysis of the source files to determine the > depends information, since it needs to generate it without invoking > the compiler. This leads to a less-than-100% rate of correctness in > the depends information, although usually, it is misses "in the other > direction" due to depending on a header file which is included in some > conditionally compiled block. (So the typical problem is an extra > dependency, not a missing one...) The header file is (not the including file or the #include itself) is guarded by a define #ifndef PRECICE_NO_PETSC which is not set. The build also contains the functionality which is guarded thereof. > Perhaps passing along the includers and the exact lines and context of > being included will give us a hint about why the dependency is not > generated properly in your case. I'm happy to provide whatever information I can. If you want to download the entire source of the project, tell me. Right now the CMake files are not yet in the repository, but I can create a branch and add them there. My CMake version is 3.8.2. Best, Florian > > > > On Tue, Aug 1, 2017 at 5:18 AM, Florian Lindnerwrote: >> Hello, >> >> on my project, which I'm currently testing with cmake, I just noticed, that >> when I modify a header, the project is not >> rebuilt. >> >> The CMakeLists.txt in the root dir is here: https://pastebin.com/vfReTM1N >> >> The other CMakeLists.txt resides in root/src and lists all the source >> (*.cpp) files using GLOBS and adds them to the >> parent scope: >> >> set (sourcesAllNoMain ${sourcesAllNoMain} PARENT_SCOPE) >> set (sourcesTests ${sourcesTests} PARENT_SCOPE) >> set (sourcesTarchTests ${sourcesTarchTests} PARENT_SCOPE) >> >> >> the questionable header file was not added recently, so I don't think its >> related to the GLOBs. >> >> The header file is also not listed in depends.make file. >> >> What other information can I give? >> >> Thanks, >> Florian >> -- >> >> Powered by www.kitware.com >> >> Please keep messages on-topic and check the CMake FAQ at: >> http://www.cmake.org/Wiki/CMake_FAQ >> >> Kitware offers various services to support the CMake community. For more >> information on each offering, please visit: >> >> CMake Support: http://cmake.org/cmake/help/support.html >> CMake Consulting: http://cmake.org/cmake/help/consulting.html >> CMake Training Courses: http://cmake.org/cmake/help/training.html >> >> Visit other Kitware open-source projects at >> http://www.kitware.com/opensource/opensource.html >> >> Follow this link to subscribe/unsubscribe: >> http://public.kitware.com/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
Re: [CMake] Source is not rebuild when header changes
What source files include the header? Is one of them listed as a file in your project? Does the **including** file exist at CMake configure time, or is it generated later by a build step? What do the lines of code that include the header look like? CMake uses its own analysis of the source files to determine the depends information, since it needs to generate it without invoking the compiler. This leads to a less-than-100% rate of correctness in the depends information, although usually, it is misses "in the other direction" due to depending on a header file which is included in some conditionally compiled block. (So the typical problem is an extra dependency, not a missing one...) Perhaps passing along the includers and the exact lines and context of being included will give us a hint about why the dependency is not generated properly in your case. HTH, David C. On Tue, Aug 1, 2017 at 5:18 AM, Florian Lindnerwrote: > Hello, > > on my project, which I'm currently testing with cmake, I just noticed, that > when I modify a header, the project is not > rebuilt. > > The CMakeLists.txt in the root dir is here: https://pastebin.com/vfReTM1N > > The other CMakeLists.txt resides in root/src and lists all the source (*.cpp) > files using GLOBS and adds them to the > parent scope: > > set (sourcesAllNoMain ${sourcesAllNoMain} PARENT_SCOPE) > set (sourcesTests ${sourcesTests} PARENT_SCOPE) > set (sourcesTarchTests ${sourcesTarchTests} PARENT_SCOPE) > > > the questionable header file was not added recently, so I don't think its > related to the GLOBs. > > The header file is also not listed in depends.make file. > > What other information can I give? > > Thanks, > Florian > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake
[CMake] Source is not rebuild when header changes
Hello, on my project, which I'm currently testing with cmake, I just noticed, that when I modify a header, the project is not rebuilt. The CMakeLists.txt in the root dir is here: https://pastebin.com/vfReTM1N The other CMakeLists.txt resides in root/src and lists all the source (*.cpp) files using GLOBS and adds them to the parent scope: set (sourcesAllNoMain ${sourcesAllNoMain} PARENT_SCOPE) set (sourcesTests ${sourcesTests} PARENT_SCOPE) set (sourcesTarchTests ${sourcesTarchTests} PARENT_SCOPE) the questionable header file was not added recently, so I don't think its related to the GLOBs. The header file is also not listed in depends.make file. What other information can I give? Thanks, Florian -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake