]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
os/CMakeLists: fix link errro when enable WITH_PMEM=ON. 20658/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Fri, 2 Mar 2018 10:23:18 +0000 (18:23 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Fri, 2 Mar 2018 10:23:18 +0000 (18:23 +0800)
commit2de73a7aa420848a4685b67701da0a9a92f49c50
tree1204ba3a87c67cbf16a330f56402c9df45fc92d1
parent1932cd1a83443e0010dc3c60ee9dd103ef326eb3
os/CMakeLists: fix link errro when enable WITH_PMEM=ON.

On some platform, when enable WITH_PMEM, it met the following errors:

>> 85%] Linking CXX executable ../../../bin/unittest_mclock_op_class_queue
   ../../nvml/src/nondebug/libpmem.a(libpmem_all.o): In function `os_thread_atfork':
   pmem_posix.c:(.text+0x2501): undefined reference to `pthread_atfork'
>> collect2: error: ld returned 1 exit status
>> src/test/osd/CMakeFiles/unittest_mclock_op_class_queue.dir/build.make:145: recipe for target 'bin/unittest_mclock_op_class_queue' failed
>> make[2]: *** [bin/unittest_mclock_op_class_queue] Error 1
>> CMakeFiles/Makefile2:18453: recipe for target 'src/test/osd/CMakeFiles/unittest_mclock_op_class_queue.dir/all' failed
>> make[1]: *** [src/test/osd/CMakeFiles/unittest_mclock_op_class_queue.dir/all] Error 2
>> Makefile:140: recipe for target 'all' failed
>> make: *** [all] Error 2

This because libpmem.a need libpthread and some targets like unitttest_mclock_op_class_queue don't with libpthread.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/os/CMakeLists.txt