CMAKE_USER_MAKE_RULES_OVERRIDE.rst 1.2 KB

1234567891011121314151617181920212223
  1. CMAKE_USER_MAKE_RULES_OVERRIDE
  2. ------------------------------
  3. Specify a CMake file that overrides platform information.
  4. CMake loads the specified file while enabling support for each
  5. language from either the project() or enable_language() commands. It
  6. is loaded after CMake's builtin compiler and platform information
  7. modules have been loaded but before the information is used. The file
  8. may set platform information variables to override CMake's defaults.
  9. This feature is intended for use only in overriding information
  10. variables that must be set before CMake builds its first test project
  11. to check that the compiler for a language works. It should not be
  12. used to load a file in cases that a normal include() will work. Use
  13. it only as a last resort for behavior that cannot be achieved any
  14. other way. For example, one may set CMAKE_C_FLAGS_INIT to change the
  15. default value used to initialize CMAKE_C_FLAGS before it is cached.
  16. The override file should NOT be used to set anything that could be set
  17. after languages are enabled, such as variables like
  18. CMAKE_RUNTIME_OUTPUT_DIRECTORY that affect the placement of binaries.
  19. Information set in the file will be used for try_compile and try_run
  20. builds too.