Skip to content

Commit 057dd39

Browse files
committed
Merge #197 'fix link issue with boost_system when statically linked'
2 parents f799908 + 6db8b21 commit 057dd39

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Please see [CONTRIBUTING.md](https://github.com./cucumber/cucumber/blob/master/CO
88

99
### Fixed
1010

11+
* Fix statically linking `boost_system` ([#197](https://github.com./cucumber/cucumber-cpp/pull/197) Matthieu Longo)
12+
1113
## [0.5](https://github.com./cucumber/cucumber-cpp/compare/v0.4...v0.5) (2 July 2018)
1214

1315
### Added

CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ if(Boost_SYSTEM_LIBRARY AND NOT TARGET Boost::system)
112112
"IMPORTED_LOCATION" "${Boost_SYSTEM_LIBRARY}"
113113
"INTERFACE_LINK_LIBRARIES" "Boost::boost"
114114
)
115+
if(Boost_USE_STATIC_LIBS)
116+
set_target_properties(Boost::system PROPERTIES
117+
"COMPILE_DEFINITIONS" BOOST_ERROR_CODE_HEADER_ONLY=1
118+
)
119+
endif()
115120
endif()
116121
if(Boost_FILESYSTEM_LIBRARY AND NOT TARGET Boost::filesystem)
117122
add_library(Boost::filesystem ${LIBRARY_TYPE} IMPORTED)

0 commit comments

Comments
 (0)