How do I configure cmake to work with rsp files when using IAR compiler - cmake

When using the IAR compiler I get an error when creating a library. This uses "iarchive.exe" in the IAR bin directory to create a library file.
The issue occurs when the number of object files exceeds the Windows10 command line limit (about 8000 bytes).
When the limit is exceeded CMake creates a ".rsp" file and the response file has a 3 bytes (Byte Order Mark) at the start of the file.
I am using a licensed version of the IAR compiler.
The tools are version 7.2.
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(IAR_INSTALL_DIR "C:/Program Files (x86)/IAR Systems/Embedded
Workbench 7.2")
architectures
set(TOOLKIT_DIR "${IAR_INSTALL_DIR}/${CMAKE_SYSTEM_PROCESSOR}")
if(UNIX)
set(ENV{PATH} "${TOOLKIT_DIR}/bin:$ENV{PATH}")
else()
set(ENV{PATH} "${TOOLKIT_DIR}/bin;$ENV{PATH}")
endif()
Compiler and Assembler
set(CMAKE_C_COMPILER "icc${CMAKE_SYSTEM_PROCESSOR}")
set(CMAKE_CXX_COMPILER "icc${CMAKE_SYSTEM_PROCESSOR}")
set(CMAKE_ASM_COMPILER "iasm${CMAKE_SYSTEM_PROCESSOR}")
SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 0)
To configure cmake
cmake -H.. -B. -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=..\iar-toolchain.cmake
I have also tried:
cmake -H.. -B. -G "NMake Makefiles" -DCMAKE_TOOLCHAIN_FILE=..\iar-toolchain.cmake
Below is the error message generated during the build.
C:\Firmware\SRFN\build>cmake --build . --target SrfnDcu
[1/20] Linking C static library Debug\libpsp_dcu_k64f120m.a
FAILED: Debug/libpsp_dcu_k64f120m.a
cmd.exe /C "cd . && C:\PROGRA~2\IARSYS~1\EMBEDD~1.2\arm\bin\iarchive.exe Debug\libpsp_dcu_k64f120m.a --create -f CMakeFiles\psp_dcu_k64f120m.Debug.rsp && cd ."
Fatal error[La001]: could not open file "C:\Firmware\SRFN\build\CMakeFiles\p
sp_dcu_k64f120m.dir\Debug\DCU\OS\mqx\source\psp\cortex_m\compiler\iar
\comp.c.o"
Fatal error detected, aborting.
One solution to the problem was to use a newer version of "iarchive.exe" that was in IAR Version 8.2.
Basically is seems that IAR updated "iarchive.exe" to support this.

Related

How to build the psa-arch-tests with the cmake and armclang in the cygwin?

After Installing several softwares for building the compilation environment according to the Software Requirements Document which is in the "https://github.com/ARM-software/psa-arch-tests/blob/master/api-tests/docs/sw_requirements.md", when I compiled the source code psa-arch-tests of PSA API compliance test suite, the cygwin prompted the following error result:
luofeng66ok#DESKTOP ~/TFMB/psa-arch-tests/api-tests/build
$ cmake ../ -G"Unix Makefiles" -DTOOLCHAIN=ARMCLANG -DTARGET=tgt_dev_apis_tfm_an521 -DCPU_ARCH=armv8m_ml -DSUITE=CRYPTO -DPSA_INCLUDE_PATHS="/cygdrive/c/cygwin64/home/anpengfei/TFMB/trusted-firmware-m/interface/include/psa/crypto.h"
-- The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/cygwin64/home/luofeng66ok/TFMB/psa-arch-tests/api-tests/BUILD/CMakeF
iles/CMakeOutput.log".
See also "C:/cygwin64/home/luofeng66ok/TFMB/psa-arch-tests/api-tests/BUILD/CMakeF
iles/CMakeError.log".
How to resolve this error?
CMakeError.log contains:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/cygwin64/bin/cc
Build flags:
Id flags:
The output was:
拒绝访问。
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: C:/cygwin64/bin/cc
Build flags:
Id flags: -c
The output was:
拒绝访问。
......
My installed software are:
Host Operating System: Windows 10 64bit
Scripting tools:
luofeng66ok#DESKTOP-STB70QG ~/TFMB/psa-arch-tests/api-tests/build
$ Python --version
Python 3.7.0
Cross Compiler toolchain :
luofeng66ok#DESKTOP-STB70QG ~/TFMB/psa-arch-tests/api-tests/build
$ armclang --version
Product: MDK Plus 5.29
Component: ARM Compiler 6.13.1
Tool: armclang [5d895d00]
Target: unspecified-arm-none-unspecified
Build tools :
luofeng66ok#DESKTOP-STB70QG ~/TFMB/psa-arch-tests/api-tests/build
$ cmake --version
cmake version 3.10.0-rc1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
$ cygcheck --version
cygcheck (cygwin) 3.1.4
and I have imported Arm Compiler in my environment variable,
At the same time, I also imported Arm Compiler by this way:
C:\cygwin64\home\luofeng66ok\.bashrc:
export PATH=/cygdrive/c/Keil/ARM/ARMCLANG/bin:$PATH
export PATH=/cygdrive/c/cmake/bin:$PATH
export PATH=/cygdrive/c/armgcc/bin:$PATH
My steps for building psa-arch-tests are:
git clone https://github.com/ARM-software/psa-arch-tests.git
git clone https://github.com/laurencelundblade/QCBOR.git (I do not why do this)
cd <TF-M base folder>
git clone https://git.trustedfirmware.org/trusted-firmware-m.git
git clone https://github.com/ARMmbed/mbed-crypto.git -b mbedcrypto-3.0.1
git clone https://github.com/ARM-software/CMSIS_5.git -b 5.5.0
git-lfs
My directory tfmb contains:
luofeng66ok#DESKTOP-STB70QG ~/tfmb
$ ls
CMSIS_5 mbed-crypto psa-arch-tests trusted-firmware-m
Start compiling psa-arch-tests
cd api-tests
mkdir BUILD
cd BUILD
cmake ../ -G"Unix Makefiles" -DTOOLCHAIN=ARMCLANG -DTARGET=tgt_dev_apis_tfm_an521 -DCPU_ARCH=armv8m_ml -DSUITE=CRYPTO -DPSA_INCLUDE_PATHS="/cygdrive/c/cygwin64/home/anpengfei/TFMB/trusted-firmware-m/interface/include/psa/crypto.h"
as the errors above shows in my cygwin, I do not why?
luofeng66ok#DESKTOP-STB70QG ~/TFMB/psa-arch-tests/api-tests/build
$ cmake ../ -G"Unix Makefiles" -DTOOLCHAIN=ARMCLANG -DTARGET=tgt_dev_apis_tfm_an521 -DCPU_ARCH=armv8m_ml -DSUITE=CRYPTO -DPSA_INCLUDE_PATHS="/cygdrive/c/cygwin64/home/anpengfei/TFMB/trusted-firmware-m/interface/include/psa/crypto.h"
-- The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/cygwin64/home/luofeng66ok/TFMB/psa-arch-tests/api-tests/BUILD/CMakeF
iles/CMakeOutput.log".
See also "C:/cygwin64/home/luofeng66ok/TFMB/psa-arch-tests/api-tests/BUILD/CMakeF
iles/CMakeError.log".

Simple test output - CMake Error: The source directory does not exist

When I create new project in Clion, cmake cannot find CMakeTmp directory.
Run Build Command(s):/usr/bin/cmake cmTC_df723/fast && No such file or directory
OS: Linux Mint 19 (Ubuntu based)
I have tried:
reinstalling gcc (now on version 8.3.0)
reinstalling cmake (now on version 3.15.2)
unset TMP from (CMake cannot compile test program as source directory doesnt exist)
set(CMAKE_C_COMPILER gcc)
set(CMAKE_SYSTEM_NAME Linux)
checked permissions to ClionProject subdirectories
Error output:
/usr/local/bin/cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=/usr/bin/cmake -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/c++ -DCMAKE_C_COMPILER=/usr/bin/gcc -G "CodeBlocks - Unix Makefiles" /home/sacha/CLionProjects/testProject
-- The C compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/gcc
CMake Error: Generator: execution of make failed. Make command was: /usr/bin/cmake cmTC_df723/fast &&
-- Check for working C compiler: /usr/bin/gcc -- broken
CMake Error at /usr/local/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"/usr/bin/gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/sacha/CLionProjects/testProject/cmake-build-release-system/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/cmake cmTC_df723/fast && No such file or directory
Generator: execution of make failed. Make command was: /usr/bin/cmake cmTC_df723/fast &&
Any help or directions appreciated, thanks!
The error message
CMake Error: Generator: execution of make failed.
signals, that something wrong with CMake settings or its generator.
In the given case you have additional message
Make command was: /usr/bin/cmake cmTC_df723/fast &&
which means that cmake is run as a Make command.
This is wrong: cmake and make commands are not interchangeable.
Would you inspect the very first command line, you will find the source of that problem:
-DCMAKE_MAKE_PROGRAM=/usr/bin/cmake
Exactly it sets cmake executable for Make command. You need to fix that line (e.g. in CLion settings).

STM32 Project with CMake

I am trying to create and compile an ARM-based STM32 project using CMake.
CMakeLsts.txt is the following:
cmake_minimum_required(VERSION 3.7)
SET(CMAKE_SYSTEM_NAME Generic)
SET(CMAKE_SYSTEM_VERSION 1)
# Enable logging messages
#set(CMAKE_VERBOSE_MAKEFILE ON)
# Project name
set(PROJECT_NAME FixtureTACO)
PROJECT(${PROJECT_NAME} C CXX ASM)
SET(CMAKE_CXX_STANDARD 11)
###################### CHIP CONFIGURATION ##########################
SET(ROOT_PROJ ${CMAKE_CURRENT_SOURCE_DIR})
SET(CPU "cortex-m4")
SET(ARCH_NAME "arm")
SET(ARCH_VER "v7e-m")
SET(FAMILY "stm32f3")
SET(CHIP "STM32F303xC")
SET(ARCH "${ARCH_NAME}${ARCH_VER}")
####################################################################
# MCU Config
set(FPU "-mfpu=fpv4-sp-d16")
set(FLOAT_ABI "-mfloat-abi=hard")
# Toolchain path
set(TOOLCHAIN_PATH "")
set(ARM_LIB "/usr/lib/arm-none-eabi/lib/${ARCH}")
# Specify C, C++ and ASM compilers
SET(CMAKE_C_COMPILER ${TOOLCHAIN_PATH}arm-none-eabi-gcc)
SET(CMAKE_CXX_COMPILER ${TOOLCHAIN_PATH}arm-none-eabi-g++)
set(AS ${TOOLCHAIN_PATH}arm-none-eabi-as)
set(AR ${TOOLCHAIN_PATH}arm-none-eabi-ar)
set(OBJCOPY ${TOOLCHAIN_PATH}arm-none-eabi-objcopy)
set(OBJDUMP ${TOOLCHAIN_PATH}arm-none-eabi-objdump)
set(SIZE ${TOOLCHAIN_PATH}arm-none-eabi-size)
set(GDB ${TOOLCHAIN_PATH}arm-none-eabi-gdb)
set(SIZE ${TOOLCHAIN_PATH}arm-none-eabi-size)
# Definitions passed at compile time (#defines)
add_definitions(-DFAMILY=${FAMILY})
add_definitions(-DCHIP=${CHIP})
add_definitions(-D${CHIP})
add_definitions(-DUSE_FULL_LL_DRIVER)
add_definitions(-USE_HAL_DRIVER)
add_definitions(-DHSE_VALUE=8000000)
add_definitions(-DHSE_STARTUP_TIMEOUT=100)
add_definitions(-DLSE_STARTUP_TIMEOUT=5000)
add_definitions(-DLSE_VALUE=32768)
add_definitions(-DHSI_VALUE=8000000)
add_definitions(-DLSI_VALUE=40000)
add_definitions(-DDD_VALUE=3300)
add_definitions(-DPREFETCH_ENABLE=1)
# Compilation flags
add_compile_options(-mcpu=${CPU})
add_compile_options(-march=${ARCH})
add_compile_options(-mthumb)
add_compile_options(${FPU})
add_compile_options(${FLOAT_ABI})
add_compile_options(-Og)
add_compile_options(-Wall)
add_compile_options(-fdata-sections)
add_compile_options(-ffunction-sections)
# Only for debugging
add_compile_options(-g -gdwarf-2)
# Linker script path
file(GLOB_RECURSE LINKER_SCRIPT ${ROOT_PROJ}/platforms/${FAMILY}/Linker/*.ld)
# Variables initialized first time
SET(CMAKE_CXX_FLAGS_INIT "-std=c++11")
SET(CMAKE_C_FLAGS_INIT "-std=gnu99")
################################## Source code ###############################################################
# Retrieve all sources # "platforms/${FAMILY}/Startup/*.s"
file(GLOB SOURCES "platforms/${FAMILY}/Startup/*.s" "src/*.cpp" "src/*.c" "platforms/${FAMILY}/Hal/src/*.c" "platforms/${FAMILY}/Device/*.c")
#Retrieve all locations of headers
file(GLOB_RECURSE HEADERS "includes/*.h" "src/*.h" "platforms/${FAMILY}*.h")
set (INCLUDE_DIRS "")
foreach (_headerFile ${HEADERS})
get_filename_component(_dir ${_headerFile} PATH)
list (APPEND INCLUDE_DIRS ${_dir})
endforeach()
list(REMOVE_DUPLICATES INCLUDE_DIRS)
include_directories(${INCLUDE_DIRS})
link_directories(${ARM_LIB})
################################## Source code END ###########################################################
set(EXE_NAME "${PROJECT_NAME}_${CHIP}")
add_executable(${EXE_NAME}.elf ${SOURCES} ${LINKER_SCRIPT})
set(CMAKE_EXE_LINKER_FLAGS "-mcpu=${CPU} -mthumb ${FPU} ${FLOAT_ABI} --specs=nano.specs -T${LINKER_SCRIPT} -Wl,-Map=${PROJECT_BINARY_DIR}/${PROJECT_NAME}.map,--cref -Wl,--gc-sections")
# Libs and external dependencies
target_link_libraries(${EXE_NAME}.elf -lc -lm -lnosys)
# Outputs
set(ELF_FILE ${PROJECT_BINARY_DIR}/${EXE_NAME}.elf)
set(HEX_FILE ${PROJECT_BINARY_DIR}/${EXE_NAME}.hex)
set(BIN_FILE ${PROJECT_BINARY_DIR}/${EXE_NAME}.bin)
add_custom_command(TARGET "${EXE_NAME}.elf" POST_BUILD
# Build .hex and .bin files
COMMAND ${OBJCOPY} -Obinary ${ELF_FILE} ${BIN_FILE}
COMMAND ${OBJCOPY} -Oihex ${ELF_FILE} ${HEX_FILE}
COMMENT "Building ${PROJECT_NAME}.bin and ${PROJECT_NAME}.hex"
# Copy files to a custom build directory
COMMAND ${CMAKE_COMMAND} -E copy ${ELF_FILE} "${ROOT_PROJ}/builds/${CHIP}/${EXE_NAME}.elf"
COMMAND ${CMAKE_COMMAND} -E copy ${HEX_FILE} "${ROOT_PROJ}/builds/${CHIP}/${EXE_NAME}.hex"
COMMAND ${CMAKE_COMMAND} -E copy ${BIN_FILE} "${ROOT_PROJ}/builds/${CHIP}/${EXE_NAME}.bin"
# Display sizes
COMMAND ${SIZE} --format=berkeley ${EXE_NAME}.elf ${EXE_NAME}.hex
COMMENT "Invoking: Cross ARM GNU Print Size"
)
add_custom_target(UPLOAD
${GDB} -iex "target remote tcp:127.0.0.1:3333"
-iex "monitor program ${EXE_NAME}.elf"
-iex "monitor reset init"
-iex "disconnect" -iex "quit ")
When I try to compile I am getting the following errors:
[ 82%] Building C object CMakeFiles/FixtureTACO_STM32F303xC.elf.dir/platforms/stm32f3/Hal/src/stm32f3xx_ll_utils.c.obj
[ 86%] Building ASM object CMakeFiles/FixtureTACO_STM32F303xC.elf.dir/platforms/stm32f3/Startup/startup_stm32f303xc.s.obj
cc: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
cc: error: unrecognized command line option ‘-mthumb’; did you mean ‘-mtbm’?
cc: error: unrecognized command line option ‘-mfpu=fpv4-sp-d16’
cc: error: unrecognized command line option ‘-mfloat-abi=hard’
The error occurs ONLY when an assembly file (startup.s in this case) is present in source files and when FPU and FLOAR_ABI flags are present. As you can see, error occurs when startup_stm32f303xc.s is compiled.
I suspect that I am adding those flags in the wrong place but I have no clue where to add them in order to get it works.
Later edit: I already have installed arm 7 compiler on my ubuntu system. I can use it without specifying any path as it is already present in environment variables. I can compile without problems ARM code (from Makefiles) for other targets on machine. My problem is with cmake.
In your line set(TOOLCHAIN_PATH "") you must add a path to compiler. First go to get your free GCC ARM ToolChain. Download for your OS. and then just copy to your favorite location. If you using Linux you can use my path configurations:
1.) Copy gcc arm compirel to /opt/ directory:
sudo tar xjfv ~/Downloads/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2 -C /opt/
For more "sexy" path you can do symbolic link:
sudo ln -s /opt/gcc-arm-none-eabi-7-2018-q2-update/ /opt/gcc-arm-none-eabi
After that go to your CMakeLists.txt and rewrite your set command to:
set(TOOLCHAIN_PATH "/opt/gcc-arm-none-eabi/bin")
But there is better solution to build your project for STM32, but with already done stm32-cmake template project, specifically made for STM32 family. It is mush easier done with something working. You will also need two prerequisites STM32CubeMX installed and again GCC ARM ToolChain. If you want to know how to use this template just DM me and I will you give a quick guidance.
OK, I finally managed to figure it out!
I had to replace
set(AS ${TOOLCHAIN_PATH}arm-none-eabi-as)
with
set(CMAKE_ASM_COMPILER ${TOOLCHAIN_PATH}arm-none-eabi-gcc)
It is not a mistake, it is gcc compiler. You can also append these flags: -x assembler-with-cpp.
CMake didn't know about my custom ASM compiler so it was using default system ASM compiler unless I force it by writing CMAKE_ASM_COMPILER. Now the project is being build and works fine on microcontroller.
The other answers were ok, but had half of the solution. Only ASM filese were compiled with wrong compiler.
I think you try to compile code for ARM using x86 compiler. It will not work. You need to download the ARM toolchain and use the correct compiler.
-mcpu is depreciated in the x86 branch, but is not in the ARM branch
another options just not exist in the x86 compiler.

Use LLVM in a cmake build

I'm trying to build my own project that use LLVM. I downloaded the source code and the precompiled package on the official web site (last version).
http://releases.llvm.org/download.html
I downloaded :
LLVM source code
Clang for Windows (64-bit)
FYI, I don't build LLVM... only want to use it !
I followed the instruction here :
http://llvm.org/docs/CMake.html#embedding-llvm-in-your-project
in the section : "Embedding LLVM in your project"
So, I added this code :
find_package(LLVM REQUIRED CONFIG)
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
message("LLVM_INCLUDE_DIRS=${LLVM_INCLUDE_DIRS}")
message("LLVM_DEFINITIONS=${LLVM_DEFINITIONS}")
But I got several cmake error messages, here is my output :
-- Using LLVMConfig.cmake in: C:\\Luciad_src\\libs\\LLVM\\cmake\\modules
LLVM_INCLUDE_DIRS=
LLVM_DEFINITIONS=
CMake Error at C:/Luciad_src/libs/LLVM/cmake/modules/LLVM-Config.cmake:31 (list):
list sub-command REMOVE_ITEM requires two or more arguments.
Call Stack (most recent call first):
C:/Luciad_src/libs/LLVM/cmake/modules/LLVM-Config.cmake:256 (is_llvm_target_library)
components/query/CMakeLists.txt:15 (llvm_map_components_to_libnames)
Is there a problem with my script, or the packages I use ? Any idea ?
Thanks for your help
You can have the LLVM as binary or source package.
The binary package does not include CMake support. If you compare both installations (binary on the left, source after building and installing it on the right) you can see the difference:
LLVM-5.0.0-win64.exe
<=> llvm-5.0.1.src.tar.xz (build and installed)
So you need to build and install the source package first to get CMake support. On my Windows machine I needed a cmd shell with administrator rights, a Visual Studio installation, go to the downloaded and extracted sources and do:
> mkdir mybuilddir
> cd mybuilddir
> cmake ..
> cmake --build . --config Release --target INSTALL
If I now use your CMake example I get:
-- Found LLVM 5.0.1
-- Using LLVMConfig.cmake in: C:/Program Files (x86)/LLVM/lib/cmake/llvm
LLVM_INCLUDE_DIRS=C:/Program Files (x86)/LLVM/include
LLVM_DEFINITIONS=-DLLVM_BUILD_GLOBAL_ISEL -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -DUNICODE -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-- Configuring done

Verbose NMake Makefiles using CMake

I have been following instructions from the FAQ: Is there an option to produce more 'verbose' compiling?. I have now:
$ cat C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows.cmake
[...]
# uncomment these out to debug nmake and borland makefiles
set(CMAKE_START_TEMP_FILE "")
set(CMAKE_END_TEMP_FILE "")
set(CMAKE_VERBOSE_MAKEFILE 1)
I then regenerate my project, and run nmake:
> cmake --version
cmake version 2.8.12.2
> cmake -G"NMake Makefiles" ..\project
> nmake VERBOSE=1
[...]
[ 73%] Building CXX object apps/foobar/CMakeFiles/bla.dir/my.cpp.obj
cd C:\Dashboards\MyTests\project-build-debug-vista32-nightly\apps\foobar
C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe #C:\Users\voxxl\AppData\Local\Temp\nm1362.tmp
Is there a way to have access to the full cl command line ?
On Windows (XP or greater), Command lines are limited in length to 8,191 bytes.
Windows compiler toolsets get around this by allowing the #filepath syntax on the command line.
So VERBOSE=1 is less useful on Windows. But you can always check command line in generated *.make files
For example (path used from question):
apps/foobar/CMakeFiles/bla.dir/build.make
apps/foobar/CMakeFiles/bla.dir/flags.make