Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gsl] fix gsl x64-linux-dynamic build by guarding win32 string replaces #31504

Merged
Merged
9 changes: 5 additions & 4 deletions ports/gsl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ foreach(DIR IN LISTS FOLDERS)
endforeach()

file(READ gsl_types.h GSLTYPES_H)
string(REPLACE "#ifdef WIN32" "#if 1 /*WIN32*/" GSLTYPES_H "${GSLTYPES_H}")
sjperkins marked this conversation as resolved.
Show resolved Hide resolved
if(BUILD_SHARED_LIBS)
string(REPLACE "# ifdef GSL_DLL" "# if 1 /*GSL_DLL*/" GSLTYPES_H "${GSLTYPES_H}")
endif()
sjperkins marked this conversation as resolved.
Show resolved Hide resolved
sjperkins marked this conversation as resolved.
Show resolved Hide resolved
if(WIN32)
sjperkins marked this conversation as resolved.
Show resolved Hide resolved
if(BUILD_SHARED_LIBS)
target_compile_definitions(gsl PRIVATE GSL_DLL)
endif()
endif(WIN32)
sjperkins marked this conversation as resolved.
Show resolved Hide resolved
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gsl_types.h "${GSLTYPES_H}")

file(GLOB_RECURSE PUBLIC_HEADERS gsl*.h)
Expand Down
2 changes: 1 addition & 1 deletion versions/g-/gsl.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"versions": [
{
"git-tree": "c9aa024bd4ce8327328a818b75cc6188de15ddd2",
"git-tree": "568ec043069dd8b8e13d24e0425cb759d0326ad1",
"version": "2.7.1",
"port-version": 2
},
Expand Down