Re: FC10: strange cmake error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ralf Corsepius wrote:
Hi,

I am facing a strange cmake-related error when trying to upgrade
OpenSceneGraph to version 2.4.0 on FC10:

...
-- Looking for pthread_yield
CMake Error at CMakeLists.txt:9 (ADD_EXECUTABLE):
  Target "cmTryCompileExec" links to item " -lpthread" which has leading
or
  trailing whitespace.  This is now an error according to policy
CMP0004.

I think attached patch is what you need. I think a lot of cmake users (including myself) are confused about using lists.

Build: http://koji.fedoraproject.org/koji/taskinfo?taskID=605508

Still get a cmake warning, that probably needs to get fixed in cmake.


--
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA/CoRA Division                    FAX: 303-415-9702
3380 Mitchell Lane                  orion@xxxxxxxxxxxxx
Boulder, CO 80301              http://www.cora.nwra.com
--- OpenSceneGraph-2.4.0/OpenSceneGraph/src/OpenThreads/pthreads/CMakeLists.txt.cmake	2008-04-24 05:34:43.000000000 -0600
+++ OpenSceneGraph-2.4.0/OpenSceneGraph/src/OpenThreads/pthreads/CMakeLists.txt	2008-05-12 14:30:26.000000000 -0600
@@ -26,8 +26,8 @@
   SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${OPENTHREADS_VERSION} SOVERSION ${OPENTHREADS_SOVERSION})
 ENDIF(OPENTHREADS_SONAMES)
 
-SET(CMAKE_REQUIRED_LIBRARIES_SAFE "${CMAKE_REQUIRED_LIBRARIES}")
-SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}")
+SET(CMAKE_REQUIRED_LIBRARIES_SAFE ${CMAKE_REQUIRED_LIBRARIES})
+SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
 
 CHECK_FUNCTION_EXISTS(pthread_yield HAVE_PTHREAD_YIELD)
 IF(HAVE_PTHREAD_YIELD)
@@ -89,7 +89,7 @@
   ENDIF(HAVE_THREE_PARAM_SCHED_SETAFFINITY)
 ENDIF(HAVE_PTHREAD_SETAFFINITY_NP)
 
-SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES_SAFE}")
+SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAFE})
 
 TARGET_LINK_LIBRARIES(${LIB_NAME}
 	${CMAKE_THREAD_LIBS_INIT}
-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux