diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 82e3c1e6f0..64d9c4f788 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -256,6 +256,9 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED AND NOT HDF4_NO_PACKAGES) set (CPACK_EXPORT_LIBRARIES ${HDF4_LIBRARIES_TO_EXPORT}) set (CPACK_EXPORT_UTILS ${HDF4_UTILS_TO_EXPORT}) + if ($ENV{BINSIGN} MATCHES "exists") + set (CPACK_PRE_BUILD_SCRIPTS ${CMAKE_SOURCE_DIR}/config/cmake/SignPackageFiles.cmake) + endif () set (CPACK_GENERATOR "TGZ") if (WIN32) @@ -290,9 +293,6 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED AND NOT HDF4_NO_PACKAGES) if (WIX_EXECUTABLE) list (APPEND CPACK_GENERATOR "WIX") - if (ENV{BINSIGN} MATCHES "exists") - set (CPACK_PRE_BUILD_SCRIPTS ${CMAKE_SOURCE_DIR}/config/cmake/SignPackageFiles.cmake) - endif () endif () #WiX variables set (CPACK_WIX_UNINSTALL "1") @@ -315,9 +315,6 @@ if (NOT HDF4_EXTERNALLY_CONFIGURED AND NOT HDF4_NO_PACKAGES) option (HDF4_PACK_MACOSX_DMG "Package the HDF4 Library using DragNDrop" ON) if (HDF4_PACK_MACOSX_DMG) list (APPEND CPACK_GENERATOR "DragNDrop") - if (ENV{BINSIGN} MATCHES "exists") - set (CPACK_PRE_BUILD_SCRIPTS ${CMAKE_SOURCE_DIR}/config/cmake/SignPackageFiles.cmake) - endif () endif () set (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) set (CPACK_PACKAGING_INSTALL_PREFIX "/${CPACK_PACKAGE_INSTALL_DIRECTORY}") diff --git a/bin/cmakehdf4 b/bin/cmakehdf4 index 429ffb178b..4e33c77116 100755 --- a/bin/cmakehdf4 +++ b/bin/cmakehdf4 @@ -294,7 +294,7 @@ foreach (req endforeach () ## -- set output to english -set($ENV{LC_MESSAGES} "en_EN") +set (ENV{LC_MESSAGES} "en_EN") #----------------------------------------------------------------------------- # Initialize the CTEST commands diff --git a/config/cmake/SignPackageFiles.cmake b/config/cmake/SignPackageFiles.cmake index f5ef609e73..5ba3339c84 100644 --- a/config/cmake/SignPackageFiles.cmake +++ b/config/cmake/SignPackageFiles.cmake @@ -3,7 +3,7 @@ message(STATUS "Signing script for ${CPACK_EXPORT_LIBRARIES} and ${CPACK_EXPORT_ foreach (target "${CPACK_EXPORT_LIBRARIES}") if (WIN32) # Sign the targets - execute_process(COMMAND ENV{SIGNTOOLDIR}/signtool + execute_process(COMMAND $ENV{SIGNTOOLDIR}/signtool sign /v /debug /fd SHA256 /tr http://timestamp.acs.microsoft.com /td SHA256 /dlib "Microsoft.Trusted.Signing.Client\bin\x64\Azure.CodeSigning.Dlib.dll" /dmdf ${CMAKE_CURRENT_SOURCE_DIR}\credentials.json $ @@ -14,7 +14,7 @@ foreach (target "${CPACK_EXPORT_LIBRARIES}") # Sign the targets execute_process(COMMAND codesign --force --timestamp --options runtime --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/config/cmake/distribution.entitlements - --verbose=4 --strict --sign "ENV{SIGNER}" + --verbose=4 --strict --sign "$ENV{SIGNER}" $ WORKING_DIRECTORY ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/ALL_COMPONENTS_IN_ONE/${CPACK_PACKAGE_INSTALL_DIRECTORY}/lib ) @@ -28,7 +28,7 @@ endforeach () foreach (target "${CPACK_EXPORT_UTILS}") if (WIN32) # Sign the targets - execute_process(COMMAND ENV{SIGNTOOLDIR}/signtool + execute_process(COMMAND $ENV{SIGNTOOLDIR}/signtool sign /v /debug /fd SHA256 /tr http://timestamp.acs.microsoft.com /td SHA256 /dlib "Microsoft.Trusted.Signing.Client\bin\x64\Azure.CodeSigning.Dlib.dll" /dmdf ${CMAKE_CURRENT_SOURCE_DIR}\credentials.json $ @@ -39,7 +39,7 @@ foreach (target "${CPACK_EXPORT_UTILS}") # Sign the targets execute_process(COMMAND codesign --force --timestamp --options runtime --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/config/cmake/distribution.entitlements - --verbose=4 --strict --sign "ENV{SIGNER}" + --verbose=4 --strict --sign "$ENV{SIGNER}" $ WORKING_DIRECTORY ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/ALL_COMPONENTS_IN_ONE/${CPACK_PACKAGE_INSTALL_DIRECTORY}/bin ) diff --git a/config/cmake/examples/CTestScript.cmake b/config/cmake/examples/CTestScript.cmake index 527fb02102..9418c7e45f 100644 --- a/config/cmake/examples/CTestScript.cmake +++ b/config/cmake/examples/CTestScript.cmake @@ -131,7 +131,7 @@ set (CTEST_CONFIGURE_COMMAND #----------------------------------------------------------------------------- ## -- set output to english -set ($ENV{LC_MESSAGES} "en_EN") +set (ENV{LC_MESSAGES} "en_EN") #----------------------------------------------------------------------------- configure_file(${CTEST_SOURCE_DIRECTORY}/config/cmake/CTestCustom.cmake ${CTEST_BINARY_DIRECTORY}/CTestCustom.cmake) diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index 28a7c23c14..c834abe597 100755 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -40,15 +40,15 @@ endif () set (BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSITE:STRING=${CTEST_SITE} -DBUILDNAME:STRING=${CTEST_BUILD_NAME}") # Launchers work only with Makefile and Ninja generators. -if(NOT "${CTEST_CMAKE_GENERATOR}" MATCHES "Make|Ninja" OR LOCAL_SKIP_TEST) - set(CTEST_USE_LAUNCHERS 0) - set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 0) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=OFF") -else() - set(CTEST_USE_LAUNCHERS 1) - set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 1) - set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON") -endif() +if (NOT "${CTEST_CMAKE_GENERATOR}" MATCHES "Make|Ninja" OR LOCAL_SKIP_TEST) + set (CTEST_USE_LAUNCHERS 0) + set (ENV{CTEST_USE_LAUNCHERS_DEFAULT} 0) + set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=OFF") +else () + set (CTEST_USE_LAUNCHERS 1) + set (ENV{CTEST_USE_LAUNCHERS_DEFAULT} 1) + set (BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON") +endif () #----------------------------------------------------------------------------- # MAC machines need special option @@ -200,7 +200,7 @@ endif () #----------------------------------------------------------------------------- ## -- set output to english -set ($ENV{LC_MESSAGES} "en_EN") +set (ENV{LC_MESSAGES} "en_EN") # Print summary information. foreach (v