GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » [fixed] cmake bug in EvtGen
[fixed] cmake bug in EvtGen [message #11206] Mon, 22 November 2010 13:29 Go to previous message
Malgorzata Gumberidze is currently offline  Malgorzata Gumberidze
Messages: 98
Registered: June 2005
continuous participant
From: *in2p3.fr
Trying to install pandaroot. I go following message right after
cmake:

Toggle Spoiler


CMake Error: Error Target: EvtGen Contains more than one Prefered language: Fortran and CXX
You must set the LINKER_LANGUAGE property for this target.


to fix it, it is neceseary to make following changes in the EvtGen/CMakeList.txt:

 
sudol@ipnei14:/projet/panda/pandaroot/jan10/buildPanda$ svn diff  ../trunk/pgenerators/EvtGen/CMakeLists.txt 
Index: ../trunk/pgenerators/EvtGen/CMakeLists.txt
===================================================================
--- ../trunk/pgenerators/EvtGen/CMakeLists.txt	(revision 10338)
+++ ../trunk/pgenerators/EvtGen/CMakeLists.txt	(working copy)
@@ -294,12 +294,12 @@
 add_library(EvtGen SHARED ${EVTGEN_SRCS})
 target_link_libraries(EvtGen ${ROOT_LIBRARIES} Pythia6 Photos ${Fortran_UseLib})
 set_target_properties(EvtGen PROPERTIES ${FAIRROOT_LIBRARY_PROPERTIES})
-set_target_properties(EvtGen PROPERTIES LINK_FLAGS "-fPIC")
+set_target_properties(EvtGen PROPERTIES LINK_FLAGS "-fPIC" LINKER_LANGUAGE CXX)

 foreach(program ${ALLEvtGen_exe})
 	add_executable(EvtGen_exe_${program} ${program}.cc)
 	set_target_properties(EvtGen_exe_${program} PROPERTIES OUTPUT_NAME ${program})
-	set_target_properties(EvtGen_exe_${program} PROPERTIES LINK_FLAGS "-fPIC")
+	set_target_properties(EvtGen_exe_${program} PROPERTIES LINK_FLAGS "-fPIC" LINKER_LANGUAGE CXX)
 	target_link_libraries(EvtGen_exe_${program} ${ROOT_LIBRARIES} EvtGen Pythia6 Photos ${Fortran_UseLib} CLHEP)
 endforeach(program)



I do not know if this fix works for everybody, it would be nice if expert can check it, and commit solution to svn.

gosia

[Updated on: Mon, 22 November 2010 14:09]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Memory leaks in digitization (TPC!)
Next Topic: Updates in CMakeLists and g3Config
Goto Forum:
  


Current Time: Wed Nov 27 01:28:27 CET 2024

Total time taken to generate the page: 0.01412 seconds