Explorar el Código

ENH: Several CPack fixes. First, allow user to set CMAKE_MODULE_PATH for CPack; make SetOptionIfNotSet more robust to handle empty options; do test TGZ, STGZ, and TZ, Add handling (and test) of Install Script; set environment variable CMAKE_INSTALL_PREFIX

Andy Cedilnik hace 19 años
padre
commit
df1ff57498

+ 10 - 0
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})
+

+ 10 - 0
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})
+