Skip to content

Commit

Permalink
Merge pull request #12 from rafaelBauer/master
Browse files Browse the repository at this point in the history
Added static link flags for MSVC
  • Loading branch information
kris-jusiak authored Apr 4, 2022
2 parents f8c9936 + 3821c90 commit 88f6249
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[submodule "libs/gherkin-c"]
path = libs/gherkin-c
url = ../gherkin-c
shallow = true
[submodule "libs/fmem"]
path = libs/fmem
url = ../fmem
shallow = true
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ file(GLOB_RECURSE GHERKIN_H_SRS
include/*.hpp
)

if(MSVC AND NOT BUILD_SHARED_LIBS)
add_compile_options(/EHsc)
# See https://gitlab.kitware.com/cmake/cmake/-/issues/18390
add_compile_options(
$<$<CONFIG:>:/MT>
$<$<CONFIG:Debug>:/MTd>
$<$<CONFIG:Release>:/MT>
)
add_compile_definitions(GHERKIN_C_EXPORTS)
endif(MSVC AND NOT BUILD_SHARED_LIBS)

ADD_LIBRARY(gherkin-cpp ${GHERKIN_CPP_SRS})
ADD_LIBRARY(gherkin-cpp::gherkin-cpp ALIAS gherkin-cpp)

Expand Down
2 changes: 1 addition & 1 deletion libs/fmem
Submodule fmem updated 1 files
+11 −1 CMakeLists.txt
2 changes: 1 addition & 1 deletion libs/gherkin-c
Submodule gherkin-c updated 1 files
+10 −0 CMakeLists.txt

0 comments on commit 88f6249

Please sign in to comment.