You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "wgtmac (via GitHub)" <gi...@apache.org> on 2025/01/17 04:13:44 UTC

[PR] AVRO-4112: [C++][CMake] Do not find Boost when test is not built [avro]

wgtmac opened a new pull request, #3293:
URL: https://github.com/apache/avro/pull/3293

   ## What is the purpose of the change
   
   - Added a CMake option `AVRO_USE_BOOST` to indicate whether boost is required for non-test targets.
   - Do not find Boost library when test is not required to build.
   
   ## Verifying this change
   
   - Manually verified that Boost is not found.
   - Pass CIs.
   
   ## Documentation
   
   - Does this pull request introduce a new feature? no
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] AVRO-4112: [C++][CMake] Do not find Boost when test is not built [avro]

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #3293:
URL: https://github.com/apache/avro/pull/3293#discussion_r1919530683


##########
lang/c++/CMakeLists.txt:
##########
@@ -81,11 +78,8 @@ if (AVRO_ADD_PROTECTOR_FLAGS)
 endif ()
 endif ()
 
-if (AVRO_BUILD_TESTS OR AVRO_BUILD_EXECUTABLES)
-    find_package (Boost 1.38 REQUIRED
-        COMPONENTS filesystem iostreams program_options system)
-else ()
-    find_package (Boost 1.38 REQUIRED COMPONENTS iostreams)
+if (AVRO_BUILD_TESTS OR AVRO_USE_BOOST)
+    find_package (Boost 1.38 REQUIRED COMPONENTS system)

Review Comment:
   @thiru-mg I'm not sure if `boost/system` is required because I haven't found any header inclusion from all source files. Should we remove it as well?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] AVRO-4112: [C++][CMake] Do not find Boost when test is not built [avro]

Posted by "thiru-mg (via GitHub)" <gi...@apache.org>.
thiru-mg merged PR #3293:
URL: https://github.com/apache/avro/pull/3293


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] AVRO-4112: [C++][CMake] Do not find Boost when test is not built [avro]

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #3293:
URL: https://github.com/apache/avro/pull/3293#discussion_r1920134170


##########
lang/c++/CMakeLists.txt:
##########
@@ -81,11 +78,8 @@ if (AVRO_ADD_PROTECTOR_FLAGS)
 endif ()
 endif ()
 
-if (AVRO_BUILD_TESTS OR AVRO_BUILD_EXECUTABLES)
-    find_package (Boost 1.38 REQUIRED
-        COMPONENTS filesystem iostreams program_options system)
-else ()
-    find_package (Boost 1.38 REQUIRED COMPONENTS iostreams)
+if (AVRO_BUILD_TESTS OR AVRO_USE_BOOST)
+    find_package (Boost 1.38 REQUIRED COMPONENTS system)

Review Comment:
   After some investigation, I think the `system` component is required for `boost/asio`, so let's keep it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org