From 4ca343778c3a90082e8c31bb2046becd61bb32e3 Mon Sep 17 00:00:00 2001 From: Norihiro Watanabe <norihiro.watanabe@ufz.de> Date: Tue, 4 Dec 2012 15:56:27 +0100 Subject: [PATCH] change GET_SOURCE_FILES() in Functions.cmake to include *.tpp and store relative file path instead of absolute one Using relative path makes easier to modify a list of source files later, e.g. removing particular source files depending on configuration. --- scripts/cmake/Functions.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/cmake/Functions.cmake b/scripts/cmake/Functions.cmake index a759e11b3f3..dbfee687d85 100644 --- a/scripts/cmake/Functions.cmake +++ b/scripts/cmake/Functions.cmake @@ -15,8 +15,9 @@ MACRO(GET_SOURCE_FILES SOURCE_FILES) ENDIF() # Get all files in the directory - FILE(GLOB GET_SOURCE_FILES_HEADERS ${DIR}/*.h) - FILE(GLOB GET_SOURCE_FILES_SOURCES ${DIR}/*.cpp) + FILE(GLOB GET_SOURCE_FILES_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${DIR}/*.h) + FILE(GLOB GET_SOURCE_FILES_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${DIR}/*.tpp) + FILE(GLOB GET_SOURCE_FILES_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${DIR}/*.cpp) SET(${SOURCE_FILES} ${GET_SOURCE_FILES_HEADERS} ${GET_SOURCE_FILES_SOURCES}) -- GitLab