kou opened a new pull request, #15022:
URL: https://github.com/apache/arrow/pull/15022

   We can overriding optimization level by
   `-DCMAKE_CXX_FLAGS_${CONFIG}=-OX` such as
   `-DCMAKE_CXX_FLAGS_RELEASE=-O0` with this change.
   
   Note that we can't use CXXFLAGS environment variable because CMake uses
   `${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${CONFIG}}` order and optimization 
flags are specified
   in `CMAKE_CXX_FLAGS_${CONFIG}` not `CMAKE_CXX_FLAGS`. (CMAKE_CXX_FLAGS CMake 
variable is
   initialized by CXXFLAGS environment variable.)
   
   See also: https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html
   
   > The flags in this variable will be passed to the compiler before
   > those in the per-configuration `CMAKE_<LANG>_FLAGS_<CONFIG>` variant,
   > and before flags added by the `add_compile_options()` or
   > `target_compile_options()` commands.
   
   This change also cleans up the followings:
   
   * C/CXX flags related codes
     * Use `CMAKE_C_FLAGS_${BUILD_TYPE}`/`CMAKE_CXX_FLAGS_${BUILD_TYPE}` 
instead of putting all flags to `CMAKE_C_FLAGS`/`CMAKE_CXX_FLAGS`
   * `externalproject_add()` related codes
     * Extract common options as `EP_XXX`
   * Use `string(APPEND)`/`list(APPEND)` as much as possible instead of 
`set(XXX "${XXX} ...")`/`set(XXX ${XXX} ...)`


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to