It is important though, because it explains the basic operation of CMake. It works! However, this process is a somewhat excessive way to just build the HelloWorld.cpp program. Building CXX object CMakeFiles/hello.dir/ Once the Makefile has been created, the make command can be used to build the make # The shell in which to execute make rules. # Generated by "Unix Makefiles" Generator, CMake Version 2.8 rw-r-r- 1 molloyd molloyd 4811 Apr 1 01:52 more Makefile Do not make edits to this Makefile, as any edits will be overwritten the next time that the cmake utility is lsĬMakeCache.txt CMakeFiles CMakeLists.txt Makefile cmake_install.cmake ls -l Makefile Build files have been written to: /home/molloyd/exploringBB/extras/cmake/helloworldĬMake identified the environment settings for the Linux device and created the Makefile for this project, which can be viewed. Check for working CXX compiler: /usr/bin/c++ - works Check for working CXX compiler: /usr/bin/c++ Check for working C compiler: /usr/bin/gcc - works Check for working C compiler: /usr/bin/gcc The CXX compiler identification is GNU 4.6.3 ![]() The C compiler identification is GNU 4.6.3 Now you are ready to build the Hello World project using CMake - execute the cmake command and pass it the directory that contains the source code and the CMakeLists.txt file - in this case “. ![]() The project code is in the GitHub repository directory, where you will see only the two files described in Listings 1 and 2 cd ls For example, under sudo apt-get install cmake -version To build the project, first test that you have CMake installed, and if not, install it using the package manager that is used by your flavor of Linux. The first argument to the add_executable() function is the name of the executable to be built, and the second argument is the source file from which to build the executable.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |