diff options
author | Evan Lojewski <github@meklort.com> | 2020-09-25 21:53:25 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-25 21:53:25 -0600 |
commit | 73cce61fa7b1eef1564315801cc7cdb8c36cb527 (patch) | |
tree | 34585781de452686a4200b32234498138fd4dae8 | |
parent | 42bf8858f059a02c1679150ccbef6c48d0b479f0 (diff) | |
download | bcm5719-ortega-73cce61fa7b1eef1564315801cc7cdb8c36cb527.tar.gz bcm5719-ortega-73cce61fa7b1eef1564315801cc7cdb8c36cb527.zip |
build: Cleanup build warnings related to assembler files. (#117)
-rw-r--r-- | cmake/arm.cmake | 6 | ||||
-rw-r--r-- | cmake/mips.cmake | 2 | ||||
-rw-r--r-- | cmake/version.cmake | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/cmake/arm.cmake b/cmake/arm.cmake index 7cbad40..29bf3a8 100644 --- a/cmake/arm.cmake +++ b/cmake/arm.cmake @@ -43,15 +43,15 @@ ################################################################################ SET(ARM_COMPILE_OPTIONS -nostdlib -nodefaultlibs - $<$<NOT:$<COMPILE_LANGUAGE:ASM>>:-fomit-frame-pointer> # Don't include for ASM sources - $<$<NOT:$<COMPILE_LANGUAGE:ASM>>:-fno-builtin> # Don't include for ASM sources + -fomit-frame-pointer + -fno-builtin -target thumbv7-none-eabi -mcpu=cortex-m3 -mfloat-abi=soft) SET(ARM_LINK_OPTIONS --gc-sections) # SET(CMAKE_EXE_LINKER_FLAGS -static) # ASM files SET(CMAKE_INCLUDE_FLAG_ASM "-I") -SET(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>") +SET(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>") SET(CMAKE_arm_LINK_EXECUTABLE "${COMPILER_BASE}/bin/ld.lld <OBJECTS> <LINK_LIBRARIES> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> -Bstatic -o <TARGET>") diff --git a/cmake/mips.cmake b/cmake/mips.cmake index b46d47f..2aaea77 100644 --- a/cmake/mips.cmake +++ b/cmake/mips.cmake @@ -48,7 +48,7 @@ SET(MIPS_LINK_OPTIONS --gc-sections) # ASM files SET(CMAKE_INCLUDE_FLAG_ASM "-I") -SET(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>") +SET(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>") SET(CMAKE_mips_LINK_EXECUTABLE "${COMPILER_BASE}/bin/ld.lld <OBJECTS> <LINK_LIBRARIES> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> -Bstatic -o <TARGET>") diff --git a/cmake/version.cmake b/cmake/version.cmake index ad7a639..54ed3cf 100644 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -58,14 +58,14 @@ IF(EXISTS ${VERSION_FILE}) LIST(GET FULL_VERSION 2 VERSION_PATCH) ELSE() # Within a git repository - EXECUTE_PROCESS(COMMAND git rev-list --count HEAD + EXECUTE_PROCESS(COMMAND git rev-list --count HEAD OUTPUT_VARIABLE VERSION_PATCH OUTPUT_STRIP_TRAILING_WHITESPACE) ENDIF() SET(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") -add_definitions( +add_compile_options( -DVERSION_MAJOR=${VERSION_MAJOR} -DVERSION_MINOR=${VERSION_MINOR} -DVERSION_PATCH=${VERSION_PATCH} |