mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 10:36:15 +00:00
cc4007a69e
We now have a cmake-format config file. We no longer use list variables for sources, instead using target_sources when we need to add, in accordance with current best practice. (This makes it a lot easier to edit too.) There's no more include_directories(), add_definitions(), or other gently-deprecated directory-scoped commands, nor any CMake scripts that include a parent directory reference (named targets instead)
15 lines
614 B
CMake
15 lines
614 B
CMake
# Copyright 2018-2021, Collabora, Ltd.
|
|
# SPDX-License-Identifier: BSL-1.0
|
|
|
|
if(NOT MSVC)
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Wextra -Wno-unused-parameter")
|
|
set(CMAKE_C_FLAGS
|
|
"${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Werror=incompatible-pointer-types"
|
|
)
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=int-conversion")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wno-unused-parameter")
|
|
|
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
|
|
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
|
|
endif()
|