Category:CMake: Difference between revisions

Most examples work with CMake 2.6 in process script mode.
(Add CMake to Rosetta Code! This category is now empty; first examples will arrive soon.)
 
(Most examples work with CMake 2.6 in process script mode.)
Line 7:
CMake is a cross-platform make system, for compiling [[C]], [[C++]] or [[Fortran]] programs. CMake uses a configuration file (CMakeLists.txt) to run configure tests, find libraries, create targets, and generate a build system for [[make|Unix make]] or another build tool. This configuration file runs commands in CMake's own scripting language.
 
InFor Rosetta Code, most examples work with ''CMake 2.6'' or later in ''process script mode'' (<code>cmake -P myscript.cmake</code>). Many examples use features from 2.6, especially function(). In <code>cmake -P</code> mode, CMake runs the script but cannotnever createcreates a project. orSo there are no configure tests and anyno targets.
 
==ExampleSimple project==
This example builds a small C program after checking if #include <sys/time.h> provides clock_gettime() or gettimeofday().
 
Anonymous user