QCC.cmake 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. include(Compiler/GNU)
  4. macro(__compiler_qcc lang)
  5. __compiler_gnu(${lang})
  6. # http://www.qnx.com/developers/docs/6.4.0/neutrino/utilities/q/qcc.html#examples
  7. set(CMAKE_${lang}_COMPILE_OPTIONS_TARGET "-V")
  8. set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-Wp,-isystem,")
  9. set(CMAKE_DEPFILE_FLAGS_${lang} "-Wp,-MD,<DEPFILE> -Wp,-MT,<OBJECT> -Wp,-MF,<DEPFILE>")
  10. set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Wl,")
  11. set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP ",")
  12. set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE NO)
  13. set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO)
  14. set(CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "${CMAKE_${lang}_COMPILER}")
  15. if(CMAKE_${lang}_COMPILER_ARG1)
  16. separate_arguments(_COMPILER_ARGS NATIVE_COMMAND "${CMAKE_${lang}_COMPILER_ARG1}")
  17. list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND ${_COMPILER_ARGS})
  18. unset(_COMPILER_ARGS)
  19. endif()
  20. list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-Wp,-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
  21. unset(CMAKE_${lang}_COMPILE_OPTIONS_IPO)
  22. unset(CMAKE_${lang}_ARCHIVE_CREATE_IPO)
  23. unset(CMAKE_${lang}_ARCHIVE_APPEND_IPO)
  24. unset(CMAKE_${lang}_ARCHIVE_FINISH_IPO)
  25. endmacro()