Linux: Don't always enable the CPU checker
When building a non portable build or when not using the precompiled libraries, do not enable the CPU checker. Make the cmake configure step error out when building with WITH_STRICT_BUILD_OPTIONS if the LIBDIR can not be found. Pull Request: https://projects.blender.org/blender/blender/pulls/118519
This commit is contained in:
parent
43f45f3986
commit
203d3e0d40
|
@ -38,14 +38,30 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT (EXISTS ${LIBDIR}))
|
if(NOT (EXISTS ${LIBDIR}))
|
||||||
|
if(WITH_STRICT_BUILD_OPTIONS)
|
||||||
|
message(SEND_ERROR
|
||||||
|
"Unable to find LIBDIR: ${LIBDIR}. "
|
||||||
|
"WITH_LIBS_PRECOMPILED needs to be able to find the LIBDIR for the precompiled libraries."
|
||||||
|
)
|
||||||
|
else()
|
||||||
message(STATUS
|
message(STATUS
|
||||||
"Unable to find LIBDIR: ${LIBDIR}, system libraries may be used "
|
"Unable to find LIBDIR: ${LIBDIR}. system libraries may be used "
|
||||||
"(disable WITH_LIBS_PRECOMPILED to suppress this message)."
|
"(disable WITH_LIBS_PRECOMPILED to suppress this message)."
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
unset(LIBDIR)
|
unset(LIBDIR)
|
||||||
|
set(WITH_LIBS_PRECOMPILED OFF)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Disable the CPU check if not portable or if we are not using the pre-compiled libs.
|
||||||
|
# This is because:
|
||||||
|
# 1. We don't install the CPU check library on a non portable build.
|
||||||
|
# 2. We assume that people know what systems they are targeting when they build a non
|
||||||
|
# portable build or when not using our precompiled libs.
|
||||||
|
set_and_warn_dependency(WITH_INSTALL_PORTABLE WITH_CPU_CHECK OFF)
|
||||||
|
set_and_warn_dependency(WITH_LIBS_PRECOMPILED WITH_CPU_CHECK OFF)
|
||||||
|
|
||||||
# Support restoring this value once pre-compiled libraries have been handled.
|
# Support restoring this value once pre-compiled libraries have been handled.
|
||||||
set(WITH_STATIC_LIBS_INIT ${WITH_STATIC_LIBS})
|
set(WITH_STATIC_LIBS_INIT ${WITH_STATIC_LIBS})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue