# Check if cmake has the required version CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) # Set name of our project to "CBMROOT". Has to be done # after check of cmake version project(MilleTest) # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ # is checked set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") include(CTest) include(CheckCompiler) #Check the compiler and set the compile and link flags Check_Compiler() # Check if the user wants to build the project in the source # directory #CHECK_OUT_OF_SOURCE_BUILD() Set(SIMPATH $ENV{SIMPATH}) find_package(ROOT 5.32.00 REQUIRED) set(INCLUDE_DIRECTORIES ${ROOT_INCLUDE_DIR} ${CMAKE_SOURCE_DIR} ) include_directories( ${INCLUDE_DIRECTORIES}) set(LINK_DIRECTORIES ${ROOT_LIBRARY_DIR} ${CMAKE_SOURCE_DIR} ) link_directories( ${LINK_DIRECTORIES}) Set(LibMille_SRCS Mille.cc ) add_library(Mille SHARED ${LibMille_SRCS}) Set(MilleTest_SRCS TestMillePede.cxx ) add_executable(TestMillePede ${MilleTest_SRCS}) target_link_libraries(TestMillePede ${ROOT_LIBRARIES} Mille)