Skip to content

Commit

Permalink
experiments (temporary commit)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dotsenko Andrey authored and 9fcc committed Aug 30, 2018
1 parent 7fe970a commit 9eed39b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,11 @@ else(HAVE_SUBUNIT)
endif (HAVE_SUBUNIT)

if (NOT ENABLE_REGEX AND WITH_PCREPOSIX)
find_package(PCREPOSIX)
if (PCREPOSIX_FOUND)
include_directories(${PCREPOSIX_INCLUDE_DIRS})
link_directories(${PCREPOSIX_LIBRARY_DIRS})
endif()
# pcreposix functions are just wrappers for pcre functions
check_library_exists(pcreposix regcomp "" HAVE_LIBPCREPOSIX)
if (HAVE_LIBPCREPOSIX)
Expand Down
13 changes: 8 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ version: 1.0.{build}

environment:
matrix:
- platform: msvc
- platform: vs
- platform: cygwin
# - platform: msvc
# - platform: vs
# - platform: cygwin
- platform: mingw32
- platform: mingw64msys
# - platform: mingw64msys

# scripts that are called at very beginning, before repo cloning
# init:
Expand Down Expand Up @@ -57,7 +57,10 @@ before_build:
- if %platform%==cygwin bash -c "autoreconf -i"
- if %platform%==cygwin bash -c "./configure"
- if %platform%==mingw32 set PATH=C:\MinGW\bin;%PATH%
- if %platform%==mingw32 appveyor-retry nuget install pcre -Verbosity detailed -OutputDirectory C:\pcre
# - if %platform%==mingw32 appveyor-retry nuget install pcre -Verbosity detailed -OutputDirectory C:\pcre
- if %platform%==mingw32 appveyor-retry nuget install pcre -Verbosity detailed -ExcludeVersion
- ps: Get-ChildItem -Recurse C:\pcre
- set CMAKE_PREFIX_PATH=C:\pcre\pcre.8.33.0.1\build\native
- if %platform%==mingw32 cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=%P%
- if %platform%==mingw64msys set PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%
- if %platform%==mingw64msys bash -c "autoreconf -i"
Expand Down
21 changes: 21 additions & 0 deletions cmake/FindPCREPOSIX.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
include(FindPackageHandleStandardArgs)

find_path(PCREPOSIX_INCLUDE_DIR NAMES pcreposix.h)
find_library(PCREPOSIX_LIBRARY NAMES pcreposix)
find_library(PCRE_LIBRARY NAMES pcre)

message("PCREPOSIX_LIBRARY: ${PCREPOSIX_LIBRARY}")
message("PCRE_LIBRARY: ${PCRE_LIBRARY}")

find_package_handle_standard_args(PCREPOSIX DEFAULT_MSG PCREPOSIX_LIBRARY PCREPOSIX_INCLUDE_DIR)

if(PCREPOSIX_FOUND)
set(PCREPOSIX_LIBRARIES ${PCREPOSIX_LIBRARY})
set(PCREPOSIX_INCLUDE_DIRS ${PCREPOSIX_INCLUDE_DIR})
else()
set(PCREPOSIX_LIBRARIES)
set(PCREPOSIX_INCLUDE_DIRS)
endif()

mark_as_advanced(PCREPOSIX_INCLUDE_DIRS PCREPOSIX_LIBRARIES)

0 comments on commit 9eed39b

Please sign in to comment.