SHARE
TWEET

Untitled

a guest Mar 25th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cmake_minimum_required(VERSION 3.0)
  2. project(myproj)
  3.  
  4. #Setting the compilers to gcc
  5. set(CMAKE_C_COMPILER gcc)
  6. set(CMAKE_CXX_COMPILER g++)
  7.  
  8. #Setting Build directory
  9. #a bunch of random lines I found on google
  10. set(dir ${CMAKE_CURRENT_SOURCE_DIR}/bin)
  11. set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${dir})
  12. set(EXECUTABLE_OUTPUT_PATH ${dir} CACHE PATH "Build directory" FORCE)
  13. set(LIBRARY_OUTPUT_PATH ${dir} CACHE PATH "Build directory" FORCE)
  14. set(CMAKE_BUILD_FILES_DIRECTORY ${dir})
  15. set(CMAKE_BUILD_DIRECTORY ${dir})
  16. set(EXECUTABLE_OUTPUT_PATH ${dir})
  17. set(LIBRARY_OUTPUT_PATH ${dir}/lib)
  18. set(CMAKE_CACHEFILE_DIR ${dir})
  19. set(CMAKE_BINARY_DIR  ${dir})
  20.  
  21. #A blob of source files called SOURCE
  22. set(SOURCE
  23.     main.cpp
  24.     test.h
  25. )
  26.  
  27. add_executable(${PROJECT_NAME} ${SOURCE})
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top