Commit 28d83837 authored by Christian Pfeiffer's avatar Christian Pfeiffer

separgs: Use NATIVE_COMMAND where appropriate

parent 2a207aac
......@@ -38,11 +38,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
set(line "${xline}")
endif()
endif()
if(UNIX)
separate_arguments(args UNIX_COMMAND "${line}")
else()
separate_arguments(args WINDOWS_COMMAND "${line}")
endif()
separate_arguments(args NATIVE_COMMAND "${line}")
list(GET args 0 cmd)
endif()
set(is_msvc 0)
......
......@@ -354,11 +354,7 @@ macro( _HDF5_parse_compile_line
libraries
libraries_hl)
if(UNIX)
separate_arguments(_HDF5_COMPILE_ARGS UNIX_COMMAND "${${compile_line_var}}")
else()
separate_arguments(_HDF5_COMPILE_ARGS WINDOWS_COMMAND "${${compile_line_var}}")
endif()
separate_arguments(_HDF5_COMPILE_ARGS NATIVE_COMMAND "${${compile_line_var}}")
foreach(arg IN LISTS _HDF5_COMPILE_ARGS)
if("${arg}" MATCHES "^-I(.*)$")
......
......@@ -645,8 +645,7 @@ foreach (lang C CXX Fortran)
add_library(MPI::MPI_${lang} INTERFACE IMPORTED)
endif()
if(MPI_${lang}_COMPILE_FLAGS)
set(_MPI_${lang}_COMPILE_OPTIONS "${MPI_${lang}_COMPILE_FLAGS}")
separate_arguments(_MPI_${lang}_COMPILE_OPTIONS)
separate_arguments(_MPI_${lang}_COMPILE_OPTIONS NATIVE_COMMAND "${MPI_${lang}_COMPILE_FLAGS}")
set_property(TARGET MPI::MPI_${lang} PROPERTY
INTERFACE_COMPILE_OPTIONS "${_MPI_${lang}_COMPILE_OPTIONS}")
endif()
......
......@@ -411,11 +411,7 @@ foreach(LANG IN ITEMS C CXX Fortran)
add_library(OpenMP::OpenMP_${LANG} INTERFACE IMPORTED)
endif()
if(OpenMP_${LANG}_FLAGS)
if(CMAKE_HOST_WIN32)
separate_arguments(_OpenMP_${LANG}_OPTIONS WINDOWS_COMMAND "${OpenMP_${LANG}_FLAGS}")
else()
separate_arguments(_OpenMP_${LANG}_OPTIONS UNIX_COMMAND "${OpenMP_${LANG}_FLAGS}")
endif()
separate_arguments(_OpenMP_${LANG}_OPTIONS NATIVE_COMMAND "${OpenMP_${LANG}_FLAGS}")
set_property(TARGET OpenMP::OpenMP_${LANG} PROPERTY
INTERFACE_COMPILE_OPTIONS "${_OpenMP_${LANG}_OPTIONS}")
unset(_OpenMP_${LANG}_OPTIONS)
......
......@@ -39,11 +39,7 @@ foreach(c C CXX Fortran)
add_test(NAME test_tgt_${c} COMMAND test_tgt_${c})
add_executable(test_var_${c} ${OpenMPTEST_SOURCE_FILE})
if(CMAKE_HOST_WIN32)
separate_arguments(_OpenMP_${c}_OPTIONS WINDOWS_COMMAND "${OpenMP_${c}_FLAGS}")
else()
separate_arguments(_OpenMP_${c}_OPTIONS UNIX_COMMAND "${OpenMP_${c}_FLAGS}")
endif()
separate_arguments(_OpenMP_${c}_OPTIONS NATIVE_COMMAND "${OpenMP_${c}_FLAGS}")
target_compile_options(test_var_${c} PRIVATE "${_OpenMP_${c}_OPTIONS}")
target_link_libraries(test_var_${c} PRIVATE "${OpenMP_${c}_FLAGS}")
set_property(TARGET test_var_${c} PROPERTY LINKER_LANGUAGE ${c})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment