You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although It can seems useful to see in the cache which include directories will be used, It can be problematic when someone :
get a new cmakelist.txt that change the list of includes ( update or switch branch in VCS for example ).
trigger a new cmake ( by using the IDE, for example visual studio trigerring a cmake configure ) but keeping the cache ( default cmake behavior )
new include directories are not registered ( we dont change the existing cache values ).
build will fail for reason not obvious to track down.
And Maybe it s the same for lib dependencies ?
=> we should review which variable we use in cache ( they are made for user customization only ). Other variable that user is not supposed to change should not be in cache. CMake 3.0 now has functions and macros and scope for variables, so we should use it properly.
The text was updated successfully, but these errors were encountered:
To be more precise, the CACHE should contain settings related to the machine we re building on, and the target, and tools related to the platform.
It should not contain any info related to the project ( that can change for each action on dvcs ).
In particular for dependencies :
binary dependencies coming from the build platform ( find_package ) should be put in cache ( so the user can change them and they are set only once ).
binary dependencies coming from the project and source dependency ( coming from the project via add_subdirectory ) should NOT be put in cache.
Although It can seems useful to see in the cache which include directories will be used, It can be problematic when someone :
And Maybe it s the same for lib dependencies ?
=> we should review which variable we use in cache ( they are made for user customization only ). Other variable that user is not supposed to change should not be in cache. CMake 3.0 now has functions and macros and scope for variables, so we should use it properly.
The text was updated successfully, but these errors were encountered: