CMake project + Intellisense + Yocto toolchain

Sysprogs forums Forums VisualGDB CMake project + Intellisense + Yocto toolchain

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #20243
    support
    Keymaster

    Hi,

    Thanks for confirming this. Just another quick question – are the flags from CMAKE_CXX_COMPILER_ARG1 mentioned anywhere else in the JSON file? If not, could you please share a repro project so that we could investigate this and submit a patch to CMake?

    #20287
    tzarc
    Participant

    I’ll create a repro testcase for you sometime this week, thanks heaps for looking into this!

     

    EDIT: Just confirming, the flags present in CMAKE_CXX_COMPILER_ARG1 do not exist anywhere in the CodeModel.json file.

    • This reply was modified 6 years, 2 months ago by tzarc.
    #20291
    tzarc
    Participant

    I’ve built a cut-down toolchain and provided a corresponding test app which exercises this at the following location:

    https://tzarc.io/vgdb/

     

    Do note that the project settings points at the custom “$(ToolchainDir)\toolchain.cmake” file, in case you want to use it with your own projects for testing.

    #20308
    support
    Keymaster

    H,

    Thanks for the repro. It looks like your toolchain fine sets the CXX executable in a way that confuses CMake. Please try moving the compiler arguments into a separate CMAKE_CXX_FLAGS statement:

    set(ENV{CXX} "arm-vgdbtest-linux-gnueabi-g++" CACHE STRING "" FORCE)
    set(CMAKE_CXX_FLAGS "-march=armv7ve -marm -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=$ENV{SDKTARGETSYSROOT}" CACHE STRING "" FORCE)
Viewing 4 posts - 16 through 19 (of 19 total)
  • You must be logged in to reply to this topic.