diff options
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) |