diff options
author | Christian Pfeiffer <cpfeiffer@live.de> | 2017-04-26 18:34:23 (GMT) |
---|---|---|
committer | Christian Pfeiffer <cpfeiffer@live.de> | 2017-04-26 18:34:23 (GMT) |
commit | 28d83837978aefc7f6e467b41ff792817da9ec95 (patch) | |
tree | 954372b01e564e88737c2f370384ca987f3ff06a | |
parent | 2a207aaca1d8414624dd4cfe8fcb19d03fe84546 (diff) | |
download | CMake-28d83837978aefc7f6e467b41ff792817da9ec95.zip CMake-28d83837978aefc7f6e467b41ff792817da9ec95.tar.gz CMake-28d83837978aefc7f6e467b41ff792817da9ec95.tar.bz2 |
separgs: Use NATIVE_COMMAND where appropriate
-rw-r--r-- | Modules/CMakeParseImplicitLinkInfo.cmake | 6 | ||||
-rw-r--r-- | Modules/FindHDF5.cmake | 6 | ||||
-rw-r--r-- | Modules/FindMPI.cmake | 3 | ||||
-rw-r--r-- | Modules/FindOpenMP.cmake | 6 | ||||
-rw-r--r-- | Tests/FindOpenMP/Test/CMakeLists.txt | 6 |
5 files changed, 5 insertions, 22 deletions
diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake index 3273443..ad3c00f 100644 --- a/Modules/CMakeParseImplicitLinkInfo.cmake +++ b/Modules/CMakeParseImplicitLinkInfo.cmake @@ -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) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 1e2ea69..5962c5b 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -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(.*)$") diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake index fab53cb..37f3255 100644 --- a/Modules/FindMPI.cmake +++ b/Modules/FindMPI.cmake @@ -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() diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake index 8c1b018..e7d9d5f 100644 --- a/Modules/FindOpenMP.cmake +++ b/Modules/FindOpenMP.cmake @@ -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) diff --git a/Tests/FindOpenMP/Test/CMakeLists.txt b/Tests/FindOpenMP/Test/CMakeLists.txt index 4ba0e5c..6313ef6 100644 --- a/Tests/FindOpenMP/Test/CMakeLists.txt +++ b/Tests/FindOpenMP/Test/CMakeLists.txt @@ -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}) |