mirror of
https://github.com/reactos/CMake.git
synced 2024-12-05 10:16:50 +00:00
3151024d24
Commit v3.0.0-rc1~111^2 (QNX: Introduce QCC compiler id for that QNX platform compiler., 2014-01-20) split handling of the QNX QCC compiler into a separate compiler-id. That refactoring results in the QCC compiler not using the CMake-compiler-id "GNU", which means that the __compiler_gnu macro is no longer executed for it. Add Compiler/QCC*.cmake modules to define and call the __compiler_qcc macro and teach it to call __compiler_gnu internally. Remove the corresponding pieces from the Platform/QNX*.cmake modules. It is also necessary to change the language conditional to dereference the lang macro parameter, which is another bug introduced by the same commit. The extra -lang-c++ flag is only necessary when the CXX compiler is specified as 'qcc' instead of 'QCC' in the toolchain file, which is why this bug was not noticed before. The flag is also necessary in that case when linking in order to find the appropriate standard libraries. The flag was not previously added when linking executables, so linking failed even with CMake 2.8.12 with the lower-case compiler-id. Co-Author: Brad King <brad.king@kitware.com>
20 lines
655 B
CMake
20 lines
655 B
CMake
set(QNXNTO 1)
|
|
|
|
include(Platform/GNU)
|
|
unset(CMAKE_LIBRARY_ARCHITECTURE_REGEX)
|
|
|
|
set(CMAKE_DL_LIBS "")
|
|
|
|
# Shared libraries with no builtin soname may not be linked safely by
|
|
# specifying the file path.
|
|
set(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
|
|
|
|
# Initialize C link type selection flags. These flags are used when
|
|
# building a shared library, shared module, or executable that links
|
|
# to other libraries to select whether to use the static or shared
|
|
# versions of the libraries.
|
|
foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
|
|
set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
|
|
set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
|
|
endforeach()
|