-
Notifications
You must be signed in to change notification settings - Fork 5
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
Set LD_LIBRARY_PATH and ROOT_INCLUDE_PATH within CheckClassVersion #15
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you verified that the $<GENEX_EVAL:...>
wrapper is necessary? I'm never quite sure.
Somehow I had convinced myself that it was necessary. I've removed the wrapper and the behavior is the same, and the code easier to read. |
…ersion (FNALssi#15)" This reverts commit edc0b1d.
* Reapply "Set LD_LIBRARY_PATH and ROOT_INCLUDE_PATH within CheckClassVersion (#15)" This reverts commit edc0b1d. * Preserve existing LD_LIBRARY_PATH entries. * Use simpler string concatenation. Co-authored-by: Chris Green <[email protected]> * Accommodate macOS systems. * Correctly account for macOS systems. --------- Co-authored-by: Chris Green <[email protected]>
* During the Perl bootstrap stage of `setup_for_development`, `STDERR` and `STDOUT` are now both redirected to `bootstrap.log`. * Many, many improvements to documentation generation, format and content: see https://fnalssi.github.io/cetmodules/ and https://fnalssi.github.io/cetmodules/latest/. * Update `pmm.cmake`. * Update BSD 3-clause license to a conforming copy to aid detection by GitHub. * Proper support for `USE_PROJECT_NAME` in `basic_plugin()` for consistency with other functions. * `cet_copy()` improvements: * New options `NO_ALL` and `TARGET_VAR`. * Detect use of single-source options (`NAME`, `NAME_AS_TARGET` and `TARGET_VAR` with multiple sources. * Make behavior of relative `DESTINATION` values conform to intent and documentation (relative to `${CMAKE_CURRENT_BINARY_DIR}` _vs_ `${CMAKE_CURRENT_SOURCE_DIR}`. * New CMake find module `FindM4.cmake`. * `cet_make_library()` improvements: * Handle explicitly-scoped aliases. * `STRIP_LIBS` is incompatible with `INTERFACE` libraries. * New function `cet_finalize()` to replace `cet_cmake_config(NO_CMAKE_CONFIG)`. * Minor improvement to format of `warn_deprecated()` messages. * `build_dictionary()` improvements: * Remove vestigial `REQUIRED_DICTIONARIES` option (also from `check_class_version()`). * `genreflex` -> `rootcling --reflex` * Allow for increased diagnostics from `rootcling` via `VERBOSE` or `VERBOSITY <n>` options. * Separate the internal concepts of `dictname` and `LIB_TARGET` to allow for better handling of `NO_LIBRARY`—especially where multiple generated dictionary sources might be added to the same external library target. * Generated source (whose name may now be specified with `GENERATED_SOURCE_FILENAME`) is added to the library target as a separate `target_sources()` call to account for `NO_LBIRARY`. * Allow for specification of the library target via `LIB_TARGET`, and return of a calculated library target name via `LIB_TARGET_VAR`. * Simplify `_generate_dictionary()` signature by relying on information inherited from `build_dictionary()`. * Relocate macOS `.rootmap` fix for older ROOT to ensure it is added at the appropriate time, and when (and only when) necessary. * Preliminary work to add PCM dictionary capability. * Generate late-executing targets to handle the concatenation of multiple `module.modulemap` files with the same `INSTALL` destination (which destination may be specified via `MODULEMAP_INSTALL_DIR`). * Support "traditional" (not `genreflex`) dictionary generation: specify headers and Linkdef.h via the `SOURCE` option. This is significantly more powerful than the—now deprecated—`cet_rootcint()` function because `build_dictionary()` leverages target properties to e.g. ensure invocation of `rootcling` with C-preprocessor definitions compatible with those configured for compilation. * Summary of new flags/options: * `GENERATED_SOURCE_FILENAME <filename>` * `LIB_TARGET <target>` * `MODULEMAP_INSTALL_DIR <dir>` * `SOURCE <source> ...` * `VERBOSE` * `VERBOSITY <n>` * Source of deprecated `cet_make()` function relocated to `compat/CetMakeCommand.cmake`. * `libexec/filter-output` -> `bin/` with link for backward compatibility. * `Modules/CetExclude.cmake` -> `Modules/private/`. * `cet_installed_path()` improvements: * Fix variable handling. * `BASE_SUBDIR` is now prepended to `<out-var>` as originally intended. * `BASE_SUBDIR` is no longer removed from `PATH`: this was due to faulty reasoning about the use cases for `cet_installed_path()`. * Detect failure to calculate relative install path. * `cet_make_completions()` improvements: * [PR #12](#12): * More careful handling of target exec and derivatives. * Handle multiple user completion files. * [PR #10](#10): really prevent cycles in `cet_process_liblist()` * Deprecate `cet_rootcint()` in favor of `build_dictionary()`. * Update `ParseAndAddCatchTests.cmake` w.r. upstream. * `parse_version_string()`: new options `INPUT_PREAMBLE` and `VERSION`. * Improve version search in `FindSmc.cmake`. * `process_smc()` improvements: * New option `NO_INSTALL_SOURCE`. * Requirement on `Smc` should not be transitive. * In `CetTest.cmake`: * New functions `cet_test_env_prepend()` and `cet_test_env_mod()` ([PR #14](#14)). * `cet_test()` improvements: * Allow target names with `REF` ([PR #13](#13)). * Improve detection of cycles when expanding target names. * Rework `COMPILE_ONLY` tests to be built as separate projects to allow parallel execution. * `install_scripts()`: follow: intent and documentation by defaulting to `SCRIPTS_DIR` instead of `BIN_DIR`. * `cet_build_plugin()` improvements: * Consider `${${BASE}_builder}` first when looking for plugin builders. * Resolve variable interpolation issue. * `check_class_version()` improvements: * Set `LD_LIBRARY_PATH` and `ROOT_INCLUDE_PATH` ([PR #15](#15)). * Preserve existing `LD_LIBRARY_PATH` entries and accommodate macOS ([PR #16](#16)). * Ensure `cet_catch2_main.cpp` is available prior to installation.
Cetmodules 3.23.00 * During the Perl bootstrap stage of `setup_for_development`, `STDERR` and `STDOUT` are now both redirected to `bootstrap.log`. * Many, many improvements to documentation generation, format and content: see https://fnalssi.github.io/cetmodules/ and https://fnalssi.github.io/cetmodules/latest/. * Update `pmm.cmake`. * Update BSD 3-clause license to a conforming copy to aid detection by GitHub. * Proper support for `USE_PROJECT_NAME` in `basic_plugin()` for consistency with other functions. * `cet_copy()` improvements: * New options `NO_ALL` and `TARGET_VAR`. * Detect use of single-source options (`NAME`, `NAME_AS_TARGET` and `TARGET_VAR` with multiple sources. * Make behavior of relative `DESTINATION` values conform to intent and documentation (relative to `${CMAKE_CURRENT_BINARY_DIR}` _vs_ `${CMAKE_CURRENT_SOURCE_DIR}`. * New CMake find module `FindM4.cmake`. * `cet_make_library()` improvements: * Handle explicitly-scoped aliases. * `STRIP_LIBS` is incompatible with `INTERFACE` libraries. * New function `cet_finalize()` to replace `cet_cmake_config(NO_CMAKE_CONFIG)`. * Minor improvement to format of `warn_deprecated()` messages. * `build_dictionary()` improvements: * Remove vestigial `REQUIRED_DICTIONARIES` option (also from `check_class_version()`). * `genreflex` -> `rootcling --reflex` * Allow for increased diagnostics from `rootcling` via `VERBOSE` or `VERBOSITY <n>` options. * Separate the internal concepts of `dictname` and `LIB_TARGET` to allow for better handling of `NO_LIBRARY`—especially where multiple generated dictionary sources might be added to the same external library target. * Generated source (whose name may now be specified with `GENERATED_SOURCE_FILENAME`) is added to the library target as a separate `target_sources()` call to account for `NO_LBIRARY`. * Allow for specification of the library target via `LIB_TARGET`, and return of a calculated library target name via `LIB_TARGET_VAR`. * Simplify `_generate_dictionary()` signature by relying on information inherited from `build_dictionary()`. * Relocate macOS `.rootmap` fix for older ROOT to ensure it is added at the appropriate time, and when (and only when) necessary. * Preliminary work to add PCM dictionary capability. * Generate late-executing targets to handle the concatenation of multiple `module.modulemap` files with the same `INSTALL` destination (which destination may be specified via `MODULEMAP_INSTALL_DIR`). * Support "traditional" (not `genreflex`) dictionary generation: specify headers and Linkdef.h via the `SOURCE` option. This is significantly more powerful than the—now deprecated—`cet_rootcint()` function because `build_dictionary()` leverages target properties to e.g. ensure invocation of `rootcling` with C-preprocessor definitions compatible with those configured for compilation. * Summary of new flags/options: * `GENERATED_SOURCE_FILENAME <filename>` * `LIB_TARGET <target>` * `MODULEMAP_INSTALL_DIR <dir>` * `SOURCE <source> ...` * `VERBOSE` * `VERBOSITY <n>` * Source of deprecated `cet_make()` function relocated to `compat/CetMakeCommand.cmake`. * `libexec/filter-output` -> `bin/` with link for backward compatibility. * `Modules/CetExclude.cmake` -> `Modules/private/`. * `cet_installed_path()` improvements: * Fix variable handling. * `BASE_SUBDIR` is now prepended to `<out-var>` as originally intended. * `BASE_SUBDIR` is no longer removed from `PATH`: this was due to faulty reasoning about the use cases for `cet_installed_path()`. * Detect failure to calculate relative install path. * `cet_make_completions()` improvements: * [PR #12](#12): * More careful handling of target exec and derivatives. * Handle multiple user completion files. * [PR #10](#10): really prevent cycles in `cet_process_liblist()` * Deprecate `cet_rootcint()` in favor of `build_dictionary()`. * Update `ParseAndAddCatchTests.cmake` w.r. upstream. * `parse_version_string()`: new options `INPUT_PREAMBLE` and `VERSION`. * Improve version search in `FindSmc.cmake`. * `process_smc()` improvements: * New option `NO_INSTALL_SOURCE`. * Requirement on `Smc` should not be transitive. * In `CetTest.cmake`: * New functions `cet_test_env_prepend()` and `cet_test_env_mod()` ([PR #14](#14)). * `cet_test()` improvements: * Allow target names with `REF` ([PR #13](#13)). * Improve detection of cycles when expanding target names. * Rework `COMPILE_ONLY` tests to be built as separate projects to allow parallel execution. * `install_scripts()`: follow: intent and documentation by defaulting to `SCRIPTS_DIR` instead of `BIN_DIR`. * `cet_build_plugin()` improvements: * Consider `${${BASE}_builder}` first when looking for plugin builders. * Resolve variable interpolation issue. * `check_class_version()` improvements: * Set `LD_LIBRARY_PATH` and `ROOT_INCLUDE_PATH` ([PR #15](#15)). * Preserve existing `LD_LIBRARY_PATH` entries and accommodate macOS ([PR #16](#16)). * Ensure `cet_catch2_main.cpp` is available prior to installation.
In a Spack user environment,
LD_LIBRARY_PATH
andROOT_INCLUDE_PATH
are not fully populated (or even available). This PR populates the environment variables as part of theadd_custom_command(...)
invocation.