set(INCLUDE_DIRECTORIES ${CMAKE_SOURCE_DIR} ${ROOT_INCLUDE_DIRS} ) include_directories(${INCLUDE_DIRECTORIES}) SET_SOURCE_FILES_PROPERTIES( test.C PROPERTIES LANGUAGE CXX ) set(INCLUDE_LIBRARIES ${ROOT_LIBRARIES} ) # Compile executable add_executable(test test.C) target_link_libraries(test ${INCLUDE_LIBRARIES})