Re: [CMake] Build flags not applied during compiler testing on Ubuntu

2018-08-30 Thread Richard Shaw
On Mon, Aug 27, 2018 at 12:43 PM Brad King wrote: > On 08/25/2018 05:48 PM, Richard Shaw wrote: > > set(CMAKE_EXE_LINKER_FLAGS "-T${CMAKE_SOURCE_DIR}/stm32_flash.ld") > > > > The build dir is the binary directory, not the source directory... > > Toolchain files cannot reference variables like

Re: [CMake] Build flags not applied during compiler testing on Ubuntu

2018-08-27 Thread Brad King
On 08/25/2018 05:48 PM, Richard Shaw wrote: > set(CMAKE_EXE_LINKER_FLAGS "-T${CMAKE_SOURCE_DIR}/stm32_flash.ld") > > The build dir is the binary directory, not the source directory... Toolchain files cannot reference variables like CMAKE_SOURCE_DIR that depend on the source and build tree

Re: [CMake] Build flags not applied during compiler testing on Ubuntu

2018-08-25 Thread Richard Shaw
On Thu, Aug 23, 2018 at 11:58 AM Brad King wrote: > On 08/22/2018 04:23 PM, Richard Shaw wrote: > > Meanwhile you can use just > > set(CMAKE_EXECUTABLE_SUFFIX ".elf") > Ok, interestingly that had no effect, but if I moved the set(CMAKE_EXECUTABLE_SUFFIX_) to the main CMakeFiles.txt file below

Re: [CMake] Build flags not applied during compiler testing on Ubuntu

2018-08-23 Thread Brad King
On 08/22/2018 04:23 PM, Richard Shaw wrote: > Here's the contents: > > set(CMAKE_EXECUTABLE_SUFFIX_C ".elf") > set(CMAKE_EXECUTABLE_SUFFIX_CXX ".elf") > set(CMAKE_EXECUTABLE_SUFFIX_ASM ".elf") [snip] On 08/22/2018 05:05 PM, Richard Shaw wrote: > One step closer: > ...me forcing the binary output

Re: [CMake] Build flags not applied during compiler testing on Ubuntu

2018-08-22 Thread Brad King
On 08/22/2018 04:23 PM, Richard Shaw wrote: > Currently I'm using an "include" of the toolchain file prior to calling > "project" since 100% of development happens on a PC instead of having > to pass the CMAKE_TOOLCHAIN_FILE option every time. CMAKE_TOOLCHAIN_FILE must be used in order to be

Re: [CMake] Build flags not applied during compiler testing on Ubuntu

2018-08-22 Thread Richard Shaw
On Wed, Aug 22, 2018 at 3:02 PM Brad King wrote: > On 08/22/2018 03:49 PM, Richard Shaw wrote: > > Initially I tried setting the flags before invoking "project" and that > seemed > > to be enough for Fedora. I've tried other things as well that I've > probably > > forgotten but one other method

Re: [CMake] Build flags not applied during compiler testing on Ubuntu

2018-08-22 Thread Brad King
On 08/22/2018 03:49 PM, Richard Shaw wrote: > Initially I tried setting the flags before invoking "project" and that seemed > to be enough for Fedora. I've tried other things as well that I've probably > forgotten but one other method I tried was: > > set(CMAKE_REQUIRED_DEFINITIONS

Re: [CMake] Build flags not applied during compiler testing on Ubuntu

2018-08-22 Thread Richard Shaw
On Wed, Aug 22, 2018 at 1:51 PM Brad King wrote: > On 08/21/2018 03:18 PM, Richard Shaw wrote: > > without --specs=nosys.specs applied during compiler testing, cmake fails. > > How is this flag specified when invoking CMake? > Initially I tried setting the flags before invoking "project" and

Re: [CMake] Build flags not applied during compiler testing on Ubuntu

2018-08-22 Thread Brad King
On 08/21/2018 03:18 PM, Richard Shaw wrote: > without --specs=nosys.specs applied during compiler testing, cmake fails. How is this flag specified when invoking CMake? > https://bugs.launchpad.net/ubuntu/+source/cmake/+bug/1787723 According to that discussion it works on Fedora but not on