diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2018-08-13 16:07:26 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-08-15 11:17:40 -0700 |
| commit | ba5d624e8bfbf5bb763a1daf67ddfa2b6518313a (patch) | |
| tree | 82d467b85005e68580fa471854f3ae26f880cb07 | |
| parent | f46cd9ae88d00ec6907c6ad5982c294da2fab1ae (diff) | |
| download | vcpkg-ba5d624e8bfbf5bb763a1daf67ddfa2b6518313a.tar.gz vcpkg-ba5d624e8bfbf5bb763a1daf67ddfa2b6518313a.zip | |
[folly] Do not use -Werror
| -rw-r--r-- | ports/folly/no-werror.patch | 12 | ||||
| -rw-r--r-- | ports/folly/portfile.cmake | 5 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_append_to_path.cmake | 41 | ||||
| -rw-r--r-- | scripts/cmake/vcpkg_common_functions.cmake | 3 |
4 files changed, 58 insertions, 3 deletions
diff --git a/ports/folly/no-werror.patch b/ports/folly/no-werror.patch new file mode 100644 index 000000000..e9ec920dc --- /dev/null +++ b/ports/folly/no-werror.patch @@ -0,0 +1,12 @@ +diff --git a/CMake/FollyCompilerUnix.cmake b/CMake/FollyCompilerUnix.cmake
+index b7d994b..a518cbe 100644
+--- a/CMake/FollyCompilerUnix.cmake
++++ b/CMake/FollyCompilerUnix.cmake
+@@ -16,7 +16,6 @@ function(apply_folly_compile_options_to_target THETARGET)
+ -std=gnu++14
+ -finput-charset=UTF-8
+ -fsigned-char
+- -Werror
+ -Wall
+ -Wno-deprecated
+ -Wdeprecated-declarations
diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 8ad63bd8c..2112c9280 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -12,7 +12,7 @@ include(vcpkg_common_functions) # Required to run build/generate_escape_tables.py et al. vcpkg_find_acquire_program(PYTHON3) get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) -set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") +vcpkg_add_to_path("${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -21,7 +21,8 @@ vcpkg_from_github( SHA512 38e7b713572d4af0a6453d001eddc32c74b4ec100158300c0a3a61a88ec546b449f1973c2b624273da4278173782aa71695d981dba3c8f423f5b76ed1375d286 HEAD_REF master PATCHES - ${CMAKE_CURRENT_LIST_DIR}/find-gflags.patch + find-gflags.patch + no-werror.patch ) file(COPY diff --git a/scripts/cmake/vcpkg_append_to_path.cmake b/scripts/cmake/vcpkg_append_to_path.cmake new file mode 100644 index 000000000..6890dfe31 --- /dev/null +++ b/scripts/cmake/vcpkg_append_to_path.cmake @@ -0,0 +1,41 @@ +## # vcpkg_add_to_path
+##
+## Add a directory to the PATH environment variable
+##
+## ## Usage
+## ```cmake
+## vcpkg_add_to_path([PREPEND] <${PYTHON3_DIR}>)
+## ```
+##
+## ## Parameters
+## ### <positional>
+## The directory to add
+##
+## ### PREPEND
+## Prepends the directory.
+##
+## The default is to append.
+function(vcpkg_add_to_path)
+ if(NOT "${ARGC}" STREQUAL "1" AND NOT "${ARGC}" STREQUAL "2")
+ message(FATAL_ERROR "vcpkg_add_to_path() only accepts 1 or 2 arguments.")
+ endif()
+ if("${ARGV0}" STREQUAL "PREPEND")
+ if(NOT "${ARGC}" STREQUAL "2")
+ message(FATAL_ERROR "Expected second argument.")
+ endif()
+ if(CMAKE_HOST_WIN32)
+ set(ENV{PATH} "${ARGV1};$ENV{PATH}")
+ else()
+ set(ENV{PATH} "${ARGV1}:$ENV{PATH}")
+ endif()
+ else()
+ if(NOT "${ARGC}" STREQUAL "1")
+ message(FATAL_ERROR "Unexpected second argument: ${ARGV1}")
+ endif()
+ if(CMAKE_HOST_WIN32)
+ set(ENV{PATH} "$ENV{PATH};${ARGV0}")
+ else()
+ set(ENV{PATH} "$ENV{PATH}:${ARGV0}")
+ endif()
+ endif()
+endfunction()
\ No newline at end of file diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 6677af00a..f4f149794 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -1,4 +1,5 @@ include(vcpkg_acquire_msys) +include(vcpkg_append_to_path) include(vcpkg_check_linkage) include(vcpkg_download_distfile) include(vcpkg_extract_source_archive) @@ -24,4 +25,4 @@ include(vcpkg_copy_tool_dependencies) include(vcpkg_get_program_files_32_bit) include(vcpkg_get_program_files_platform_bitness) include(vcpkg_get_windows_sdk) -include(vcpkg_replace_string)
\ No newline at end of file +include(vcpkg_replace_string) |
