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(CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_COMPILER_IS_GNUCC) | |||||
campbellbarton: Missing version checks, even though `GCC-9.3` is documented as the minimum version. This is… | |||||
| string(APPEND PLATFORM_CFLAGS " -ffile-prefix-map=\"${CMAKE_SOURCE_DIR}/\"=\"\"") | |||||
campbellbartonUnsubmitted 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… | |||||
campbellbartonUnsubmitted Done Inline ActionsNo need for 2x calls. campbellbarton: No need for 2x calls. | |||||
ankitmAuthorUnsubmitted 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. | |||||
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. | |||||
| string(APPEND PLATFORM_CFLAGS " -ffile-prefix-map=\"${CMAKE_BINARY_DIR}/\"=\"\"") | |||||
| 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() | ||||
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… | |||||
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.