Skip to content

Commit

Permalink
Disable shared libs configuraion on MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed Jun 17, 2023
1 parent 53d824f commit 69c6442
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ jobs:
include:
- { os: ubuntu-20.04, env: { CC: clang, CXX: clang++ }, shared: on }
- { os: ubuntu-20.04, env: { CC: clang, CXX: clang++ }, shared: off }
# Builds sexp dll with MSVC is not supported
exclude:
- { os: windows-2019, env: { }, shared: on }

env: ${{ matrix.env }}
steps:
- name: Checkout
Expand Down
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ include(CheckCXXSourceCompiles)

if (BUILD_SHARED_LIBS)
set(TYPE "SHARED")
if (WIN32)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS, TRUE)
endif(WIN32)
else (BUILD_SHARED_LIBS)
set(TYPE "STATIC")
endif (BUILD_SHARED_LIBS)

if (BUILD_SHARED_LIBS AND MSVC)
message(FATAL_ERROR "Building sexp shared library with MSVC is not supported")
endif(BUILD_SHARED_LIBS AND MSVC)


message(STATUS "Building ${TYPE} library")

if (WITH_SANITIZERS)
Expand Down
1 change: 1 addition & 0 deletions include/sexp/ext-key-format.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#pragma once

#include <map>

#include "sexp.h"

namespace ext_key_format {
Expand Down

0 comments on commit 69c6442

Please sign in to comment.