Remove '-ansi' from cxxflags as it implies c++98 with gcc, and grantlee wants c++11. OK rsadowski@
43 lines
2.3 KiB
Plaintext
43 lines
2.3 KiB
Plaintext
$OpenBSD: patch-CMakeLists_txt,v 1.3 2019/09/22 09:10:55 cwen Exp $
|
|
Hunk #2: ports-gcc fix because with it, -ansi means -std=c++98, and
|
|
grantlee wants c++11
|
|
|
|
Index: CMakeLists.txt
|
|
--- CMakeLists.txt.orig
|
|
+++ CMakeLists.txt
|
|
@@ -34,14 +34,14 @@ include(GenerateExportHeader)
|
|
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
|
|
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
|
|
|
|
-if (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
|
|
+if (CMAKE_GENERATOR STREQUAL "Unix Makefiles" OR CMAKE_GENERATOR STREQUAL "Ninja")
|
|
# create coverage build type
|
|
set(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} Coverage )
|
|
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
|
|
"Debug" "Release" "MinSizeRel" "RelWithDebInfo" "Coverage" "TestCocoon")
|
|
endif()
|
|
|
|
-if (CMAKE_GENERATOR STREQUAL "Unix Makefiles")
|
|
+if (CMAKE_GENERATOR STREQUAL "Unix Makefiles" OR CMAKE_GENERATOR STREQUAL "Ninja")
|
|
set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_RELEASE} -fprofile-arcs -ftest-coverage")
|
|
set(CMAKE_C_FLAGS_COVERAGE "${CMAKE_C_FLAGS_RELEASE} -fprofile-arcs -ftest-coverage")
|
|
set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -fprofile-arcs -ftest-coverage")
|
|
@@ -56,7 +56,7 @@ endif()
|
|
|
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common")
|
|
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-check-new -fno-common ")
|
|
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-check-new -fno-common ")
|
|
|
|
if (CMAKE_BUILD_TYPE MATCHES TestCocoon)
|
|
# Needed on 64 bit
|
|
@@ -100,7 +100,7 @@ set (LIB_SUFFIX "" CACHE STRING "Define suffix of libr
|
|
set( LIB_INSTALL_DIR lib${LIB_SUFFIX} )
|
|
set( PLUGIN_INSTALL_DIR ${LIB_INSTALL_DIR}/grantlee/${Grantlee5_MAJOR_MINOR_VERSION_STRING} )
|
|
set( BIN_INSTALL_DIR bin )
|
|
-set( INCLUDE_INSTALL_DIR include )
|
|
+set( INCLUDE_INSTALL_DIR include/grantlee5 )
|
|
set( DATA_INSTALL_DIR share/apps )
|
|
|
|
# set up RPATH/install_name_dir
|