Now it works for everything. Perhaps it is time to know if it survives the night?
0 Compiler warnings
Test project /home/nightly/IAR_tests_local/CMake-build
Guessing configuration NoConfig
Start 646: RunCMake.IAR
1/1 Test #646: RunCMake.IAR ..................... Passed 9.41 sec
100% tests passed, 0 tests failed out of 1
Label Time Summary:
CMake = 9.41 sec*proc (1 test)
IAR = 9.41 sec*proc (1 test)
run = 9.41 sec*proc (1 test)
Total Test time (real) = 9.44 sec
Thanks for your help!
@brad.king thanks. My apologies: the ${TOOLKIT_DIR}
variable will actually expand to /opt/iarsystems/bxavr-8.10.1/avr
which means that the corrections to the RunCMake.cmake
needs to refer the subdirectory immediately below that level. In practice this means:
if(ARCH STREQUAL "avr")
string(CONCAT LINK_OPTS
"-I${TOOLKIT_DIR}/lib "
"-f ${TOOLKIT_DIR}/src/template/lnk3s.xcl "
)
I can trigger the local testing once more. Let me know.
Please change to:
# Sets the minimal requirements for linking each target architecture
if(ARCH STREQUAL avr)
set(LINK_OPTS
"-I${TOOLKIT_DIR}/../lib
-f ${TOOLKIT_DIR}/../src/template/lnk3s.xcl")
elseif(ARCH STREQUAL rl78)
set(LINK_OPTS
"--config_def _STACK_SIZE=256 \
--config_def _NEAR_HEAP_SIZE=0x400 \
--config_def _FAR_HEAP_SIZE=4096 \
--config_def _HUGE_HEAP_SIZE=0 \
--config_def _NEAR_CONST_LOCATION_START=0x2000 \
--config_def _NEAR_CONST_LOCATION_SIZE=0x6F00 \
--define_symbol _NEAR_CONST_LOCATION=0 \
--config ${TOOLKIT_DIR}/config/lnkrl78_s3.icf" )
else()
set(LINK_OPTS "")
endif()
@brad.king thanks. Now almost all architectures under test passed except for the Microchip AVR architecture due explicit linker configuration requirements. I commented suggesting code changes that should work as default linker configuration for AVR.
@brad.king thanks for properly extending these tests. I've run it locally using CDash and it FAILED mostly because these source files were using IAR extended keywords such as __root
, which requires -e
to compile:
-- iar-c - PASSED
CMake Error at /home/nightly/IAR_tests_local/CMake/Tests/RunCMake/RunCMake.cmake:281 (message):
iar-c-build - FAILED:
Result is [2], not [0].
stderr does not match that expected.
Command was:
command> "/home/nightly/IAR_tests_local/CMake-build/bin/cmake" "--build" "."
Actual stdout:
actual-stdout> [ 50%] Building C object CMakeFiles/exec-c.dir/module.o
Expected stderr to match:
expect-stderr> ^$
Actual stderr:
actual-stderr>
actual-stderr> __root int i;
actual-stderr> ^
actual-stderr> "/home/nightly/IAR_tests_local/CMake/Tests/RunCMake/IAR/module.c",5 Warning[Pa031]:
actual-stderr> IAR keyword "__root" used with IAR extended language disabled
actual-stderr>
actual-stderr> __root int i;
actual-stderr> ^
actual-stderr> "/home/nightly/IAR_tests_local/CMake/Tests/RunCMake/IAR/module.c",5 Error[Pe077]:
actual-stderr> this declaration has no storage class or type specifier
actual-stderr>
actual-stderr> __root int i;
actual-stderr> ^
actual-stderr> "/home/nightly/IAR_tests_local/CMake/Tests/RunCMake/IAR/module.c",5 Error[Pe065]:
actual-stderr> expected a ";"
actual-stderr>
actual-stderr> __root int main()
actual-stderr> ^
actual-stderr> "/home/nightly/IAR_tests_local/CMake/Tests/RunCMake/IAR/module.c",6 Error[Pe077]:
actual-stderr> this declaration has no storage class or type specifier
actual-stderr>
actual-stderr> __root int main()
actual-stderr> ^
actual-stderr> "/home/nightly/IAR_tests_local/CMake/Tests/RunCMake/IAR/module.c",6 Error[Pe065]:
actual-stderr> expected a ";"
actual-stderr> At end of source Warning[Pe012]: parsing restarts here after previous syntax
actual-stderr> error
actual-stderr> gmake[2]: *** [CMakeFiles/exec-c.dir/build.make:75: CMakeFiles/exec-c.dir/module.o] Error 2
actual-stderr> gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/exec-c.dir/all] Error 2
actual-stderr> gmake: *** [Makefile:91: all] Error 2
Call Stack (most recent call first):
/home/nightly/IAR_tests_local/CMake/Tests/RunCMake/RunCMake.cmake:289 (run_cmake)
/home/nightly/IAR_tests_local/CMake/Tests/RunCMake/IAR/RunCMakeTest.cmake:15 (run_cmake_command)
/home/nightly/IAR_tests_local/CMake/Tests/RunCMake/IAR/RunCMakeTest.cmake:45 (run_toolchain)
I suggest one of the following options:
a) set the extended flag on the corresponding target_compile_options(... $<COMPILE_LANGUAGE:C,CXX>:-e>)
-or-
b) use compiler's pragmas:
#pragma language=save
#pragma language=extended
/* C with IAR extensions */
#pragma language=restore
/* Standard C */
Will do. Thanks.
Thanks for your detailed guidance, @brad.king. The submitted results can be found here: https://open.cdash.org/viewSite.php?siteid=121530
Thanks for fixing that, @brad.king. I refreshed my local branch to match #37e44707.
From my end, I believe we are ready for stage. Let me know if there is any other action to be taken before that. Thanks.
Added set_property()
for filtering tests from the ctest
script.
Felipe Torrezan (960c896b) at 23 Oct 15:51
IAR: add initial RunCMake tests for Nightly
I amended the commit with !8909 (comment 1435142) and pushed. I do not have any other planned updates for !8909 (merged).
Felipe Torrezan (d982ec7e) at 23 Oct 15:48
IAR: add initial RunCMake tests for Nightly
Felipe Torrezan (861ff468) at 23 Oct 12:51
IAR: add initial RunCMake tests for Nightly
Thanks @brad.king. I will modify the globbing based on your instructions and run the Dashboard script from our end.
Felipe Torrezan (60436b16) at 23 Oct 10:53
IAR: add initial RunCMake tests for Nightly
Felipe Torrezan (a4a69eca) at 23 Oct 10:51
IAR: add initial RunCMake tests for Nightly
Felipe Torrezan (63f1cc79) at 23 Oct 10:50
IAR: add initial RunCMake tests for Nightly
Run the tests only if enabled explicitly by an undocumented cache entry. We will enable it on hosts known to have the toolchains.
Once accepted, IAR can publish the results to the CMake Dashboard from which Kitware also can make use of. We are initially looking into running Nightly using a Linux machine with the IAR Build Tools installed for the all the supported targets, namely: arm, avr, rh850, riscv, rl78 and rx.
Cc: @jlonnberg @micaelbo
Issue: #23308
Felipe Torrezan (19d28201) at 23 Oct 10:19
IAR: add initial RunCMake tests for Nightly