Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake 3.10, C++17, SWIG warnings #2081

Merged
merged 3 commits into from
Nov 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12)
cmake_minimum_required(VERSION 3.10)

if (UNIX AND POLICY CMP0072)
# In case of both legacy and glvnd OpenGL libraries found. Prefer GLVND
Expand Down Expand Up @@ -70,8 +70,9 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo)
endif()

find_package(CXX11 REQUIRED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAGS}")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)

if(${CMAKE_C_COMPILER_ID} MATCHES "Clang" OR ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
set(CMAKE_COMPILER_IS_CLANG TRUE)
Expand Down
3 changes: 2 additions & 1 deletion UI/platform-windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "obs-config.h"
#include "obs-app.hpp"
#include "platform.hpp"
using namespace std;

#include <util/windows/win-version.h>
#include <util/platform.h>
Expand All @@ -37,6 +36,8 @@ using namespace std;
#include <util/windows/HRError.hpp>
#include <util/windows/ComPtr.hpp>

using namespace std;

static inline bool check_path(const char *data, const char *path,
string &output)
{
Expand Down
5 changes: 5 additions & 0 deletions deps/obs-scripting/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ endif()

project(obs-scripting)

if(POLICY CMP0068)
# RPATH settings on macOS do not affect install_name.
cmake_policy(SET CMP0068 NEW)
endif()

if(MSVC)
set(obs-scripting_PLATFORM_DEPS
w32-pthreads)
Expand Down
5 changes: 5 additions & 0 deletions deps/obs-scripting/obslua/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ cmake_minimum_required(VERSION 2.8)
project(obslua)

if(POLICY CMP0078)
# UseSWIG generates standard target names.
cmake_policy(SET CMP0078 OLD)
endif()
if(POLICY CMP0086)
# UseSWIG honors SWIG_MODULE_NAME via -module flag.
cmake_policy(SET CMP0086 OLD)
endif()

find_package(SWIG 2 REQUIRED)
include(${SWIG_USE_FILE})
Expand Down
5 changes: 5 additions & 0 deletions deps/obs-scripting/obspython/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ cmake_minimum_required(VERSION 2.8)
project(obspython)

if(POLICY CMP0078)
# UseSWIG generates standard target names.
cmake_policy(SET CMP0078 OLD)
endif()
if(POLICY CMP0086)
# UseSWIG honors SWIG_MODULE_NAME via -module flag.
cmake_policy(SET CMP0086 OLD)
endif()

find_package(SWIG 2 REQUIRED)
include(${SWIG_USE_FILE})
Expand Down