CMakeLists.txt 537 B

12345678910111213141516171819
  1. cmake_minimum_required(VERSION 3.10)
  2. project(terrainGenCpp LANGUAGES CXX)
  3. set(CMAKE_CXX_STANDARD 14)
  4. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Ofast -Wall -pedantic -ggdb3")
  5. if (UNIX AND NOT APPLE)
  6. set(LINUX TRUE)
  7. endif ()
  8. if (LINUX AND ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
  9. message(STATUS ">>> ${CMAKE_SYSTEM_NAME}")
  10. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
  11. link_libraries("-fsanitize=address")
  12. add_compile_options("-fsanitize=address")
  13. endif ()
  14. add_subdirectory(src)