[Cmake] CMake is unable to compile simple test program

William A. Hoffman billlist at nycap.rr.com
Wed, 28 Jan 2004 10:27:11 -0500


There is documentation here:
http://www.cmake.org/HTML/Documentation.html
And an example here:
http://www.cmake.org/HTML/Examples.html

Normally, the CMakeLists.txt files are in the source directory.
However, the build can be anywhere once the list files are created.

-Bill

At 09:36 AM 1/28/2004, Neil Mackie wrote:
>Bill Hoffman helpfully replied:
>
>>> CMake makes sure the compiler works before generating the makefiles.
>>> When using nmake, you must make sure that vcvars32.bat 
>>> has been run in the shell before you run CMakeSetup.   
>
>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 right 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 characters) to match what vcvars32.bat would define if I ran it in the DOS command 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 file. Is there a way to indicate where my source is in relation to where the CMakeLists.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)? 
>
>Or should the CMakeLists.txt be in the source directory? 
>
>What is the standard practice? Could someone post a short CMakeLists.txt file 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 responsibilities across television, radio, telecommunications and wireless communications 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 five 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 the message. This footer also confirms that this email message has been scanned for the presence of computer viruses.
>
>Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Ofcom.
>***********************************************************************************
>
>_______________________________________________
>Cmake mailing list
>Cmake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake