diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/SimpleInstall/PackageScript.cmake | 10 | ||||
-rw-r--r-- | Tests/SimpleInstallS2/PackageScript.cmake | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/Tests/SimpleInstall/PackageScript.cmake b/Tests/SimpleInstall/PackageScript.cmake new file mode 100644 index 0000000..3567a2f --- /dev/null +++ b/Tests/SimpleInstall/PackageScript.cmake @@ -0,0 +1,10 @@ +MESSAGE("This is packaging script") +MESSAGE("It writes a file with all variables available in ${CMAKE_INSTALL_PREFIX}/AllVariables.txt") + +FILE(WRITE ${CMAKE_INSTALL_PREFIX}/AllVariables.txt "") +GET_CMAKE_PROPERTY(res VARIABLES) +FOREACH(var ${res}) + FILE(APPEND ${CMAKE_INSTALL_PREFIX}/AllVariables.txt + "${var} \"${${var}}\"\n") +ENDFOREACH(var ${res}) + diff --git a/Tests/SimpleInstallS2/PackageScript.cmake b/Tests/SimpleInstallS2/PackageScript.cmake new file mode 100644 index 0000000..3567a2f --- /dev/null +++ b/Tests/SimpleInstallS2/PackageScript.cmake @@ -0,0 +1,10 @@ +MESSAGE("This is packaging script") +MESSAGE("It writes a file with all variables available in ${CMAKE_INSTALL_PREFIX}/AllVariables.txt") + +FILE(WRITE ${CMAKE_INSTALL_PREFIX}/AllVariables.txt "") +GET_CMAKE_PROPERTY(res VARIABLES) +FOREACH(var ${res}) + FILE(APPEND ${CMAKE_INSTALL_PREFIX}/AllVariables.txt + "${var} \"${${var}}\"\n") +ENDFOREACH(var ${res}) + |