From 708c696a6974a957fb44d8391823d063f7d999b2 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 15 Nov 2020 21:26:55 +0100 Subject: [PATCH] Build GPSTk with the same visibility settings --- src/tests/data/gpstk_static.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/tests/data/gpstk_static.patch b/src/tests/data/gpstk_static.patch index 97ff88d69..531bb76fc 100644 --- a/src/tests/data/gpstk_static.patch +++ b/src/tests/data/gpstk_static.patch @@ -2,12 +2,21 @@ SPDX-License-Identifier: GPL-3.0-or-later SPDX-FileCopyrightText: 2020 Carles Fernandez-Prades --- CMakeLists.txt 2020-10-25 10:06:26.000000000 +0100 +++ CMakeLists.txt 2020-10-25 10:06:11.000000000 +0100 -@@ -74,7 +74,7 @@ +@@ -74,7 +74,16 @@ include( BuildSetup.cmake ) - +set(STADYN "STATIC") ++if(POLICY CMP0063) ++ cmake_policy(SET CMP0063 NEW) ++ set(CMAKE_CXX_VISIBILITY_PRESET hidden) ++ set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) ++else() ++ if((CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32) ++ add_definitions(-fvisibility=hidden) ++ endif() ++endif() #============================================================ # Core Library Target Files #============================================================