Skip to content

Commit 7dea5c0

Browse files
huydhnmalfet
andauthored
Update CMakeLists.txt
Co-authored-by: Nikita Shulga <[email protected]>
1 parent 521ded9 commit 7dea5c0

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

CMakeLists.txt

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -716,25 +716,19 @@ if(EXECUTORCH_BUILD_PYBIND)
716716
endif()
717717

718718
# compile options for pybind
719+
set(_pybind_compile_options
720+
-Wno-deprecated-declarations
721+
-fPIC
722+
-frtti
723+
-fexceptions
724+
)
719725
if(EXECUTORCH_DO_NOT_USE_CXX11_ABI)
720-
set(_pybind_compile_options
721-
-Wno-deprecated-declarations
722-
-fPIC
723-
-frtti
724-
-fexceptions
725-
# libtorch is built with the old ABI, so we need to do the same for any
726-
# .cpp files that include torch, c10, or ATen targets. Note that PyTorch
727-
# nightly binary is built with _GLIBCXX_USE_CXX11_ABI set to 0 while its
728-
# CI build sets this to 1 (default)
729-
-D_GLIBCXX_USE_CXX11_ABI=0
730-
)
726+
# libtorch is built with the old ABI, so we need to do the same for any
727+
# .cpp files that include torch, c10, or ATen targets. Note that PyTorch
728+
# nightly binary is built with _GLIBCXX_USE_CXX11_ABI set to 0 while its
729+
# CI build sets this to 1 (default)
730+
list(APPEND _pybind_compile_options -D_GLIBCXX_USE_CXX11_ABI=0)
731731
else()
732-
set(_pybind_compile_options
733-
-Wno-deprecated-declarations
734-
-fPIC
735-
-frtti
736-
-fexceptions
737-
)
738732
endif()
739733

740734
# util lib

0 commit comments

Comments
 (0)