Ensure that all the flags are really passed to CMake
This commit is contained in:
parent
793134d1ba
commit
a86c9a85c2
2 changed files with 14 additions and 5 deletions
14
setup.py
14
setup.py
|
@ -168,10 +168,16 @@ class BuildCMakeExt(build_ext):
|
|||
# Below is just an example set of arguments for building Blender as a Python module
|
||||
|
||||
compilers=[]
|
||||
if "CC" in os.environ:
|
||||
compilers.append('-DCMAKE_C_COMPILER=' + os.environ["CC"])
|
||||
if "CXX" in os.environ:
|
||||
compilers.append("-DCMAKE_CXX_COMPILER=" + os.environ["CXX"])
|
||||
fill_up_settings=[
|
||||
("CMAKE_C_COMPILER", "CC"),
|
||||
("CMAKE_CXX_COMPILER", "CXX"),
|
||||
("CMAKE_C_FLAGS", "CFLAGS"),
|
||||
("CMAKE_EXE_LINKER_FLAGS_INIT", "LDFLAGS"),
|
||||
("CMAKE_SHARED_LINKER_FLAGS_INIT", "LDFLAGS"),
|
||||
("CMAKE_MODULE_LINKER_FLAGS_INIT", "LDFLAGS")]
|
||||
for cmake_flag, os_flag:
|
||||
if os_flag in os.environ:
|
||||
compilers.append(f"-D{cmake_flag}={os.environ[os_flag]}")
|
||||
|
||||
self.spawn(['cmake', '-H'+SOURCE_DIR, '-B'+self.build_temp,
|
||||
'-DENABLE_OPENMP=ON','-DINTERNAL_BOOST=ON','-DINTERNAL_EIGEN=ON',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue