Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include directories should not be in CACHE #49

Open
asmodehn opened this issue Sep 17, 2014 · 1 comment
Open

Include directories should not be in CACHE #49

asmodehn opened this issue Sep 17, 2014 · 1 comment

Comments

@asmodehn
Copy link
Owner

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.

@asmodehn
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant