From 772b9175568d56fc6aa873c5215274cf3ae39b15 Mon Sep 17 00:00:00 2001 From: Lucas Nussbaum Date: Tue, 13 Sep 2011 23:20:21 +0200 Subject: [PATCH] Move library after the source due to changes in ld Due to changes in ld introduced in Ubuntu oneiric (ld --as-needed by default), it is now required to order libraries on the ld command line so that they are only listed *after* the other files that require them. --- buildtools/Cmake/CompleteInFiles.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index d251d515ab..4179edfbc5 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -211,7 +211,7 @@ if(pthread) ### Test that we have a way to create semaphores if(HAVE_SEM_OPEN_LIB) - exec_program("${CMAKE_C_COMPILER} -lpthread ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_sem_open.c -o testprog" + exec_program("${CMAKE_C_COMPILER} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_sem_open.c -lpthread -o testprog" OUTPUT_VARIABLE HAVE_SEM_OPEN_run) if(HAVE_SEM_OPEN_run) set(HAVE_SEM_OPEN 0) @@ -230,7 +230,7 @@ if(pthread) endif(HAVE_SEM_OPEN_LIB) if(HAVE_SEM_INIT_LIB) - exec_program("${CMAKE_C_COMPILER} -lpthread ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_sem_init.c -o testprog" + exec_program("${CMAKE_C_COMPILER} ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/test_prog/prog_sem_init.c -lpthread -o testprog" OUTPUT_VARIABLE HAVE_SEM_INIT_run) if(HAVE_SEM_INIT_run) set(HAVE_SEM_INIT 0) -- 2.20.1