Skip to content

Instantly share code, notes, and snippets.

@scivision
Created October 24, 2021 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scivision/fed99dae5582c0f2370bfe2ec368bbca to your computer and use it in GitHub Desktop.
Save scivision/fed99dae5582c0f2370bfe2ec368bbca to your computer and use it in GitHub Desktop.
CMake CTest ENVIRONMENT_MODIFICATION test property
cmake_minimum_required(VERSION 3.22)
project(envPrint LANGUAGES NONE)
enable_testing()
add_test(NAME PrintEnv COMMAND ${CMAKE_COMMAND} -E environment)
set_tests_properties(PrintEnv PROPERTIES
ENVIRONMENT_MODIFICATION "NotExistingVar=path_list_prepend:WillSegfault")
@scivision
Copy link
Author

Demos bug in CMake 3.22.0-rc1. Segfaults in Linux but not in Windows, but still doesn't work properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment