lorensen
(Bill Lorensen)
June 21, 2019, 5:51am
1
Folks,
I’m trying to use VTK/CMake/CheckCXXSourceRuns.cmake.
My CXX file runs and checks to see if a certain capability works correctly.
The VTK version of the cmake macro reports success if the program compiles, not if it runs successfully. This seems to be a bug.
The CMake version CMake/Modules/CheckCXXSourceRuns.cmake does the proper checking. Why does the VTK version have the same name as the CMake version?
ben.boeckel
(Ben Boeckel (Kitware))
June 21, 2019, 6:59pm
2
VTK’s copy should probably just go away. It hasn’t been meaningfully edited in over 5 years. If this is for <regex>
detection, is a simple try_compile
not sufficient? Why would we need to run the resulting code since it’s a linker error?
lorensen
(Bill Lorensen)
June 21, 2019, 7:33pm
3
Some compilers will link but always return true on matches.
lorensen
(Bill Lorensen)
June 21, 2019, 8:00pm
4
Ben,
The use of kwsys regular expression vs. std::regex was discussed in this issue was a year ago.
And this part of the discussion talks about the skeleton code in some compilers that compiles but does not run correctly.
Bill
ben.boeckel
(Ben Boeckel (Kitware))
June 25, 2019, 1:24pm
5
Well, that is…dumb. Also, probably explicitly against the standard.