CMakeExportBuildSettings.cmake 1.7 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #=============================================================================
  2. # Copyright 2002-2009 Kitware, Inc.
  3. #
  4. # Distributed under the OSI-approved BSD License (the "License");
  5. # see accompanying file Copyright.txt for details.
  6. #
  7. # This software is distributed WITHOUT ANY WARRANTY; without even the
  8. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. # See the License for more information.
  10. #=============================================================================
  11. # (To distribute this file outside of CMake, substitute the full
  12. # License text for the above reference.)
  13. # This module is purposely no longer documented. It does nothing useful.
  14. IF(NOT "${CMAKE_MINIMUM_REQUIRED_VERSION}" VERSION_LESS 2.7)
  15. MESSAGE(FATAL_ERROR
  16. "The functionality of this module has been dropped as of CMake 2.8. "
  17. "It was deemed harmful (confusing users by changing their compiler). "
  18. "Please remove calls to the CMAKE_EXPORT_BUILD_SETTINGS macro and "
  19. "stop including this module. "
  20. "If this project generates any files for use by external projects, "
  21. "remove any use of the CMakeImportBuildSettings module from them.")
  22. ENDIF()
  23. # This macro used to store build settings of a project in a file to be
  24. # loaded by another project using CMAKE_IMPORT_BUILD_SETTINGS. Now it
  25. # creates a file that refuses to load (with comment explaining why).
  26. MACRO(CMAKE_EXPORT_BUILD_SETTINGS SETTINGS_FILE)
  27. IF(${SETTINGS_FILE} MATCHES ".+")
  28. CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeBuildSettings.cmake.in
  29. ${SETTINGS_FILE} @ONLY IMMEDIATE)
  30. ELSE(${SETTINGS_FILE} MATCHES ".+")
  31. MESSAGE(SEND_ERROR "CMAKE_EXPORT_BUILD_SETTINGS called with no argument.")
  32. ENDIF(${SETTINGS_FILE} MATCHES ".+")
  33. ENDMACRO(CMAKE_EXPORT_BUILD_SETTINGS)