protobits commented on pull request #3704:
URL: https://github.com/apache/incubator-nuttx/pull/3704#issuecomment-859631957


    
   
   > sethost.sh is linux specific. We can execute kconfig-tweak from Cmake
   > 
   > ```
   >  set(NUTTX_DEFCONFIG_SAVED ${NUTTX_DEFCONFIG} CACHE INTERNAL "Saved 
defconfig path" FORCE)
   >  
   > +  if(APPLE)
   > +  execute_process(COMMAND  kconfig-tweak  --file .config --disable 
CONFIG_HOST_WINDOWS
   > +                                  WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
   > +  execute_process(COMMAND kconfig-tweak  --file .config --enable 
CONFIG_HOST_MACOS
   > +                                  WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
   > +  execute_process(COMMAND kconfig-tweak  --file .config --disable 
CONFIG_HOST_LINUX
   > +                                  WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
   > +  elseif(WIN32)
   > +    execute_process(COMMAND kconfig-tweak  --file .config --enable 
CONFIG_HOST_WINDOWS
   > +                                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
   > +    execute_process(COMMAND kconfig-tweak  --file .config --disable 
CONFIG_HOST_MACOS
   > +                                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
   > +    execute_process(COMMAND kconfig-tweak  --file .config --disable 
CONFIG_HOST_LINUX
   > +                            WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
   > +  elseif(UNIX)
   > +    execute_process(COMMAND kconfig-tweak  --file .config --disable 
CONFIG_HOST_WINDOWS
   > +                                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
   > +    execute_process(COMMAND kconfig-tweak  --file .config --disable 
CONFIG_HOST_MACOS
   > +                                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
   > +    execute_process(COMMAND kconfig-tweak  --file .config --enable 
CONFIG_HOST_LINUX
   > +                                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
   > +  else()
   > +    execute_process(COMMAND kconfig-tweak  --file .config --disable 
CONFIG_HOST_WINDOWS
   > +                                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
   > +    execute_process(COMMAND kconfig-tweak  --file .config --disable 
CONFIG_HOST_MACOS
   > +                                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
   > +    execute_process(COMMAND kconfig-tweak  --file .config --enable 
CONFIG_HOST_LINUX
   > +                                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
   > +  endif()
   >    # Print configuration choices
   >  
   >    message(STATUS "  Board: ${NUTTX_BOARD}")
   >    message(STATUS "  Config: ${NUTTX_CONFIG}")
   >    message(STATUS "  Appdir: ${NUTTX_APPS_DIR}")
   > ```
   > 
   > So we will not alter top Kconfig.
   
   I'd rather not go backwards, since I moved away from changing those settings 
using kconfig-tweak. Passing environment variables to kconfig-mconf and such is 
already being done, so adding the option of setting CONFIG_HOST_ the same way 
is preferable. 
   
   The end goal would be to remove these variables from config files altogether 
since it is problematic when .config has a host setting different than the 
platform (there's also no point in storing that information in a .config).


-- 
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.

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


Reply via email to