Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct ENV usage #759

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions CMakeInstallation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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")
Expand All @@ -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}")
Expand Down
2 changes: 1 addition & 1 deletion bin/cmakehdf4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions config/cmake/SignPackageFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<TARGET_FILE:${target}>
Expand All @@ -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}"
$<TARGET_FILE:${target}>
WORKING_DIRECTORY ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/ALL_COMPONENTS_IN_ONE/${CPACK_PACKAGE_INSTALL_DIRECTORY}/lib
)
Expand All @@ -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
$<TARGET_FILE:${target}>
Expand All @@ -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}"
$<TARGET_FILE:${target}>
WORKING_DIRECTORY ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/ALL_COMPONENTS_IN_ONE/${CPACK_PACKAGE_INSTALL_DIRECTORY}/bin
)
Expand Down
2 changes: 1 addition & 1 deletion config/cmake/examples/CTestScript.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
20 changes: 10 additions & 10 deletions config/cmake/scripts/CTestScript.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading