aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Fetzer <fetzer.ch@gmail.com>2016-10-03 22:35:45 +0200
committerGitHub <noreply@github.com>2016-10-03 22:35:45 +0200
commit6e7d6bb7e0e01459f990b7a504db1e989806ee85 (patch)
tree45b76d6d6a2f7a01e870675d05f4af98a9fa77b0
parent8d6e828a4b58f7bbc7ca8432abf6a4fbebe23cf6 (diff)
parentf52c43bf228a65f633713d78aabdce20b8bd8602 (diff)
Merge pull request #10614 from fetzerch/cmake_always_outdated
[cmake] Fix always outdated targets
-rw-r--r--project/cmake/scripts/common/Macros.cmake8
-rw-r--r--project/cmake/scripts/linux/Macros.cmake4
2 files changed, 10 insertions, 2 deletions
diff --git a/project/cmake/scripts/common/Macros.cmake b/project/cmake/scripts/common/Macros.cmake
index 4f0ae67c44..b30dfab56e 100644
--- a/project/cmake/scripts/common/Macros.cmake
+++ b/project/cmake/scripts/common/Macros.cmake
@@ -211,6 +211,14 @@ function(copy_file_to_buildtree file)
file(APPEND ${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/ExportFiles.cmake "# Export files to build tree\n")
endif()
+ # Exclude autotools build artefacts and other blacklisted files in source tree.
+ if(file MATCHES "(Makefile|\.in|\.xbt|\.so|\.dylib|\.gitignore)$")
+ if(VERBOSE)
+ message(STATUS "copy_file_to_buildtree - ignoring file: ${file}")
+ endif()
+ return()
+ endif()
+
if(NOT file STREQUAL ${CMAKE_BINARY_DIR}/${outfile})
if(VERBOSE)
message(STATUS "copy_file_to_buildtree - copying file: ${file} -> ${CMAKE_BINARY_DIR}/${outfile}")
diff --git a/project/cmake/scripts/linux/Macros.cmake b/project/cmake/scripts/linux/Macros.cmake
index 1f99b1ce9d..2c89eab01b 100644
--- a/project/cmake/scripts/linux/Macros.cmake
+++ b/project/cmake/scripts/linux/Macros.cmake
@@ -32,7 +32,7 @@ function(core_link_library lib wraplib)
endif()
get_filename_component(dir ${wraplib} PATH)
- add_custom_command(OUTPUT ${wraplib}-${ARCH}${CMAKE_SHARED_MODULE_SUFFIX}
+ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${wraplib}-${ARCH}${CMAKE_SHARED_MODULE_SUFFIX}
COMMAND cmake -E make_directory ${dir}
COMMAND ${CMAKE_C_COMPILER}
ARGS -Wl,--whole-archive
@@ -43,7 +43,7 @@ function(core_link_library lib wraplib)
DEPENDS ${target} wrapper.def wrapper)
get_filename_component(libname ${wraplib} NAME_WE)
- add_custom_target(wrap_${libname} ALL DEPENDS ${wraplib}-${ARCH}${CMAKE_SHARED_MODULE_SUFFIX})
+ add_custom_target(wrap_${libname} ALL DEPENDS ${CMAKE_BINARY_DIR}/${wraplib}-${ARCH}${CMAKE_SHARED_MODULE_SUFFIX})
set_target_properties(wrap_${libname} PROPERTIES FOLDER lib/wrapped)
add_dependencies(${APP_NAME_LC}-libraries wrap_${libname})