Changeset View
Changeset View
Standalone View
Standalone View
build_files/cmake/platform/platform_unix.cmake
| Show First 20 Lines • Show All 675 Lines • ▼ Show 20 Lines | |||||
| endif() | endif() | ||||
| # Avoid conflicts with Mesa llvmpipe, Luxrender, and other plug-ins that may | # Avoid conflicts with Mesa llvmpipe, Luxrender, and other plug-ins that may | ||||
| # use the same libraries as Blender with a different version or build options. | # use the same libraries as Blender with a different version or build options. | ||||
| set(PLATFORM_LINKFLAGS | set(PLATFORM_LINKFLAGS | ||||
| "${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'" | "${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'" | ||||
| ) | ) | ||||
| if(WITH_DEBUG_REL_PATHS) | |||||
campbellbarton: Missing version checks, even though `GCC-9.3` is documented as the minimum version. This is… | |||||
| if(CMAKE_C_COMPILER_VERSION VERSION_LESS 8.4) | |||||
Done Inline Actions*picky*, set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ...") is currently being done everywhere, adding it in one place makes the reader wonder why it's only used here, checking on this it was added in CMake 3.4x, which is fine since the minimum is 3.10. Prefer to move to string(APPEND, ...) in a separate refactor. campbellbarton: *picky*, `set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} ...")` is currently being done… | |||||
Done Inline ActionsNo need for 2x calls. campbellbarton: No need for 2x calls. | |||||
Done Inline ActionsThe single line had become too long. Hope this is correct. ankitm: The single line had become too long. Hope this is correct. | |||||
campbellbartonUnsubmitted Done Inline ActionsVersion checks should be paired with the compiler they're checking the version of. campbellbarton: Version checks should be paired with the compiler they're checking the version of. | |||||
| message_first_run(WARNING | |||||
| "-f{file/macro}-prefix-map flags are not supported by compiler" | |||||
| " ${CMAKE_C_COMPILER_ID} version ${CMAKE_C_COMPILER_VERSION}.") | |||||
| set(WITH_DEBUG_REL_PATHS OFF) | |||||
| else() | |||||
| set(PLATFORM_CFLAGS | |||||
| "${PLATFORM_CFLAGS} -ffile-prefix-map=\"${CMAKE_SOURCE_DIR}/\"=\"\" \ | |||||
| -ffile-prefix-map=\"${CMAKE_BINARY_DIR}/\"=\"\"") | |||||
campbellbartonUnsubmitted Done Inline ActionsThe white-space is being added in the command line, this can be done instead. set(PLATFORM_CFLAGS
"${PLATFORM_CFLAGS} \
-ffile-prefix-map=\"${CMAKE_SOURCE_DIR}/\"=\"\" \
-ffile-prefix-map=\"${CMAKE_BINARY_DIR}/\"=\"\"")campbellbarton: The white-space is being added in the command line, this can be done instead.
```
set… | |||||
| endif() | |||||
| endif() | |||||
| # Don't use position independent executable for portable install since file | # Don't use position independent executable for portable install since file | ||||
| # browsers can't properly detect blender as an executable then. Still enabled | # browsers can't properly detect blender as an executable then. Still enabled | ||||
| # for non-portable installs as typically used by Linux distributions. | # for non-portable installs as typically used by Linux distributions. | ||||
| if(WITH_INSTALL_PORTABLE) | if(WITH_INSTALL_PORTABLE) | ||||
| set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie") | set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie") | ||||
| endif() | endif() | ||||
Missing version checks, even though GCC-9.3 is documented as the minimum version. This is only for pre-compiled libraries, checks for older versions remain elsewhere. Unless we move to fail completely with older versions, a version check should be added here.