Skip to content

Commit

Permalink
fix(cmake): output was not exported
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii committed Apr 28, 2023
1 parent c214752 commit af96244
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions tools/pybind11Common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -262,19 +262,16 @@ include(CheckCXXCompilerFlag)
# cached base on the result variable. If the flags work, sets them in
# cxxflags_out/linkerflags_out internal cache variables (in addition to
# ${result}).
function(_pybind11_return_if_cxx_and_linker_flags_work result cxxflags linkerflags cxxflags_out
linkerflags_out)
macro(_pybind11_return_if_cxx_and_linker_flags_work result cxxflags linkerflags cxxflags_out
linkerflags_out)
set(CMAKE_REQUIRED_LIBRARIES ${linkerflags})
check_cxx_compiler_flag("${cxxflags}" ${result})
if(${result})
set(${cxxflags_out}
"${cxxflags}"
PARENT_SCOPE)
set(${linkerflags_out}
"${linkerflags}"
PARENT_SCOPE)
set(${cxxflags_out} "${cxxflags}")
set(${linkerflags_out} "${linkerflags}")
endif()
endfunction()
unset(CMAKE_REQUIRED_LIBRARIES)
endmacro()

function(_pybind11_generate_lto target prefer_thin_lto)
if(MINGW)
Expand Down

0 comments on commit af96244

Please sign in to comment.