MantisBT - CMake
View Issue Details
0009513CMakeModulespublic2009-09-09 13:482016-06-10 14:30
dataangel 
Bill Hoffman 
normalminoralways
closedmoved 
CMake-2-6 
 
0009513: CHECK_CXX_SOURCE_RUNS and its ilk should take files, not text
Putting configure checks directly into your CMakeLists.txt is bad style, just like putting it directly into your configure.ac when using autotools is bad style. If you ever switch build environments you have to go through ugly code copy and pasting between the old environment configure file and the new one. Configure checks should be in their own source files, and this good habit is what CHECK_CXX_SOURCE_RUNS and friends should do by default. At the very least file based equivalents should be provided -- having to write out file(READ ... ) commands is lame and overly verbose.
No tags attached.
Issue History
2009-09-09 13:48dataangelNew Issue
2009-09-11 17:18Bill HoffmanNote Added: 0017384
2009-09-11 17:18Bill HoffmanStatusnew => assigned
2009-09-11 17:18Bill HoffmanAssigned To => Bill Hoffman
2010-08-29 10:38Kovarththanan RajaratnamCategoryCMake => Modules
2016-06-10 14:27Kitware RobotNote Added: 0041592
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0017384)
Bill Hoffman   
2009-09-11 17:18   
try_compile can be used like this. In fact that was the only way to do it, until someone else complained that it should be done this way...
(0041592)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.