MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / get_cmake_opts

Function get_cmake_opts

python-package/setup.py:172–180  ·  view source on GitHub ↗
(openmp_include_dir, openmp_library)

Source from the content-addressed store, hash-verified

170 if system() == 'Darwin' and not nomp and not (os.environ.get('CC', '').split('/')[-1].split('\\')[-1].startswith('gcc')
171 and os.environ.get('CXX', '').split('/')[-1].split('\\')[-1].startswith('g++')):
172 def get_cmake_opts(openmp_include_dir, openmp_library):
173 if openmp_include_dir and openmp_library:
174 return ['-DOpenMP_C_FLAGS=-Xpreprocessor -fopenmp -I{0}'.format(openmp_include_dir),
175 '-DOpenMP_C_LIB_NAMES=omp',
176 '-DOpenMP_CXX_FLAGS=-Xpreprocessor -fopenmp -I{0}'.format(openmp_include_dir),
177 '-DOpenMP_CXX_LIB_NAMES=omp',
178 '-DOpenMP_omp_LIBRARY={0}'.format(openmp_library)]
179 else:
180 return []
181
182 status = silent_call(cmake_cmd + get_cmake_opts(openmp_include_dir, openmp_library))
183 status += silent_call(["make", "_lightgbm", "-j4"])

Callers 1

compile_cppFunction · 0.85

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected