diff options
Diffstat (limited to 'Tests')
17 files changed, 46 insertions, 5 deletions
diff --git a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in index 055b183..da614e9 100644 --- a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in +++ b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in @@ -105,6 +105,13 @@ set(linux64_test2_libs "c;/opt/sun/sunstudio12/prod/lib/amd64/libc_supp.a") set(linux64_test2_dirs "/opt/sun/sunstudio12/prod/lib/amd64;/lib64;/usr/lib64") list(APPEND platforms linux64_test2) +# -specs=redhat-hardened-ld +set(linux64_test3_text "COLLECT_GCC_OPTIONS='-specs=/usr/lib/rpm/redhat/redhat-hardened-ld' '-v' '-O2' '-g' '-pipe' '-Wall' '-Werror=format-security' '-fexceptions' '-fstack-protector-strong' '--param' 'ssp-buffer-size=4' '-grecord-gcc-switches' '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' '-m64' '-mtune=generic' '-I' '/usr/lib64/gfortran/modules' '-o' 'a.out' '-rdynamic' '-shared-libgcc' '-march=x86-64' '-pie' + /usr/libexec/gcc/x86_64-redhat-linux/5.1.1/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/5.1.1/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/5.1.1/lto-wrapper -plugin-opt=-fresolution=/tmp/ccNzxFD8.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z now -pie -o a.out /usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../../../lib64/Scrt1.o /usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/5.1.1/crtbeginS.o -L/usr/lib/gcc/x86_64-redhat-linux/5.1.1 -L/usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../.. -z relro dummy.o -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-redhat-linux/5.1.1/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../../../lib64/crtn.o") +set(linux64_test3_libs "gfortran;m;quadmath;m;c") +set(linux64_test3_dirs "/usr/lib/gcc/x86_64-redhat-linux/5.1.1;/usr/lib64;/lib64;/usr/lib") +list(APPEND platforms linux64_test3) + #----------------------------------------------------------------------------- # Mac diff --git a/Tests/RunCMake/find_program/A/testAandB b/Tests/RunCMake/find_program/A/testAandB new file mode 100755 index 0000000..1a24852 --- /dev/null +++ b/Tests/RunCMake/find_program/A/testAandB @@ -0,0 +1 @@ +#!/bin/sh diff --git a/Tests/RunCMake/find_program/B/testAandB b/Tests/RunCMake/find_program/B/testAandB new file mode 100755 index 0000000..1a24852 --- /dev/null +++ b/Tests/RunCMake/find_program/B/testAandB @@ -0,0 +1 @@ +#!/bin/sh diff --git a/Tests/RunCMake/find_program/EnvAndHints-stdout.txt b/Tests/RunCMake/find_program/EnvAndHints-stdout.txt new file mode 100644 index 0000000..39329b2 --- /dev/null +++ b/Tests/RunCMake/find_program/EnvAndHints-stdout.txt @@ -0,0 +1 @@ +-- PROG='[^']*/Tests/RunCMake/find_program/A/testAandB' diff --git a/Tests/RunCMake/find_program/EnvAndHints.cmake b/Tests/RunCMake/find_program/EnvAndHints.cmake new file mode 100644 index 0000000..14ebd6e --- /dev/null +++ b/Tests/RunCMake/find_program/EnvAndHints.cmake @@ -0,0 +1,8 @@ +set(ENV_PATH "$ENV{PATH}") +set(ENV{PATH} ${CMAKE_CURRENT_SOURCE_DIR}/A) +find_program(PROG + NAMES testAandB + HINTS ${CMAKE_CURRENT_SOURCE_DIR}/A ${CMAKE_CURRENT_SOURCE_DIR}/B + ) +message(STATUS "PROG='${PROG}'") +set(ENV{PATH} "${ENV_PATH}") diff --git a/Tests/RunCMake/find_program/RunCMakeTest.cmake b/Tests/RunCMake/find_program/RunCMakeTest.cmake index 2adec11..89307c1 100644 --- a/Tests/RunCMake/find_program/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_program/RunCMakeTest.cmake @@ -1,5 +1,6 @@ include(RunCMake) +run_cmake(EnvAndHints) run_cmake(DirsPerName) run_cmake(NamesPerDir) diff --git a/Tests/RunCMake/set_property/COMPILE_DEFINITIONS-stdout.txt b/Tests/RunCMake/set_property/COMPILE_DEFINITIONS-stdout.txt index b85f41d..dd5bae1 100644 --- a/Tests/RunCMake/set_property/COMPILE_DEFINITIONS-stdout.txt +++ b/Tests/RunCMake/set_property/COMPILE_DEFINITIONS-stdout.txt @@ -1 +1,2 @@ --- Target COMPILE_DEFINITIONS is 'a;;b;c;;d;;e' +-- Target COMPILE_DEFINITIONS is 'a;b;c;d;;e' +-- Directory COMPILE_DEFINITIONS is 'a;b;c;d;;e' diff --git a/Tests/RunCMake/set_property/COMPILE_DEFINITIONS.cmake b/Tests/RunCMake/set_property/COMPILE_DEFINITIONS.cmake index ec07ce9..f0c63bf 100644 --- a/Tests/RunCMake/set_property/COMPILE_DEFINITIONS.cmake +++ b/Tests/RunCMake/set_property/COMPILE_DEFINITIONS.cmake @@ -1,2 +1,3 @@ include(Common.cmake) test_target_property(COMPILE_DEFINITIONS) +test_directory_property(COMPILE_DEFINITIONS) diff --git a/Tests/RunCMake/set_property/COMPILE_FEATURES-stdout.txt b/Tests/RunCMake/set_property/COMPILE_FEATURES-stdout.txt index 81ef170..bd5a992 100644 --- a/Tests/RunCMake/set_property/COMPILE_FEATURES-stdout.txt +++ b/Tests/RunCMake/set_property/COMPILE_FEATURES-stdout.txt @@ -1 +1 @@ --- Target COMPILE_FEATURES is 'a;;b;c;;d;;e' +-- Target COMPILE_FEATURES is 'a;b;c;d;;e' diff --git a/Tests/RunCMake/set_property/COMPILE_OPTIONS-stdout.txt b/Tests/RunCMake/set_property/COMPILE_OPTIONS-stdout.txt index f18451a..1a20501 100644 --- a/Tests/RunCMake/set_property/COMPILE_OPTIONS-stdout.txt +++ b/Tests/RunCMake/set_property/COMPILE_OPTIONS-stdout.txt @@ -1 +1,2 @@ --- Target COMPILE_OPTIONS is 'a;;b;c;;d;;e' +-- Target COMPILE_OPTIONS is 'a;b;c;d;;e' +-- Directory COMPILE_OPTIONS is 'a;b;c;d;;e' diff --git a/Tests/RunCMake/set_property/COMPILE_OPTIONS.cmake b/Tests/RunCMake/set_property/COMPILE_OPTIONS.cmake index da20ec8..75f0535 100644 --- a/Tests/RunCMake/set_property/COMPILE_OPTIONS.cmake +++ b/Tests/RunCMake/set_property/COMPILE_OPTIONS.cmake @@ -1,2 +1,3 @@ include(Common.cmake) test_target_property(COMPILE_OPTIONS) +test_directory_property(COMPILE_OPTIONS) diff --git a/Tests/RunCMake/set_property/Common.cmake b/Tests/RunCMake/set_property/Common.cmake index b359487..9d5e4f4 100644 --- a/Tests/RunCMake/set_property/Common.cmake +++ b/Tests/RunCMake/set_property/Common.cmake @@ -12,3 +12,17 @@ macro(test_target_property PROP) message(STATUS "Target ${PROP} is '${val}'") set_property(TARGET CustomTarget PROPERTY ${PROP}) endmacro() + +macro(test_directory_property PROP) + set_property(DIRECTORY PROPERTY ${PROP} x) + set_property(DIRECTORY PROPERTY ${PROP}) + set_property(DIRECTORY APPEND PROPERTY ${PROP}) + set_property(DIRECTORY PROPERTY ${PROP} a) + set_property(DIRECTORY APPEND PROPERTY ${PROP} "") + set_property(DIRECTORY APPEND PROPERTY ${PROP} b c) + set_property(DIRECTORY APPEND PROPERTY ${PROP}) + set_property(DIRECTORY APPEND PROPERTY ${PROP} "d;;e") + get_property(val DIRECTORY PROPERTY ${PROP}) + message(STATUS "Directory ${PROP} is '${val}'") + set_property(DIRECTORY PROPERTY ${PROP}) +endmacro() diff --git a/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES-stdout.txt b/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES-stdout.txt index f9970ce..c957dd5 100644 --- a/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES-stdout.txt +++ b/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES-stdout.txt @@ -1 +1,2 @@ --- Target INCLUDE_DIRECTORIES is 'a;;b;c;;d;;e' +-- Target INCLUDE_DIRECTORIES is 'a;b;c;d;;e' +-- Directory INCLUDE_DIRECTORIES is 'a;b;c;d;;e' diff --git a/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES.cmake b/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES.cmake index 8f44aee..c9a9151 100644 --- a/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES.cmake +++ b/Tests/RunCMake/set_property/INCLUDE_DIRECTORIES.cmake @@ -1,2 +1,3 @@ include(Common.cmake) test_target_property(INCLUDE_DIRECTORIES) +test_directory_property(INCLUDE_DIRECTORIES) diff --git a/Tests/RunCMake/set_property/LINK_LIBRARIES-stdout.txt b/Tests/RunCMake/set_property/LINK_LIBRARIES-stdout.txt index 1f7663b..9a3988e 100644 --- a/Tests/RunCMake/set_property/LINK_LIBRARIES-stdout.txt +++ b/Tests/RunCMake/set_property/LINK_LIBRARIES-stdout.txt @@ -1 +1 @@ --- Target LINK_LIBRARIES is 'a;;b;c;;d;;e' +-- Target LINK_LIBRARIES is 'a;b;c;d;;e' diff --git a/Tests/RunCMake/set_property/USER_PROP-stdout.txt b/Tests/RunCMake/set_property/USER_PROP-stdout.txt index eaf6e37..107cc87 100644 --- a/Tests/RunCMake/set_property/USER_PROP-stdout.txt +++ b/Tests/RunCMake/set_property/USER_PROP-stdout.txt @@ -1 +1,2 @@ -- Target USER_PROP is 'a;b;c;d;;e' +-- Directory USER_PROP is 'a;b;c;d;;e' diff --git a/Tests/RunCMake/set_property/USER_PROP.cmake b/Tests/RunCMake/set_property/USER_PROP.cmake index e1f88e1..aa0aa83 100644 --- a/Tests/RunCMake/set_property/USER_PROP.cmake +++ b/Tests/RunCMake/set_property/USER_PROP.cmake @@ -1,2 +1,3 @@ include(Common.cmake) test_target_property(USER_PROP) +test_directory_property(USER_PROP) |