Ensure that all the flags are really passed to CMake
This commit is contained in:
parent
793134d1ba
commit
a86c9a85c2
@ -3,7 +3,7 @@ package:
|
||||
version: "1.2.3"
|
||||
|
||||
source:
|
||||
git_rev: 03033b6
|
||||
git_rev: 793134d
|
||||
git_url: https://bitbucket.org/glavaux/cosmotool
|
||||
|
||||
requirements:
|
||||
@ -14,6 +14,8 @@ requirements:
|
||||
- numpy # [build_platform != target_platform]
|
||||
- {{ compiler('c') }}
|
||||
- {{ compiler('cxx') }}
|
||||
- llvm-openmp # [osx]
|
||||
- libgomp # [linux]
|
||||
|
||||
host:
|
||||
- python
|
||||
@ -36,6 +38,7 @@ requirements:
|
||||
- pyfftw
|
||||
- h5py
|
||||
- {{ pin_compatible('gsl') }}
|
||||
- llvm-openmp
|
||||
|
||||
test:
|
||||
imports:
|
||||
|
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…
Reference in New Issue
Block a user