diff options
author | Chris Wright <chris.wright@mqa.co.uk> | 2022-03-24 09:52:39 (GMT) |
---|---|---|
committer | Chris Wright <chris.wright@mqa.co.uk> | 2022-04-04 15:56:47 (GMT) |
commit | e9eabb0dcdb2fd8084135e02a1ad63047f8ae772 (patch) | |
tree | 89d5446f68cba13ab2eed308c21e6a493ddb95d7 /Modules/Compiler/ADSP.cmake | |
parent | 88b38f531adb90af752eb5af0f90eab0ee4343ae (diff) | |
download | CMake-e9eabb0dcdb2fd8084135e02a1ad63047f8ae772.zip CMake-e9eabb0dcdb2fd8084135e02a1ad63047f8ae772.tar.gz CMake-e9eabb0dcdb2fd8084135e02a1ad63047f8ae772.tar.bz2 |
ADSP: Configure compiler in compiler module
Diffstat (limited to 'Modules/Compiler/ADSP.cmake')
-rw-r--r-- | Modules/Compiler/ADSP.cmake | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Modules/Compiler/ADSP.cmake b/Modules/Compiler/ADSP.cmake new file mode 100644 index 0000000..2633997 --- /dev/null +++ b/Modules/Compiler/ADSP.cmake @@ -0,0 +1,26 @@ +include_guard() + +set(CMAKE_EXECUTABLE_SUFFIX ".dxe") + +macro(__compiler_adsp lang) + set(CMAKE_${lang}_OUTPUT_EXTENSION ".doj") + + set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-flags-link" " ") + set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP ",") + + set(_CMAKE_${lang}_ADSP_FLAGS "-proc=${CMAKE_SYSTEM_PROCESSOR}") + + set(CMAKE_${lang}_COMPILE_OBJECT + "<CMAKE_${lang}_COMPILER> ${_CMAKE_${lang}_ADSP_FLAGS} <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>") + + set(CMAKE_${lang}_CREATE_STATIC_LIBRARY + "<CMAKE_${lang}_COMPILER> ${_CMAKE_${lang}_ADSP_FLAGS} -build-lib -o <TARGET> <CMAKE_${lang}_LINK_FLAGS> <OBJECTS>") + + set(CMAKE_${lang}_LINK_EXECUTABLE + "<CMAKE_${lang}_COMPILER> ${_CMAKE_${lang}_ADSP_FLAGS} <FLAGS> <CMAKE_${lang}_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>") + + unset(_CMAKE_${lang}_ADSP_FLAGS) + + set(CMAKE_${lang}_CREATE_SHARED_LIBRARY) + set(CMAKE_${lang}_CREATE_MODULE_LIBRARY) +endmacro() |