Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJocelyn Turcotte <jturcotte@woboq.com>2016-09-14 16:31:05 +0300
committerJocelyn Turcotte <jturcotte@woboq.com>2016-09-16 18:43:39 +0300
commit2b274e9460b6236e0f2e54d3b4cef57eca64e980 (patch)
tree89980a8a4ad79c21acaef6aa451f91e56ccd52fa /cmake
parentb7809ded23fdba6aa50b6d834b5bd5fc16865eea (diff)
Fix the MSVC build
- Replace functions that are provided by MinGW with a Win32-based implementation - Explicitly export needed symbols from ocsync.dll - Rename share.h to sharemanager.h since the name clashes with one of the Windows headers and get included from there - Remove the timestamp from the fallback csync stderr logging, it's not used since we always provide a log callback
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/Warnings.cmake32
1 files changed, 17 insertions, 15 deletions
diff --git a/cmake/modules/Warnings.cmake b/cmake/modules/Warnings.cmake
index 4ba425983..1ee7a9ea7 100644
--- a/cmake/modules/Warnings.cmake
+++ b/cmake/modules/Warnings.cmake
@@ -2,21 +2,23 @@
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING* file.
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Wno-long-long")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
-if(CMAKE_COMPILER_IS_GNUCXX)
- execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
- OUTPUT_VARIABLE GCC_VERSION)
- if(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
- else(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
+ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
+ OUTPUT_VARIABLE GCC_VERSION)
+ if(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
+ else(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
+ endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
+ else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
- endif(GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8)
-else()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
-endif(CMAKE_COMPILER_IS_GNUCXX)
+ endif()
-if(DEFINED MIRALL_FATAL_WARNINGS)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
-endif(DEFINED MIRALL_FATAL_WARNINGS)
+ if(DEFINED MIRALL_FATAL_WARNINGS)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
+ endif(DEFINED MIRALL_FATAL_WARNINGS)
+endif()