[CMake] a couple of ideas for cmake

Christopher Harvey chris at basementcode.com
Fri Nov 7 11:56:08 EST 2008


Hi cmake maintainers,
I'm wondering if there was a reason why the windows configure interface
outputs message commands as individual dialogs instead of inside some
sort of in-program terminal (that the user wouldn't be able to type
into). It seems to me that it would make the cmake experience more
consistent across configures.

I could *try* to write a patch that does this...but I wanted to see if
there was interest in it at all first.

The second idea is to have an internal cmake variable that is a list of
directories that cmake modules could use to look for libraries and
include files. I'm starting to notice that every single FindXXX.cmake
uses commands like:

FIND_PATH(SDL_INCLUDE_DIR SDL.h
  HINTS
  $ENV{SDLDIR}
  PATH_SUFFIXES include
  PATHS
  ~/Library/Frameworks
  /Library/Frameworks
  /usr/local/include/SDL
  /usr/include/SDL
  /usr/local/include/SDL12
  /usr/local/include/SDL11 # FreeBSD ports
  /usr/include/SDL12
  /usr/include/SDL11
  /usr/local/include
  /usr/include
  /sw/include/SDL # Fink
  /sw/include
  /opt/local/include/SDL # DarwinPorts
  /opt/local/include
  /opt/csw/include/SDL # Blastwave
  /opt/csw/include
  /opt/include/SDL
  /opt/include

)

over and over.

Why not define these paths internally and turn these long commands into :


FIND_PATH(SDL_INCLUDE_DIR SDL.h
  HINTS
  $ENV{SDLDIR}
  PATH_SUFFIXES include
  PATHS
  ${CMAKE_COMMON_INCLUDE_PATHS}
)

Just some ideas,
Chris.


More information about the CMake mailing list