diff options
author | Brad King <brad.king@kitware.com> | 2022-11-08 13:11:28 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-11-08 13:11:42 (GMT) |
commit | 2624c88e2f506d4caa54083c36f70b4c50e06307 (patch) | |
tree | 1026d1e4300528b890ef2a85962e41248a314eed /Modules | |
parent | 2759bd0aa9335741bc06ef4a5b34819d89fcdc5f (diff) | |
parent | 0a1d55897133e148365114f5764c4400c9b1bba5 (diff) | |
download | CMake-2624c88e2f506d4caa54083c36f70b4c50e06307.zip CMake-2624c88e2f506d4caa54083c36f70b4c50e06307.tar.gz CMake-2624c88e2f506d4caa54083c36f70b4c50e06307.tar.bz2 |
Merge topic 'tasking_remove_system_processor'
0a1d558971 Tasking: Remove CMAKE_SYSTEM_PROCESSOR support per CMP0123
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7879
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Compiler/Tasking.cmake | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/Modules/Compiler/Tasking.cmake b/Modules/Compiler/Tasking.cmake index 419db63..5bf066e 100644 --- a/Modules/Compiler/Tasking.cmake +++ b/Modules/Compiler/Tasking.cmake @@ -17,44 +17,12 @@ set(BUILD_SHARED_LIBS FALSE CACHE BOOL "") set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") set(CMAKE_LINK_SEARCH_START_STATIC TRUE) -function(__tasking_set_processor_list lang out_var) - execute_process(COMMAND "${CMAKE_${lang}_COMPILER}" --cpu-list - OUTPUT_VARIABLE processor_list - ERROR_VARIABLE processor_list) - string(REGEX MATCHALL " +([A-Za-z0-9_]+)[^\n]+\n" processor_list "${processor_list}") - list(POP_FRONT processor_list) - string(REGEX REPLACE " +([A-Za-z0-9_]+)[^\n]+\n" "\\1" processor_list "${processor_list}") - set(${out_var} "${processor_list}" PARENT_SCOPE) -endfunction() - -function(__tasking_check_processor processor list out_var) - string(TOLOWER "${processor}" processor) - if(processor IN_LIST list) - set(${out_var} TRUE PARENT_SCOPE) - else() - set(${out_var} FALSE PARENT_SCOPE) - endif() -endfunction() - if(NOT CMAKE_TASKING_TOOLSET) set(CMAKE_TASKING_TOOLSET "Standalone") endif() macro(__compiler_tasking lang) - if(CMAKE_SYSTEM_PROCESSOR) - if(NOT _TASKING_${lang}_PROCESSOR_LIST) - __tasking_set_processor_list(${lang} _TASKING_${lang}_PROCESSOR_LIST) - endif() - __tasking_check_processor(${CMAKE_SYSTEM_PROCESSOR} "${_TASKING_${lang}_PROCESSOR_LIST}" _TASKING_${lang}_VALID_PROCESSOR) - if(${_TASKING_${lang}_VALID_PROCESSOR}) - string(APPEND CMAKE_${lang}_FLAGS_INIT " -C${CMAKE_SYSTEM_PROCESSOR}") - else() - message(FATAL_ERROR "Invalid processor ${CMAKE_SYSTEM_PROCESSOR} specified.\n" - "Supported processors: ${_TASKING_${lang}_PROCESSOR_LIST}") - endif() - endif() - set(CMAKE_${lang}_VERBOSE_FLAG "-v") set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "--pic") set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Wl" " ") |