Browse Source

[cmake] Only build for targets newer than TARGET

Build only for targets newer than TARGET when DYNAMIC_ARCH is enabled and a TARGET is selected.
I don't know how to implement this for Makefiles
pull/3417/head
Mehdi Chinoune 4 years ago
parent
commit
85f3f64b49
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      cmake/arch.cmake

+ 4
- 0
cmake/arch.cmake View File

@@ -82,6 +82,10 @@ if (DYNAMIC_ARCH)
set(DYNAMIC_CORE ${DYNAMIC_CORE} SKYLAKEX COOPERLAKE)
string(REGEX REPLACE "-march=native" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
endif ()
if(TARGET)
list(FIND DYNAMIC_CORE ${TARGET} TARGET_INDEX)
list(SUBLIST DYNAMIC_CORE ${TARGET_INDEX} -1 DYNAMIC_CORE)
endif()
if (DYNAMIC_LIST)
set(DYNAMIC_CORE PRESCOTT ${DYNAMIC_LIST})
endif ()


Loading…
Cancel
Save