Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ jobs:

### Mac OS build intel
macos_build_intel:
runs-on: macos-13
runs-on: macos-15
strategy:
matrix:
config:
- {cc: "gcc", cxx: "g++"}
- {cc: "clang", cxx: "clang++"}
steps:
- uses: actions/checkout@v2
Expand All @@ -56,7 +55,7 @@ jobs:
HOMEBREW_NO_AUTO_UPDATE=1 brew install boost automake
- name: Compile and test
run: |
mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DSTATIC_BUILD=OFF ..
mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_PREFIX_PATH=$(brew --prefix) -DBoost_NO_BOOST_CMAKE=ON -DSTATIC_BUILD=OFF ..
make -j2
cd .. && ./build/bin/test_validation_suite
- name: Rename release files
Expand All @@ -83,7 +82,6 @@ jobs:
strategy:
matrix:
config:
- {cc: "gcc", cxx: "g++"}
- {cc: "clang", cxx: "clang++"}

steps:
Expand All @@ -94,7 +92,7 @@ jobs:
HOMEBREW_NO_AUTO_UPDATE=1 brew install boost automake libtool
- name: Compile and test
run: |
mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DSTATIC_BUILD=OFF ..
mkdir build && cd build && cmake -G "Unix Makefiles" -DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -DCMAKE_C_COMPILER=${{ matrix.config.cc }} -DCMAKE_PREFIX_PATH=$(brew --prefix) -DBoost_NO_BOOST_CMAKE=ON -DSTATIC_BUILD=OFF ..
make -j2
cd .. && ./build/bin/test_validation_suite
- name: Rename release files
Expand Down
17 changes: 10 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
cmake_minimum_required(VERSION 3.10)
# Use legacy FindBoost module until Boost CMake configs are more reliable across platforms
if(POLICY CMP0167)
cmake_policy(SET CMP0167 OLD)
endif()
project(vcf-validator CXX C)

# Version info
Expand Down Expand Up @@ -28,8 +32,8 @@ else()
endif()

# ========== Static/Dynamic Build Settings ==========
if( NOT MSVC)
if(STATIC_BUILD AND NOT MSVC)
if(NOT MSVC)
if(STATIC_BUILD)
message(STATUS "Configuring for static build")
set(BUILD_SHARED_LIBS OFF)
set(Boost_USE_STATIC_LIBS ON)
Expand Down Expand Up @@ -64,11 +68,11 @@ if(MSVC)
set(Boost_USE_STATIC_LIBS ON)
endif()

find_package(Boost REQUIRED COMPONENTS filesystem iostreams log log_setup program_options regex system thread)
find_package(Boost REQUIRED COMPONENTS filesystem iostreams log log_setup program_options regex thread)
find_package(CURL REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(Threads REQUIRED)
if( NOT MSVC)
if(NOT MSVC)
find_package(ZLIB REQUIRED)
find_package(BZip2 REQUIRED)
# Only need PkgConfig when building statically
Expand All @@ -77,7 +81,7 @@ if( NOT MSVC)
endif()
endif()

# ========== Include Paths ==========
# ========== Include Paths ==========

include_directories(
${Boost_INCLUDE_DIRS}
Expand All @@ -102,7 +106,6 @@ target_link_libraries(mod_vcf PRIVATE
Boost::log_setup
Boost::program_options
Boost::regex
Boost::system
Boost::thread
CURL::libcurl
OpenSSL::SSL
Expand All @@ -119,7 +122,7 @@ else()
pkg_check_modules(LIBCURL REQUIRED IMPORTED_TARGET libcurl)
target_link_libraries(mod_vcf PRIVATE ${LIBCURL_STATIC_LIBRARIES})
else()
target_link_libraries(mod_vcf PRIVATE ${LIBCURL_LIBRARIES})
target_link_libraries(mod_vcf PRIVATE ${CURL_LIBRARIES})
endif()
target_link_libraries(mod_vcf PRIVATE ZLIB::ZLIB BZip2::BZip2 dl)
endif()
Expand Down