[Cmake] CMake is unable to compile simple test program

Neil Mackie Neil.Mackie at ofcom.org.uk
Wed, 28 Jan 2004 14:36:59 -0000


Bill Hoffman helpfully replied:

>> CMake makes sure the compiler works before generating the makefiles.
>> When using nmake, you must make sure that vcvars32.bat=20
>> has been run in the shell before you run CMakeSetup.  =20

Shell ? what shell ? I'm using Windows!

However I can see that vcvars32.bat sets a variable LIB which refers to the=
 directory in which kernel32.lib resides. So I went to 'my computer' and ri=
ght clicked on properties, selected the 'environment' tab and in the tiny, =
single line, 60 characters wide field provided, updated the PATH variable (=
which in my case is 452 characters wide) and added a LIB variable (105 char=
acters) to match what vcvars32.bat would define if I ran it in the DOS comm=
and prompt.

Now CMakeSetup runs and tells me my CMakeLists.txt is wrong (which is what =
I expected). My CMakeLists.txt file is in the directory above my source fil=
e. Is there a way to indicate where my source is in relation to where the C=
MakeLists.txt file is, but avoiding the use of AUX_SOURCE_DIRECTORY() which=
 would pick up all the source files (possibly including some I do not want =
to build)?=20

Or should the CMakeLists.txt be in the source directory?=20

What is the standard practice? Could someone post a short CMakeLists.txt fi=
le that they consider adheres to best practice?

Regards,
Neil J Mackie
you'd think Bill could afford to build bigger prompts into his OSs


***************************************************************************=
********
Ofcom is the regulator for the UK communications industry, with responsibil=
ities across television, radio, telecommunications and wireless communicati=
ons services. Ofcom exists to further the interests of citizen-consumers as=
 the communications industries enter the digital age.

Ofcom has taken over the responsibilities and assumed the powers of the fiv=
e former regulators it has replaced - the Broadcasting Standards Commission=
, the Independent Television Commission, Oftel, the Radio Authority and the=
 Radiocommunications Agency.

This email and any files transmitted with it are confidential and intended =
solely for the use of the individual or entity to whom they are addressed.

If you have received this email in error please notify the originator of th=
e message. This footer also confirms that this email message has been scann=
ed for the presence of computer viruses.

Any views expressed in this message are those of the individual sender, exc=
ept where the sender specifies and with authority, states them to be the vi=
ews of Ofcom.
***************************************************************************=
********