Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This file should be named as CMakeLists.txt and placed next to the sources.
- # In order to use, make sure cmake and make is installed:
- # $ sudo apt-get install cmake make
- #
- # First time usage:
- # $ mkdir build && cd build && cmake .. && make
- #
- # Subsequent builds:
- # $ make
- #
- # If you wish to use other than the default compiler do:
- # $ cmake .. -DCMAKE_CXX_COMPILER="clang++"
- #
- # If you wish to generate e.g. C::B projects instead of plain Makefiles do:
- # $ cmake .. -G "CodeBlocks - Unix Makefiles"
- cmake_minimum_required(VERSION 2.6)
- # Add a sensible build type default and warning because empty means no optimization and no debug info.
- if (NOT CMAKE_BUILD_TYPE)
- message("WARNING: CMAKE_BUILD_TYPE is not defined!\n Defaulting to CMAKE_BUILD_TYPE=RelWithDebInfo.")
- set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
- endif()
- # Gather sources
- file(GLOB SOURCES *.cc *.cpp)
- # Executable
- add_executable(main ${SOURCES})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement