Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: use object library to avoid duplicate compilation. (#4489)
* cmake: use object library to avoid duplicate compilation. * debug: verbose make log for building r package. * Include /usr/local/include for AppleClang. * Revert "debug: verbose make log for building r package." * update cmake comment and fix indentation * debug cmake USE_DEBUG. * Revert "debug cmake USt E_DEBUG." * Add -fPIC for building shared library. * Always set -fPIC for non MSVC compiler. * debug: print exception in setup.py * debug: print cmake output for vs build. * debug: set opencl related target_xxx on lightgbm_objs. * Define compile definitions, link libraries on lightgbm_objs. * Add PUBLIC to target_link_libraries to expose library dependency. * Use target_link_libraries on object library. This should propagate usage requirements. * Fix CUDA linking. Linking object library (lightgbm_objs) to object library (histograms) does not linked objects. * Use PUBLIC link for lightgbm lib. * Set cuda related properties on final targets. * Remove debugging changes. Revert "debug: print exception in setup.py" Revert "debug: print cmake output for vs build." etc. * Remove -D_lightgbm_EXPORTS. * Revert to add -fPIC only for NOT USE_DEBUG. * Enable PIC for shared lib. * Fix enable PIC. * Use -fPIC for shared lib. * testlightgbm depends only on object files. * tweak build for R. * Try to remove OpenMP related include dir settings. * link with openmp for capi object library. * Use PUBLIC for _lightgbm target_link_libraries. * Try removing exports definition. * fix typo Co-authored-by: Nikita Titov <nekit94-08@mail.ru> * fix typo Co-authored-by: Nikita Titov <nekit94-08@mail.ru> * Add some comments for cmake code. * Try to fix cmake warnings CUDA. * revert accidentally commited R-package path change. * Try to fix cmake CUDA warnings, set for _lightgbm target. * Try to fix cmake CUDA warnings, set for lightgbm target. * empty commit to trigger ci Co-authored-by: Nikita Titov <nekit94-08@mail.ru>
- Loading branch information