File: CMakeCompilerSettings.cmake

package info (click to toggle)
libjson-rpc-cpp 0.7.0-2.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,124 kB
  • sloc: cpp: 6,491; xml: 202; sh: 65; makefile: 13
file content (14 lines) | stat: -rw-r--r-- 811 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Set necessary compile and link flags


if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
        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")
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
# TODO figure clang stuff to enable test-coverage
# Instrument Program flow should be set to Yes
# http://stackoverflow.com/questions/7949781/undefined-symbols-for-architecture-i386-upgrading-project-to-ios-5
	set(CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -Wnon-virtual-dtor -fPIC -O0")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# no msvc flags for now
endif()