diff options
Diffstat (limited to 'Tests/RunCMake')
31 files changed, 152 insertions, 20 deletions
diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-try_compile.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-try_compile.cmake new file mode 100644 index 0000000..281f8aa --- /dev/null +++ b/Tests/RunCMake/GenEx-DEVICE_LINK/DEVICE_LINK-try_compile.cmake @@ -0,0 +1,9 @@ + +enable_language(C) + +add_library(demo INTERFACE IMPORTED) +set_property(TARGET demo PROPERTY INTERFACE_LINK_OPTIONS "$<DEVICE_LINK:>") + +set(CMAKE_TRY_COMPILE_TARGET_TYPE EXECUTABLE) +try_compile(result "${CMAKE_CURRENT_BINARY_DIR}/tc" "${CMAKE_CURRENT_SOURCE_DIR}/empty.c" + LINK_LIBRARIES demo) diff --git a/Tests/RunCMake/GenEx-DEVICE_LINK/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-DEVICE_LINK/RunCMakeTest.cmake index 1e44601..80633e2 100644 --- a/Tests/RunCMake/GenEx-DEVICE_LINK/RunCMakeTest.cmake +++ b/Tests/RunCMake/GenEx-DEVICE_LINK/RunCMakeTest.cmake @@ -12,6 +12,7 @@ run_cmake(DEVICE_LINK-target_compile_options) run_cmake(DEVICE_LINK-target_include_directories) run_cmake(DEVICE_LINK-target_link_libraries) run_cmake(DEVICE_LINK-target_link_directories) +run_cmake(DEVICE_LINK-try_compile) if(RunCMake_GENERATOR MATCHES "(Ninja|Makefile)") run_cmake(DEVICE_LINK-link_depends) endif() diff --git a/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-try_compile.cmake b/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-try_compile.cmake new file mode 100644 index 0000000..f221ff1 --- /dev/null +++ b/Tests/RunCMake/GenEx-HOST_LINK/HOST_LINK-try_compile.cmake @@ -0,0 +1,9 @@ + +enable_language(C) + +add_library(demo INTERFACE IMPORTED) +set_property(TARGET demo PROPERTY INTERFACE_LINK_OPTIONS "$<HOST_LINK:>") + +set(CMAKE_TRY_COMPILE_TARGET_TYPE EXECUTABLE) +try_compile(result "${CMAKE_CURRENT_BINARY_DIR}/tc" "${CMAKE_CURRENT_SOURCE_DIR}/empty.c" + LINK_LIBRARIES demo) diff --git a/Tests/RunCMake/GenEx-HOST_LINK/RunCMakeTest.cmake b/Tests/RunCMake/GenEx-HOST_LINK/RunCMakeTest.cmake index 329a7c6..9e3eeec 100644 --- a/Tests/RunCMake/GenEx-HOST_LINK/RunCMakeTest.cmake +++ b/Tests/RunCMake/GenEx-HOST_LINK/RunCMakeTest.cmake @@ -12,6 +12,7 @@ run_cmake(HOST_LINK-target_compile_options) run_cmake(HOST_LINK-target_include_directories) run_cmake(HOST_LINK-target_link_libraries) run_cmake(HOST_LINK-target_link_directories) +run_cmake(HOST_LINK-try_compile) if(RunCMake_GENERATOR MATCHES "(Ninja|Makefile)") run_cmake(HOST_LINK-link_depends) endif() diff --git a/Tests/RunCMake/ParseImplicitData/linux-C-NVHPC-21.1.0.input b/Tests/RunCMake/ParseImplicitData/linux-C-NVHPC-21.1.0.input new file mode 100644 index 0000000..93e36ca --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/linux-C-NVHPC-21.1.0.input @@ -0,0 +1,42 @@ +CMAKE_LANG=C +CMAKE_LINKER=/usr/bin/ld +CMAKE_C_COMPILER_ABI= +CMAKE_C_COMPILER_AR= +CMAKE_C_COMPILER_ARCHITECTURE_ID= +CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_C_COMPILER_ID=NVHPC +CMAKE_C_COMPILER_LAUNCHER= +CMAKE_C_COMPILER_LOADED=1 +CMAKE_C_COMPILER_RANLIB= +CMAKE_C_COMPILER_TARGET= +CMAKE_C_COMPILER_VERSION=21.1.0 +CMAKE_C_COMPILER_VERSION_INTERAL= +Change Dir: /root/parse_implicit_data/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_b8daa/fast && /usr/bin/make -f CMakeFiles/cmTC_b8daa.dir/build.make CMakeFiles/cmTC_b8daa.dir/build +make[1]: Entering directory '/root/parse_implicit_data/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_b8daa.dir/CMakeCCompilerABI.c.o +/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/nvc -v -o CMakeFiles/cmTC_b8daa.dir/CMakeCCompilerABI.c.o -c /host_pwd/Work/cmake/src/Modules/CMakeCCompilerABI.c +Export PGI_CURR_CUDA_HOME=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/cuda/ +Export NVCOMPILER=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1 +Export PGI=/opt/nvidia/hpc_sdk + +/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/tools/cpp1 --llalign -Dunix -D__unix -D__unix__ -Dlinux -D__linux -D__linux__ -D__NO_MATH_INLINES -D__LP64__ -D__x86_64 -D__x86_64__ -D__LONG_MAX__=9223372036854775807L '-D__SIZE_TYPE__=unsigned long int' '-D__PTRDIFF_TYPE__=long int' -D__amd64 -D__amd64__ -D__k8 -D__k8__ -D__MMX__ -D__SSE__ -D__SSE2__ -D__SSE3__ -D__SSSE3__ -D__SSE4_1__ -D__SSE4_2__ -D__AVX__ -D__AVX2__ -D__AVX512F__ -D__AVX512VL__ -D__FMA__ -D__XSAVE__ -D__POPCNT__ -D__FXSR__ -D__PGI -D__NVCOMPILER -D_PGCG_SOURCE --c -I- -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include-gcc70 -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include-gcc70 -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include -D__PGLLVM__ -D__NVCOMPILER_LLVM__ -D__extension__= --preinclude _cplus_preinclude.h --preinclude_macros _cplus_macros.h --gnu_version=90300 -D__pgnu_vsn=90300 -q -o /tmp/nvcjpcFBbmqiQuf.il /host_pwd/Work/cmake/src/Modules/CMakeCCompilerABI.c + +/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/tools/cpp2 /host_pwd/Work/cmake/src/Modules/CMakeCCompilerABI.c -opt 1 -x 119 0xa10000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 17 -x 19 0x400000 -x 28 0x40000 -x 120 0x10000000 -x 70 0x8000 -x 122 1 -x 125 0x20000 -quad -x 59 4 -tp skylake -x 120 0x1000 -astype 0 -fn /host_pwd/Work/cmake/src/Modules/CMakeCCompilerABI.c -il /tmp/nvcjpcFBbmqiQuf.il -x 123 0x80000000 -x 123 4 -x 2 0x400 -x 119 0x20 -def __pgnu_vsn=90300 -x 70 0x40000000 -x 183 4 -x 121 0x800 -x 6 0x20000 -x 122 0x400000 -y 125 0x100000 -x 249 100 -x 120 0x200000 -x 70 0x40000000 -x 8 0x40000000 -x 164 0x800000 -x 85 0x2000 -x 85 0x4000 -x 68 0x1 -x 39 4 -x 56 0x10 -x 26 0x10 -x 26 1 -x 56 0x4000 -y 163 0xc0000000 -x 189 0x10 -y 189 0x4000000 -gnuvsn 90300 -x 69 0x200 -x 123 0x400 -cmdline '+nvc /tmp/nvcjpcFBbmqiQuf.il -v -o CMakeFiles/cmTC_b8daa.dir/CMakeCCompilerABI.c.o -c' -asm /tmp/nvczpcFlZn4rWzz.ll +NVC++/x86-64 Linux 21.1-0: compilation successful + +/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/share/llvm/bin/llc /tmp/nvczpcFlZn4rWzz.ll -march=x86-64 -mcpu=native -O1 -fast-isel=0 -non-global-value-max-name-size=4294967295 -x86-cmov-converter=0 -filetype=obj -o CMakeFiles/cmTC_b8daa.dir/CMakeCCompilerABI.c.o +Unlinking /tmp/nvcjpcFBbmqiQuf.il +Unlinking /tmp/nvcrpcFZmmAHpuz.s +Unlinking /tmp/nvczpcFlZn4rWzz.ll +Unlinking /tmp/nvcHpcFJmCQUbek.llvm +Linking C executable cmTC_b8daa +/host_pwd/Work/cmake/nvhpc_build/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b8daa.dir/link.txt --verbose=1 +/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/nvc -v CMakeFiles/cmTC_b8daa.dir/CMakeCCompilerABI.c.o -o cmTC_b8daa +Export PGI_CURR_CUDA_HOME=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/cuda/ +Export NVCOMPILER=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1 +Export PGI=/opt/nvidia/hpc_sdk + +/usr/bin/ld /usr/lib/x86_64-linux-gnu/crt1.o /usr/lib/x86_64-linux-gnu/crti.o /opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib/trace_init.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbegin.o --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib/nvhpc.ld -L/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib -L/usr/lib64 -L/usr/lib/gcc/x86_64-linux-gnu/9 CMakeFiles/cmTC_b8daa.dir/CMakeCCompilerABI.c.o -rpath /opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib -rpath /usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib64 -o cmTC_b8daa -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib64 -lnvomp -ldl --as-needed -lnvhpcatm -latomic --no-as-needed -lpthread --start-group -lnvcpumath -lnsnvc -lnvc --end-group -lm -lgcc -lc -lgcc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/9/crtend.o /usr/lib/x86_64-linux-gnu/crtn.o +make[1]: Leaving directory '/root/parse_implicit_data/CMakeFiles/CMakeTmp' diff --git a/Tests/RunCMake/ParseImplicitData/linux-CXX-NVHPC-21.1.0.input b/Tests/RunCMake/ParseImplicitData/linux-CXX-NVHPC-21.1.0.input new file mode 100644 index 0000000..64781b9 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/linux-CXX-NVHPC-21.1.0.input @@ -0,0 +1,42 @@ +CMAKE_LANG=CXX +CMAKE_LINKER=/usr/bin/ld +CMAKE_CXX_COMPILER_ABI= +CMAKE_CXX_COMPILER_AR= +CMAKE_CXX_COMPILER_ARCHITECTURE_ID= +CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_CXX_COMPILER_ID=NVHPC +CMAKE_CXX_COMPILER_LAUNCHER= +CMAKE_CXX_COMPILER_LOADED=1 +CMAKE_CXX_COMPILER_RANLIB= +CMAKE_CXX_COMPILER_TARGET= +CMAKE_CXX_COMPILER_VERSION=21.1.0 +CMAKE_CXX_COMPILER_VERSION_INTERAL= +Change Dir: /root/parse_implicit_data/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/make -f Makefile cmTC_79118/fast && /usr/bin/make -f CMakeFiles/cmTC_79118.dir/build.make CMakeFiles/cmTC_79118.dir/build +make[1]: Entering directory '/root/parse_implicit_data/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_79118.dir/CMakeCXXCompilerABI.cpp.o +/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/nvc++ -v -o CMakeFiles/cmTC_79118.dir/CMakeCXXCompilerABI.cpp.o -c /host_pwd/Work/cmake/src/Modules/CMakeCXXCompilerABI.cpp +Export PGI_CURR_CUDA_HOME=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/cuda/ +Export NVCOMPILER=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1 +Export PGI=/opt/nvidia/hpc_sdk + +/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/tools/cpp1 --llalign -Dunix -D__unix -D__unix__ -Dlinux -D__linux -D__linux__ -D__NO_MATH_INLINES -D__LP64__ -D__x86_64 -D__x86_64__ -D__LONG_MAX__=9223372036854775807L '-D__SIZE_TYPE__=unsigned long int' '-D__PTRDIFF_TYPE__=long int' -D__amd64 -D__amd64__ -D__k8 -D__k8__ -D__MMX__ -D__SSE__ -D__SSE2__ -D__SSE3__ -D__SSSE3__ -D__SSE4_1__ -D__SSE4_2__ -D__AVX__ -D__AVX2__ -D__AVX512F__ -D__AVX512VL__ -D__FMA__ -D__XSAVE__ -D__POPCNT__ -D__FXSR__ -D__PGI -D__NVCOMPILER -D_GNU_SOURCE -D_PGCG_SOURCE -I- -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include-gcc70 -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include -I/usr/include/c++/9 -I/usr/include/x86_64-linux-gnu/c++/9 -I/usr/include/c++/9/backward -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include-gcc70 -I/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/include -I/usr/lib/gcc/x86_64-linux-gnu/9/include -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include -D__PGLLVM__ -D__NVCOMPILER_LLVM__ -D__extension__= --preinclude _cplus_preinclude.h --preinclude_macros _cplus_macros.h --gnu_version=90300 -D__pgnu_vsn=90300 -q -o /tmp/nvc++WCcFq4IEc6_D.il /host_pwd/Work/cmake/src/Modules/CMakeCXXCompilerABI.cpp + +/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/tools/cpp2 /host_pwd/Work/cmake/src/Modules/CMakeCXXCompilerABI.cpp -opt 1 -x 119 0xa10000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 17 -x 19 0x400000 -x 28 0x40000 -x 120 0x10000000 -x 70 0x8000 -x 122 1 -x 125 0x20000 -quad -x 59 4 -tp skylake -x 120 0x1000 -astype 0 -fn /host_pwd/Work/cmake/src/Modules/CMakeCXXCompilerABI.cpp -il /tmp/nvc++WCcFq4IEc6_D.il -x 117 0x200 -x 123 0x80000000 -x 123 4 -x 119 0x20 -def __pgnu_vsn=90300 -x 70 0x40000000 -x 183 4 -x 121 0x800 -x 6 0x20000 -x 249 100 -x 120 0x200000 -x 70 0x40000000 -x 8 0x40000000 -x 164 0x800000 -x 85 0x2000 -x 85 0x4000 -x 68 0x1 -x 39 4 -x 56 0x10 -x 26 0x10 -x 26 1 -x 56 0x4000 -y 163 0xc0000000 -x 189 0x10 -y 189 0x4000000 -gnuvsn 90300 -x 69 0x200 -x 123 0x400 -cmdline '+nvc++ /tmp/nvc++WCcFq4IEc6_D.il -v -o CMakeFiles/cmTC_79118.dir/CMakeCXXCompilerABI.cpp.o -c' -asm /tmp/nvc++WCcFqmjAQUnq.ll +NVC++/x86-64 Linux 21.1-0: compilation successful + +/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/share/llvm/bin/llc /tmp/nvc++WCcFqmjAQUnq.ll -march=x86-64 -mcpu=native -O1 -fast-isel=0 -non-global-value-max-name-size=4294967295 -x86-cmov-converter=0 -filetype=obj -o CMakeFiles/cmTC_79118.dir/CMakeCXXCompilerABI.cpp.o +Unlinking /tmp/nvc++WCcFq4IEc6_D.il +Unlinking /tmp/nvc++WCcFq65QYK7M.s +Unlinking /tmp/nvc++WCcFqmjAQUnq.ll +Unlinking /tmp/nvc++WCcFqUsdHmUV.llvm +Linking CXX executable cmTC_79118 +/host_pwd/Work/cmake/nvhpc_build/bin/cmake -E cmake_link_script CMakeFiles/cmTC_79118.dir/link.txt --verbose=1 +/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/bin/nvc++ -v CMakeFiles/cmTC_79118.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_79118 +Export PGI_CURR_CUDA_HOME=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/cuda/ +Export NVCOMPILER=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1 +Export PGI=/opt/nvidia/hpc_sdk + +/usr/bin/ld /usr/lib/x86_64-linux-gnu/crt1.o /usr/lib/x86_64-linux-gnu/crti.o /opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib/trace_init.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbegin.o --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib/nvhpc.ld -L/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib -L/usr/lib64 -L/usr/lib/gcc/x86_64-linux-gnu/9 CMakeFiles/cmTC_79118.dir/CMakeCXXCompilerABI.cpp.o -rpath /opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib -rpath /usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib64 -o cmTC_79118 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib64 -latomic -lnvhpcatm -lstdc++ -lnvomp -ldl --as-needed -lnvhpcatm -latomic --no-as-needed -lpthread --start-group -lnvcpumath -lnsnvc -lnvc --end-group -lm -lgcc -lc -lgcc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/9/crtend.o /usr/lib/x86_64-linux-gnu/crtn.o +make[1]: Leaving directory '/root/parse_implicit_data/CMakeFiles/CMakeTmp' diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake index abd0eaa..2d3abcc 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake @@ -28,6 +28,7 @@ set(targets linux-Fortran-PGI-18.10.1 linux_pgf77-Fortran-PGI-18.10.1 linux_nostdinc-C-PGI-18.10.1 linux_nostdinc-CXX-PGI-18.10.1 linux_nostdinc-Fortran-PGI-18.10.1 + linux-C-NVHPC-21.1.0-empty linux-CXX-NVHPC-21.1.0-empty linux-C-XL-12.1.0 linux-CXX-XL-12.1.0 linux-Fortran-XL-14.1.0 linux_nostdinc-C-XL-12.1.0 linux_nostdinc-CXX-XL-12.1.0 linux_nostdinc_i-C-XL-12.1.0 linux_nostdinc-CXX-XL-12.1.0 diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-NVHPC-21.1.0-empty.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-NVHPC-21.1.0-empty.output new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-NVHPC-21.1.0-empty.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-NVHPC-21.1.0-empty.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-NVHPC-21.1.0-empty.output new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-NVHPC-21.1.0-empty.output diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake index c46d044..1f3468b 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake +++ b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake @@ -28,6 +28,7 @@ set(targets linux-Fortran-PGI-18.10.1 linux_pgf77-Fortran-PGI-18.10.1 linux_nostdinc-C-PGI-18.10.1 linux_nostdinc-CXX-PGI-18.10.1 linux_nostdinc-Fortran-PGI-18.10.1 + linux-C-NVHPC-21.1.0 linux-CXX-NVHPC-21.1.0 linux-C-XL-12.1.0 linux-CXX-XL-12.1.0 linux-Fortran-XL-14.1.0 linux_nostdinc-C-XL-12.1.0 linux_nostdinc-CXX-XL-12.1.0 linux_nostdinc_i-C-XL-12.1.0 linux_nostdinc-CXX-XL-12.1.0 @@ -104,10 +105,8 @@ endfunction() function(load_platform_info target) if(target MATCHES "linux-") set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*" PARENT_SCOPE) - set(CMAKE_LIBRARY_ARCHITECTURE_REGEX_VERSIONED "gcc/[a-z0-9_]+(-[a-z0-9_]+)?-linux(-gnu)?/[0-9]+(\\.[0-9]+\\.[0-9]+)*" PARENT_SCOPE) else() unset(CMAKE_LIBRARY_ARCHITECTURE_REGEX PARENT_SCOPE) - unset(CMAKE_LIBRARY_ARCHITECTURE_REGEX_VERSIONED PARENT_SCOPE) endif() endfunction() @@ -134,6 +133,7 @@ foreach(t ${targets}) # Need to handle files with empty entries for both libs or dirs set(implicit_lib_output "") set(idirs_output "") + set(implicit_objs "") set(library_arch_output "") file(STRINGS ${outfile} outputs) foreach(line IN LISTS outputs) @@ -149,10 +149,11 @@ foreach(t ${targets}) endforeach() cmake_parse_implicit_link_info("${input}" implicit_libs idirs implicit_fwks log - "${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}") + "${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}" + COMPUTE_IMPLICIT_OBJECTS implicit_objs) set(library_arch) - cmake_parse_library_architecture("${idirs}" library_arch) + cmake_parse_library_architecture(${lang} "${idirs}" "${implicit_objs}" library_arch) # File format # file(WRITE ${outfile} "libs=${implicit_libs}\ndirs=${idirs}\nlibrary_arch=${library_arch}") @@ -165,7 +166,7 @@ foreach(t ${targets}) message("${t} parse failed: state=${state}, '${idirs}' does not match '${idirs_output}'") elseif(NOT "${implicit_libs}" STREQUAL "${implicit_lib_output}") message("${t} parse failed: state=${state}, '${implicit_libs}' does not match '${implicit_lib_output}'") - elseif(library_arch AND NOT "${library_arch}" STREQUAL "${library_arch_output}") + elseif((library_arch OR library_arch_output) AND NOT "${library_arch}" STREQUAL "${library_arch_output}") message("${t} parse failed: state=${state}, '${library_arch}' does not match '${library_arch_output}'") endif() diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-Intel-18.0.0.20170811.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-Intel-18.0.0.20170811.output index 55852c0..e613290 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-Intel-18.0.0.20170811.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-Intel-18.0.0.20170811.output @@ -1,3 +1,3 @@ libs=imf;svml;irng;m;ipgo;decimal;cilkrts;stdc++;gcc;gcc_s;irc;svml;c;gcc;gcc_s;irc_s;dl;c dirs=/opt/intel/compilers_and_libraries_2018.0.128/linux/ipp/lib/intel64;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/lib/intel64_lin;/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64_lin;/opt/intel/compilers_and_libraries_2018.0.128/linux/tbb/lib/intel64/gcc4.7;/usr/lib/gcc/x86_64-redhat-linux/4.8.5;/usr/lib64;/lib64;/usr/lib;/lib -library_arch=x86_64-redhat-linux +library_arch= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-NVHPC-21.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-NVHPC-21.1.0.output new file mode 100644 index 0000000..e932be9 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-NVHPC-21.1.0.output @@ -0,0 +1,3 @@ +libs=nvomp;dl;nvhpcatm;atomic;pthread;nvcpumath;nsnvc;nvc;m;gcc;c;gcc;gcc_s +dirs=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib;/usr/lib64;/usr/lib/gcc/x86_64-linux-gnu/9 +library_arch=x86_64-linux-gnu diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-12.1.0.output index de8c8eb..81ac0ba 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-12.1.0.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-12.1.0.output @@ -1,3 +1,3 @@ libs=xlopt;xl;dl;gcc_s;gcc;m;c;gcc_s;gcc dirs=/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/lib64;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/lib64;/soft/compilers/ibmcmp-oct2017/vac/bg/12.1/lib64;/soft/compilers/ibmcmp-oct2017/vacpp/bg/12.1/lib64;/usr/lib/gcc/ppc64-redhat-linux/4.4.7;/usr/lib64;/lib64;/usr/lib -library_arch=ppc64-redhat-linux +library_arch= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-16.1.0.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-16.1.0.0.output index cd672d5..b88a48d 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-16.1.0.0.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-16.1.0.0.output @@ -1,3 +1,3 @@ libs=xlopt;xl;dl;gcc_s;pthread;gcc;m;c;gcc_s;gcc dirs=/opt/ibm/xlsmp/5.1.0/lib;/opt/ibm/xlmass/9.1.0/lib;/opt/ibm/xlC/16.1.0/lib;/usr/lib/gcc/ppc64le-redhat-linux/4.8.5;/usr/lib64;/lib64;/usr/lib -library_arch=ppc64le-redhat-linux +library_arch= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v.output index 8824772..261785c 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v.output @@ -1,3 +1,3 @@ libs=cudadevrt;cudart_static;rt;pthread;dl;xlopt;xl;ibmc++;stdc++;m;dl;gcc_s;gcc;pthread;m;c;gcc_s;gcc dirs=/sw/summit/cuda/10.1.168/targets/ppc64le-linux/lib/stubs;/sw/summit/cuda/10.1.168/targets/ppc64le-linux/lib;/autofs/nccs-svm1_sw/summit/.swci/1-compute/opt/spack/20180914/linux-rhel7-ppc64le/xl-16.1.1-3/spectrum-mpi-10.3.0.1-20190611-aqjt3jo53mogrrhcrd2iufr435azcaha/lib;/autofs/nccs-svm1_sw/summit/.swci/1-compute/opt/spack/20180914/linux-rhel7-ppc64le/gcc-4.8.5/darshan-runtime-3.1.7-csygoqyym3m3ysoaperhxlhoiluvpa2u/lib;/autofs/nccs-svm1_sw/summit/xl/16.1.1-3/xlsmp/5.1.1/lib;/autofs/nccs-svm1_sw/summit/xl/16.1.1-3/xlmass/9.1.1/lib;/autofs/nccs-svm1_sw/summit/xl/16.1.1-3/xlC/16.1.1/lib;/usr/lib/gcc/ppc64le-redhat-linux/4.8.5;/usr/lib64;/lib64;/autofs/nccs-svm1_sw/peak/.swci/1-compute/opt/spack/20180914/linux-rhel7-ppc64le/gcc-4.8.5/darshan-runtime-3.1.7-ytwv7xbkub6mqnpvygdthwqa7mhjqbc5/lib;/usr/lib -library_arch=ppc64le-redhat-linux +library_arch= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-Intel-18.0.0.20170811.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-Intel-18.0.0.20170811.output index 6a2a105..678a196 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-Intel-18.0.0.20170811.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-Intel-18.0.0.20170811.output @@ -1,3 +1,3 @@ libs=imf;svml;irng;stdc++;m;ipgo;decimal;cilkrts;stdc++;gcc;gcc_s;irc;svml;c;gcc;gcc_s;irc_s;dl;c dirs=/opt/intel/compilers_and_libraries_2018.0.128/linux/ipp/lib/intel64;/opt/intel/compilers_and_libraries_2018.0.128/linux/compiler/lib/intel64_lin;/opt/intel/compilers_and_libraries_2018.0.128/linux/mkl/lib/intel64_lin;/opt/intel/compilers_and_libraries_2018.0.128/linux/tbb/lib/intel64/gcc4.7;/usr/lib/gcc/x86_64-redhat-linux/4.8.5;/usr/lib64;/lib64;/usr/lib;/lib -library_arch=x86_64-redhat-linux +library_arch= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-NVHPC-21.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-NVHPC-21.1.0.output new file mode 100644 index 0000000..e7f7d05 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-NVHPC-21.1.0.output @@ -0,0 +1,3 @@ +libs=atomic;nvhpcatm;stdc++;nvomp;dl;nvhpcatm;atomic;pthread;nvcpumath;nsnvc;nvc;m;gcc;c;gcc;gcc_s +dirs=/opt/nvidia/hpc_sdk/Linux_x86_64/21.1/compilers/lib;/usr/lib64;/usr/lib/gcc/x86_64-linux-gnu/9 +library_arch=x86_64-linux-gnu diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-12.1.0.output index 9fbc844..45c5565 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-12.1.0.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-12.1.0.output @@ -1,3 +1,3 @@ libs=xlopt;xl;ibmc++;xlopt;xl;stdc++;m;dl;gcc_s;gcc;m;c;gcc_s;gcc;dl;gcc_s;gcc;m;c;gcc_s;gcc dirs=/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/lib64;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/lib64;/soft/compilers/ibmcmp-oct2017/vac/bg/12.1/lib64;/soft/compilers/ibmcmp-oct2017/vacpp/bg/12.1/lib64;/usr/lib/gcc/ppc64-redhat-linux/4.4.7;/usr/lib64;/lib64;/usr/lib -library_arch=ppc64-redhat-linux +library_arch= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-16.1.0.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-16.1.0.0.output index 4e9ab0a..9d649ec 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-16.1.0.0.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-16.1.0.0.output @@ -1,3 +1,3 @@ libs=xlopt;xl;ibmc++;stdc++;m;dl;gcc_s;gcc;pthread;m;c;gcc_s;gcc dirs=/opt/ibm/xlsmp/5.1.0/lib;/opt/ibm/xlmass/9.1.0/lib;/opt/ibm/xlC/16.1.0/lib;/usr/lib/gcc/ppc64le-redhat-linux/4.8.5;/usr/lib64;/lib64;/usr/lib -library_arch=ppc64le-redhat-linux +library_arch= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-XL-14.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-XL-14.1.0.output index 68be4c5..3c07cf8 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-XL-14.1.0.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-XL-14.1.0.output @@ -1,3 +1,3 @@ libs=xlf90;xlopt;xlomp_ser;xl;xlfmath;gcc_s;dl;rt;pthread;gcc;m;c;gcc_s;gcc dirs=/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/lib64;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/lib64;/soft/compilers/ibmcmp-oct2017/xlf/bg/14.1/lib64;/usr/lib/gcc/ppc64-redhat-linux/4.4.7;/usr/lib64;/lib64;/usr/lib -library_arch=ppc64-redhat-linux +library_arch= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-PGI-18.10.1.output index e44c84d..dc17ce7 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-PGI-18.10.1.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-PGI-18.10.1.output @@ -1,3 +1,3 @@ libs=pgmp;numa;pthread;pgmath;nspgc;pgc;m;gcc;c;gcc;gcc_s dirs=/mnt/pgi/linux86-64/18.10/lib;/usr/lib64;/usr/lib/gcc/x86_64-linux-gnu/7 -library_arch=x86_64-linux-gnu2 +library_arch= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-XL-12.1.0.output index de8c8eb..81ac0ba 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-XL-12.1.0.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-XL-12.1.0.output @@ -1,3 +1,3 @@ libs=xlopt;xl;dl;gcc_s;gcc;m;c;gcc_s;gcc dirs=/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/lib64;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/lib64;/soft/compilers/ibmcmp-oct2017/vac/bg/12.1/lib64;/soft/compilers/ibmcmp-oct2017/vacpp/bg/12.1/lib64;/usr/lib/gcc/ppc64-redhat-linux/4.4.7;/usr/lib64;/lib64;/usr/lib -library_arch=ppc64-redhat-linux +library_arch= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output index cd15054..a7c14d2 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output @@ -1,3 +1,3 @@ libs=atomic;pgatm;stdc++;pgmp;numa;pthread;pgmath;nspgc;pgc;m;gcc;c;gcc;gcc_s dirs=/mnt/pgi/linux86-64/18.10/lib;/usr/lib64;/usr/lib/gcc/x86_64-linux-gnu/7 -library_arch=x86_64-linux-gnu +library_arch= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-XL-12.1.0.output index 9fbc844..45c5565 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-XL-12.1.0.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-XL-12.1.0.output @@ -1,3 +1,3 @@ libs=xlopt;xl;ibmc++;xlopt;xl;stdc++;m;dl;gcc_s;gcc;m;c;gcc_s;gcc;dl;gcc_s;gcc;m;c;gcc_s;gcc dirs=/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/lib64;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/lib64;/soft/compilers/ibmcmp-oct2017/vac/bg/12.1/lib64;/soft/compilers/ibmcmp-oct2017/vacpp/bg/12.1/lib64;/usr/lib/gcc/ppc64-redhat-linux/4.4.7;/usr/lib64;/lib64;/usr/lib -library_arch=ppc64-redhat-linux +library_arch= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-Fortran-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-Fortran-PGI-18.10.1.output index f3cc551..955d540 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-Fortran-PGI-18.10.1.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-Fortran-PGI-18.10.1.output @@ -1,3 +1,3 @@ libs=pgf90rtl;pgf90;pgf90_rpm1;pgf902;pgf90rtl;pgftnrtl;pgmp;numa;pthread;pgmath;nspgc;pgc;rt;pthread;m;gcc;c;gcc;gcc_s dirs=/mnt/pgi/linux86-64/18.10/lib;/usr/lib64;/usr/lib/gcc/x86_64-linux-gnu/7 -library_arch=x86_64-linux-gnu +library_arch= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc_i-C-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc_i-C-XL-12.1.0.output index de8c8eb..81ac0ba 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc_i-C-XL-12.1.0.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc_i-C-XL-12.1.0.output @@ -1,3 +1,3 @@ libs=xlopt;xl;dl;gcc_s;gcc;m;c;gcc_s;gcc dirs=/soft/compilers/ibmcmp-oct2017/xlsmp/bg/3.1/lib64;/soft/compilers/ibmcmp-oct2017/xlmass/bg/7.3/lib64;/soft/compilers/ibmcmp-oct2017/vac/bg/12.1/lib64;/soft/compilers/ibmcmp-oct2017/vacpp/bg/12.1/lib64;/usr/lib/gcc/ppc64-redhat-linux/4.4.7;/usr/lib64;/lib64;/usr/lib -library_arch=ppc64-redhat-linux +library_arch= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_pgf77-Fortran-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_pgf77-Fortran-PGI-18.10.1.output index 8f68358..30b86e6 100644 --- a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_pgf77-Fortran-PGI-18.10.1.output +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_pgf77-Fortran-PGI-18.10.1.output @@ -1,3 +1,3 @@ libs=pgftnrtl;pgmp;numa;pthread;pgmath;nspgc;pgc;rt;pthread;m;gcc;c;gcc;gcc_s dirs=/mnt/pgi/linux86-64/18.10/lib;/usr/lib64;/usr/lib/gcc/x86_64-linux-gnu/7 -library_arch=x86_64-linux-gnu +library_arch= diff --git a/Tests/RunCMake/target_link_options/RunCMakeTest.cmake b/Tests/RunCMake/target_link_options/RunCMakeTest.cmake index 8ef13f9..a707383 100644 --- a/Tests/RunCMake/target_link_options/RunCMakeTest.cmake +++ b/Tests/RunCMake/target_link_options/RunCMakeTest.cmake @@ -17,6 +17,9 @@ if (NOT CMAKE_C_COMPILER_ID STREQUAL "Intel") if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG) list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Release) endif() + if (RunCMake_GENERATOR MATCHES "Ninja") + set(VERBOSE -- -v) + endif() run_cmake(LINK_OPTIONS) @@ -56,6 +59,10 @@ if (NOT CMAKE_C_COMPILER_ID STREQUAL "Intel") run_cmake_target(genex_DEVICE_LINK CMP0105_OLD LinkOptions_CMP0105_OLD --config Release) run_cmake_target(genex_DEVICE_LINK CMP0105_NEW LinkOptions_CMP0105_NEW --config Release) run_cmake_target(genex_DEVICE_LINK device LinkOptions_device --config Release) + + if (RunCMake_GENERATOR MATCHES "(Ninja|Unix Makefiles)") + run_cmake_target(genex_DEVICE_LINK host_link_options LinkOptions_host_link_options --config Release ${VERBOSE}) + endif() endif() run_cmake_target(genex_DEVICE_LINK no_device LinkOptions_no_device --config Release) diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-host_link_options-check.cmake b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-host_link_options-check.cmake new file mode 100644 index 0000000..31ffe7f --- /dev/null +++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-host_link_options-check.cmake @@ -0,0 +1,4 @@ + +if (NOT actual_stdout MATCHES "-Xlinker=OPT1 -Xlinker=OPT2 -Xlinker=OPT3 -Xlinker=OPT4 -Xlinker=OPT5") + set (RunCMake_TEST_FAILED "Not found expected '-Xlinker=OPT1 -Xlinker=OPT2 -Xlinker=OPT3 -Xlinker=OPT4 -Xlinker=OPT5'.") +endif() diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-host_link_options-result.txt b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-host_link_options-result.txt new file mode 100644 index 0000000..8d98f9d --- /dev/null +++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK-host_link_options-result.txt @@ -0,0 +1 @@ +.* diff --git a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK.cmake b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK.cmake index 0126080..a53ab20 100644 --- a/Tests/RunCMake/target_link_options/genex_DEVICE_LINK.cmake +++ b/Tests/RunCMake/target_link_options/genex_DEVICE_LINK.cmake @@ -1,6 +1,10 @@ enable_language(C) +set(CMAKE_VERBOSE_MAKEFILE TRUE) +set(CMAKE_C_USE_RESPONSE_FILE_FOR_LIBRARIES FALSE) +set(CMAKE_CXX_USE_RESPONSE_FILE_FOR_LIBRARIES FALSE) + set (obj "${CMAKE_C_OUTPUT_EXTENSION}") if(BORLAND) set(pre -) @@ -43,6 +47,10 @@ if (CMake_TEST_CUDA) set_property(TARGET LinkOptions_device PROPERTY CUDA_SEPARABLE_COMPILATION ON) target_link_options(LinkOptions_device PRIVATE $<DEVICE_LINK:${pre}BADFLAG_DEVICE_LINK${obj}> $<HOST_LINK:${pre}BADFLAG_NORMAL_LINK${obj}>) + + add_executable(LinkOptions_host_link_options LinkOptionsDevice.cu) + set_property(TARGET LinkOptions_host_link_options PROPERTY CUDA_SEPARABLE_COMPILATION ON) + target_link_options(LinkOptions_host_link_options PRIVATE -Wl,OPT1 -Xlinker=OPT2 "SHELL:-Xlinker OPT3" "SHELL:LINKER:OPT4 LINKER:OPT5") endif() add_executable(LinkOptions_no_device LinkOptionsDevice.cu) |