Advertisement
Guest User

Untitled

a guest
Jun 21st, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 1.04 KB | None | 0 0
  1. # This file should be named as CMakeLists.txt and placed next to the sources.
  2. # In order to use, make sure cmake and make is installed:
  3. #   $ sudo apt-get install cmake make
  4. #
  5. # First time usage:
  6. #   $ mkdir build && cd build && cmake .. && make
  7. #
  8. # Subsequent builds:
  9. #   $ make
  10. #
  11. # If you wish to use other than the default compiler do:
  12. #   $ cmake .. -DCMAKE_CXX_COMPILER="clang++"
  13. #
  14. # If you wish to generate e.g. C::B projects instead of plain Makefiles do:
  15. #   $ cmake .. -G "CodeBlocks - Unix Makefiles"
  16.  
  17. cmake_minimum_required(VERSION 2.6)
  18.  
  19. # Add a sensible build type default and warning because empty means no optimization and no debug info.
  20. if (NOT CMAKE_BUILD_TYPE)
  21.     message("WARNING: CMAKE_BUILD_TYPE is not defined!\n         Defaulting to CMAKE_BUILD_TYPE=RelWithDebInfo.")
  22.     set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
  23. endif()
  24.  
  25. # Gather sources
  26. file(GLOB SOURCES *.cc *.cpp)
  27.  
  28. # Executable
  29. add_executable(main ${SOURCES})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement