elmerfem icon indicating copy to clipboard operation
elmerfem copied to clipboard

[cmake] fix module path in `test_macros`

Open bartoszek opened this issue 3 years ago • 0 comments

https://github.com/ElmerCSC/elmerfem/pull/303#issuecomment-971400868

I had to revert this since I got reports that it caused the tests not running succesfully. I didn't dig deeper being no cmake wizard myself.

I've pinpointed the issue here, you can't use ${CMAKE_MODULE_PATH} in add_test() directly as it gets expanded and effectively only the first element of the list will get passed to the COMMAND arg list.

Quick solution for it would be to escape semicolons in CMAKE_MODULE_PATH before passing it as an argument to COMMAND in add_test()

Rationale: https://github.com/ElmerCSC/elmerfem/pull/303#issuecomment-982979150

bartoszek avatar Nov 30 '21 20:11 bartoszek