CMakeCompilerSettings.cmake 811 B

1234567891011121314
  1. # Set necessary compile and link flags
  2. if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
  3. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  4. set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wformat -Wno-format-extra-args -Wformat-security -Wformat-nonliteral -Wformat=2 -Wextra -Wnon-virtual-dtor -fprofile-arcs -ftest-coverage -fPIC -O0")
  5. elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
  6. # TODO figure clang stuff to enable test-coverage
  7. # Instrument Program flow should be set to Yes
  8. # http://stackoverflow.com/questions/7949781/undefined-symbols-for-architecture-i386-upgrading-project-to-ios-5
  9. set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -Wnon-virtual-dtor -fPIC -O0")
  10. elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
  11. # no msvc flags for now
  12. endif()