From bff462211a49236ea8adda6c65f85baa478f2caa Mon Sep 17 00:00:00 2001 From: Carlos J Date: Mon, 15 Jan 2018 21:59:17 +0100 Subject: [PATCH 1/2] FreeBSD fixes and improvements --- grive/CMakeLists.txt | 6 +++--- libgrive/src/util/File.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/grive/CMakeLists.txt b/grive/CMakeLists.txt index 37145f1..32dd16b 100644 --- a/grive/CMakeLists.txt +++ b/grive/CMakeLists.txt @@ -27,8 +27,8 @@ set_target_properties( grive_executable install(TARGETS grive_executable RUNTIME DESTINATION bin) -if ( ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" ) +if ( ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" ) install(FILES doc/grive.1 DESTINATION man/man1 ) -else ( ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" ) +else ( ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" ) install(FILES doc/grive.1 DESTINATION share/man/man1 ) -endif( ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" ) +endif( ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" ) diff --git a/libgrive/src/util/File.cc b/libgrive/src/util/File.cc index 93345ac..c5184ec 100644 --- a/libgrive/src/util/File.cc +++ b/libgrive/src/util/File.cc @@ -33,7 +33,7 @@ #include #include -#ifdef __OpenBSD__ +#if defined(__FreeBSD__) || defined(__OpenBSD__) #include #endif From b06f66c86dda6df035c06b3b0486bf0211698e1c Mon Sep 17 00:00:00 2001 From: Carlos J Date: Mon, 15 Jan 2018 23:43:15 +0100 Subject: [PATCH 2/2] Unbreak the build against new Clang version 6.0.0 --- libgrive/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libgrive/CMakeLists.txt b/libgrive/CMakeLists.txt index 54776bd..3b48e3c 100644 --- a/libgrive/CMakeLists.txt +++ b/libgrive/CMakeLists.txt @@ -142,6 +142,10 @@ target_link_libraries( btest ${Boost_LIBRARIES} ) +if ( ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-narrowing" ) +endif ( ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" ) + if ( WIN32 ) else ( WIN32 ) set_target_properties( btest