diff options
author | Brad King <brad.king@kitware.com> | 2002-12-05 14:46:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-12-05 14:46:30 (GMT) |
commit | ee72d5740ba3f35983fd70af777d730d82b3ae4f (patch) | |
tree | 747b9131419c56fc08d9a5f6c22265d1d4750f44 /Modules/CMakeExportBuildSettings.cmake | |
parent | d386b74feab0a9ca509c216f138a92db8583a4e2 (diff) | |
download | CMake-ee72d5740ba3f35983fd70af777d730d82b3ae4f.zip CMake-ee72d5740ba3f35983fd70af777d730d82b3ae4f.tar.gz CMake-ee72d5740ba3f35983fd70af777d730d82b3ae4f.tar.bz2 |
ENH: Adding CMAKE_EXPORT_BUILD_SETTINGS and CMAKE_IMPORT_BUILD_SETTINGS macro.
Diffstat (limited to 'Modules/CMakeExportBuildSettings.cmake')
-rw-r--r-- | Modules/CMakeExportBuildSettings.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/CMakeExportBuildSettings.cmake b/Modules/CMakeExportBuildSettings.cmake new file mode 100644 index 0000000..1ec8b8a --- /dev/null +++ b/Modules/CMakeExportBuildSettings.cmake @@ -0,0 +1,11 @@ +# Macro to export the build settings for use by another project. +# Provide as an argument the file into which the settings are to be +# stored. +MACRO(CMAKE_EXPORT_BUILD_SETTINGS SETTINGS_FILE) + IF(${SETTINGS_FILE} MATCHES ".+") + CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeBuildSettings.cmake.in + ${SETTINGS_FILE} @ONLY IMMEDIATE) + ELSE(${SETTINGS_FILE} MATCHES ".+") + MESSAGE(SEND_ERROR "CMAKE_EXPORT_BUILD_SETTINGS called with no argument.") + ENDIF(${SETTINGS_FILE} MATCHES ".+") +ENDMACRO(CMAKE_EXPORT_BUILD_SETTINGS) |