Difference: Geant4Tutorial (5 vs. 6)

Revision 62015-07-09 - JohnIdarraga

Line: 1 to 1
 
META TOPICPARENT name="JohnIdarraga"
Line: 29 to 29
 
target_link_libraries(exampleXX ${Geant4_LIBRARIES} ${ROOT_LIBRARIES})
Added:
>
>
If you are using a library needing C++0x (like ROOT6) you need to add this

include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
        message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
 

Cmake line

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback