[Cmake] Re: cmake checkin

Bill Hoffman bill.hoffman at kitware.com
Mon Nov 18 08:36:14 EST 2002


No, I have not yet sent it.   I was too busy fixing it last week....

Basically, I have combined all of the makefile generators into one class with
a few options.   Most of the options for the build are now specified in cmake
list files that are loaded at configure time.    On unix the use of autoconf
configure files has been replaced by cmake's own try compile/run commands.
Windows is also now using try run/compile commands.   

When cmake is run for makefiles it does this:

1. determine these variables:
# CMAKE_SYSTEM_NAME - on unix this is uname -s, for windows it is Windows
# CMAKE_SYSTEM_VERSION - on unix this is uname -r, for windows it is empty
# CMAKE_SYSTEM - ${CMAKE_SYSTEM}-${CMAKE_SYSTEM_VERSION}, for windows: ${CMAKE_SYSTEM}

Expected values for CMAKE_SYSTEM_NAME are:
# AIX                           AIX  
# BSD/OS                        BSD/OS  
# FreeBSD                       FreeBSD  
# HP-UX                         HP-UX  
# IRIX                          IRIX  
# Linux                         Linux  
# NetBSD                        NetBSD  
# OpenBSD                       OpenBSD  
# OFS/1 (Digital Unix)          OSF1  
# SCO OpenServer 5              SCO_SV  
# SCO UnixWare 7                UnixWare  
# SCO UnixWare (pre release 7)  UNIX_SV  
# SCO XENIX                     Xenix  
# Solaris                       SunOS  
# SunOS                         SunOS  
# Tru64                         Tru64  
# Ultrix                        ULTRIX  
# cygwin                        CYGWIN_NT-5.1
# MacOSX                        Darwin
  
2. Load Modules/Platform/${CMAKE_SYSTEM_NAME}.cmake
3. optional Load Modules/Platform/${CMAKE_SYSTEM_NAME}-C_COMPILER_NAME.cmake)
4. optional Load Modules/Platform/${CMAKE_SYSTEM_NAME}-CXX_COMPILER_NAME.cmake)
5. INCLUDE(${CMAKE_ROOT}/Modules/CMakeDefaultMakeRuleVariables.cmake)
6. optional load  INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE})


There are special rule variables that can be in the system files.

For example in Windows-bcc32.cmake there is a variable like this:
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY 
 "<CMAKE_CXX_COMPILER>  ${CMAKE_START_TEMP_FILE}-e<TARGET>  -tWD  <LINK_FLAGS> -tWR <LINK_LIBRARIES> <OBJECTS>${CMAKE_END_TEMP_FILE}"
 "implib ${CMAKE_START_TEMP_FILE}-w <TARGET_BASE>.lib <TARGET_BASE>.dll${CMAKE_END_TEMP_FILE}"
)

The <> names are replaced by the makefile generator, and are set to a limited
set of options.   See CMakeDefaultMakeRuleVariables.cmake for a list of
<variables> that can be used.   This should allow control over how things are done,
without having to change the cmake binary.

Once this settles down, I will change the IDE based generators over to loading the
same set of configuration files.



-Bill


At 10:52 AM 11/18/2002 +0000, John Biddiscombe wrote:
>> >I have just checked in a major re-write of the cmake makefile generator.
>> >Expect some build problems...
>> >
>> >I will send a more full explanation of what I have done on Monday.
>
>Did I miss something or is it still unsent?
>
>JB





More information about the CMake mailing list