diff options
Diffstat (limited to 'Tests')
287 files changed, 2089 insertions, 117 deletions
diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt index cd4dbc8..204810e 100644 --- a/Tests/CMakeLib/CMakeLists.txt +++ b/Tests/CMakeLib/CMakeLists.txt @@ -9,6 +9,7 @@ set(CMakeLib_TESTS testGeneratedFileStream.cxx testRST.cxx testRange.cxx + testOptional.cxx testString.cxx testStringAlgorithms.cxx testSystemTools.cxx diff --git a/Tests/CMakeLib/testOptional.cxx b/Tests/CMakeLib/testOptional.cxx new file mode 100644 index 0000000..a5e30fb --- /dev/null +++ b/Tests/CMakeLib/testOptional.cxx @@ -0,0 +1,690 @@ +#include "cm_optional.hxx" +#include "cm_utility.hxx" + +#include <iostream> +#include <type_traits> +#include <utility> +#include <vector> + +class EventLogger; + +class Event +{ +public: + enum EventType + { + DEFAULT_CONSTRUCT, + COPY_CONSTRUCT, + MOVE_CONSTRUCT, + VALUE_CONSTRUCT, + + DESTRUCT, + + COPY_ASSIGN, + MOVE_ASSIGN, + VALUE_ASSIGN, + + REFERENCE, + CONST_REFERENCE, + RVALUE_REFERENCE, + CONST_RVALUE_REFERENCE, + + SWAP, + }; + + EventType Type; + const EventLogger* Logger1; + const EventLogger* Logger2; + int Value; + + bool operator==(const Event& other) const; + bool operator!=(const Event& other) const; +}; + +bool Event::operator==(const Event& other) const +{ + return this->Type == other.Type && this->Logger1 == other.Logger1 && + this->Logger2 == other.Logger2 && this->Value == other.Value; +} + +bool Event::operator!=(const Event& other) const +{ + return !(*this == other); +} + +static std::vector<Event> events; + +class EventLogger +{ +public: + EventLogger(); + EventLogger(const EventLogger& other); + EventLogger(EventLogger&& other); + EventLogger(int value); + + ~EventLogger(); + + EventLogger& operator=(const EventLogger& other); + EventLogger& operator=(EventLogger&& other); + EventLogger& operator=(int value); + + void Reference() &; + void Reference() const&; + void Reference() &&; + void Reference() const&&; + + int Value = 0; +}; + +// Certain builds of GCC generate false -Wmaybe-uninitialized warnings when +// doing a release build with the system version of std::optional. These +// warnings do not manifest when using our own cm::optional implementation. +// Silence these false warnings. +#if defined(__GNUC__) && !defined(__clang__) +# define BEGIN_IGNORE_UNINITIALIZED \ + _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define END_IGNORE_UNINITIALIZED _Pragma("GCC diagnostic pop") +#else +# define BEGIN_IGNORE_UNINITIALIZED +# define END_IGNORE_UNINITIALIZED +#endif + +void swap(EventLogger& e1, EventLogger& e2) +{ + BEGIN_IGNORE_UNINITIALIZED + events.push_back({ Event::SWAP, &e1, &e2, e2.Value }); + END_IGNORE_UNINITIALIZED + auto tmp = e1.Value; + e1.Value = e2.Value; + e2.Value = tmp; +} + +EventLogger::EventLogger() + : Value(0) +{ + events.push_back({ Event::DEFAULT_CONSTRUCT, this, nullptr, 0 }); +} + +EventLogger::EventLogger(const EventLogger& other) + : Value(other.Value) +{ + events.push_back({ Event::COPY_CONSTRUCT, this, &other, other.Value }); +} + +BEGIN_IGNORE_UNINITIALIZED +EventLogger::EventLogger(EventLogger&& other) + : Value(other.Value) +{ + events.push_back({ Event::MOVE_CONSTRUCT, this, &other, other.Value }); +} +END_IGNORE_UNINITIALIZED + +EventLogger::EventLogger(int value) + : Value(value) +{ + events.push_back({ Event::VALUE_CONSTRUCT, this, nullptr, value }); +} + +EventLogger::~EventLogger() +{ + BEGIN_IGNORE_UNINITIALIZED + events.push_back({ Event::DESTRUCT, this, nullptr, this->Value }); + END_IGNORE_UNINITIALIZED +} + +EventLogger& EventLogger::operator=(const EventLogger& other) +{ + events.push_back({ Event::COPY_ASSIGN, this, &other, other.Value }); + this->Value = other.Value; + return *this; +} + +EventLogger& EventLogger::operator=(EventLogger&& other) +{ + events.push_back({ Event::MOVE_ASSIGN, this, &other, other.Value }); + this->Value = other.Value; + return *this; +} + +EventLogger& EventLogger::operator=(int value) +{ + events.push_back({ Event::VALUE_ASSIGN, this, nullptr, value }); + this->Value = value; + return *this; +} + +void EventLogger::Reference() & +{ + events.push_back({ Event::REFERENCE, this, nullptr, this->Value }); +} + +void EventLogger::Reference() const& +{ + events.push_back({ Event::CONST_REFERENCE, this, nullptr, this->Value }); +} + +void EventLogger::Reference() && +{ + events.push_back({ Event::RVALUE_REFERENCE, this, nullptr, this->Value }); +} + +void EventLogger::Reference() const&& +{ + events.push_back( + { Event::CONST_RVALUE_REFERENCE, this, nullptr, this->Value }); +} + +static bool testDefaultConstruct(std::vector<Event>& expected) +{ + const cm::optional<EventLogger> o{}; + + expected = {}; + return true; +} + +static bool testNulloptConstruct(std::vector<Event>& expected) +{ + const cm::optional<EventLogger> o{ cm::nullopt }; + + expected = {}; + return true; +} + +static bool testValueConstruct(std::vector<Event>& expected) +{ + const cm::optional<EventLogger> o{ 4 }; + + expected = { + { Event::VALUE_CONSTRUCT, &*o, nullptr, 4 }, + { Event::DESTRUCT, &*o, nullptr, 4 }, + }; + return true; +} + +static bool testInPlaceConstruct(std::vector<Event>& expected) +{ + const cm::optional<EventLogger> o1{ cm::in_place, 4 }; + const cm::optional<EventLogger> o2{ cm::in_place_t{}, 4 }; + + expected = { + { Event::VALUE_CONSTRUCT, &*o1, nullptr, 4 }, + { Event::VALUE_CONSTRUCT, &*o2, nullptr, 4 }, + { Event::DESTRUCT, &*o2, nullptr, 4 }, + { Event::DESTRUCT, &*o1, nullptr, 4 }, + }; + return true; +} + +static bool testCopyConstruct(std::vector<Event>& expected) +{ + const cm::optional<EventLogger> o1{ 4 }; + const cm::optional<EventLogger> o2{ o1 }; + const cm::optional<EventLogger> o3{}; + const cm::optional<EventLogger> o4{ o3 }; + + expected = { + { Event::VALUE_CONSTRUCT, &*o1, nullptr, 4 }, + { Event::COPY_CONSTRUCT, &*o2, &o1.value(), 4 }, + { Event::DESTRUCT, &*o2, nullptr, 4 }, + { Event::DESTRUCT, &*o1, nullptr, 4 }, + }; + return true; +} + +static bool testMoveConstruct(std::vector<Event>& expected) +{ + cm::optional<EventLogger> o1{ 4 }; + const cm::optional<EventLogger> o2{ std::move(o1) }; + cm::optional<EventLogger> o3{}; + const cm::optional<EventLogger> o4{ std::move(o3) }; + + expected = { + { Event::VALUE_CONSTRUCT, &*o1, nullptr, 4 }, + { Event::MOVE_CONSTRUCT, &*o2, &o1.value(), 4 }, + { Event::DESTRUCT, &*o2, nullptr, 4 }, + { Event::DESTRUCT, &*o1, nullptr, 4 }, + }; + return true; +} + +static bool testNulloptAssign(std::vector<Event>& expected) +{ + cm::optional<EventLogger> o1{ 4 }; + o1 = cm::nullopt; + cm::optional<EventLogger> o2{}; + o2 = cm::nullopt; + + expected = { + { Event::VALUE_CONSTRUCT, &*o1, nullptr, 4 }, + { Event::DESTRUCT, &*o1, nullptr, 4 }, + }; + return true; +} + +static bool testCopyAssign(std::vector<Event>& expected) +{ + cm::optional<EventLogger> o1{}; + const cm::optional<EventLogger> o2{ 4 }; + o1 = o2; + const cm::optional<EventLogger> o3{ 5 }; + o1 = o3; + const cm::optional<EventLogger> o4{}; + o1 = o4; + o1 = o4; // Intentionally duplicated to test assigning an empty optional to + // an empty optional + + expected = { + { Event::VALUE_CONSTRUCT, &*o2, nullptr, 4 }, + { Event::COPY_CONSTRUCT, &*o1, &*o2, 4 }, + { Event::VALUE_CONSTRUCT, &*o3, nullptr, 5 }, + { Event::COPY_ASSIGN, &*o1, &*o3, 5 }, + { Event::DESTRUCT, &*o1, nullptr, 5 }, + { Event::DESTRUCT, &o3.value(), nullptr, 5 }, + { Event::DESTRUCT, &o2.value(), nullptr, 4 }, + }; + return true; +} + +static bool testMoveAssign(std::vector<Event>& expected) +{ + cm::optional<EventLogger> o1{}; + cm::optional<EventLogger> o2{ 4 }; + o1 = std::move(o2); + cm::optional<EventLogger> o3{ 5 }; + o1 = std::move(o3); + cm::optional<EventLogger> o4{}; + o1 = std::move(o4); + + expected = { + { Event::VALUE_CONSTRUCT, &*o2, nullptr, 4 }, + { Event::MOVE_CONSTRUCT, &*o1, &*o2, 4 }, + { Event::VALUE_CONSTRUCT, &*o3, nullptr, 5 }, + { Event::MOVE_ASSIGN, &*o1, &*o3, 5 }, + { Event::DESTRUCT, &*o1, nullptr, 5 }, + { Event::DESTRUCT, &*o3, nullptr, 5 }, + { Event::DESTRUCT, &*o2, nullptr, 4 }, + }; + return true; +} + +static bool testPointer(std::vector<Event>& expected) +{ + cm::optional<EventLogger> o1{ 4 }; + const cm::optional<EventLogger> o2{ 5 }; + + o1->Reference(); + o2->Reference(); + + expected = { + { Event::VALUE_CONSTRUCT, &*o1, nullptr, 4 }, + { Event::VALUE_CONSTRUCT, &*o2, nullptr, 5 }, + { Event::REFERENCE, &*o1, nullptr, 4 }, + { Event::CONST_REFERENCE, &*o2, nullptr, 5 }, + { Event::DESTRUCT, &*o2, nullptr, 5 }, + { Event::DESTRUCT, &*o1, nullptr, 4 }, + }; + return true; +} + +#if !__GNUC__ || __GNUC__ > 4 +# define ALLOW_CONST_RVALUE +#endif + +static bool testDereference(std::vector<Event>& expected) +{ + cm::optional<EventLogger> o1{ 4 }; + const cm::optional<EventLogger> o2{ 5 }; + + (*o1).Reference(); + (*o2).Reference(); + (*std::move(o1)).Reference(); +#ifdef ALLOW_CONST_RVALUE + (*std::move(o2)).Reference(); // Broken in GCC 4.9.0. Sigh... +#endif + + expected = { + { Event::VALUE_CONSTRUCT, &*o1, nullptr, 4 }, + { Event::VALUE_CONSTRUCT, &*o2, nullptr, 5 }, + { Event::REFERENCE, &*o1, nullptr, 4 }, + { Event::CONST_REFERENCE, &*o2, nullptr, 5 }, + { Event::RVALUE_REFERENCE, &*o1, nullptr, 4 }, +#ifdef ALLOW_CONST_RVALUE + { Event::CONST_RVALUE_REFERENCE, &*o2, nullptr, 5 }, +#endif + { Event::DESTRUCT, &*o2, nullptr, 5 }, + { Event::DESTRUCT, &*o1, nullptr, 4 }, + }; + return true; +} + +static bool testHasValue(std::vector<Event>& expected) +{ + bool retval = true; + + const cm::optional<EventLogger> o1{ 4 }; + const cm::optional<EventLogger> o2{}; + + if (!o1.has_value()) { + std::cout << "o1 should have a value" << std::endl; + retval = false; + } + + if (!o1) { + std::cout << "(bool)o1 should be true" << std::endl; + retval = false; + } + + if (o2.has_value()) { + std::cout << "o2 should not have a value" << std::endl; + retval = false; + } + + if (o2) { + std::cout << "(bool)o2 should be false" << std::endl; + retval = false; + } + + expected = { + { Event::VALUE_CONSTRUCT, &*o1, nullptr, 4 }, + { Event::DESTRUCT, &*o1, nullptr, 4 }, + }; + return retval; +} + +static bool testValue(std::vector<Event>& expected) +{ + bool retval = true; + + cm::optional<EventLogger> o1{ 4 }; + const cm::optional<EventLogger> o2{ 5 }; + cm::optional<EventLogger> o3{}; + const cm::optional<EventLogger> o4{}; + + o1.value().Reference(); + o2.value().Reference(); + + bool thrown = false; + try { + (void)o3.value(); + } catch (cm::bad_optional_access&) { + thrown = true; + } + if (!thrown) { + std::cout << "o3.value() did not throw" << std::endl; + retval = false; + } + + thrown = false; + try { + (void)o4.value(); + } catch (cm::bad_optional_access&) { + thrown = true; + } + if (!thrown) { + std::cout << "o4.value() did not throw" << std::endl; + retval = false; + } + + expected = { + { Event::VALUE_CONSTRUCT, &*o1, nullptr, 4 }, + { Event::VALUE_CONSTRUCT, &*o2, nullptr, 5 }, + { Event::REFERENCE, &*o1, nullptr, 4 }, + { Event::CONST_REFERENCE, &*o2, nullptr, 5 }, + { Event::DESTRUCT, &*o2, nullptr, 5 }, + { Event::DESTRUCT, &*o1, nullptr, 4 }, + }; + return retval; +} + +static bool testValueOr() +{ + bool retval = true; + + const cm::optional<EventLogger> o1{ 4 }; + cm::optional<EventLogger> o2{ 5 }; + const cm::optional<EventLogger> o3{}; + cm::optional<EventLogger> o4{}; + + EventLogger e1{ 6 }; + EventLogger e2{ 7 }; + EventLogger e3{ 8 }; + EventLogger e4{ 9 }; + + EventLogger r1 = o1.value_or(e1); + if (r1.Value != 4) { + std::cout << "r1.Value should be 4" << std::endl; + retval = false; + } + EventLogger r2 = std::move(o2).value_or(e2); + if (r2.Value != 5) { + std::cout << "r2.Value should be 5" << std::endl; + retval = false; + } + EventLogger r3 = o3.value_or(e3); + if (r3.Value != 8) { + std::cout << "r3.Value should be 8" << std::endl; + retval = false; + } + EventLogger r4 = std::move(o4).value_or(e4); + if (r4.Value != 9) { + std::cout << "r4.Value should be 9" << std::endl; + retval = false; + } + + return retval; +} + +static bool testSwap(std::vector<Event>& expected) +{ + bool retval = true; + + cm::optional<EventLogger> o1{ 4 }; + cm::optional<EventLogger> o2{}; + + o1.swap(o2); + + if (o1.has_value()) { + std::cout << "o1 should not have value" << std::endl; + retval = false; + } + if (!o2.has_value()) { + std::cout << "o2 should have value" << std::endl; + retval = false; + } + if (o2.value().Value != 4) { + std::cout << "value of o2 should be 4" << std::endl; + retval = false; + } + + o1.swap(o2); + + if (!o1.has_value()) { + std::cout << "o1 should have value" << std::endl; + retval = false; + } + if (o1.value().Value != 4) { + std::cout << "value of o1 should be 4" << std::endl; + retval = false; + } + if (o2.has_value()) { + std::cout << "o2 should not have value" << std::endl; + retval = false; + } + + o2.emplace(5); + o1.swap(o2); + + if (!o1.has_value()) { + std::cout << "o1 should have value" << std::endl; + retval = false; + } + if (o1.value().Value != 5) { + std::cout << "value of o1 should be 5" << std::endl; + retval = false; + } + if (!o2.has_value()) { + std::cout << "o2 should not have value" << std::endl; + retval = false; + } + if (o2.value().Value != 4) { + std::cout << "value of o2 should be 4" << std::endl; + retval = false; + } + + o1.reset(); + o2.reset(); + o1.swap(o2); + + if (o1.has_value()) { + std::cout << "o1 should not have value" << std::endl; + retval = false; + } + if (o2.has_value()) { + std::cout << "o2 should not have value" << std::endl; + retval = false; + } + + expected = { + { Event::VALUE_CONSTRUCT, &*o1, nullptr, 4 }, + { Event::MOVE_CONSTRUCT, &*o2, &*o1, 4 }, + { Event::DESTRUCT, &*o1, nullptr, 4 }, + { Event::MOVE_CONSTRUCT, &*o1, &*o2, 4 }, + { Event::DESTRUCT, &*o2, nullptr, 4 }, + { Event::VALUE_CONSTRUCT, &*o2, nullptr, 5 }, + { Event::SWAP, &*o1, &*o2, 5 }, + { Event::DESTRUCT, &*o1, nullptr, 5 }, + { Event::DESTRUCT, &*o2, nullptr, 4 }, + }; + return retval; +} + +static bool testReset(std::vector<Event>& expected) +{ + bool retval = true; + + cm::optional<EventLogger> o{ 4 }; + + o.reset(); + + if (o.has_value()) { + std::cout << "o should not have value" << std::endl; + retval = false; + } + + o.reset(); + + expected = { + { Event::VALUE_CONSTRUCT, &*o, nullptr, 4 }, + { Event::DESTRUCT, &*o, nullptr, 4 }, + }; + return retval; +} + +static bool testEmplace(std::vector<Event>& expected) +{ + cm::optional<EventLogger> o{ 4 }; + + o.emplace(5); + o.reset(); + o.emplace(); + + expected = { + { Event::VALUE_CONSTRUCT, &*o, nullptr, 4 }, + { Event::DESTRUCT, &*o, nullptr, 4 }, + { Event::VALUE_CONSTRUCT, &*o, nullptr, 5 }, + { Event::DESTRUCT, &*o, nullptr, 5 }, + { Event::DEFAULT_CONSTRUCT, &*o, nullptr, 0 }, + { Event::DESTRUCT, &*o, nullptr, 0 }, + }; + return true; +} + +static bool testMakeOptional(std::vector<Event>& expected) +{ + EventLogger e{ 4 }; + cm::optional<EventLogger> o1 = cm::make_optional<EventLogger>(e); + cm::optional<EventLogger> o2 = cm::make_optional<EventLogger>(5); + + expected = { + { Event::VALUE_CONSTRUCT, &e, nullptr, 4 }, + { Event::COPY_CONSTRUCT, &*o1, &e, 4 }, + { Event::VALUE_CONSTRUCT, &*o2, nullptr, 5 }, + { Event::DESTRUCT, &*o2, nullptr, 5 }, + { Event::DESTRUCT, &*o1, nullptr, 4 }, + { Event::DESTRUCT, &e, nullptr, 4 }, + }; + return true; +} + +static bool testMemoryRange(std::vector<Event>& expected) +{ + bool retval = true; + + cm::optional<EventLogger> o{ 4 }; + + auto* ostart = &o; + auto* oend = ostart + 1; + auto* estart = &o.value(); + auto* eend = estart + 1; + + if (static_cast<void*>(estart) < static_cast<void*>(ostart) || + static_cast<void*>(eend) > static_cast<void*>(oend)) { + std::cout << "value is not within memory range of optional" << std::endl; + retval = false; + } + + expected = { + { Event::VALUE_CONSTRUCT, &*o, nullptr, 4 }, + { Event::DESTRUCT, &*o, nullptr, 4 }, + }; + return retval; +} + +int testOptional(int /*unused*/, char* /*unused*/ []) +{ + int retval = 0; + +#define DO_EVENT_TEST(name) \ + do { \ + events.clear(); \ + std::vector<Event> expected; \ + if (!name(expected)) { \ + std::cout << "in " #name << std::endl; \ + retval = 1; \ + } else if (expected != events) { \ + std::cout << #name " did not produce expected events" << std::endl; \ + retval = 1; \ + } \ + } while (0) + +#define DO_TEST(name) \ + do { \ + if (!name()) { \ + std::cout << "in " #name << std::endl; \ + retval = 1; \ + } \ + } while (0) + + DO_EVENT_TEST(testDefaultConstruct); + DO_EVENT_TEST(testNulloptConstruct); + DO_EVENT_TEST(testValueConstruct); + DO_EVENT_TEST(testInPlaceConstruct); + DO_EVENT_TEST(testCopyConstruct); + DO_EVENT_TEST(testMoveConstruct); + DO_EVENT_TEST(testNulloptAssign); + DO_EVENT_TEST(testCopyAssign); + DO_EVENT_TEST(testMoveAssign); + DO_EVENT_TEST(testPointer); + DO_EVENT_TEST(testDereference); + DO_EVENT_TEST(testHasValue); + DO_EVENT_TEST(testValue); + DO_TEST(testValueOr); + DO_EVENT_TEST(testSwap); + DO_EVENT_TEST(testReset); + DO_EVENT_TEST(testEmplace); + DO_EVENT_TEST(testMakeOptional); + DO_EVENT_TEST(testMemoryRange); + + return retval; +} diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 5b8f255..cbd7d56 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -764,7 +764,8 @@ if(BUILD_TESTING) set(_TEST_DIR "${CMake_BINARY_DIR}/Tests/${name}") file(MAKE_DIRECTORY "${_TEST_DIR}") file(WRITE "${_TEST_DIR}/nightly-cmake.sh" - "cd ${_TEST_DIR} + "set -e +cd ${_TEST_DIR} ${CMake_BINARY_DIR}/bin/cmake -DCMAKE_CREATE_VERSION=nightly -P ${CMake_SOURCE_DIR}/Utilities/Release/${script} ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGHTLY_RELEASES}' ") @@ -780,8 +781,6 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH win64_release.cmake) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyOSX osx_release.cmake) - ADD_NIGHTLY_BUILD_TEST(CMakeNightlyLinux64 - linux64_release.cmake) set_property(TEST CMakeNightlyWin64 PROPERTY DEPENDS CMakeNightlyWin32) endif() @@ -1409,6 +1408,7 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH LibXml2 LTTngUST ODBC + OpenACC OpenCL OpenGL OpenMP @@ -1597,7 +1597,7 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH endfunction() if(NOT CMake_TEST_EXTERNAL_CMAKE) - foreach(STP RANGE 1 11) + foreach(STP RANGE 2 11) add_tutorial_test(Step${STP} TRUE) endforeach() add_tutorial_test(Complete TRUE) @@ -2129,8 +2129,8 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH macro(add_test_VSWinCE name generator systemName systemVersion generatorPlatform) # TODO: Fix the tutorial to make it work in cross compile # currently the MakeTable is build for target and can not be used on the host - # This happens in part 5 so we build only part 1-4 of the tutorial - foreach(STP RANGE 1 4) + # This happens in part 5 so we build only through part 4 of the tutorial. + foreach(STP RANGE 2 4) add_test(NAME "TutorialStep${STP}.${name}" COMMAND ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Help/guide/tutorial/Step${STP}" @@ -2618,16 +2618,18 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev -- '${CMake_BUILD_NIGH PASS_REGULAR_EXPRESSION "Could not find executable" FAIL_REGULAR_EXPRESSION "SegFault") - configure_file( - "${CMake_SOURCE_DIR}/Tests/CTestTestUpload/test.cmake.in" - "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" - @ONLY ESCAPE_QUOTES) - add_test(CTestTestUpload ${CMAKE_CTEST_COMMAND} - -S "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" -V - --output-log "${CMake_BINARY_DIR}/Tests/CTestTestUpload/testOut.log" - ) - set_tests_properties(CTestTestUpload PROPERTIES - PASS_REGULAR_EXPRESSION "Upload\\.xml") + if(NOT CMake_TEST_NO_NETWORK) + configure_file( + "${CMake_SOURCE_DIR}/Tests/CTestTestUpload/test.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" + @ONLY ESCAPE_QUOTES) + add_test(CTestTestUpload ${CMAKE_CTEST_COMMAND} + -S "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" -V + --output-log "${CMake_BINARY_DIR}/Tests/CTestTestUpload/testOut.log" + ) + set_tests_properties(CTestTestUpload PROPERTIES + PASS_REGULAR_EXPRESSION "Upload\\.xml") + endif() configure_file( "${CMake_SOURCE_DIR}/Tests/CTestCoverageCollectGCOV/test.cmake.in" diff --git a/Tests/COnly/CMakeLists.txt b/Tests/COnly/CMakeLists.txt index 3037f13..20615fe 100644 --- a/Tests/COnly/CMakeLists.txt +++ b/Tests/COnly/CMakeLists.txt @@ -13,11 +13,5 @@ if(MSVC_VERSION AND NOT CMAKE_C_COMPILER_ID STREQUAL Clang OR "x${CMAKE_C_COMPIL endif() string(ASCII 35 32 67 77 97 107 101 ASCII_STRING) message(STATUS "String: ${ASCII_STRING}") -get_source_file_property(LANG conly.c LANGUAGE) -if("${LANG}" STREQUAL "C") - message("Language is C") -else() - message(FATAL_ERROR "Bad language for file conly.c") -endif() add_library(testCModule MODULE testCModule.c) diff --git a/Tests/FindOpenACC/CMakeLists.txt b/Tests/FindOpenACC/CMakeLists.txt new file mode 100644 index 0000000..ef7de65 --- /dev/null +++ b/Tests/FindOpenACC/CMakeLists.txt @@ -0,0 +1,20 @@ + +set(langs C CXX) +if(NOT CMAKE_GENERATOR STREQUAL "Ninja") + list(APPEND langs Fortran) +endif() + +foreach(lang IN LISTS langs) + if(CMAKE_${lang}_COMPILER) + add_test(NAME FindOpenACC.Test${lang} COMMAND + ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindOpenACC/${lang}Test" + "${CMake_BINARY_DIR}/Tests/FindOpenACC/${lang}Test" + ${build_generator_args} + --build-project TestFindOpenACC + --build-options ${build_options} + --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> + ) + endif() +endforeach() diff --git a/Tests/FindOpenACC/CTest/CMakeLists.txt b/Tests/FindOpenACC/CTest/CMakeLists.txt new file mode 100644 index 0000000..c8d0968 --- /dev/null +++ b/Tests/FindOpenACC/CTest/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.14) +project(VerifyFindOpenAcc C) + +set(CMAKE_C_STANDARD 11) + +find_package(OpenACC REQUIRED) + +add_executable(UsesOpenACC main.c) +target_link_libraries(UsesOpenACC PRIVATE OpenACC::OpenACC_C) + +add_executable(UsesOpenACCVars main.c) +target_link_options(UsesOpenACCVars PRIVATE ${OpenACC_C_OPTIONS}) +target_compile_options(UsesOpenACCVars PRIVATE ${OpenACC_C_OPTIONS}) diff --git a/Tests/FindOpenACC/CTest/main.c b/Tests/FindOpenACC/CTest/main.c new file mode 100644 index 0000000..53b6cae --- /dev/null +++ b/Tests/FindOpenACC/CTest/main.c @@ -0,0 +1,44 @@ +#include <stdio.h> +#include <stdlib.h> + +void vecaddgpu(float* r, float* a, float* b, int n) +{ +#pragma acc kernels loop present(r, a, b) + for (int i = 0; i < n; ++i) + r[i] = a[i] + b[i]; +} + +int main() +{ + int n = 100000; /* vector length */ + float* a; /* input vector 1 */ + float* b; /* input vector 2 */ + float* r; /* output vector */ + float* e; /* expected output values */ + int i, errs; + + a = (float*)malloc(n * sizeof(float)); + b = (float*)malloc(n * sizeof(float)); + r = (float*)malloc(n * sizeof(float)); + e = (float*)malloc(n * sizeof(float)); + for (i = 0; i < n; ++i) { + a[i] = (float)(i + 1); + b[i] = (float)(1000 * i); + } +/* compute on the GPU */ +#pragma acc data copyin(a [0:n], b [0:n]) copyout(r [0:n]) + { + vecaddgpu(r, a, b, n); + } + /* compute on the host to compare */ + for (i = 0; i < n; ++i) + e[i] = a[i] + b[i]; + /* compare results */ + errs = 0; + for (i = 0; i < n; ++i) { + if (r[i] != e[i]) { + ++errs; + } + } + return errs; +} diff --git a/Tests/FindOpenACC/CXXTest/CMakeLists.txt b/Tests/FindOpenACC/CXXTest/CMakeLists.txt new file mode 100644 index 0000000..a6caf7b --- /dev/null +++ b/Tests/FindOpenACC/CXXTest/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.14) +project(VerifyFindOpenAcc CXX) + +set(CMAKE_CXX_STANDARD 11) + +find_package(OpenACC REQUIRED) + +add_executable(UsesOpenACC main.cxx) +target_link_libraries(UsesOpenACC PRIVATE OpenACC::OpenACC_CXX) + +add_executable(UsesOpenACCVars main.cxx) +target_link_options(UsesOpenACCVars PRIVATE ${OpenACC_CXX_OPTIONS}) +target_compile_options(UsesOpenACCVars PRIVATE ${OpenACC_CXX_OPTIONS}) diff --git a/Tests/FindOpenACC/CXXTest/main.cxx b/Tests/FindOpenACC/CXXTest/main.cxx new file mode 100644 index 0000000..7369045 --- /dev/null +++ b/Tests/FindOpenACC/CXXTest/main.cxx @@ -0,0 +1,43 @@ + +#include <vector> + +void vecaddgpu(float* r, float* a, float* b, std::size_t n) +{ +#pragma acc kernels loop present(r, a, b) + for (std::size_t i = 0; i < n; ++i) + r[i] = a[i] + b[i]; +} + +int main(int, char* []) +{ + const std::size_t n = 100000; /* vector length */ + std::vector<float> a(n); /* input vector 1 */ + std::vector<float> b(n); /* input vector 2 */ + std::vector<float> r(n); /* output vector */ + std::vector<float> e(n); /* expected output values */ + + for (std::size_t i = 0; i < n; ++i) { + a[i] = static_cast<float>(i + 1); + b[i] = static_cast<float>(1000 * i); + } + + /* compute on the GPU */ + auto a_ptr = a.data(); + auto b_ptr = b.data(); + auto r_ptr = r.data(); +#pragma acc data copyin(a_ptr [0:n], b_ptr [0:n]) copyout(r_ptr [0:n]) + { + vecaddgpu(r_ptr, a_ptr, b_ptr, n); + } + /* compute on the host to compare */ + for (std::size_t i = 0; i < n; ++i) + e[i] = a[i] + b[i]; + /* compare results */ + int errs = 0; + for (std::size_t i = 0; i < n; ++i) { + if (r[i] != e[i]) { + ++errs; + } + } + return errs; +} diff --git a/Tests/FindOpenACC/FortranTest/CMakeLists.txt b/Tests/FindOpenACC/FortranTest/CMakeLists.txt new file mode 100644 index 0000000..12e3503 --- /dev/null +++ b/Tests/FindOpenACC/FortranTest/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.14) +project(VerifyFindOpenAcc Fortran) + +find_package(OpenACC REQUIRED) + +add_executable(UsesOpenACC main.f90) +target_link_libraries(UsesOpenACC PRIVATE OpenACC::OpenACC_Fortran) + +add_executable(UsesOpenACCVars main.f90) +target_link_options(UsesOpenACCVars PRIVATE ${OpenACC_Fortran_OPTIONS}) +target_compile_options(UsesOpenACCVars PRIVATE ${OpenACC_Fortran_OPTIONS}) diff --git a/Tests/FindOpenACC/FortranTest/main.f90 b/Tests/FindOpenACC/FortranTest/main.f90 new file mode 100644 index 0000000..2ff1ba0 --- /dev/null +++ b/Tests/FindOpenACC/FortranTest/main.f90 @@ -0,0 +1,9 @@ +program t +integer(4) a(10000) +a = [ (1+i,i=1,10000) ] +!$acc kernels +do i = 1, 10000 + if (a(i)/3000*3000.eq.a(i)) print *," located ",i,a(i),i.gt.5000,a(i)/5.0 +end do +!$acc end kernels +end diff --git a/Tests/MakeClean/ToClean/CMakeLists.txt b/Tests/MakeClean/ToClean/CMakeLists.txt index 6f16d12..a05c38b 100644 --- a/Tests/MakeClean/ToClean/CMakeLists.txt +++ b/Tests/MakeClean/ToClean/CMakeLists.txt @@ -15,42 +15,45 @@ function(writeCleanFile FILENAME) file(WRITE "${FILENAME}" ${CLEAN_FILE_CONTENT}) endfunction() +set(DUMMY_CONTENT_FILE ${CSD}/toclean.cxx) + # Build a simple project whose compiled objects should be cleaned. add_executable(toclean toclean.cxx) -addCleanFile("${CBD}${CMAKE_FILES_DIRECTORY}/toclean.dir/toclean.cxx${CMAKE_CXX_OUTPUT_EXTENSION}") +addCleanFile( + "${CBD}${CMAKE_FILES_DIRECTORY}/toclean.dir/toclean.cxx${CMAKE_CXX_OUTPUT_EXTENSION}") -# Create a post build custom command that copies the toclean output executable +# Create a post build custom command that copies a dummy file # to a custom location -function(addToCleanPostBuildCopy FILENAME) - add_custom_command(TARGET toclean POST_BUILD +function(addPostBuildFile TARGET FILENAME) + add_custom_command(TARGET ${TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy $<TARGET_FILE:toclean> ${FILENAME}) + ARGS -E copy ${DUMMY_CONTENT_FILE} ${FILENAME}) endfunction() # Create a custom command whose output should be cleaned. set(CustomCommandFile "${CBD}/CustomCommandFile.txt") add_custom_command(OUTPUT ${CustomCommandFile} - DEPENDS ${CSD}/toclean.cxx + DEPENDS ${DUMMY_CONTENT_FILE} COMMAND ${CMAKE_COMMAND} - ARGS -E copy ${CSD}/toclean.cxx ${CustomCommandFile}) -add_custom_target(generate ALL DEPENDS ${CustomCommandFile}) + ARGS -E copy ${DUMMY_CONTENT_FILE} ${CustomCommandFile}) +add_custom_target(customTarget ALL DEPENDS ${CustomCommandFile}) addCleanFile(${CustomCommandFile}) ### Tests ADDITIONAL_MAKE_CLEAN_FILES directory property if("${CMAKE_GENERATOR}" MATCHES "Makefile") # Create a file that must be registered for cleaning. - set(MakeDirPropFile "${CBD}/MakeDirPropFile.txt") - writeCleanFile("${MakeDirPropFile}") - set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${MakeDirPropFile}") - addCleanFile(${MakeDirPropFile}) + set(MakeDirPropFileAbs "${CBD}/MakeDirPropFile.txt") + writeCleanFile("${MakeDirPropFileAbs}") + set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${MakeDirPropFileAbs}") + addCleanFile(${MakeDirPropFileAbs}) # Create a custom command whose output should be cleaned, but whose name # is not known until generate-time set(MakeDirPropExpFileRel "MakeDirProp_copy${CMAKE_EXECUTABLE_SUFFIX}") - set(MakeDirPropExpFile "$<TARGET_FILE_DIR:toclean>/${MakeDirPropExpFileRel}") - addToCleanPostBuildCopy("${MakeDirPropExpFile}") - set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${MakeDirPropExpFile}) + set(MakeDirPropExpFileAbs "$<TARGET_FILE_DIR:toclean>/${MakeDirPropExpFileRel}") + addPostBuildFile(toclean "${MakeDirPropExpFileAbs}") + set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${MakeDirPropExpFileAbs}) addCleanFile("${CBD}/${MakeDirPropExpFileRel}") endif() @@ -72,34 +75,43 @@ addCleanFile("${DirPropFileAbs}") # Create a custom command whose output should be cleaned, but whose name # is not known until generate-time set(DirPropExpFileRel "DirProp_copy${CMAKE_EXECUTABLE_SUFFIX}") -set(DirPropExpFile "$<TARGET_FILE_DIR:toclean>/${DirPropExpFileRel}") -addToCleanPostBuildCopy("${DirPropExpFile}") -set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_CLEAN_FILES ${DirPropExpFile}) +set(DirPropExpFileAbs "$<TARGET_FILE_DIR:toclean>/${DirPropExpFileRel}") +addPostBuildFile(toclean "${DirPropExpFileAbs}") +set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_CLEAN_FILES ${DirPropExpFileAbs}) addCleanFile("${CBD}/${DirPropExpFileRel}") ### Tests ADDITIONAL_CLEAN_FILES target property -# Register a file path relative to the build directory -set(TgtPropFileRel "TargetPropFileRel.txt") -writeCleanFile("${CBD}/${TgtPropFileRel}") -set_target_properties(toclean PROPERTIES ADDITIONAL_CLEAN_FILES ${TgtPropFileRel}) -addCleanFile("${CBD}/${TgtPropFileRel}") - -# Register an absolute file path -set(TgtPropFileAbs "${CBD}/TargetPropFileAbs.txt") -writeCleanFile("${TgtPropFileAbs}") -set_property(TARGET toclean APPEND PROPERTY ADDITIONAL_CLEAN_FILES ${TgtPropFileAbs}) -addCleanFile("${TgtPropFileAbs}") - -# Create a custom command whose output should be cleaned, but whose name -# is not known until generate-time -set(TgtPropExpFileRel "TgtProp_copy${CMAKE_EXECUTABLE_SUFFIX}") -set(TgtPropExpFile "$<TARGET_FILE_DIR:toclean>/${TgtPropExpFileRel}") -addToCleanPostBuildCopy("${TgtPropExpFile}") -set_property(TARGET toclean APPEND PROPERTY ADDITIONAL_CLEAN_FILES ${TgtPropExpFile}) -addCleanFile("${CBD}/${TgtPropExpFileRel}") +function(test_target_property TARGET) + # Register a file path relative to the build directory + set(TgtPropFileRel "${TARGET}_TargetPropFileRel.txt") + writeCleanFile("${CBD}/${TgtPropFileRel}") + set_target_properties(${TARGET} PROPERTIES ADDITIONAL_CLEAN_FILES ${TgtPropFileRel}) + addCleanFile("${CBD}/${TgtPropFileRel}") + + # Register an absolute file path + set(TgtPropFileAbs "${CBD}/${TARGET}_TargetPropFileAbs.txt") + writeCleanFile("${TgtPropFileAbs}") + set_property(TARGET ${TARGET} APPEND PROPERTY ADDITIONAL_CLEAN_FILES ${TgtPropFileAbs}) + addCleanFile("${TgtPropFileAbs}") + + # Create a custom command whose output should be cleaned, but whose name + # is not known until generate-time + set(TgtPropExpFileRel "${TARGET}_TargetPropGenExp.txt") + set(TgtPropExpFileAbs "$<TARGET_FILE_DIR:toclean>/${TgtPropExpFileRel}") + addPostBuildFile(${TARGET} "${TgtPropExpFileAbs}") + set_property(TARGET ${TARGET} APPEND PROPERTY ADDITIONAL_CLEAN_FILES ${TgtPropExpFileAbs}) + addCleanFile("${CBD}/${TgtPropExpFileRel}") +endfunction() +# Test target property for various target types +add_executable(acf_exec toclean.cxx) +test_target_property(acf_exec) +add_library(acf_lib toclean.cxx) +test_target_property(acf_lib) +add_custom_target(acf_custom ALL DEPENDS ${CustomCommandFile}) +test_target_property(acf_custom) # Process subdirectory without targets add_subdirectory(EmptySubDir) diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index c952b1a..48eebcc 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -201,6 +201,7 @@ if(MSVC) endif() add_RunCMake_test(ObjectLibrary) add_RunCMake_test(ParseImplicitIncludeInfo) +add_RunCMake_test(ParseImplicitLinkInfo) if(UNIX AND CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG AND CMAKE_EXECUTABLE_FORMAT STREQUAL "ELF") add_RunCMake_test(RuntimePath) endif() @@ -248,7 +249,8 @@ add_RunCMake_test(export) add_RunCMake_test(cmake_minimum_required) add_RunCMake_test(cmake_parse_arguments) add_RunCMake_test(continue) -add_RunCMake_test(ctest_build) +add_executable(color_warning color_warning.c) +add_RunCMake_test(ctest_build -DCOLOR_WARNING=$<TARGET_FILE:color_warning>) add_RunCMake_test(ctest_cmake_error) add_RunCMake_test(ctest_configure) if(COVERAGE_COMMAND) @@ -572,3 +574,5 @@ if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|9[0-9])") endif() add_RunCMake_test("CTestCommandExpandLists") + +add_RunCMake_test(PrecompileHeaders) diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake index 3fee79c..ca2975a 100644 --- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake @@ -256,7 +256,11 @@ function(run_ShowOnly) file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" " add_test(ShowOnly \"${CMAKE_COMMAND}\" -E echo) - set_tests_properties(ShowOnly PROPERTIES WILL_FAIL true _BACKTRACE_TRIPLES \"file1;1;add_test;file0;;\") + set_tests_properties(ShowOnly PROPERTIES + WILL_FAIL true + REQUIRED_FILES RequiredFileDoesNotExist + _BACKTRACE_TRIPLES \"file1;1;add_test;file0;;\" + ) add_test(ShowOnlyNotAvailable NOT_AVAILABLE) ") run_cmake_command(show-only_human ${CMAKE_CTEST_COMMAND} --show-only=human) diff --git a/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py b/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py index 4dff90c..3ad5768 100644 --- a/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py +++ b/Tests/RunCMake/CTestCommandLine/show-only_json-v1_check.py @@ -63,6 +63,15 @@ def check_command(c): assert is_string(c[2]) assert c[2] == "echo" +def check_reqfiles_property(p): + assert is_dict(p) + assert sorted(p.keys()) == ["name", "value"] + assert is_string(p["name"]) + assert is_list(p["value"]) + assert p["name"] == "REQUIRED_FILES" + assert len(p["value"]) == 1 + assert p["value"][0] == "RequiredFileDoesNotExist" + def check_willfail_property(p): assert is_dict(p) assert sorted(p.keys()) == ["name", "value"] @@ -81,9 +90,10 @@ def check_workingdir_property(p): def check_properties(p): assert is_list(p) - assert len(p) == 2 - check_willfail_property(p[0]) - check_workingdir_property(p[1]) + assert len(p) == 3 + check_reqfiles_property(p[0]) + check_willfail_property(p[1]) + check_workingdir_property(p[2]) def check_tests(t): assert is_list(t) diff --git a/Tests/RunCMake/CommandLine/C_buildsrcdir-stderr.txt b/Tests/RunCMake/CommandLine/C_buildsrcdir-stderr.txt new file mode 100644 index 0000000..0d8f72e --- /dev/null +++ b/Tests/RunCMake/CommandLine/C_buildsrcdir-stderr.txt @@ -0,0 +1,8 @@ +initial-cache.txt: CMAKE_SOURCE_DIR: .*/C_buildsrcdir/src +initial-cache.txt: CMAKE_BINARY_DIR: .*/C_buildsrcdir-build/DummyBuildDir +PreLoad.cmake: CMAKE_SOURCE_DIR: .*/C_buildsrcdir/src +PreLoad.cmake: CMAKE_BINARY_DIR: .*/C_buildsrcdir-build/DummyBuildDir +CMakeLists.txt: INITIAL_SOURCE_DIR: .*/C_buildsrcdir/src +CMakeLists.txt: INITIAL_BINARY_DIR: .*/C_buildsrcdir-build/DummyBuildDir +CMakeLists.txt: PRELOAD_SOURCE_DIR: .*/C_buildsrcdir/src +CMakeLists.txt: PRELOAD_BINARY_DIR: .*/C_buildsrcdir-build/DummyBuildDir diff --git a/Tests/RunCMake/CommandLine/C_buildsrcdir-stdout.txt b/Tests/RunCMake/CommandLine/C_buildsrcdir-stdout.txt new file mode 100644 index 0000000..c69b11e --- /dev/null +++ b/Tests/RunCMake/CommandLine/C_buildsrcdir-stdout.txt @@ -0,0 +1,2 @@ +loading initial cache file .*/C_buildsrcdir/initial-cache.txt +.* diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd_nostdinc-CXX-GNU-4.8.5.output b/Tests/RunCMake/CommandLine/C_buildsrcdir.cmake index e69de29..e69de29 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd_nostdinc-CXX-GNU-4.8.5.output +++ b/Tests/RunCMake/CommandLine/C_buildsrcdir.cmake diff --git a/Tests/RunCMake/CommandLine/C_buildsrcdir/initial-cache.txt b/Tests/RunCMake/CommandLine/C_buildsrcdir/initial-cache.txt new file mode 100644 index 0000000..adc125b --- /dev/null +++ b/Tests/RunCMake/CommandLine/C_buildsrcdir/initial-cache.txt @@ -0,0 +1,6 @@ +# Used to verify that the values match what is passed via -S and -B, and are retained in cache. +set(INITIAL_SOURCE_DIR "${CMAKE_SOURCE_DIR}" CACHE PATH "defined in initial.cmake") +set(INITIAL_BINARY_DIR "${CMAKE_BINARY_DIR}" CACHE PATH "defined in initial.cmake") + +message("initial-cache.txt: CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}") +message("initial-cache.txt: CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}") diff --git a/Tests/RunCMake/CommandLine/C_buildsrcdir/src/CMakeLists.txt b/Tests/RunCMake/CommandLine/C_buildsrcdir/src/CMakeLists.txt new file mode 100644 index 0000000..4893fe7 --- /dev/null +++ b/Tests/RunCMake/CommandLine/C_buildsrcdir/src/CMakeLists.txt @@ -0,0 +1,6 @@ +project(C_buildsrcdir) + +message("CMakeLists.txt: INITIAL_SOURCE_DIR: ${INITIAL_SOURCE_DIR}") +message("CMakeLists.txt: INITIAL_BINARY_DIR: ${INITIAL_BINARY_DIR}") +message("CMakeLists.txt: PRELOAD_SOURCE_DIR: ${PRELOAD_SOURCE_DIR}") +message("CMakeLists.txt: PRELOAD_BINARY_DIR: ${PRELOAD_BINARY_DIR}") diff --git a/Tests/RunCMake/CommandLine/C_buildsrcdir/src/PreLoad.cmake b/Tests/RunCMake/CommandLine/C_buildsrcdir/src/PreLoad.cmake new file mode 100644 index 0000000..5199219 --- /dev/null +++ b/Tests/RunCMake/CommandLine/C_buildsrcdir/src/PreLoad.cmake @@ -0,0 +1,6 @@ +# Used to verify that the values match what is passed via -S and -B, and are retained in cache. +message("PreLoad.cmake: CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}") +message("PreLoad.cmake: CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}") + +set(PRELOAD_BINARY_DIR "${CMAKE_BINARY_DIR}" CACHE PATH "value of cmake_binary_dir during preload") +set(PRELOAD_SOURCE_DIR "${CMAKE_SOURCE_DIR}" CACHE PATH "value of cmake_source_dir during preload") diff --git a/Tests/RunCMake/CommandLine/E_remove_directory-symlink-dir-check.cmake b/Tests/RunCMake/CommandLine/E_remove_directory-symlink-dir-check.cmake new file mode 100644 index 0000000..f70312c --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_remove_directory-symlink-dir-check.cmake @@ -0,0 +1,6 @@ +if(EXISTS ${out}/link_dir) + set(RunCMake_TEST_FAILED "did not remove ${out}/link_dir") +endif() +if(NOT EXISTS ${out}/dir) + set(RunCMake_TEST_FAILED "should not have removed ${out}/dir") +endif() diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd_nostdinc-C-GNU-4.8.5.output b/Tests/RunCMake/CommandLine/E_remove_directory-symlink-dir-stderr.txt index e69de29..e69de29 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd_nostdinc-C-GNU-4.8.5.output +++ b/Tests/RunCMake/CommandLine/E_remove_directory-symlink-dir-stderr.txt diff --git a/Tests/RunCMake/CommandLine/E_remove_directory-symlink-file-check.cmake b/Tests/RunCMake/CommandLine/E_remove_directory-symlink-file-check.cmake new file mode 100644 index 0000000..23d7c6d --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_remove_directory-symlink-file-check.cmake @@ -0,0 +1,6 @@ +if(NOT EXISTS ${outfile}) + set(RunCMake_TEST_FAILED "removed non-directory ${outfile}") +endif() +if(NOT EXISTS ${out}/link_file_for_test.txt) + set(RunCMake_TEST_FAILED "removed non-directory symlink ${out}/link_file_for_test.txt") +endif() diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-Fortran-PGI-18.10.1.output b/Tests/RunCMake/CommandLine/E_remove_directory-symlink-file-stderr.txt index e69de29..e69de29 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-Fortran-PGI-18.10.1.output +++ b/Tests/RunCMake/CommandLine/E_remove_directory-symlink-file-stderr.txt diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 4e19871..efd1cc2 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -348,6 +348,17 @@ run_cmake_command(E_make_directory-two-directories-and-file ${CMAKE_COMMAND} -E make_directory ${out}/d1 ${out}/d2 ${outfile}) run_cmake_command(E_remove_directory-two-directories-and-file ${CMAKE_COMMAND} -E remove_directory ${out}/d1 ${out}/d2 ${outfile}) + +if(UNIX) + file(MAKE_DIRECTORY ${out}/dir) + file(CREATE_LINK ${out}/dir ${out}/link_dir SYMBOLIC) + file(CREATE_LINK ${outfile} ${out}/link_file_for_test.txt SYMBOLIC) + run_cmake_command(E_remove_directory-symlink-dir + ${CMAKE_COMMAND} -E remove_directory ${out}/link_dir) + run_cmake_command(E_remove_directory-symlink-file + ${CMAKE_COMMAND} -E remove_directory ${out}/link_file_for_test.txt) +endif() + unset(out) unset(outfile) @@ -391,6 +402,13 @@ run_cmake_command(E_sleep-one-tenth ${CMAKE_COMMAND} -E sleep 0.1) run_cmake_command(P_directory ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}) run_cmake_command(P_working-dir ${CMAKE_COMMAND} -DEXPECTED_WORKING_DIR=${RunCMake_BINARY_DIR}/P_working-dir-build -P ${RunCMake_SOURCE_DIR}/P_working-dir.cmake) +# Documented to return the same result as above even if -S and -B are set to something else. +# Tests the values of CMAKE_BINARY_DIR CMAKE_CURRENT_BINARY_DIR CMAKE_SOURCE_DIR CMAKE_CURRENT_SOURCE_DIR. +run_cmake_command(P_working-dir ${CMAKE_COMMAND} -DEXPECTED_WORKING_DIR=${RunCMake_BINARY_DIR}/P_working-dir-build -P ${RunCMake_SOURCE_DIR}/P_working-dir.cmake -S something_else -B something_else_1) + +# CMAKE_BINARY_DIR should be determined by -B if specified, and CMAKE_SOURCE_DIR determined by -S if specified. +run_cmake_with_options(C_buildsrcdir -B DummyBuildDir -S ${RunCMake_SOURCE_DIR}/C_buildsrcdir/src -C ${RunCMake_SOURCE_DIR}/C_buildsrcdir/initial-cache.txt) + set(RunCMake_TEST_OPTIONS "-DFOO=-DBAR:BOOL=BAZ") @@ -484,6 +502,14 @@ set(RunCMake_TEST_OPTIONS --trace-expand --warn-uninitialized) run_cmake(trace-expand-warn-uninitialized) unset(RunCMake_TEST_OPTIONS) +set(RunCMake_TEST_OPTIONS --trace-redirect=${RunCMake_BINARY_DIR}/redirected.trace) +run_cmake(trace-redirect) +unset(RunCMake_TEST_OPTIONS) + +set(RunCMake_TEST_OPTIONS --trace-redirect=/no/such/file.txt) +run_cmake(trace-redirect-nofile) +unset(RunCMake_TEST_OPTIONS) + set(RunCMake_TEST_OPTIONS -Wno-deprecated --warn-uninitialized) run_cmake(warn-uninitialized) unset(RunCMake_TEST_OPTIONS) diff --git a/Tests/RunCMake/CommandLine/trace-redirect-check.cmake b/Tests/RunCMake/CommandLine/trace-redirect-check.cmake new file mode 100644 index 0000000..1ee0e0d --- /dev/null +++ b/Tests/RunCMake/CommandLine/trace-redirect-check.cmake @@ -0,0 +1,13 @@ +file(READ ${RunCMake_SOURCE_DIR}/trace-stderr.txt expected_content) +string(REGEX REPLACE "\n+$" "" expected_content "${expected_content}") + +file(READ ${RunCMake_BINARY_DIR}/redirected.trace actual_content) +string(REGEX REPLACE "\r\n" "\n" actual_content "${actual_content}") +string(REGEX REPLACE "\n+$" "" actual_content "${actual_content}") +if(NOT "${actual_content}" MATCHES "${expected_content}") + set(RunCMake_TEST_FAILED + "Trace file content does not match that expected." + "Expected to match:\n${expected_content}\n" + "Actual content:\n${actual_content}\n" + ) +endif() diff --git a/Tests/RunCMake/CommandLine/trace-redirect-nofile-result.txt b/Tests/RunCMake/CommandLine/trace-redirect-nofile-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/trace-redirect-nofile-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/trace-redirect-nofile-stderr.txt b/Tests/RunCMake/CommandLine/trace-redirect-nofile-stderr.txt new file mode 100644 index 0000000..edb0c8e --- /dev/null +++ b/Tests/RunCMake/CommandLine/trace-redirect-nofile-stderr.txt @@ -0,0 +1 @@ +^CMake Error: Error opening trace file /no/such/file.txt: .+$ diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-CXX-XL-12.1.0.output b/Tests/RunCMake/CommandLine/trace-redirect-nofile.cmake index e69de29..e69de29 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-CXX-XL-12.1.0.output +++ b/Tests/RunCMake/CommandLine/trace-redirect-nofile.cmake diff --git a/Tests/RunCMake/CommandLine/trace-redirect-stdout.txt b/Tests/RunCMake/CommandLine/trace-redirect-stdout.txt new file mode 100644 index 0000000..775f2b5 --- /dev/null +++ b/Tests/RunCMake/CommandLine/trace-redirect-stdout.txt @@ -0,0 +1 @@ +^.*Trace will be written to .+redirected.trace.*$ diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-C-XL-12.1.0.output b/Tests/RunCMake/CommandLine/trace-redirect.cmake index e69de29..e69de29 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-C-XL-12.1.0.output +++ b/Tests/RunCMake/CommandLine/trace-redirect.cmake diff --git a/Tests/RunCMake/FindBoost/CMakePackage_New/BoostConfig.cmake b/Tests/RunCMake/FindBoost/CMakePackage_New/BoostConfig.cmake index 3a88f26..1151514 100644 --- a/Tests/RunCMake/FindBoost/CMakePackage_New/BoostConfig.cmake +++ b/Tests/RunCMake/FindBoost/CMakePackage_New/BoostConfig.cmake @@ -8,6 +8,7 @@ set_target_properties(Boost::date_time PROPERTIES IMPORTED_CONFIGURATIONS RELEASE IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_LIST_DIR}/lib/libboost_date_time.a" ) + set(Boost_python37_FOUND 1) add_library(Boost::python UNKNOWN IMPORTED) set_target_properties(Boost::python PROPERTIES @@ -15,6 +16,10 @@ set_target_properties(Boost::python PROPERTIES IMPORTED_LOCATION_RELEASE "${CMAKE_CURRENT_LIST_DIR}/lib/libboost_python_release.a" IMPORTED_LOCATION_DEBUG "${CMAKE_CURRENT_LIST_DIR}/lib/libboost_python.a" ) +# Versioned target alias for compatibility (added by upstream BoostConfig). +add_library(Boost::python37 INTERFACE IMPORTED) +set_property(TARGET Boost::python37 APPEND PROPERTY INTERFACE_LINK_LIBRARIES Boost::python) + set(Boost_mpi_python2_FOUND 1) add_library(Boost::mpi_python UNKNOWN IMPORTED) set_target_properties(Boost::mpi_python PROPERTIES diff --git a/Tests/RunCMake/ObjectLibrary/InstallLinkedObj1-stderr.txt b/Tests/RunCMake/ObjectLibrary/InstallLinkedObj1-stderr.txt index f2f0f94..c663707 100644 --- a/Tests/RunCMake/ObjectLibrary/InstallLinkedObj1-stderr.txt +++ b/Tests/RunCMake/ObjectLibrary/InstallLinkedObj1-stderr.txt @@ -1 +1 @@ -CMake Error: install\(EXPORT "exp" ...\) includes target "UseA" which requires target "A" that is not in the export set. +CMake Error: install\(EXPORT "exp" ...\) includes target "UseA" which requires target "A" that is not in any export set. diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/CMakeLists.txt b/Tests/RunCMake/ParseImplicitData/CMakeLists.txt index bffe819..7a8570b 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/CMakeLists.txt +++ b/Tests/RunCMake/ParseImplicitData/CMakeLists.txt @@ -1,6 +1,6 @@ # # helper CMakeLists.txt file that can be used to generate input files -# for the Tests/RunCMake/ParseImplicitIncludeInfo test. +# for the Tests/RunCMake/ParseImplicit[Include|Lib]Info tests. # # usage: # [create a temporary build directory and chdir to it] @@ -81,6 +81,7 @@ foreach(lang IN ITEMS ${LANGUAGES}) endif() set(result "CMAKE_LANG=${lang}\n") + list(APPEND result "CMAKE_LINKER=${CMAKE_LINKER}\n") foreach(var IN ITEMS ${compvars}) list(APPEND result "CMAKE_${lang}_COMPILER_${var}=${CMAKE_${lang}_COMPILER_${var}}\n") diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/README b/Tests/RunCMake/ParseImplicitData/README index 4f19b3c..4680254 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/README +++ b/Tests/RunCMake/ParseImplicitData/README @@ -1,6 +1,7 @@ This directory contains sample input files for the implicit include -directories parser for testing. For each configuration there is one -".input" file and one ".output" file. +directories, and link info parsers for testing. For each configuration + there is one ".input" file and matching ".output" files in +ParseImplicitIncludeInfo/results and ParseImplicitLinkInfo/results. To generate ".input" files for a system, create a temporary build directory and chdir to it. Then run cmake pointing to this directory. diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-C-XL-13.1.3.input b/Tests/RunCMake/ParseImplicitData/aix-C-XL-13.1.3.input index 14517c5..14517c5 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-C-XL-13.1.3.input +++ b/Tests/RunCMake/ParseImplicitData/aix-C-XL-13.1.3.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-C-XLClang-16.1.0.1.input b/Tests/RunCMake/ParseImplicitData/aix-C-XLClang-16.1.0.1.input index 2f018e6..2f018e6 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-C-XLClang-16.1.0.1.input +++ b/Tests/RunCMake/ParseImplicitData/aix-C-XLClang-16.1.0.1.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-CXX-XL-13.1.3.input b/Tests/RunCMake/ParseImplicitData/aix-CXX-XL-13.1.3.input index 5aec849..5aec849 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-CXX-XL-13.1.3.input +++ b/Tests/RunCMake/ParseImplicitData/aix-CXX-XL-13.1.3.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-CXX-XLClang-16.1.0.1.input b/Tests/RunCMake/ParseImplicitData/aix-CXX-XLClang-16.1.0.1.input index da16db3..da16db3 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-CXX-XLClang-16.1.0.1.input +++ b/Tests/RunCMake/ParseImplicitData/aix-CXX-XLClang-16.1.0.1.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Cray-8.7.input b/Tests/RunCMake/ParseImplicitData/craype-C-Cray-8.7.input index b3218a2..b3218a2 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Cray-8.7.input +++ b/Tests/RunCMake/ParseImplicitData/craype-C-Cray-8.7.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Cray-9.0-hlist-ad.input b/Tests/RunCMake/ParseImplicitData/craype-C-Cray-9.0-hlist-ad.input index e82bd97..e82bd97 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Cray-9.0-hlist-ad.input +++ b/Tests/RunCMake/ParseImplicitData/craype-C-Cray-9.0-hlist-ad.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-GNU-7.3.0.input b/Tests/RunCMake/ParseImplicitData/craype-C-GNU-7.3.0.input index 2dc60af..2dc60af 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-GNU-7.3.0.input +++ b/Tests/RunCMake/ParseImplicitData/craype-C-GNU-7.3.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Intel-18.0.2.20180210.input b/Tests/RunCMake/ParseImplicitData/craype-C-Intel-18.0.2.20180210.input index 8c68e5b..8c68e5b 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Intel-18.0.2.20180210.input +++ b/Tests/RunCMake/ParseImplicitData/craype-C-Intel-18.0.2.20180210.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Cray-8.7.input b/Tests/RunCMake/ParseImplicitData/craype-CXX-Cray-8.7.input index 73c9c8a..73c9c8a 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Cray-8.7.input +++ b/Tests/RunCMake/ParseImplicitData/craype-CXX-Cray-8.7.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Cray-9.0-hlist-ad.input b/Tests/RunCMake/ParseImplicitData/craype-CXX-Cray-9.0-hlist-ad.input index 06a4ac9..06a4ac9 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Cray-9.0-hlist-ad.input +++ b/Tests/RunCMake/ParseImplicitData/craype-CXX-Cray-9.0-hlist-ad.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-GNU-7.3.0.input b/Tests/RunCMake/ParseImplicitData/craype-CXX-GNU-7.3.0.input index 50f2859..50f2859 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-GNU-7.3.0.input +++ b/Tests/RunCMake/ParseImplicitData/craype-CXX-GNU-7.3.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Intel-18.0.2.20180210.input b/Tests/RunCMake/ParseImplicitData/craype-CXX-Intel-18.0.2.20180210.input index e25f7cf..e25f7cf 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Intel-18.0.2.20180210.input +++ b/Tests/RunCMake/ParseImplicitData/craype-CXX-Intel-18.0.2.20180210.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Cray-8.7.input b/Tests/RunCMake/ParseImplicitData/craype-Fortran-Cray-8.7.input index 4c4e2f4..4c4e2f4 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Cray-8.7.input +++ b/Tests/RunCMake/ParseImplicitData/craype-Fortran-Cray-8.7.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Cray-9.0-hlist-ad.input b/Tests/RunCMake/ParseImplicitData/craype-Fortran-Cray-9.0-hlist-ad.input index 0ba430a..0ba430a 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Cray-9.0-hlist-ad.input +++ b/Tests/RunCMake/ParseImplicitData/craype-Fortran-Cray-9.0-hlist-ad.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-GNU-7.3.0.input b/Tests/RunCMake/ParseImplicitData/craype-Fortran-GNU-7.3.0.input index bee298c..bee298c 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-GNU-7.3.0.input +++ b/Tests/RunCMake/ParseImplicitData/craype-Fortran-GNU-7.3.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Intel-18.0.2.20180210.input b/Tests/RunCMake/ParseImplicitData/craype-Fortran-Intel-18.0.2.20180210.input index 4cdff74..4cdff74 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Intel-18.0.2.20180210.input +++ b/Tests/RunCMake/ParseImplicitData/craype-Fortran-Intel-18.0.2.20180210.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-C-AppleClang-8.0.0.8000042.input b/Tests/RunCMake/ParseImplicitData/darwin-C-AppleClang-8.0.0.8000042.input index 4bc26bc..4bc26bc 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-C-AppleClang-8.0.0.8000042.input +++ b/Tests/RunCMake/ParseImplicitData/darwin-C-AppleClang-8.0.0.8000042.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-CXX-AppleClang-8.0.0.8000042.input b/Tests/RunCMake/ParseImplicitData/darwin-CXX-AppleClang-8.0.0.8000042.input index 907a92e..907a92e 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-CXX-AppleClang-8.0.0.8000042.input +++ b/Tests/RunCMake/ParseImplicitData/darwin-CXX-AppleClang-8.0.0.8000042.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin_nostdinc-C-AppleClang-8.0.0.8000042.input b/Tests/RunCMake/ParseImplicitData/darwin_nostdinc-C-AppleClang-8.0.0.8000042.input index effaedf..effaedf 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin_nostdinc-C-AppleClang-8.0.0.8000042.input +++ b/Tests/RunCMake/ParseImplicitData/darwin_nostdinc-C-AppleClang-8.0.0.8000042.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.input b/Tests/RunCMake/ParseImplicitData/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.input index 5504e94..5504e94 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.input +++ b/Tests/RunCMake/ParseImplicitData/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/freebsd-C-Clang-3.3.0.input b/Tests/RunCMake/ParseImplicitData/freebsd-C-Clang-3.3.0.input index 81626f9..81626f9 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/freebsd-C-Clang-3.3.0.input +++ b/Tests/RunCMake/ParseImplicitData/freebsd-C-Clang-3.3.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/freebsd-CXX-Clang-3.3.0.input b/Tests/RunCMake/ParseImplicitData/freebsd-CXX-Clang-3.3.0.input index 1f7758b..1f7758b 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/freebsd-CXX-Clang-3.3.0.input +++ b/Tests/RunCMake/ParseImplicitData/freebsd-CXX-Clang-3.3.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/freebsd-Fortran-GNU-4.6.4.input b/Tests/RunCMake/ParseImplicitData/freebsd-Fortran-GNU-4.6.4.input index 8a5d741..8a5d741 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/freebsd-Fortran-GNU-4.6.4.input +++ b/Tests/RunCMake/ParseImplicitData/freebsd-Fortran-GNU-4.6.4.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-C-empty.input b/Tests/RunCMake/ParseImplicitData/hand-C-empty.input index b27eb02..b27eb02 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-C-empty.input +++ b/Tests/RunCMake/ParseImplicitData/hand-C-empty.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-C-relative.input b/Tests/RunCMake/ParseImplicitData/hand-C-relative.input index dd846e3..52ac9df 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-C-relative.input +++ b/Tests/RunCMake/ParseImplicitData/hand-C-relative.input @@ -19,3 +19,5 @@ This is a hand-written test case. ../../../adaptive/relative/include /usr/include End of search list. + +/usr/bin/ld -L/usr/lib64 -L../../../adaptive/relative/lib diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-CXX-empty.input b/Tests/RunCMake/ParseImplicitData/hand-CXX-empty.input index b983d6b..b983d6b 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-CXX-empty.input +++ b/Tests/RunCMake/ParseImplicitData/hand-CXX-empty.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-CXX-relative.input b/Tests/RunCMake/ParseImplicitData/hand-CXX-relative.input index 54cc4db..0b223a1 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-CXX-relative.input +++ b/Tests/RunCMake/ParseImplicitData/hand-CXX-relative.input @@ -19,3 +19,5 @@ This is a hand-written test case. ../../../adaptive/relative/include /usr/include End of search list. + +/usr/bin/ld -L/usr/lib64 -L../../../adaptive/relative/lib diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-GNU-7.3.0.input b/Tests/RunCMake/ParseImplicitData/linux-C-GNU-7.3.0.input index ee296a7..ee296a7 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-GNU-7.3.0.input +++ b/Tests/RunCMake/ParseImplicitData/linux-C-GNU-7.3.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-Intel-18.0.0.20170811.input b/Tests/RunCMake/ParseImplicitData/linux-C-Intel-18.0.0.20170811.input index 1e6544b..1e6544b 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-Intel-18.0.0.20170811.input +++ b/Tests/RunCMake/ParseImplicitData/linux-C-Intel-18.0.0.20170811.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-PGI-18.10.1.input b/Tests/RunCMake/ParseImplicitData/linux-C-PGI-18.10.1.input index cfc3e7b..cfc3e7b 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-PGI-18.10.1.input +++ b/Tests/RunCMake/ParseImplicitData/linux-C-PGI-18.10.1.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-XL-12.1.0.input b/Tests/RunCMake/ParseImplicitData/linux-C-XL-12.1.0.input index a6d9e5a..a6d9e5a 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-XL-12.1.0.input +++ b/Tests/RunCMake/ParseImplicitData/linux-C-XL-12.1.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-XL-16.1.0.0.input b/Tests/RunCMake/ParseImplicitData/linux-C-XL-16.1.0.0.input index 97fa28b..97fa28b 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-XL-16.1.0.0.input +++ b/Tests/RunCMake/ParseImplicitData/linux-C-XL-16.1.0.0.input diff --git a/Tests/RunCMake/ParseImplicitData/linux-CUDA-NVIDIA-10.1.168-CLANG.input b/Tests/RunCMake/ParseImplicitData/linux-CUDA-NVIDIA-10.1.168-CLANG.input new file mode 100644 index 0000000..954697d --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/linux-CUDA-NVIDIA-10.1.168-CLANG.input @@ -0,0 +1,242 @@ +CMAKE_LANG=CUDA +CMAKE_LINKER=/usr/bin/ld +CMAKE_CUDA_COMPILER_ABI= +CMAKE_CUDA_COMPILER_AR= +CMAKE_CUDA_COMPILER_ARCHITECTURE_ID= +CMAKE_CUDA_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_CUDA_COMPILER_ID=NVIDIA +CMAKE_CUDA_COMPILER_LAUNCHER= +CMAKE_CUDA_COMPILER_LOADED=1 +CMAKE_CUDA_COMPILER_RANLIB= +CMAKE_CUDA_COMPILER_TARGET= +CMAKE_CUDA_COMPILER_VERSION=10.1.168 +CMAKE_CUDA_COMPILER_VERSION_INTERAL= +Change Dir: /home/robert/Work/cmake/cuda_clang_compiler_info/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/ninja cmTC_e3386 && [1/2] Building CUDA object CMakeFiles/cmTC_e3386.dir/CMakeCUDACompilerABI.cu.o +clang version 8.0.1-svn369350-1~exp1~20190820121219.79 (branches/release_80) +Target: x86_64-pc-linux-gnu +Thread model: posix +InstalledDir: /usr/bin +Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/8 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.5.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.5.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8 +Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8 +Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8 +Candidate multilib: .@m64 +Selected multilib: .@m64 +Found CUDA installation: /usr/local/cuda-10.1, version unknown + "/usr/lib/llvm-8/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -E -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCUDACompilerABI.cu -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -v -resource-dir /usr/lib/llvm-8/lib/clang/8.0.1 -include cuda_runtime.h -D __CUDA_ARCH__=300 -D CUDA_DOUBLE_MATH_FUNCTIONS -D __CUDACC__ -D __NVCC__ -I /usr/local/cuda/bin/../targets/x86_64-linux/include -D __CUDACC_VER_MAJOR__=10 -D __CUDACC_VER_MINOR__=1 -D __CUDACC_VER_BUILD__=168 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward -internal-isystem /usr/include/clang/8.0.1/include/ -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-8/lib/clang/8.0.1/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/robert/Work/cmake/cuda_clang_compiler_info/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o - -x c++ /opt/cmake-3.15/share/cmake-3.15/Modules/CMakeCUDACompilerABI.cu -faddrsig +clang -cc1 version 8.0.1 based upon LLVM 8.0.1 default target x86_64-pc-linux-gnu +ignoring nonexistent directory "/include" +ignoring duplicate directory "/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8" +ignoring duplicate directory "/usr/include/clang/8.0.1/include" +#include "..." search starts here: +#include <...> search starts here: + /usr/local/cuda/bin/../targets/x86_64-linux/include + /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 + /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 + /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward + /usr/include/clang/8.0.1/include + /usr/local/include + /usr/include/x86_64-linux-gnu + /usr/include +End of search list. +clang version 8.0.1-svn369350-1~exp1~20190820121219.79 (branches/release_80) +Target: x86_64-pc-linux-gnu +Thread model: posix +InstalledDir: /usr/bin +Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/8 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.5.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.5.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8 +Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8 +Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8 +Candidate multilib: .@m64 +Selected multilib: .@m64 +Found CUDA installation: /usr/local/cuda-10.1, version unknown + "/usr/lib/llvm-8/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -E -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCUDACompilerABI.cu -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -v -resource-dir /usr/lib/llvm-8/lib/clang/8.0.1 -include cuda_runtime.h -D __CUDACC__ -D __NVCC__ -I /usr/local/cuda/bin/../targets/x86_64-linux/include -D __CUDACC_VER_MAJOR__=10 -D __CUDACC_VER_MINOR__=1 -D __CUDACC_VER_BUILD__=168 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward -internal-isystem /usr/include/clang/8.0.1/include/ -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-8/lib/clang/8.0.1/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/robert/Work/cmake/cuda_clang_compiler_info/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o - -x c++ /opt/cmake-3.15/share/cmake-3.15/Modules/CMakeCUDACompilerABI.cu -faddrsig +clang -cc1 version 8.0.1 based upon LLVM 8.0.1 default target x86_64-pc-linux-gnu +ignoring nonexistent directory "/include" +ignoring duplicate directory "/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8" +ignoring duplicate directory "/usr/include/clang/8.0.1/include" +#include "..." search starts here: +#include <...> search starts here: + /usr/local/cuda/bin/../targets/x86_64-linux/include + /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 + /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 + /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward + /usr/include/clang/8.0.1/include + /usr/local/include + /usr/include/x86_64-linux-gnu + /usr/include +End of search list. +clang version 8.0.1-svn369350-1~exp1~20190820121219.79 (branches/release_80) +Target: x86_64-pc-linux-gnu +Thread model: posix +InstalledDir: /usr/bin +Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/8 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.5.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.5.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8 +Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8 +Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8 +Candidate multilib: .@m64 +Selected multilib: .@m64 +Found CUDA installation: /usr/local/cuda-10.1, version unknown + "/usr/lib/llvm-8/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name tmpxft_00005e34_00000000-5_CMakeCUDACompilerABI.cudafe1.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -v -coverage-notes-file /home/robert/Work/cmake/cuda_clang_compiler_info/CMakeFiles/CMakeTmp/CMakeFiles/cmTC_e3386.dir/CMakeCUDACompilerABI.cu.gcno -resource-dir /usr/lib/llvm-8/lib/clang/8.0.1 -D __CUDA_ARCH__=300 -D CUDA_DOUBLE_MATH_FUNCTIONS -I /usr/local/cuda/bin/../targets/x86_64-linux/include -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward -internal-isystem /usr/include/clang/8.0.1/include/ -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-8/lib/clang/8.0.1/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/robert/Work/cmake/cuda_clang_compiler_info/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o CMakeFiles/cmTC_e3386.dir/CMakeCUDACompilerABI.cu.o -x c++ /tmp/tmpxft_00005e34_00000000-5_CMakeCUDACompilerABI.cudafe1.cpp -faddrsig +clang -cc1 version 8.0.1 based upon LLVM 8.0.1 default target x86_64-pc-linux-gnu +ignoring nonexistent directory "/include" +ignoring duplicate directory "/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8" +ignoring duplicate directory "/usr/include/clang/8.0.1/include" +#include "..." search starts here: +#include <...> search starts here: + /usr/local/cuda/bin/../targets/x86_64-linux/include + /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 + /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 + /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward + /usr/include/clang/8.0.1/include + /usr/local/include + /usr/include/x86_64-linux-gnu + /usr/include +End of search list. +clang version 8.0.1-svn369350-1~exp1~20190820121219.79 (branches/release_80) +Target: x86_64-pc-linux-gnu +Thread model: posix +InstalledDir: /usr/bin +Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/8 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.5.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.5.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8 +Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8 +Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8 +Candidate multilib: .@m64 +Selected multilib: .@m64 +Found CUDA installation: /usr/local/cuda-10.1, version unknown + "/usr/lib/llvm-8/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -E -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCUDACompilerABI.cu -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -v -resource-dir /usr/lib/llvm-8/lib/clang/8.0.1 -include cuda_runtime.h -D __CUDA_ARCH__=300 -D CUDA_DOUBLE_MATH_FUNCTIONS -D __CUDACC__ -D __NVCC__ -I /usr/local/cuda/bin/../targets/x86_64-linux/include -D __CUDACC_VER_MAJOR__=10 -D __CUDACC_VER_MINOR__=1 -D __CUDACC_VER_BUILD__=168 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward -internal-isystem /usr/include/clang/8.0.1/include/ -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-8/lib/clang/8.0.1/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/robert/Work/cmake/cuda_clang_compiler_info/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o - -x c++ /opt/cmake-3.15/share/cmake-3.15/Modules/CMakeCUDACompilerABI.cu -faddrsig +clang -cc1 version 8.0.1 based upon LLVM 8.0.1 default target x86_64-pc-linux-gnu +ignoring nonexistent directory "/include" +ignoring duplicate directory "/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8" +ignoring duplicate directory "/usr/include/clang/8.0.1/include" +#include "..." search starts here: +#include <...> search starts here: + /usr/local/cuda/bin/../targets/x86_64-linux/include + /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 + /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 + /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward + /usr/include/clang/8.0.1/include + /usr/local/include + /usr/include/x86_64-linux-gnu + /usr/include +End of search list. +clang version 8.0.1-svn369350-1~exp1~20190820121219.79 (branches/release_80) +Target: x86_64-pc-linux-gnu +Thread model: posix +InstalledDir: /usr/bin +Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/8 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.5.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.5.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8 +Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8 +Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8 +Candidate multilib: .@m64 +Selected multilib: .@m64 +Found CUDA installation: /usr/local/cuda-10.1, version unknown + "/usr/lib/llvm-8/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -E -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCUDACompilerABI.cu -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -v -resource-dir /usr/lib/llvm-8/lib/clang/8.0.1 -include cuda_runtime.h -D __CUDACC__ -D __NVCC__ -I /usr/local/cuda/bin/../targets/x86_64-linux/include -D __CUDACC_VER_MAJOR__=10 -D __CUDACC_VER_MINOR__=1 -D __CUDACC_VER_BUILD__=168 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward -internal-isystem /usr/include/clang/8.0.1/include/ -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-8/lib/clang/8.0.1/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/robert/Work/cmake/cuda_clang_compiler_info/CMakeFiles/CMakeTmp -ferror-limit 19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o - -x c++ /opt/cmake-3.15/share/cmake-3.15/Modules/CMakeCUDACompilerABI.cu -faddrsig +clang -cc1 version 8.0.1 based upon LLVM 8.0.1 default target x86_64-pc-linux-gnu +ignoring nonexistent directory "/include" +ignoring duplicate directory "/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8" +ignoring duplicate directory "/usr/include/clang/8.0.1/include" +#include "..." search starts here: +#include <...> search starts here: + /usr/local/cuda/bin/../targets/x86_64-linux/include + /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8 + /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/x86_64-linux-gnu/c++/8 + /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/backward + /usr/include/clang/8.0.1/include + /usr/local/include + /usr/include/x86_64-linux-gnu + /usr/include +End of search list. +[2/2] Linking CUDA executable cmTC_e3386 +clang version 8.0.1-svn369350-1~exp1~20190820121219.79 (branches/release_80) +Target: x86_64-pc-linux-gnu +Thread model: posix +InstalledDir: /usr/bin +Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/8 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.5.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.5.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0 +Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8 +Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0 +Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8 +Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/8 +Candidate multilib: .@m64 +Selected multilib: .@m64 +Found CUDA installation: /usr/local/cuda-10.1, version unknown + "/usr/bin/ld" -z relro --hash-style=gnu --build-id --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o cmTC_e3386 /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/crt1.o /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/crti.o /usr/bin/../lib/gcc/x86_64-linux-gnu/8/crtbegin.o -L/usr/local/cuda/targets/x86_64-linux/lib/stubs -L/usr/local/cuda/targets/x86_64-linux/lib -L/usr/bin/../lib/gcc/x86_64-linux-gnu/8 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../.. -L/usr/lib/llvm-8/bin/../lib -L/lib -L/usr/lib CMakeFiles/cmTC_e3386.dir/CMakeCUDACompilerABI.cu.o -lcudadevrt -lcudart_static -lrt -lpthread -ldl -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/bin/../lib/gcc/x86_64-linux-gnu/8/crtend.o /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/crtn.o diff --git a/Tests/RunCMake/ParseImplicitData/linux-CUDA-NVIDIA-10.1.168-XLClang-v.input b/Tests/RunCMake/ParseImplicitData/linux-CUDA-NVIDIA-10.1.168-XLClang-v.input new file mode 100644 index 0000000..7b20288 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitData/linux-CUDA-NVIDIA-10.1.168-XLClang-v.input @@ -0,0 +1,51 @@ +CMAKE_LANG=CUDA +CMAKE_LINKER=/sw/summit/xalt/1.1.3/bin/ld +CMAKE_CUDA_COMPILER_ABI=ELF +CMAKE_CUDA_COMPILER_AR= +CMAKE_CUDA_COMPILER_ARCHITECTURE_ID= +CMAKE_CUDA_COMPILER_EXTERNAL_TOOLCHAIN= +CMAKE_CUDA_COMPILER_ID=NVIDIA +CMAKE_CUDA_COMPILER_LAUNCHER= +CMAKE_CUDA_COMPILER_LOADED=1 +CMAKE_CUDA_COMPILER_RANLIB= +CMAKE_CUDA_COMPILER_TARGET= +CMAKE_CUDA_COMPILER_VERSION=10.1.168 +CMAKE_CUDA_COMPILER_VERSION_INTERAL= +Change Dir: /ccs/home/rmaynard/cmake/extract_xlc_info/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/gmake cmTC_e9f3e/fast && /usr/bin/gmake -f CMakeFiles/cmTC_e9f3e.dir/build.make CMakeFiles/cmTC_e9f3e.dir/build +gmake[1]: Entering directory `/autofs/nccs-svm1_home1/rmaynard/cmake/extract_xlc_info/CMakeFiles/CMakeTmp' +Building CUDA object CMakeFiles/cmTC_e9f3e.dir/CMakeCUDACompilerABI.cu.o +/sw/summit/cuda/10.1.168/bin/nvcc -ccbin=/sw/summit/xl/16.1.1-3/xlC/16.1.1/bin/xlc++ -v -x cu -c /ccs/home/rmaynard/cmake/src/Modules/CMakeCUDACompilerABI.cu -o CMakeFiles/cmTC_e9f3e.dir/CMakeCUDACompilerABI.cu.o +#$ _SPACE_= +#$ _CUDART_=cudart +#$ _HERE_=/sw/summit/cuda/10.1.168/bin +#$ _THERE_=/sw/summit/cuda/10.1.168/bin +#$ _TARGET_SIZE_= +#$ _TARGET_DIR_= +#$ _TARGET_DIR_=targets/ppc64le-linux +#$ TOP=/sw/summit/cuda/10.1.168/bin/.. +#$ NVVMIR_LIBRARY_DIR=/sw/summit/cuda/10.1.168/bin/../nvvm/libdevice +#$ LD_LIBRARY_PATH=/sw/summit/cuda/10.1.168/bin/../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:/sw/summit/xl/16.1.1-3/xlsmp/5.1.1/lib:/sw/summit/xl/16.1.1-3/xlmass/9.1.1/lib:/sw/summit/xl/16.1.1-3/xlC/16.1.1/lib:/sw/summit/xl/16.1.1-3/xlf/16.1.1/lib:/sw/summit/xl/16.1.1-3/lib:/sw/summit/cuda/10.1.168/lib64:/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:/opt/ibm/spectrumcomputing/lsf/10.1/linux3.10-glibc2.17-ppc64le-csm/lib +#$ PATH=/sw/summit/cuda/10.1.168/bin/../nvvm/bin:/sw/summit/cuda/10.1.168/bin:/sw/sources/lsf-tools/2.0/summit/bin:/sw/summit/xalt/1.1.3/bin:/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/bin:/sw/summit/xl/16.1.1-3/xlC/16.1.1/bin:/sw/summit/xl/16.1.1-3/xlf/16.1.1/bin:/sw/summit/cuda/10.1.168/bin:/usr/bin:/usr/sbin:/autofs/nccs-svm1_sw/summit/.swci/1-compute/opt/spack/20180914/linux-rhel7-ppc64le/gcc-4.8.5/darshan-runtime-3.1.7-csygoqyym3m3ysoaperhxlhoiluvpa2u/bin:/sw/sources/hpss/bin:/opt/ibm/spectrumcomputing/lsf/10.1/linux3.10-glibc2.17-ppc64le-csm/etc:/opt/ibm/spectrumcomputing/lsf/10.1/linux3.10-glibc2.17-ppc64le-csm/bin:/opt/ibm/csm/bin:/usr/local/bin:/usr/local/sbin:/opt/ibm/flightlog/bin:/opt/ibutils/bin:/opt/ibm/spectrum_mpi/jsm_pmix/bin:/opt/puppetlabs/bin:/usr/lpp/mmfs/bin +#$ INCLUDES="-I/sw/summit/cuda/10.1.168/bin/../targets/ppc64le-linux/include" +#$ LIBRARIES= "-L/sw/summit/cuda/10.1.168/bin/../targets/ppc64le-linux/lib/stubs" "-L/sw/summit/cuda/10.1.168/bin/../targets/ppc64le-linux/lib" +#$ CUDAFE_FLAGS= +#$ PTXAS_FLAGS= +#$ "/sw/summit/xl/16.1.1-3/xlC/16.1.1/bin"/xlc++ -D__CUDA_ARCH__=300 -E -x c++ -DCUDA_DOUBLE_MATH_FUNCTIONS -D__CUDACC__ -D__NVCC__ "-I/sw/summit/cuda/10.1.168/bin/../targets/ppc64le-linux/include" -D__CUDACC_VER_MAJOR__=10 -D__CUDACC_VER_MINOR__=1 -D__CUDACC_VER_BUILD__=168 -include "cuda_runtime.h" "/ccs/home/rmaynard/cmake/src/Modules/CMakeCUDACompilerABI.cu" > "/tmp/tmpxft_0000de61_00000000-6_CMakeCUDACompilerABI.cpp1.ii" +#$ cicc --clang --clang_version=40000 --allow_managed --unsigned_chars -arch compute_30 -m64 -ftz=0 -prec_div=1 -prec_sqrt=1 -fmad=1 --include_file_name "tmpxft_0000de61_00000000-2_CMakeCUDACompilerABI.fatbin.c" -tused -nvvmir-library "/sw/summit/cuda/10.1.168/bin/../nvvm/libdevice/libdevice.10.bc" --gen_module_id_file --module_id_file_name "/tmp/tmpxft_0000de61_00000000-3_CMakeCUDACompilerABI.module_id" --orig_src_file_name "/ccs/home/rmaynard/cmake/src/Modules/CMakeCUDACompilerABI.cu" --gen_c_file_name "/tmp/tmpxft_0000de61_00000000-5_CMakeCUDACompilerABI.cudafe1.c" --stub_file_name "/tmp/tmpxft_0000de61_00000000-5_CMakeCUDACompilerABI.cudafe1.stub.c" --gen_device_file_name "/tmp/tmpxft_0000de61_00000000-5_CMakeCUDACompilerABI.cudafe1.gpu" "/tmp/tmpxft_0000de61_00000000-6_CMakeCUDACompilerABI.cpp1.ii" -o "/tmp/tmpxft_0000de61_00000000-5_CMakeCUDACompilerABI.ptx" +#$ ptxas -arch=sm_30 -m64 "/tmp/tmpxft_0000de61_00000000-5_CMakeCUDACompilerABI.ptx" -o "/tmp/tmpxft_0000de61_00000000-7_CMakeCUDACompilerABI.sm_30.cubin" +#$ fatbinary --create="/tmp/tmpxft_0000de61_00000000-2_CMakeCUDACompilerABI.fatbin" -64 -no-asm "--image=profile=sm_30,file=/tmp/tmpxft_0000de61_00000000-7_CMakeCUDACompilerABI.sm_30.cubin" "--image=profile=compute_30,file=/tmp/tmpxft_0000de61_00000000-5_CMakeCUDACompilerABI.ptx" --embedded-fatbin="/tmp/tmpxft_0000de61_00000000-2_CMakeCUDACompilerABI.fatbin.c" +#$ rm /tmp/tmpxft_0000de61_00000000-2_CMakeCUDACompilerABI.fatbin +#$ "/sw/summit/xl/16.1.1-3/xlC/16.1.1/bin"/xlc++ -E -x c++ -D__CUDACC__ -D__NVCC__ "-I/sw/summit/cuda/10.1.168/bin/../targets/ppc64le-linux/include" -D__CUDACC_VER_MAJOR__=10 -D__CUDACC_VER_MINOR__=1 -D__CUDACC_VER_BUILD__=168 -include "cuda_runtime.h" "/ccs/home/rmaynard/cmake/src/Modules/CMakeCUDACompilerABI.cu" > "/tmp/tmpxft_0000de61_00000000-4_CMakeCUDACompilerABI.cpp4.ii" +#$ cudafe++ --clang --clang_version=40000 --allow_managed --unsigned_chars --m64 --parse_templates --gen_c_file_name "/tmp/tmpxft_0000de61_00000000-5_CMakeCUDACompilerABI.cudafe1.cpp" --stub_file_name "tmpxft_0000de61_00000000-5_CMakeCUDACompilerABI.cudafe1.stub.c" --module_id_file_name "/tmp/tmpxft_0000de61_00000000-3_CMakeCUDACompilerABI.module_id" "/tmp/tmpxft_0000de61_00000000-4_CMakeCUDACompilerABI.cpp4.ii" +#$ "/sw/summit/xl/16.1.1-3/xlC/16.1.1/bin"/xlc++ -D__CUDA_ARCH__=300 -c -x c++ -DCUDA_DOUBLE_MATH_FUNCTIONS "-I/sw/summit/cuda/10.1.168/bin/../targets/ppc64le-linux/include" -o "CMakeFiles/cmTC_e9f3e.dir/CMakeCUDACompilerABI.cu.o" "/tmp/tmpxft_0000de61_00000000-5_CMakeCUDACompilerABI.cudafe1.cpp" +Linking CUDA executable cmTC_e9f3e +/ccs/home/rmaynard/cmake/build/bin/cmake -E cmake_link_script CMakeFiles/cmTC_e9f3e.dir/link.txt --verbose=1 +/sw/summit/xl/16.1.1-3/xlC/16.1.1/bin/xlc++ -v CMakeFiles/cmTC_e9f3e.dir/CMakeCUDACompilerABI.cu.o -o cmTC_e9f3e -L"/sw/summit/cuda/10.1.168/targets/ppc64le-linux/lib/stubs" -L"/sw/summit/cuda/10.1.168/targets/ppc64le-linux/lib" -lcudadevrt -lcudart_static -lrt -lpthread -ldl +exec: export(export,XL_CONFIG=/sw/summit/xl/16.1.1-3/xlC/16.1.1/etc/xlc.cfg.rhel.7.6.gcc.4.8.5.cuda.10.1:xlc++,NULL) +exec: /sw/summit/xalt/1.1.3/bin/ld(/sw/summit/xalt/1.1.3/bin/ld,--eh-frame-hdr,-Qy,-melf64lppc,-dynamic-linker,/lib64/ld64.so.2,--enable-new-dtags,-L/sw/summit/cuda/10.1.168/targets/ppc64le-linux/lib/stubs,-L/sw/summit/cuda/10.1.168/targets/ppc64le-linux/lib,-L/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,-L/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,/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../lib64/crt1.o,/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../lib64/crti.o,/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/crtbegin.o,-L/autofs/nccs-svm1_sw/summit/xl/16.1.1-3/xlsmp/5.1.1/lib,-L/autofs/nccs-svm1_sw/summit/xl/16.1.1-3/xlmass/9.1.1/lib,-L/autofs/nccs-svm1_sw/summit/xl/16.1.1-3/xlC/16.1.1/lib,-R/autofs/nccs-svm1_sw/summit/xl/16.1.1-3/lib,-L/usr/lib/gcc/ppc64le-redhat-linux/4.8.5,-L/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../lib64,-L/lib/../lib64,-L/usr/lib/../lib64,-L/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,-L/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../..,CMakeFiles/cmTC_e9f3e.dir/CMakeCUDACompilerABI.cu.o,-o,cmTC_e9f3e,-lcudadevrt,-lcudart_static,-lrt,-lpthread,-ldl,-lxlopt,-lxl,-libmc++,-lstdc++,-lm,-ldl,-lgcc_s,-lgcc,--as-needed,-lpthread,--no-as-needed,-lm,-lc,-lgcc_s,-lgcc,/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/crtend.o,/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../lib64/crtn.o,NULL) +unlink: /tmp/xlcW0by5DKQ +unlink: /tmp/xlcW1dqSZDp +unlink: /tmp/xlcW2nyAlxY +gmake[1]: Leaving directory `/autofs/nccs-svm1_home1/rmaynard/cmake/extract_xlc_info/CMakeFiles/CMakeTmp' diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CUDA-NVIDIA-9.2.148.input b/Tests/RunCMake/ParseImplicitData/linux-CUDA-NVIDIA-9.2.148-GCC.input index 5dd3650..98aee98 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CUDA-NVIDIA-9.2.148.input +++ b/Tests/RunCMake/ParseImplicitData/linux-CUDA-NVIDIA-9.2.148-GCC.input @@ -1,4 +1,5 @@ CMAKE_LANG=CUDA +CMAKE_LINKER=/usr/bin/ld CMAKE_CUDA_COMPILER_ABI=ELF CMAKE_CUDA_COMPILER_AR= CMAKE_CUDA_COMPILER_ARCHITECTURE_ID= diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-GNU-7.3.0.input b/Tests/RunCMake/ParseImplicitData/linux-CXX-GNU-7.3.0.input index 633a0ef..633a0ef 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-GNU-7.3.0.input +++ b/Tests/RunCMake/ParseImplicitData/linux-CXX-GNU-7.3.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-Intel-18.0.0.20170811.input b/Tests/RunCMake/ParseImplicitData/linux-CXX-Intel-18.0.0.20170811.input index 22d8715..22d8715 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-Intel-18.0.0.20170811.input +++ b/Tests/RunCMake/ParseImplicitData/linux-CXX-Intel-18.0.0.20170811.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-PGI-18.10.1.input b/Tests/RunCMake/ParseImplicitData/linux-CXX-PGI-18.10.1.input index f95627e..f95627e 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-PGI-18.10.1.input +++ b/Tests/RunCMake/ParseImplicitData/linux-CXX-PGI-18.10.1.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-12.1.0.input b/Tests/RunCMake/ParseImplicitData/linux-CXX-XL-12.1.0.input index 494b45c..494b45c 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-12.1.0.input +++ b/Tests/RunCMake/ParseImplicitData/linux-CXX-XL-12.1.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-16.1.0.0.input b/Tests/RunCMake/ParseImplicitData/linux-CXX-XL-16.1.0.0.input index 37aa450..37aa450 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-16.1.0.0.input +++ b/Tests/RunCMake/ParseImplicitData/linux-CXX-XL-16.1.0.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-Fortran-GNU-7.3.0.input b/Tests/RunCMake/ParseImplicitData/linux-Fortran-GNU-7.3.0.input index 4582433..4582433 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-Fortran-GNU-7.3.0.input +++ b/Tests/RunCMake/ParseImplicitData/linux-Fortran-GNU-7.3.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-Fortran-PGI-18.10.1.input b/Tests/RunCMake/ParseImplicitData/linux-Fortran-PGI-18.10.1.input index fe49bcd..fe49bcd 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-Fortran-PGI-18.10.1.input +++ b/Tests/RunCMake/ParseImplicitData/linux-Fortran-PGI-18.10.1.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-Fortran-XL-14.1.0.input b/Tests/RunCMake/ParseImplicitData/linux-Fortran-XL-14.1.0.input index d80cede..d80cede 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-Fortran-XL-14.1.0.input +++ b/Tests/RunCMake/ParseImplicitData/linux-Fortran-XL-14.1.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-C-PGI-18.10.1.input b/Tests/RunCMake/ParseImplicitData/linux_nostdinc-C-PGI-18.10.1.input index 5e2e49a..5e2e49a 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-C-PGI-18.10.1.input +++ b/Tests/RunCMake/ParseImplicitData/linux_nostdinc-C-PGI-18.10.1.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-C-XL-12.1.0.input b/Tests/RunCMake/ParseImplicitData/linux_nostdinc-C-XL-12.1.0.input index 8b1e286..8b1e286 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-C-XL-12.1.0.input +++ b/Tests/RunCMake/ParseImplicitData/linux_nostdinc-C-XL-12.1.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-CXX-PGI-18.10.1.input b/Tests/RunCMake/ParseImplicitData/linux_nostdinc-CXX-PGI-18.10.1.input index dd2b55d..dd2b55d 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-CXX-PGI-18.10.1.input +++ b/Tests/RunCMake/ParseImplicitData/linux_nostdinc-CXX-PGI-18.10.1.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-CXX-XL-12.1.0.input b/Tests/RunCMake/ParseImplicitData/linux_nostdinc-CXX-XL-12.1.0.input index f6b5d91..f6b5d91 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-CXX-XL-12.1.0.input +++ b/Tests/RunCMake/ParseImplicitData/linux_nostdinc-CXX-XL-12.1.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-Fortran-PGI-18.10.1.input b/Tests/RunCMake/ParseImplicitData/linux_nostdinc-Fortran-PGI-18.10.1.input index 12727f0..12727f0 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-Fortran-PGI-18.10.1.input +++ b/Tests/RunCMake/ParseImplicitData/linux_nostdinc-Fortran-PGI-18.10.1.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc_i-C-XL-12.1.0.input b/Tests/RunCMake/ParseImplicitData/linux_nostdinc_i-C-XL-12.1.0.input index a552d70..a552d70 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc_i-C-XL-12.1.0.input +++ b/Tests/RunCMake/ParseImplicitData/linux_nostdinc_i-C-XL-12.1.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc_i-CXX-XL-12.1.0.input b/Tests/RunCMake/ParseImplicitData/linux_nostdinc_i-CXX-XL-12.1.0.input index 4b20f2e..4b20f2e 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc_i-CXX-XL-12.1.0.input +++ b/Tests/RunCMake/ParseImplicitData/linux_nostdinc_i-CXX-XL-12.1.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_pgf77-Fortran-PGI-18.10.1.input b/Tests/RunCMake/ParseImplicitData/linux_pgf77-Fortran-PGI-18.10.1.input index 01abe8d..01abe8d 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_pgf77-Fortran-PGI-18.10.1.input +++ b/Tests/RunCMake/ParseImplicitData/linux_pgf77-Fortran-PGI-18.10.1.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-C-GNU-4.9.3.input b/Tests/RunCMake/ParseImplicitData/mingw.org-C-GNU-4.9.3.input index 81e9ee0..81e9ee0 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-C-GNU-4.9.3.input +++ b/Tests/RunCMake/ParseImplicitData/mingw.org-C-GNU-4.9.3.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-CXX-GNU-4.9.3.input b/Tests/RunCMake/ParseImplicitData/mingw.org-CXX-GNU-4.9.3.input index cd77340..cd77340 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-CXX-GNU-4.9.3.input +++ b/Tests/RunCMake/ParseImplicitData/mingw.org-CXX-GNU-4.9.3.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd-C-GNU-4.8.5.input b/Tests/RunCMake/ParseImplicitData/netbsd-C-GNU-4.8.5.input index b468484..b468484 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd-C-GNU-4.8.5.input +++ b/Tests/RunCMake/ParseImplicitData/netbsd-C-GNU-4.8.5.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd-CXX-GNU-4.8.5.input b/Tests/RunCMake/ParseImplicitData/netbsd-CXX-GNU-4.8.5.input index e3c5f72..e3c5f72 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd-CXX-GNU-4.8.5.input +++ b/Tests/RunCMake/ParseImplicitData/netbsd-CXX-GNU-4.8.5.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd_nostdinc-C-GNU-4.8.5.input b/Tests/RunCMake/ParseImplicitData/netbsd_nostdinc-C-GNU-4.8.5.input index cd5845a..cd5845a 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd_nostdinc-C-GNU-4.8.5.input +++ b/Tests/RunCMake/ParseImplicitData/netbsd_nostdinc-C-GNU-4.8.5.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd_nostdinc-CXX-GNU-4.8.5.input b/Tests/RunCMake/ParseImplicitData/netbsd_nostdinc-CXX-GNU-4.8.5.input index b9a585c..b9a585c 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd_nostdinc-CXX-GNU-4.8.5.input +++ b/Tests/RunCMake/ParseImplicitData/netbsd_nostdinc-CXX-GNU-4.8.5.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/openbsd-C-Clang-5.0.1.input b/Tests/RunCMake/ParseImplicitData/openbsd-C-Clang-5.0.1.input index 9f34f3d..9f34f3d 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/openbsd-C-Clang-5.0.1.input +++ b/Tests/RunCMake/ParseImplicitData/openbsd-C-Clang-5.0.1.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/openbsd-CXX-Clang-5.0.1.input b/Tests/RunCMake/ParseImplicitData/openbsd-CXX-Clang-5.0.1.input index 93f1a95..93f1a95 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/openbsd-CXX-Clang-5.0.1.input +++ b/Tests/RunCMake/ParseImplicitData/openbsd-CXX-Clang-5.0.1.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/sunos-C-SunPro-5.13.0.input b/Tests/RunCMake/ParseImplicitData/sunos-C-SunPro-5.13.0.input index b0b504a..b0b504a 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/sunos-C-SunPro-5.13.0.input +++ b/Tests/RunCMake/ParseImplicitData/sunos-C-SunPro-5.13.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/sunos-CXX-SunPro-5.13.0.input b/Tests/RunCMake/ParseImplicitData/sunos-CXX-SunPro-5.13.0.input index 9abd06a..9abd06a 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/sunos-CXX-SunPro-5.13.0.input +++ b/Tests/RunCMake/ParseImplicitData/sunos-CXX-SunPro-5.13.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/sunos-Fortran-SunPro-8.8.0.input b/Tests/RunCMake/ParseImplicitData/sunos-Fortran-SunPro-8.8.0.input index 4a2bedd..4a2bedd 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/sunos-Fortran-SunPro-8.8.0.input +++ b/Tests/RunCMake/ParseImplicitData/sunos-Fortran-SunPro-8.8.0.input diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake index 5880378..abd0eaa 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/ParseImplicitIncludeInfo.cmake @@ -32,7 +32,8 @@ set(targets 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 linux-C-XL-16.1.0.0 linux-CXX-XL-16.1.0.0 - linux-CUDA-NVIDIA-9.2.148 + linux-CUDA-NVIDIA-10.1.168-CLANG linux-CUDA-NVIDIA-10.1.168-XLClang-v-empty + linux-CUDA-NVIDIA-9.2.148-GCC mingw.org-C-GNU-4.9.3 mingw.org-CXX-GNU-4.9.3 netbsd-C-GNU-4.8.5 netbsd-CXX-GNU-4.8.5 netbsd_nostdinc-C-GNU-4.8.5 netbsd_nostdinc-CXX-GNU-4.8.5 @@ -97,22 +98,30 @@ endfunction() # main test loop # foreach(t ${targets}) - set(infile "${CMAKE_SOURCE_DIR}/data/${t}.input") - set(outfile "${CMAKE_SOURCE_DIR}/data/${t}.output") - if (NOT EXISTS ${infile} OR NOT EXISTS ${outfile}) - message("missing files for target ${t} in ${CMAKE_SOURCE_DIR}/data") + set(infile "${CMAKE_SOURCE_DIR}/../ParseImplicitData/${t}.input") + set(outfile "${CMAKE_SOURCE_DIR}/results/${t}.output") + if (NOT EXISTS ${infile}) + string(REPLACE "-empty" "" infile "${infile}") + if (NOT EXISTS ${infile}) + message("missing input file for target ${t} in ${CMAKE_SOURCE_DIR}/../ParseImplicitData/") + continue() + endif() + elseif(NOT EXISTS ${outfile}) + message("missing files for target ${t} in ${CMAKE_SOURCE_DIR}/results/") continue() endif() + load_compiler_info(${infile} lang cmvars input) file(READ ${outfile} output) string(STRIP "${output}" output) cmake_parse_implicit_include_info("${input}" "${lang}" idirs log state) + if(t MATCHES "-empty$") # empty isn't supposed to parse if("${state}" STREQUAL "done") message("empty parse failed: ${idirs}, log=${log}") endif() elseif(NOT "${state}" STREQUAL "done" OR NOT "${idirs}" MATCHES "^${output}$") - message("parse failed: state=${state}, '${idirs}' does not match '^${output}$', log=${log}") + message("${t} parse failed: state=${state}, '${idirs}' does not match '^${output}$', log=${log}") endif() unload_compiler_info("${cmvars}") endforeach(t) diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-C-XL-13.1.3.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/aix-C-XL-13.1.3.output index 91b35ad..91b35ad 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-C-XL-13.1.3.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/aix-C-XL-13.1.3.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-C-XLClang-16.1.0.1.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/aix-C-XLClang-16.1.0.1.output index 85399b7..85399b7 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-C-XLClang-16.1.0.1.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/aix-C-XLClang-16.1.0.1.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-CXX-XL-13.1.3.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/aix-CXX-XL-13.1.3.output index 264e4fe..264e4fe 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-CXX-XL-13.1.3.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/aix-CXX-XL-13.1.3.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-CXX-XLClang-16.1.0.1.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/aix-CXX-XLClang-16.1.0.1.output index 7666f7e..7666f7e 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/aix-CXX-XLClang-16.1.0.1.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/aix-CXX-XLClang-16.1.0.1.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Cray-8.7.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-C-Cray-8.7.output index cbd2132..cbd2132 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Cray-8.7.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-C-Cray-8.7.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Cray-9.0-hlist-ad.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-C-Cray-9.0-hlist-ad.output index 42b194a..42b194a 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Cray-9.0-hlist-ad.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-C-Cray-9.0-hlist-ad.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-GNU-7.3.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-C-GNU-7.3.0.output index 64f127e..64f127e 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-GNU-7.3.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-C-GNU-7.3.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Intel-18.0.2.20180210.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-C-Intel-18.0.2.20180210.output index a26a007..a26a007 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-C-Intel-18.0.2.20180210.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-C-Intel-18.0.2.20180210.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Cray-8.7.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-CXX-Cray-8.7.output index 263f8cb..263f8cb 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Cray-8.7.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-CXX-Cray-8.7.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Cray-9.0-hlist-ad.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-CXX-Cray-9.0-hlist-ad.output index a3b8768..a3b8768 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Cray-9.0-hlist-ad.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-CXX-Cray-9.0-hlist-ad.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-GNU-7.3.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-CXX-GNU-7.3.0.output index b76c5db..b76c5db 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-GNU-7.3.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-CXX-GNU-7.3.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Intel-18.0.2.20180210.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-CXX-Intel-18.0.2.20180210.output index 031c324..031c324 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-CXX-Intel-18.0.2.20180210.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-CXX-Intel-18.0.2.20180210.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Cray-8.7.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-Fortran-Cray-8.7.output index daa34e2..daa34e2 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Cray-8.7.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-Fortran-Cray-8.7.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Cray-9.0-hlist-ad.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-Fortran-Cray-9.0-hlist-ad.output index 234483b..234483b 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Cray-9.0-hlist-ad.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-Fortran-Cray-9.0-hlist-ad.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-GNU-7.3.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-Fortran-GNU-7.3.0.output index 5b96c9d..5b96c9d 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-GNU-7.3.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-Fortran-GNU-7.3.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Intel-18.0.2.20180210.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-Fortran-Intel-18.0.2.20180210.output index 8e484bc..8e484bc 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/craype-Fortran-Intel-18.0.2.20180210.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/craype-Fortran-Intel-18.0.2.20180210.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-C-AppleClang-8.0.0.8000042.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/darwin-C-AppleClang-8.0.0.8000042.output index 20f9b0e..20f9b0e 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-C-AppleClang-8.0.0.8000042.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/darwin-C-AppleClang-8.0.0.8000042.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-CXX-AppleClang-8.0.0.8000042.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/darwin-CXX-AppleClang-8.0.0.8000042.output index de0f91f..de0f91f 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin-CXX-AppleClang-8.0.0.8000042.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/darwin-CXX-AppleClang-8.0.0.8000042.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin_nostdinc-C-AppleClang-8.0.0.8000042.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/darwin_nostdinc-C-AppleClang-8.0.0.8000042.output index e69de29..e69de29 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin_nostdinc-C-AppleClang-8.0.0.8000042.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/darwin_nostdinc-C-AppleClang-8.0.0.8000042.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.output index e69de29..e69de29 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/freebsd-C-Clang-3.3.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/freebsd-C-Clang-3.3.0.output index 893ec49..893ec49 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/freebsd-C-Clang-3.3.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/freebsd-C-Clang-3.3.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/freebsd-CXX-Clang-3.3.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/freebsd-CXX-Clang-3.3.0.output index 97410f2..97410f2 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/freebsd-CXX-Clang-3.3.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/freebsd-CXX-Clang-3.3.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/freebsd-Fortran-GNU-4.6.4.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/freebsd-Fortran-GNU-4.6.4.output index c0aee11..c0aee11 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/freebsd-Fortran-GNU-4.6.4.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/freebsd-Fortran-GNU-4.6.4.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-C-empty.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/hand-C-empty.output index e69de29..e69de29 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-C-empty.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/hand-C-empty.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-C-relative.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/hand-C-relative.output index e43139b..e43139b 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-C-relative.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/hand-C-relative.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-CXX-empty.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/hand-CXX-empty.output index e69de29..e69de29 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-CXX-empty.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/hand-CXX-empty.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-CXX-relative.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/hand-CXX-relative.output index e43139b..e43139b 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/hand-CXX-relative.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/hand-CXX-relative.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-GNU-7.3.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-GNU-7.3.0.output index dcd6565..dcd6565 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-GNU-7.3.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-GNU-7.3.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-Intel-18.0.0.20170811.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-Intel-18.0.0.20170811.output index 714131c..714131c 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-Intel-18.0.0.20170811.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-Intel-18.0.0.20170811.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-PGI-18.10.1.output index 289c530..289c530 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-PGI-18.10.1.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-PGI-18.10.1.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-XL-12.1.0.output index eceacf9..eceacf9 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-XL-12.1.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-XL-12.1.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-XL-16.1.0.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-XL-16.1.0.0.output index 6dac25f..6dac25f 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-C-XL-16.1.0.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-C-XL-16.1.0.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CUDA-NVIDIA-10.1.168-CLANG.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CUDA-NVIDIA-10.1.168-CLANG.output new file mode 100644 index 0000000..84149e6 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CUDA-NVIDIA-10.1.168-CLANG.output @@ -0,0 +1 @@ +/usr/local/cuda/targets/x86_64-linux/include;/usr/include/c\+\+/8;/usr/include/x86_64-linux-gnu/c\+\+/8;/usr/include/c\+\+/8/backward;/usr/include/clang/8.0.1/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-C-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v-empty.output index e69de29..e69de29 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-C-PGI-18.10.1.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v-empty.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CUDA-NVIDIA-9.2.148.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CUDA-NVIDIA-9.2.148-GCC.output index 497fb88..497fb88 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CUDA-NVIDIA-9.2.148.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CUDA-NVIDIA-9.2.148-GCC.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-GNU-7.3.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-GNU-7.3.0.output index af33ba8..af33ba8 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-GNU-7.3.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-GNU-7.3.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-Intel-18.0.0.20170811.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-Intel-18.0.0.20170811.output index 95bdf99..95bdf99 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-Intel-18.0.0.20170811.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-Intel-18.0.0.20170811.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-PGI-18.10.1.output index 8eb97c8..8eb97c8 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-PGI-18.10.1.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-PGI-18.10.1.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-XL-12.1.0.output index d6d3e58..d6d3e58 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-12.1.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-XL-12.1.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-16.1.0.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-XL-16.1.0.0.output index 9e118fc..9e118fc 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-CXX-XL-16.1.0.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-CXX-XL-16.1.0.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-Fortran-GNU-7.3.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-Fortran-GNU-7.3.0.output index d84842b..d84842b 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-Fortran-GNU-7.3.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-Fortran-GNU-7.3.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-Fortran-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-Fortran-PGI-18.10.1.output index 289c530..289c530 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-Fortran-PGI-18.10.1.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-Fortran-PGI-18.10.1.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-Fortran-XL-14.1.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-Fortran-XL-14.1.0.output index 39a28a4..39a28a4 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux-Fortran-XL-14.1.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux-Fortran-XL-14.1.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc-C-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc-C-PGI-18.10.1.output new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc-C-PGI-18.10.1.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc-C-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc-C-XL-12.1.0.output new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc-C-XL-12.1.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-CXX-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output index 8eb97c8..8eb97c8 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc-CXX-PGI-18.10.1.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc-CXX-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc-CXX-XL-12.1.0.output new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc-CXX-XL-12.1.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc-Fortran-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc-Fortran-PGI-18.10.1.output new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc-Fortran-PGI-18.10.1.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc_i-C-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc_i-C-XL-12.1.0.output index 38f0b37..38f0b37 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc_i-C-XL-12.1.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc_i-C-XL-12.1.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc_i-CXX-XL-12.1.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc_i-CXX-XL-12.1.0.output index 727afdb..727afdb 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_nostdinc_i-CXX-XL-12.1.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_nostdinc_i-CXX-XL-12.1.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_pgf77-Fortran-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_pgf77-Fortran-PGI-18.10.1.output index 289c530..289c530 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/linux_pgf77-Fortran-PGI-18.10.1.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/linux_pgf77-Fortran-PGI-18.10.1.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-C-GNU-4.9.3.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/mingw.org-C-GNU-4.9.3.output index d23e7fe..d23e7fe 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-C-GNU-4.9.3.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/mingw.org-C-GNU-4.9.3.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-CXX-GNU-4.9.3.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/mingw.org-CXX-GNU-4.9.3.output index 9996940..9996940 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/mingw.org-CXX-GNU-4.9.3.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/mingw.org-CXX-GNU-4.9.3.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd-C-GNU-4.8.5.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/netbsd-C-GNU-4.8.5.output index 6b69b2d..6b69b2d 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd-C-GNU-4.8.5.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/netbsd-C-GNU-4.8.5.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd-CXX-GNU-4.8.5.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/netbsd-CXX-GNU-4.8.5.output index d2289eb..d2289eb 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/netbsd-CXX-GNU-4.8.5.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/netbsd-CXX-GNU-4.8.5.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/results/netbsd_nostdinc-C-GNU-4.8.5.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/netbsd_nostdinc-C-GNU-4.8.5.output new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/netbsd_nostdinc-C-GNU-4.8.5.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/results/netbsd_nostdinc-CXX-GNU-4.8.5.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/netbsd_nostdinc-CXX-GNU-4.8.5.output new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/netbsd_nostdinc-CXX-GNU-4.8.5.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/openbsd-C-Clang-5.0.1.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/openbsd-C-Clang-5.0.1.output index 60dbe24..60dbe24 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/openbsd-C-Clang-5.0.1.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/openbsd-C-Clang-5.0.1.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/openbsd-CXX-Clang-5.0.1.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/openbsd-CXX-Clang-5.0.1.output index d77687b..d77687b 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/openbsd-CXX-Clang-5.0.1.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/openbsd-CXX-Clang-5.0.1.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/sunos-C-SunPro-5.13.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/sunos-C-SunPro-5.13.0.output index 27c452d..27c452d 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/sunos-C-SunPro-5.13.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/sunos-C-SunPro-5.13.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/sunos-CXX-SunPro-5.13.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/sunos-CXX-SunPro-5.13.0.output index be851c2..be851c2 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/sunos-CXX-SunPro-5.13.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/sunos-CXX-SunPro-5.13.0.output diff --git a/Tests/RunCMake/ParseImplicitIncludeInfo/data/sunos-Fortran-SunPro-8.8.0.output b/Tests/RunCMake/ParseImplicitIncludeInfo/results/sunos-Fortran-SunPro-8.8.0.output index 3c31e16..3c31e16 100644 --- a/Tests/RunCMake/ParseImplicitIncludeInfo/data/sunos-Fortran-SunPro-8.8.0.output +++ b/Tests/RunCMake/ParseImplicitIncludeInfo/results/sunos-Fortran-SunPro-8.8.0.output diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt b/Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt new file mode 100644 index 0000000..2897109 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.0) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake new file mode 100644 index 0000000..bb6beb2 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/ParseImplicitLinkInfo.cmake @@ -0,0 +1,146 @@ +cmake_minimum_required(VERSION 3.14) +project(Minimal NONE) + +# +# list of targets to test. to add a target: put its files in the data +# subdirectory and add it to this list... we run each target's +# data/*.input file through the parser and check to see if it matches +# the corresponding data/*.output file. note that the empty-* case +# has special handling (it should not parse). +# +set(targets + aix-C-XL-13.1.3 aix-CXX-XL-13.1.3 + aix-C-XLClang-16.1.0.1 aix-CXX-XLClang-16.1.0.1 + craype-C-Cray-8.7 craype-CXX-Cray-8.7 craype-Fortran-Cray-8.7 + craype-C-Cray-9.0-hlist-ad craype-CXX-Cray-9.0-hlist-ad craype-Fortran-Cray-9.0-hlist-ad + craype-C-GNU-7.3.0 craype-CXX-GNU-7.3.0 craype-Fortran-GNU-7.3.0 + craype-C-Intel-18.0.2.20180210 craype-CXX-Intel-18.0.2.20180210 + craype-Fortran-Intel-18.0.2.20180210 + darwin-C-AppleClang-8.0.0.8000042 darwin-CXX-AppleClang-8.0.0.8000042 + darwin_nostdinc-C-AppleClang-8.0.0.8000042 + darwin_nostdinc-CXX-AppleClang-8.0.0.8000042 + freebsd-C-Clang-3.3.0 freebsd-CXX-Clang-3.3.0 freebsd-Fortran-GNU-4.6.4 + hand-C-empty hand-CXX-empty + hand-C-relative hand-CXX-relative + linux-C-GNU-7.3.0 linux-CXX-GNU-7.3.0 linux-Fortran-GNU-7.3.0 + linux-C-Intel-18.0.0.20170811 linux-CXX-Intel-18.0.0.20170811 + linux-C-PGI-18.10.1 linux-CXX-PGI-18.10.1 + 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-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 + linux-C-XL-16.1.0.0 linux-CXX-XL-16.1.0.0 + linux-CUDA-NVIDIA-10.1.168-CLANG linux-CUDA-NVIDIA-10.1.168-XLClang-v + linux-CUDA-NVIDIA-9.2.148-GCC + mingw.org-C-GNU-4.9.3 mingw.org-CXX-GNU-4.9.3 + netbsd-C-GNU-4.8.5 netbsd-CXX-GNU-4.8.5 + netbsd_nostdinc-C-GNU-4.8.5 netbsd_nostdinc-CXX-GNU-4.8.5 + openbsd-C-Clang-5.0.1 openbsd-CXX-Clang-5.0.1 + sunos-C-SunPro-5.13.0 sunos-CXX-SunPro-5.13.0 sunos-Fortran-SunPro-8.8.0 + ) + +if(CMAKE_HOST_WIN32) + # The KWSys actual-case cache breaks case sensitivity on Windows. + list(FILTER targets EXCLUDE REGEX "-XL|-SunPro") +else() + # Windows drive letters are not recognized as absolute on other platforms. + list(FILTER targets EXCLUDE REGEX "mingw") +endif() + +include(${CMAKE_ROOT}/Modules/CMakeParseImplicitLinkInfo.cmake) + +# +# load_compiler_info: read infile, parsing out cmake compiler info +# variables as we go. returns language, a list of variables we set +# (so we can clear them later), and the remaining verbose output +# from the compiler. +# +function(load_compiler_info infile lang_var outcmvars_var outstr_var) + unset(lang) + unset(outcmvars) + unset(outstr) + file(READ "${infile}" in) + string(REGEX REPLACE "\r?\n" ";" in_lines "${in}") + foreach(line IN LISTS in_lines) + # check for special CMAKE variable lines and parse them if found + if("${line}" MATCHES "^CMAKE_([_A-Za-z0-9]+)=(.*)$") + if("${CMAKE_MATCH_1}" STREQUAL "LANG") # handle CMAKE_LANG here + set(lang "${CMAKE_MATCH_2}") + else() + set(CMAKE_${CMAKE_MATCH_1} "${CMAKE_MATCH_2}" PARENT_SCOPE) + list(APPEND outcmvars "CMAKE_${CMAKE_MATCH_1}") + endif() + else() + string(APPEND outstr "${line}\n") + endif() + endforeach() + if(NOT lang) + message("load_compiler_info: ${infile} no LANG info; default to C") + set(lang C) + endif() + set(${lang_var} "${lang}" PARENT_SCOPE) + set(${outcmvars_var} "${outcmvars}" PARENT_SCOPE) + set(${outstr_var} "${outstr}" PARENT_SCOPE) +endfunction() + +# +# unload_compiler_info: clear out any CMAKE_* vars load previously set +# +function(unload_compiler_info cmvars) + foreach(var IN LISTS cmvars) + unset("${var}" PARENT_SCOPE) + endforeach() +endfunction() + +# +# main test loop +# +foreach(t ${targets}) + set(infile "${CMAKE_SOURCE_DIR}/../ParseImplicitData/${t}.input") + set(outfile "${CMAKE_SOURCE_DIR}/results/${t}.output") + if (NOT EXISTS ${infile}) + string(REPLACE "-empty" "" infile "${infile}") + if (NOT EXISTS ${infile}) + message("missing input file for target ${t} in ${CMAKE_SOURCE_DIR}/../ParseImplicitData/") + continue() + endif() + elseif(NOT EXISTS ${outfile}) + message("missing files for target ${t} in ${CMAKE_SOURCE_DIR}/results/") + continue() + endif() + + load_compiler_info(${infile} lang cmvars input) + + # Need to handle files with empty entries for both libs or dirs + set(implicit_lib_output "") + set(idirs_output "") + file(STRINGS ${outfile} outputs) + foreach(line IN LISTS outputs) + if(line MATCHES "libs=") + string(REPLACE "libs=" "" implicit_lib_output "${line}") + endif() + if(line MATCHES "dirs=") + string(REPLACE "dirs=" "" idirs_output "${line}") + endif() + endforeach() + + cmake_parse_implicit_link_info("${input}" implicit_libs idirs implicit_fwks log + "${CMAKE_${lang}_IMPLICIT_OBJECT_REGEX}") + + # File format + # file(WRITE ${outfile} "libs=${implicit_libs}\ndirs=${idirs}\n") + + if(t MATCHES "-empty$") # empty isn't supposed to parse + if("${state}" STREQUAL "done") + message("empty parse failed: ${idirs}, log=${log}") + endif() + elseif(NOT "${idirs}" STREQUAL "${idirs_output}") + 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}'") + endif() + + unload_compiler_info("${cmvars}") +endforeach(t) diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/RunCMakeTest.cmake b/Tests/RunCMake/ParseImplicitLinkInfo/RunCMakeTest.cmake new file mode 100644 index 0000000..713e2e7 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(ParseImplicitLinkInfo) diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-C-XL-13.1.3.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-C-XL-13.1.3.output new file mode 100644 index 0000000..4e030b3 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-C-XL-13.1.3.output @@ -0,0 +1,2 @@ +libs=xlopt;xlipa;xl;c +dirs=/opt/IBM/xlmass/8.1.3/lib/aix61;/opt/IBM/xlc/13.1.3/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-C-XLClang-16.1.0.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-C-XLClang-16.1.0.1.output new file mode 100644 index 0000000..6f677a0 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-C-XLClang-16.1.0.1.output @@ -0,0 +1,2 @@ +libs=xlopt;xlipa;xl;c;pthreads +dirs=/opt/IBM/xlmass/9.1.0/lib/aix61;/opt/IBM/xlc/16.1.0/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-CXX-XL-13.1.3.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-CXX-XL-13.1.3.output new file mode 100644 index 0000000..6cbc792 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-CXX-XL-13.1.3.output @@ -0,0 +1,2 @@ +libs=xlopt;xlipa;xl;C;m;c +dirs=/opt/IBM/xlmass/8.1.3/lib/aix61;/opt/IBM/xlc/13.1.3/lib;/opt/IBM/xlC/13.1.3/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-CXX-XLClang-16.1.0.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-CXX-XLClang-16.1.0.1.output new file mode 100644 index 0000000..2dc5832 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/aix-CXX-XLClang-16.1.0.1.output @@ -0,0 +1,2 @@ +libs=xlopt;xlipa;xl;c++;Ccore;pthreads;m;c +dirs=/opt/IBM/xlmass/9.1.0/lib/aix61;/opt/IBM/xlc/16.1.0/lib;/opt/IBM/xlC/16.1.0/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-8.7.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-8.7.output new file mode 100644 index 0000000..674975c --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-8.7.output @@ -0,0 +1,2 @@ +libs=AtpSigHandler;AtpSigHCommData;pthread;sci_cray_mpi_mp;m;f;sci_cray_mp;craymp;m;pthread;f;hugetlbfs;mpich_cray;rt;pthread;ugni;pmi;pgas-dmapp;fi;u;rt;dmapp;ugni;udreg;pthread;m;cray-c++-rts;stdc++;xpmem;dmapp;pthread;pmi;pthread;alpslli;pthread;wlm_detect;ugni;pthread;alpsutil;pthread;rca;udreg;quadmath;m;omp;rt;craymp;pthread;rt;dl;cray-c++-rts;stdc++;m;modules;m;rt;fi;m;quadmath;rt;craymath;m;gfortran;quadmath;rt;f;m;pthread;rt;u;rt;dl;cray-c++-rts;stdc++;m;csup;rt;atomic;stdc++;pthread;c;csup;m;gcc +dirs=/opt/gcc/6.1.0/snos/lib64;/opt/cray/pe/libsci/18.07.1/CRAY/8.6/x86_64/lib;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.3/gni/mpich-cray/8.6/lib;/opt/cray/rca/2.2.16-6.0.5.0_15.34__g5e09e6d.ari/lib64;/opt/cray/alps/6.5.28-6.0.5.0_18.6__g13a91b6.ari/lib64;/opt/cray/xpmem/2.2.4-6.0.5.1_8.26__g35d5e73.ari/lib64;/opt/cray/dmapp/7.1.1-6.0.5.0_49.8__g1125556.ari/lib64;/opt/cray/pe/pmi/5.0.14/lib64;/opt/cray/ugni/6.0.14-6.0.5.0_16.9__g19583bb.ari/lib64;/opt/cray/udreg/2.3.2-6.0.5.0_13.12__ga14955a.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/pe/cce/8.7.4/cce/x86_64/lib;/opt/cray/wlm_detect/1.3.2-6.0.5.0_3.1__g388ccd5.ari/lib64;/usr/lib64;/lib64;/opt/gcc/6.1.0/snos/lib/gcc/x86_64-suse-linux/6.1.0;/opt/cray/pe/cce/8.7.4/binutils/x86_64/x86_64-unknown-linux-gnu/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-9.0-hlist-ad.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-9.0-hlist-ad.output new file mode 100644 index 0000000..1bf2f6d --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Cray-9.0-hlist-ad.output @@ -0,0 +1,2 @@ +libs=AtpSigHandler;AtpSigHCommData;rca;mpich_cray_90;sci_cray_mpi;sci_cray;pgas-dmapp;quadmath;modules;fi;craymath;f;u;csup;atomic;tcmalloc_minimal;cray-c++-rts;stdc++;pthread;c;csup;m;clang_rt.craypgo-x86_64;gcc +dirs=/opt/gcc/8.1.0/snos/lib64;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.8/gni/mpich-cray/9.0/lib;/opt/cray/pe/libsci/19.06.1/CRAY/9.0/x86_64/lib;/opt/cray/rca/2.2.18-6.0.7.0_33.3__g2aa4f39.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/pe/cce/9.0.0/cce/x86_64/lib;/usr/lib64;/lib64;/opt/cray/pe/cce/9.0.0/cce-clang/x86_64/lib/clang/9.0.0/lib/linux;/opt/gcc/8.1.0/snos/lib/gcc/x86_64-suse-linux/8.1.0;/opt/cray/pe/cce/9.0.0/binutils/x86_64/x86_64-unknown-linux-gnu/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-GNU-7.3.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-GNU-7.3.0.output new file mode 100644 index 0000000..267bf58 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-GNU-7.3.0.output @@ -0,0 +1,2 @@ +libs=AtpSigHandler;AtpSigHCommData;pthread;sci_gnu_71_mpi;sci_gnu_71;pthread;hugetlbfs;mpich_gnu_71;rt;ugni;pthread;pmi;pthread;alpslli;pthread;wlm_detect;alpsutil;pthread;rca;xpmem;ugni;pthread;udreg;gfortran;quadmath;mvec;m;pthread;gcc;c +dirs=/opt/cray/pe/libsci/18.07.1/GNU/7.1/x86_64/lib;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.3/gni/mpich-gnu/7.1/lib;/opt/cray/rca/2.2.16-6.0.5.0_15.34__g5e09e6d.ari/lib64;/opt/cray/alps/6.5.28-6.0.5.0_18.6__g13a91b6.ari/lib64;/opt/cray/xpmem/2.2.4-6.0.5.1_8.26__g35d5e73.ari/lib64;/opt/cray/pe/pmi/5.0.14/lib64;/opt/cray/ugni/6.0.14-6.0.5.0_16.9__g19583bb.ari/lib64;/opt/cray/udreg/2.3.2-6.0.5.0_13.12__ga14955a.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/wlm_detect/1.3.2-6.0.5.0_3.1__g388ccd5.ari/lib64;/opt/gcc/7.3.0/snos/lib/gcc/x86_64-suse-linux/7.3.0;/opt/gcc/7.3.0/snos/lib64;/lib64;/usr/lib64;/opt/gcc/7.3.0/snos/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Intel-18.0.2.20180210.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Intel-18.0.2.20180210.output new file mode 100644 index 0000000..e9e6739 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-C-Intel-18.0.2.20180210.output @@ -0,0 +1,2 @@ +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/2018.2.199/compilers_and_libraries_2018/linux/mkl/lib/intel64;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64_lin;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0;/opt/gcc/6.3.0/snos/lib64;/lib64;/usr/lib64;/opt/gcc/6.3.0/snos/lib;/lib;/usr/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-8.7.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-8.7.output new file mode 100644 index 0000000..7daa29d --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-8.7.output @@ -0,0 +1,2 @@ +libs=AtpSigHandler;AtpSigHCommData;pthread;sci_cray_mpi_mp;m;f;sci_cray_mp;craymp;m;pthread;f;hugetlbfs;mpichcxx_cray;rt;pthread;ugni;pmi;mpich_cray;rt;pthread;ugni;pmi;pgas-dmapp;fi;u;rt;dmapp;ugni;udreg;pthread;m;cray-c++-rts;stdc++;xpmem;dmapp;pthread;pmi;pthread;alpslli;pthread;wlm_detect;ugni;pthread;alpsutil;pthread;rca;udreg;quadmath;m;omp;rt;craymp;pthread;rt;dl;cray-c++-rts;stdc++;m;modules;m;rt;fi;m;quadmath;rt;craymath;m;gfortran;quadmath;rt;f;m;pthread;rt;u;rt;dl;cray-c++-rts;stdc++;m;csup;rt;atomic;cray-c++-rts;stdc++;supc++;stdc++;pthread;c;csup;m;gcc +dirs=/opt/gcc/6.1.0/snos/lib64;/opt/cray/pe/libsci/18.07.1/CRAY/8.6/x86_64/lib;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.3/gni/mpich-cray/8.6/lib;/opt/cray/rca/2.2.16-6.0.5.0_15.34__g5e09e6d.ari/lib64;/opt/cray/alps/6.5.28-6.0.5.0_18.6__g13a91b6.ari/lib64;/opt/cray/xpmem/2.2.4-6.0.5.1_8.26__g35d5e73.ari/lib64;/opt/cray/dmapp/7.1.1-6.0.5.0_49.8__g1125556.ari/lib64;/opt/cray/pe/pmi/5.0.14/lib64;/opt/cray/ugni/6.0.14-6.0.5.0_16.9__g19583bb.ari/lib64;/opt/cray/udreg/2.3.2-6.0.5.0_13.12__ga14955a.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/pe/cce/8.7.4/cce/x86_64/lib;/opt/cray/wlm_detect/1.3.2-6.0.5.0_3.1__g388ccd5.ari/lib64;/usr/lib64;/lib64;/opt/gcc/6.1.0/snos/lib/gcc/x86_64-suse-linux/6.1.0;/opt/cray/pe/cce/8.7.4/binutils/x86_64/x86_64-unknown-linux-gnu/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-9.0-hlist-ad.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-9.0-hlist-ad.output new file mode 100644 index 0000000..958a6b1 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Cray-9.0-hlist-ad.output @@ -0,0 +1,2 @@ +libs=AtpSigHandler;AtpSigHCommData;rca;mpich_cray_90;mpichcxx_cray_90;sci_cray_mpi;sci_cray;pgas-dmapp;quadmath;modules;fi;craymath;f;u;csup;atomic;cray-c++-rts;cray-c++-rts;stdc++;supc++;tcmalloc_minimal;cray-c++-rts;stdc++;pthread;c;csup;m;clang_rt.craypgo-x86_64;gcc +dirs=/opt/gcc/8.1.0/snos/lib64;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.8/gni/mpich-cray/9.0/lib;/opt/cray/pe/libsci/19.06.1/CRAY/9.0/x86_64/lib;/opt/cray/rca/2.2.18-6.0.7.0_33.3__g2aa4f39.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/pe/cce/9.0.0/cce/x86_64/lib;/usr/lib64;/lib64;/opt/cray/pe/cce/9.0.0/cce-clang/x86_64/lib/clang/9.0.0/lib/linux;/opt/gcc/8.1.0/snos/lib/gcc/x86_64-suse-linux/8.1.0;/opt/cray/pe/cce/9.0.0/binutils/x86_64/x86_64-unknown-linux-gnu/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-GNU-7.3.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-GNU-7.3.0.output new file mode 100644 index 0000000..40d0047 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-GNU-7.3.0.output @@ -0,0 +1,2 @@ +libs=AtpSigHandler;AtpSigHCommData;pthread;sci_gnu_71_mpi;sci_gnu_71;pthread;hugetlbfs;mpichcxx_gnu_71;rt;ugni;pthread;pmi;mpich_gnu_71;rt;ugni;pthread;pmi;pthread;alpslli;pthread;wlm_detect;alpsutil;pthread;rca;ugni;pthread;xpmem;udreg;gfortran;quadmath;mvec;m;pthread;stdc++;m;gcc;c +dirs=/opt/cray/pe/libsci/18.07.1/GNU/7.1/x86_64/lib;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.3/gni/mpich-gnu/7.1/lib;/opt/cray/rca/2.2.16-6.0.5.0_15.34__g5e09e6d.ari/lib64;/opt/cray/alps/6.5.28-6.0.5.0_18.6__g13a91b6.ari/lib64;/opt/cray/xpmem/2.2.4-6.0.5.1_8.26__g35d5e73.ari/lib64;/opt/cray/pe/pmi/5.0.14/lib64;/opt/cray/ugni/6.0.14-6.0.5.0_16.9__g19583bb.ari/lib64;/opt/cray/udreg/2.3.2-6.0.5.0_13.12__ga14955a.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/wlm_detect/1.3.2-6.0.5.0_3.1__g388ccd5.ari/lib64;/opt/gcc/7.3.0/snos/lib/gcc/x86_64-suse-linux/7.3.0;/opt/gcc/7.3.0/snos/lib64;/lib64;/usr/lib64;/opt/gcc/7.3.0/snos/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Intel-18.0.2.20180210.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Intel-18.0.2.20180210.output new file mode 100644 index 0000000..6212844 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-CXX-Intel-18.0.2.20180210.output @@ -0,0 +1,2 @@ +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/2018.2.199/compilers_and_libraries_2018/linux/mkl/lib/intel64;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64_lin;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0;/opt/gcc/6.3.0/snos/lib64;/lib64;/usr/lib64;/opt/gcc/6.3.0/snos/lib;/lib;/usr/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-8.7.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-8.7.output new file mode 100644 index 0000000..9828bf3 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-8.7.output @@ -0,0 +1,2 @@ +libs=AtpSigHandler;AtpSigHCommData;rca;sci_cray_mpi_mp;sci_cray_mp;mpich_cray;mpichf90_cray;pgas-dmapp;quadmath;omp;craymp;modules;fi;craymath;f;u;csup;atomic;gfortran;tcmalloc_minimal;stdc++;pthread;c;csup;m;gcc +dirs=/opt/gcc/6.1.0/snos/lib64;/opt/cray/pe/libsci/18.07.1/CRAY/8.6/x86_64/lib;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.3/gni/mpich-cray/8.6/lib;/opt/cray/rca/2.2.16-6.0.5.0_15.34__g5e09e6d.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/pe/cce/8.7.4/cce/x86_64/lib;/usr/lib64;/lib64;/opt/gcc/6.1.0/snos/lib/gcc/x86_64-suse-linux/6.1.0;/opt/cray/pe/cce/8.7.4/binutils/x86_64/x86_64-unknown-linux-gnu/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-9.0-hlist-ad.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-9.0-hlist-ad.output new file mode 100644 index 0000000..4675408 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Cray-9.0-hlist-ad.output @@ -0,0 +1,2 @@ +libs=AtpSigHandler;AtpSigHCommData;rca;mpich_cray_90;mpichf90_cray_90;sci_cray_mpi;sci_cray;pgas-dmapp;quadmath;modules;fi;craymath;f;u;csup;gfortran;tcmalloc_minimal;cray-c++-rts;stdc++;pthread;c;csup;m;clang_rt.craypgo-x86_64;gcc +dirs=/opt/gcc/8.1.0/snos/lib64;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.8/gni/mpich-cray/9.0/lib;/opt/cray/pe/libsci/19.06.1/CRAY/9.0/x86_64/lib;/opt/cray/rca/2.2.18-6.0.7.0_33.3__g2aa4f39.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/pe/cce/9.0.0/cce/x86_64/lib;/usr/lib64;/lib64;/opt/cray/pe/cce/9.0.0/cce-clang/x86_64/lib/clang/9.0.0/lib/linux;/opt/gcc/8.1.0/snos/lib/gcc/x86_64-suse-linux/8.1.0;/opt/cray/pe/cce/9.0.0/binutils/x86_64/x86_64-unknown-linux-gnu/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-GNU-7.3.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-GNU-7.3.0.output new file mode 100644 index 0000000..da2e557 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-GNU-7.3.0.output @@ -0,0 +1,2 @@ +libs=AtpSigHandler;AtpSigHCommData;rca;sci_gnu_71_mpi;sci_gnu_71;mpich_gnu_71;mpichf90_gnu_71;gfortran;quadmath;pthread;gfortran;m;gcc_s;gcc;quadmath;m;gcc_s;gcc;c;gcc_s;gcc +dirs=/opt/cray/pe/libsci/18.07.1/GNU/7.1/x86_64/lib;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.3/gni/mpich-gnu/7.1/lib;/opt/cray/rca/2.2.16-6.0.5.0_15.34__g5e09e6d.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/gcc/7.3.0/snos/lib/gcc/x86_64-suse-linux/7.3.0;/opt/gcc/7.3.0/snos/lib64;/lib64;/usr/lib64;/opt/gcc/7.3.0/snos/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Intel-18.0.2.20180210.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Intel-18.0.2.20180210.output new file mode 100644 index 0000000..e73cbe9 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/craype-Fortran-Intel-18.0.2.20180210.output @@ -0,0 +1,2 @@ +libs=hugetlbfs;AtpSigHandler;AtpSigHCommData;pthread;mpichf90_intel;rt;ugni;pmi;imf;m;pthread;dl;sci_intel_mpi;sci_intel;imf;m;dl;mpich_intel;rt;ugni;pthread;pmi;imf;m;dl;pmi;pthread;alpslli;pthread;wlm_detect;alpsutil;pthread;rca;xpmem;ugni;pthread;udreg;sci_intel;imf;m;pthread;dl;hugetlbfs;imf;m;pthread;ifport;ifcore;imf;svml;m;ipgo;irc;svml;c;gcc;irc_s;dl;c +dirs=/opt/cray/pe/libsci/18.07.1/INTEL/16.0/x86_64/lib;/opt/cray/dmapp/default/lib64;/opt/cray/pe/mpt/7.7.3/gni/mpich-intel/16.0/lib;/opt/cray/rca/2.2.16-6.0.5.0_15.34__g5e09e6d.ari/lib64;/opt/cray/alps/6.5.28-6.0.5.0_18.6__g13a91b6.ari/lib64;/opt/cray/xpmem/2.2.4-6.0.5.1_8.26__g35d5e73.ari/lib64;/opt/cray/pe/pmi/5.0.14/lib64;/opt/cray/ugni/6.0.14-6.0.5.0_16.9__g19583bb.ari/lib64;/opt/cray/udreg/2.3.2-6.0.5.0_13.12__ga14955a.ari/lib64;/opt/cray/pe/atp/2.1.3/libApp;/opt/cray/wlm_detect/1.3.2-6.0.5.0_3.1__g388ccd5.ari/lib64;/opt/intel/2018.2.199/compilers_and_libraries_2018/linux/mkl/lib/intel64;/opt/intel/2018.2.199/compilers_and_libraries_2018.2.199/linux/compiler/lib/intel64_lin;/opt/gcc/6.3.0/snos/lib/gcc/x86_64-suse-linux/6.3.0;/opt/gcc/6.3.0/snos/lib64;/lib64;/usr/lib64;/opt/gcc/6.3.0/snos/lib;/lib;/usr/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin-C-AppleClang-8.0.0.8000042.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin-C-AppleClang-8.0.0.8000042.output new file mode 100644 index 0000000..c041faa --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin-C-AppleClang-8.0.0.8000042.output @@ -0,0 +1,2 @@ +libs= +dirs=/usr/lib;/usr/local/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin-CXX-AppleClang-8.0.0.8000042.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin-CXX-AppleClang-8.0.0.8000042.output new file mode 100644 index 0000000..f75637c --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin-CXX-AppleClang-8.0.0.8000042.output @@ -0,0 +1,2 @@ +libs=c++ +dirs=/usr/lib;/usr/local/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin_nostdinc-C-AppleClang-8.0.0.8000042.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin_nostdinc-C-AppleClang-8.0.0.8000042.output new file mode 100644 index 0000000..c041faa --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin_nostdinc-C-AppleClang-8.0.0.8000042.output @@ -0,0 +1,2 @@ +libs= +dirs=/usr/lib;/usr/local/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.output new file mode 100644 index 0000000..f75637c --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/darwin_nostdinc-CXX-AppleClang-8.0.0.8000042.output @@ -0,0 +1,2 @@ +libs=c++ +dirs=/usr/lib;/usr/local/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/freebsd-C-Clang-3.3.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/freebsd-C-Clang-3.3.0.output new file mode 100644 index 0000000..4ce854a --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/freebsd-C-Clang-3.3.0.output @@ -0,0 +1,2 @@ +libs=gcc;gcc_s;c;gcc;gcc_s +dirs=/usr/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/freebsd-CXX-Clang-3.3.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/freebsd-CXX-Clang-3.3.0.output new file mode 100644 index 0000000..b0b8e25 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/freebsd-CXX-Clang-3.3.0.output @@ -0,0 +1,2 @@ +libs=c++;m;gcc;gcc_s;c;gcc;gcc_s +dirs=/usr/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/freebsd-Fortran-GNU-4.6.4.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/freebsd-Fortran-GNU-4.6.4.output new file mode 100644 index 0000000..1228333 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/freebsd-Fortran-GNU-4.6.4.output @@ -0,0 +1,2 @@ +libs=gfortran;m;gcc_s;gcc;quadmath;m;gcc_s;gcc;c;gcc_s;gcc +dirs=/usr/local/lib/gcc46/gcc/x86_64-portbld-freebsd10.0/4.6.4;/usr/local/x86_64-portbld-freebsd10.0/lib;/usr/local/lib/gcc46 diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/hand-C-empty.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/hand-C-empty.output new file mode 100644 index 0000000..1b14cd5 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/hand-C-empty.output @@ -0,0 +1,2 @@ +libs= +dirs= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/hand-C-relative.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/hand-C-relative.output new file mode 100644 index 0000000..9bb651a --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/hand-C-relative.output @@ -0,0 +1,2 @@ +libs= +dirs=/usr/lib64 diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/hand-CXX-empty.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/hand-CXX-empty.output new file mode 100644 index 0000000..1b14cd5 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/hand-CXX-empty.output @@ -0,0 +1,2 @@ +libs= +dirs= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/hand-CXX-relative.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/hand-CXX-relative.output new file mode 100644 index 0000000..9bb651a --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/hand-CXX-relative.output @@ -0,0 +1,2 @@ +libs= +dirs=/usr/lib64 diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-GNU-7.3.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-GNU-7.3.0.output new file mode 100644 index 0000000..63b51a1 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-GNU-7.3.0.output @@ -0,0 +1,2 @@ +libs=gcc;gcc_s;c;gcc;gcc_s +dirs=/usr/lib/gcc/x86_64-linux-gnu/7;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib 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 new file mode 100644 index 0000000..b61e097 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-Intel-18.0.0.20170811.output @@ -0,0 +1,2 @@ +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 diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-PGI-18.10.1.output new file mode 100644 index 0000000..7b20915 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-PGI-18.10.1.output @@ -0,0 +1,2 @@ +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 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 new file mode 100644 index 0000000..de407f2 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-12.1.0.output @@ -0,0 +1,2 @@ +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 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 new file mode 100644 index 0000000..de515e7 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-C-XL-16.1.0.0.output @@ -0,0 +1,2 @@ +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 diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-CLANG.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-CLANG.output new file mode 100644 index 0000000..a657b85 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-CLANG.output @@ -0,0 +1,2 @@ +libs=cudadevrt;cudart_static;rt;pthread;dl;stdc++;m;gcc_s;gcc;c;gcc_s;gcc +dirs=/usr/local/cuda/targets/x86_64-linux/lib/stubs;/usr/local/cuda/targets/x86_64-linux/lib;/usr/lib/gcc/x86_64-linux-gnu/8;/usr/lib/x86_64-linux-gnu;/lib/x86_64-linux-gnu;/lib64;/usr/lib;/usr/lib/llvm-8/lib;/lib 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 new file mode 100644 index 0000000..58ae64d --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-10.1.168-XLClang-v.output @@ -0,0 +1,2 @@ +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 diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-9.2.148-GCC.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-9.2.148-GCC.output new file mode 100644 index 0000000..7c99bf6 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CUDA-NVIDIA-9.2.148-GCC.output @@ -0,0 +1,2 @@ +libs=cudadevrt;cudart_static;rt;pthread;dl;stdc++;m;gcc_s;gcc;c;gcc_s;gcc +dirs=/usr/lib/x86_64-linux-gnu/stubs;/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-GNU-7.3.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-GNU-7.3.0.output new file mode 100644 index 0000000..4fc7937 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-GNU-7.3.0.output @@ -0,0 +1,2 @@ +libs=stdc++;m;gcc_s;gcc;c;gcc_s;gcc +dirs=/usr/lib/gcc/x86_64-linux-gnu/7;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib 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 new file mode 100644 index 0000000..5d85789 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-Intel-18.0.0.20170811.output @@ -0,0 +1,2 @@ +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 diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-PGI-18.10.1.output new file mode 100644 index 0000000..db0b29c --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-PGI-18.10.1.output @@ -0,0 +1,2 @@ +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 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 new file mode 100644 index 0000000..4466415 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-12.1.0.output @@ -0,0 +1,2 @@ +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 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 new file mode 100644 index 0000000..8124911 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-CXX-XL-16.1.0.0.output @@ -0,0 +1,2 @@ +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 diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-GNU-7.3.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-GNU-7.3.0.output new file mode 100644 index 0000000..f985a03 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-GNU-7.3.0.output @@ -0,0 +1,2 @@ +libs=gfortran;m;gcc_s;gcc;quadmath;m;gcc_s;gcc;c;gcc_s;gcc +dirs=/usr/lib/gcc/x86_64-linux-gnu/7;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-PGI-18.10.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-PGI-18.10.1.output new file mode 100644 index 0000000..d40f81e --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-PGI-18.10.1.output @@ -0,0 +1,2 @@ +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 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 new file mode 100644 index 0000000..3c5d23b --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux-Fortran-XL-14.1.0.output @@ -0,0 +1,2 @@ +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 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 new file mode 100644 index 0000000..7b20915 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-PGI-18.10.1.output @@ -0,0 +1,2 @@ +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 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 new file mode 100644 index 0000000..de407f2 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-C-XL-12.1.0.output @@ -0,0 +1,2 @@ +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 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 new file mode 100644 index 0000000..db0b29c --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-PGI-18.10.1.output @@ -0,0 +1,2 @@ +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 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 new file mode 100644 index 0000000..4466415 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-CXX-XL-12.1.0.output @@ -0,0 +1,2 @@ +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 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 new file mode 100644 index 0000000..d40f81e --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc-Fortran-PGI-18.10.1.output @@ -0,0 +1,2 @@ +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 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 new file mode 100644 index 0000000..de407f2 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_nostdinc_i-C-XL-12.1.0.output @@ -0,0 +1,2 @@ +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 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 new file mode 100644 index 0000000..7b523ea --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/linux_pgf77-Fortran-PGI-18.10.1.output @@ -0,0 +1,2 @@ +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 diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/mingw.org-C-GNU-4.9.3.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/mingw.org-C-GNU-4.9.3.output new file mode 100644 index 0000000..8aee7cf --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/mingw.org-C-GNU-4.9.3.output @@ -0,0 +1,2 @@ +libs=mingw32;gcc;moldname;mingwex;advapi32;shell32;user32;kernel32;mingw32;gcc;moldname;mingwex +dirs=C:/DoesNotExist/mingw/lib/gcc/mingw32/4.9.3;C:/DoesNotExist/mingw/lib/gcc;C:/DoesNotExist/mingw/mingw32/lib;C:/DoesNotExist/mingw/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/mingw.org-CXX-GNU-4.9.3.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/mingw.org-CXX-GNU-4.9.3.output new file mode 100644 index 0000000..5e79cc1 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/mingw.org-CXX-GNU-4.9.3.output @@ -0,0 +1,2 @@ +libs=stdc++;mingw32;gcc_s;gcc;moldname;mingwex;advapi32;shell32;user32;kernel32;mingw32;gcc_s;gcc;moldname;mingwex +dirs=C:/DoesNotExist/mingw/lib/gcc/mingw32/4.9.3;C:/DoesNotExist/mingw/lib/gcc;C:/DoesNotExist/mingw/mingw32/lib;C:/DoesNotExist/mingw/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd-C-GNU-4.8.5.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd-C-GNU-4.8.5.output new file mode 100644 index 0000000..4a09c5b --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd-C-GNU-4.8.5.output @@ -0,0 +1,2 @@ +libs=gcc;gcc_s;c;gcc;gcc_s +dirs= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd-CXX-GNU-4.8.5.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd-CXX-GNU-4.8.5.output new file mode 100644 index 0000000..d747e5b --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd-CXX-GNU-4.8.5.output @@ -0,0 +1,2 @@ +libs=stdc++;m;gcc_s;gcc;c;gcc_s;gcc +dirs= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd_nostdinc-C-GNU-4.8.5.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd_nostdinc-C-GNU-4.8.5.output new file mode 100644 index 0000000..4a09c5b --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd_nostdinc-C-GNU-4.8.5.output @@ -0,0 +1,2 @@ +libs=gcc;gcc_s;c;gcc;gcc_s +dirs= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd_nostdinc-CXX-GNU-4.8.5.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd_nostdinc-CXX-GNU-4.8.5.output new file mode 100644 index 0000000..d747e5b --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/netbsd_nostdinc-CXX-GNU-4.8.5.output @@ -0,0 +1,2 @@ +libs=stdc++;m;gcc_s;gcc;c;gcc_s;gcc +dirs= diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-C-Clang-5.0.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-C-Clang-5.0.1.output new file mode 100644 index 0000000..5bb5db4 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-C-Clang-5.0.1.output @@ -0,0 +1,2 @@ +libs=compiler_rt;c;compiler_rt +dirs=/usr/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-CXX-Clang-5.0.1.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-CXX-Clang-5.0.1.output new file mode 100644 index 0000000..4158973 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/openbsd-CXX-Clang-5.0.1.output @@ -0,0 +1,2 @@ +libs=c++;c++abi;pthread;m;compiler_rt;c;compiler_rt +dirs=/usr/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/sunos-C-SunPro-5.13.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/sunos-C-SunPro-5.13.0.output new file mode 100644 index 0000000..0d636e6 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/sunos-C-SunPro-5.13.0.output @@ -0,0 +1,2 @@ +libs=c +dirs=/opt/solarisstudio12.4/lib/compilers/staticlib;/opt/solarisstudio12.4/lib/compilers/sparc;/opt/solarisstudio12.4/lib/compilers;/usr/ccs/lib;/lib;/usr/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/sunos-CXX-SunPro-5.13.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/sunos-CXX-SunPro-5.13.0.output new file mode 100644 index 0000000..f7c8213 --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/sunos-CXX-SunPro-5.13.0.output @@ -0,0 +1,2 @@ +libs=Cstd;Crun;m;c +dirs=/opt/solarisstudio12.4/lib/compilers/sparc;/opt/solarisstudio12.4/lib/compilers;/opt/solarisstudio12.4/lib/sparc;/opt/solarisstudio12.4/lib;/usr/ccs/lib;/lib;/usr/lib diff --git a/Tests/RunCMake/ParseImplicitLinkInfo/results/sunos-Fortran-SunPro-8.8.0.output b/Tests/RunCMake/ParseImplicitLinkInfo/results/sunos-Fortran-SunPro-8.8.0.output new file mode 100644 index 0000000..b49557a --- /dev/null +++ b/Tests/RunCMake/ParseImplicitLinkInfo/results/sunos-Fortran-SunPro-8.8.0.output @@ -0,0 +1,2 @@ +libs=fsu;sunmath;mtsk;m;c +dirs=/opt/developerstudio12.6/lib/compilers/sparcvis2;/opt/developerstudio12.6/lib/compilers;/opt/developerstudio12.6/lib;/usr/ccs/lib;/lib;/usr/lib diff --git a/Tests/RunCMake/PrecompileHeaders/CMakeLists.txt b/Tests/RunCMake/PrecompileHeaders/CMakeLists.txt new file mode 100644 index 0000000..7dbf32e --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.15.0) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/PrecompileHeaders/DisabledPch-check.cmake b/Tests/RunCMake/PrecompileHeaders/DisabledPch-check.cmake new file mode 100644 index 0000000..fa37c2c --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/DisabledPch-check.cmake @@ -0,0 +1,17 @@ +if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG) + set(foo_pch_header "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foo.dir/CMakeFiles/foo.dir/cmake_pch.h") + set(foobar_pch_header "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foobar.dir/CMakeFiles/foobar.dir/cmake_pch.h") +else() + set(foo_pch_header "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foo.dir/cmake_pch.h") + set(foobar_pch_header "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foobar.dir/cmake_pch.h") +endif() + +if (NOT EXISTS ${foo_pch_header}) + set(RunCMake_TEST_FAILED "Generated foo pch header ${foo_pch_header} does not exist") + return() +endif() + +if (EXISTS ${foobar_pch_header}) + set(RunCMake_TEST_FAILED "Generated foobar pch header ${foobar_pch_header} should not exist") + return() +endif() diff --git a/Tests/RunCMake/PrecompileHeaders/DisabledPch.cmake b/Tests/RunCMake/PrecompileHeaders/DisabledPch.cmake new file mode 100644 index 0000000..ee47980 --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/DisabledPch.cmake @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.15) +project(DisabledPch C) + +add_library(foo foo.c) +target_include_directories(foo PUBLIC include) +target_precompile_headers(foo PUBLIC + foo.h + <stdio.h> + \"string.h\" +) + +add_executable(foobar foobar.c) +target_link_libraries(foobar foo) +set_target_properties(foobar PROPERTIES DISABLE_PRECOMPILE_HEADERS ON) diff --git a/Tests/RunCMake/PrecompileHeaders/PchInterface-check.cmake b/Tests/RunCMake/PrecompileHeaders/PchInterface-check.cmake new file mode 100644 index 0000000..cbd6ede --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/PchInterface-check.cmake @@ -0,0 +1,36 @@ +if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG) + set(foo_pch_header "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foo.dir/CMakeFiles/foo.dir/cmake_pch.h") + set(foobar_pch_header "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foobar.dir/CMakeFiles/foobar.dir/cmake_pch.h") +else() + set(foo_pch_header "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foo.dir/cmake_pch.h") + set(foobar_pch_header "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/foobar.dir/cmake_pch.h") +endif() + +if (NOT EXISTS ${foo_pch_header}) + set(RunCMake_TEST_FAILED "Generated foo pch header ${foo_pch_header} does not exist") + return() +endif() + +if (NOT EXISTS ${foobar_pch_header}) + set(RunCMake_TEST_FAILED "Generated foobar pch header ${foobar_pch_header} does not exist") + return() +endif() + +file(STRINGS ${foo_pch_header} foo_pch_header_strings) + +if (NOT "#include \"foo.h\"" IN_LIST foo_pch_header_strings OR + NOT "#include <stdio.h>" IN_LIST foo_pch_header_strings OR + NOT "#include \"string.h\"" IN_LIST foo_pch_header_strings) + set(RunCMake_TEST_FAILED "Generated foo pch header ${foo_pch_header} has bad content") + return() +endif() + +file(STRINGS ${foobar_pch_header} foobar_pch_header_strings) + +if (NOT "#include \"foo.h\"" IN_LIST foobar_pch_header_strings OR + NOT "#include <stdio.h>" IN_LIST foobar_pch_header_strings OR + NOT "#include \"string.h\"" IN_LIST foobar_pch_header_strings OR + NOT "#include \"bar.h\"" IN_LIST foobar_pch_header_strings) + set(RunCMake_TEST_FAILED "Generated foobar pch header ${foobar_pch_header} has bad content") + return() +endif() diff --git a/Tests/RunCMake/PrecompileHeaders/PchInterface.cmake b/Tests/RunCMake/PrecompileHeaders/PchInterface.cmake new file mode 100644 index 0000000..9041b09 --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/PchInterface.cmake @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.15) +project(PchInterface C) + +add_library(foo foo.c) +target_include_directories(foo PUBLIC include) +target_precompile_headers(foo PUBLIC + foo.h + <stdio.h> + \"string.h\" +) + +add_library(bar INTERFACE) +target_include_directories(bar INTERFACE include) +target_precompile_headers(bar INTERFACE bar.h) + +add_executable(foobar foobar.c) +target_link_libraries(foobar foo bar) + +enable_testing() +add_test(NAME foobar COMMAND foobar) diff --git a/Tests/RunCMake/PrecompileHeaders/PchPrologueEpilogue-check.cmake b/Tests/RunCMake/PrecompileHeaders/PchPrologueEpilogue-check.cmake new file mode 100644 index 0000000..fd82607 --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/PchPrologueEpilogue-check.cmake @@ -0,0 +1,12 @@ +if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG) + set(main_pch_header "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/main.dir/CMakeFiles/main.dir/cmake_pch.hxx") +else() + set(main_pch_header "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/main.dir/cmake_pch.hxx") +endif() + +file(STRINGS ${main_pch_header} main_pch_header_strings) +string(REGEX MATCH "#pragma warning\\(push, 0\\).*#include.*pch.h.*#pragma warning\\(pop\\)" matched_code ${main_pch_header_strings}) +if(NOT matched_code) + set(RunCMake_TEST_FAILED "Generated pch file doesn't include expected prologue and epilogue code") + return() +endif() diff --git a/Tests/RunCMake/PrecompileHeaders/PchPrologueEpilogue.cmake b/Tests/RunCMake/PrecompileHeaders/PchPrologueEpilogue.cmake new file mode 100644 index 0000000..3e27620 --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/PchPrologueEpilogue.cmake @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.15) + +project(PchPrologueEpilogue) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +set(CMAKE_PCH_PROLOGUE "#pragma warning(push, 0)") +set(CMAKE_PCH_EPILOGUE "#pragma warning(pop)") + +add_executable(main main.cpp) +target_precompile_headers(main PRIVATE pch.h) diff --git a/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake new file mode 100644 index 0000000..fffcc47 --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/RunCMakeTest.cmake @@ -0,0 +1,18 @@ +cmake_policy(SET CMP0057 NEW) +include(RunCMake) + +function(run_test name) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${name}-build) + run_cmake(${name}) + # Precompiled headers are not supported with multiple architectures. + if(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" MATCHES "[;$]") + set(RunCMake_TEST_NO_CLEAN 1) + run_cmake_command(${name}-build ${CMAKE_COMMAND} --build . --config Debug) + run_cmake_command(${name}-test ${CMAKE_CTEST_COMMAND} -C Debug) + endif() +endfunction() + +run_cmake(DisabledPch) +run_test(PchInterface) +run_cmake(PchPrologueEpilogue) +run_test(SkipPrecompileHeaders) diff --git a/Tests/RunCMake/PrecompileHeaders/SkipPrecompileHeaders.cmake b/Tests/RunCMake/PrecompileHeaders/SkipPrecompileHeaders.cmake new file mode 100644 index 0000000..49efbfb --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/SkipPrecompileHeaders.cmake @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.15) + +project(SkipPrecompileHeaders) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +add_executable(pch-test main.cpp non-pch.cpp) +target_precompile_headers(pch-test PRIVATE pch.h) + +set_source_files_properties(non-pch.cpp PROPERTIES SKIP_PRECOMPILE_HEADERS ON) + +enable_testing() +add_test(NAME pch-test COMMAND pch-test) diff --git a/Tests/RunCMake/PrecompileHeaders/foo.c b/Tests/RunCMake/PrecompileHeaders/foo.c new file mode 100644 index 0000000..974a248 --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/foo.c @@ -0,0 +1,6 @@ +#include "foo.h" + +int foo() +{ + return 0; +} diff --git a/Tests/RunCMake/PrecompileHeaders/foobar.c b/Tests/RunCMake/PrecompileHeaders/foobar.c new file mode 100644 index 0000000..6dbf8ce --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/foobar.c @@ -0,0 +1,7 @@ +#include "bar.h" +#include "foo.h" + +int main() +{ + return foo() + bar(); +} diff --git a/Tests/RunCMake/PrecompileHeaders/include/bar.h b/Tests/RunCMake/PrecompileHeaders/include/bar.h new file mode 100644 index 0000000..5feb983 --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/include/bar.h @@ -0,0 +1,9 @@ +#ifndef bar_h +#define bar_h + +static int bar() +{ + return 0; +} + +#endif diff --git a/Tests/RunCMake/PrecompileHeaders/include/foo.h b/Tests/RunCMake/PrecompileHeaders/include/foo.h new file mode 100644 index 0000000..4a49474 --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/include/foo.h @@ -0,0 +1,6 @@ +#ifndef foo_h +#define foo_h + +extern int foo(); + +#endif diff --git a/Tests/RunCMake/PrecompileHeaders/main.cpp b/Tests/RunCMake/PrecompileHeaders/main.cpp new file mode 100644 index 0000000..f8b643a --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/main.cpp @@ -0,0 +1,4 @@ +int main() +{ + return 0; +} diff --git a/Tests/RunCMake/PrecompileHeaders/non-pch.cpp b/Tests/RunCMake/PrecompileHeaders/non-pch.cpp new file mode 100644 index 0000000..df5a79f --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/non-pch.cpp @@ -0,0 +1,3 @@ +#ifdef PCH_INCLUDED +# error "PCH must not be included into this file!" +#endif diff --git a/Tests/RunCMake/PrecompileHeaders/pch.h b/Tests/RunCMake/PrecompileHeaders/pch.h new file mode 100644 index 0000000..81b6d9e --- /dev/null +++ b/Tests/RunCMake/PrecompileHeaders/pch.h @@ -0,0 +1,3 @@ +#pragma once + +#define PCH_INCLUDED 1 diff --git a/Tests/RunCMake/VS10Project/Dir/DirNested/foo_nested.cpp b/Tests/RunCMake/VS10Project/Dir/DirNested/foo_nested.cpp new file mode 100644 index 0000000..3695dc9 --- /dev/null +++ b/Tests/RunCMake/VS10Project/Dir/DirNested/foo_nested.cpp @@ -0,0 +1,3 @@ +void foo() +{ +} diff --git a/Tests/RunCMake/VS10Project/Dir/foo.cpp b/Tests/RunCMake/VS10Project/Dir/foo.cpp new file mode 100644 index 0000000..3695dc9 --- /dev/null +++ b/Tests/RunCMake/VS10Project/Dir/foo.cpp @@ -0,0 +1,3 @@ +void foo() +{ +} diff --git a/Tests/RunCMake/VS10Project/Prefixed/PrefixedNested/bar_nested.cpp b/Tests/RunCMake/VS10Project/Prefixed/PrefixedNested/bar_nested.cpp new file mode 100644 index 0000000..3695dc9 --- /dev/null +++ b/Tests/RunCMake/VS10Project/Prefixed/PrefixedNested/bar_nested.cpp @@ -0,0 +1,3 @@ +void foo() +{ +} diff --git a/Tests/RunCMake/VS10Project/Prefixed/bar.cpp b/Tests/RunCMake/VS10Project/Prefixed/bar.cpp new file mode 100644 index 0000000..b72a1a5 --- /dev/null +++ b/Tests/RunCMake/VS10Project/Prefixed/bar.cpp @@ -0,0 +1,3 @@ +void bar() +{ +} diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake index 1cb4ce5..72154e7 100644 --- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake +++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake @@ -5,6 +5,7 @@ run_cmake(VsCSharpCompilerOpts) run_cmake(ExplicitCMakeLists) run_cmake(RuntimeLibrary) run_cmake(SourceGroupCMakeLists) +run_cmake(SourceGroupTreeCMakeLists) run_cmake(VsConfigurationType) run_cmake(VsTargetsFileReferences) @@ -24,6 +25,7 @@ run_cmake(VsProjectImport) run_cmake(VsPackageReferences) run_cmake(VsDpiAware) run_cmake(VsDpiAwareBadParam) +run_cmake(VsPrecompileHeaders) if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 19.05) run_cmake(VsJustMyCode) diff --git a/Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake b/Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake index c2a94bb..616f38b 100644 --- a/Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake +++ b/Tests/RunCMake/VS10Project/SourceGroupCMakeLists-check.cmake @@ -4,30 +4,8 @@ if(NOT EXISTS "${vcFiltersFile}") return() endif() -set(foundFileFilter 0) -set(foundFilter 0) file(STRINGS "${vcFiltersFile}" lines) -foreach(line IN LISTS lines) - if(line MATCHES "<Filter>CMakeListsSourceGroup</Filter>") - set(rule "${CMAKE_MATCH_1}") - if(foundFileFilter) - set(RunCMake_TEST_FAILED "Multiple files listed with filter for CMakeListsSourceGroup.") - return() - endif() - set(foundFileFilter 1) - endif() - if(line MATCHES "<Filter.*Include=\"CMakeListsSourceGroup\"") - set(rule "${CMAKE_MATCH_1}") - if(foundFilter) - set(RunCMake_TEST_FAILED "Multiple copies of CMakeListsSourceGroup filter listed.") - return() - endif() - set(foundFilter 1) - endif() -endforeach() -if(NOT foundFileFilter) - set(RunCMake_TEST_FAILED "File filter for CMakeListsSourceGroup not found.") -endif() -if(NOT foundFilter) - set(RunCMake_TEST_FAILED "Filter CMakeListsSourceGroup not found.") -endif() + +include(${RunCMake_TEST_SOURCE_DIR}/SourceGroupHelpers.cmake) + +find_source_group("${lines}" CMakeListsSourceGroup) diff --git a/Tests/RunCMake/VS10Project/SourceGroupHelpers.cmake b/Tests/RunCMake/VS10Project/SourceGroupHelpers.cmake new file mode 100644 index 0000000..c82a66e --- /dev/null +++ b/Tests/RunCMake/VS10Project/SourceGroupHelpers.cmake @@ -0,0 +1,35 @@ +function(find_source_group LINES NAME) + set(foundFileFilter 0) + set(foundFilter 0) + foreach(line IN LISTS LINES) + if(line MATCHES "<Filter>${NAME}</Filter>") + if(foundFileFilter) + set(RunCMake_TEST_FAILED "Multiple files listed with filter for ${NAME}." PARENT_SCOPE) + set(FILTER_FOUND 0 PARENT_SCOPE) + return() + endif() + set(foundFileFilter 1) + endif() + if(line MATCHES "<Filter.*Include=\"${NAME}\"") + if(foundFilter) + set(RunCMake_TEST_FAILED "Multiple copies of ${NAME} filter listed." PARENT_SCOPE) + set(FILTER_FOUND 0 PARENT_SCOPE) + return() + endif() + set(foundFilter 1) + endif() + endforeach() + + if(NOT foundFileFilter) + set(RunCMake_TEST_FAILED "File filter for ${NAME} not found." PARENT_SCOPE) + set(FILTER_FOUND 0 PARENT_SCOPE) + return() + endif() + if(NOT foundFilter) + set(RunCMake_TEST_FAILED "Filter ${NAME} not found." PARENT_SCOPE) + set(FILTER_FOUND 0 PARENT_SCOPE) + return() + endif() + + set(FILTER_FOUND 1 PARENT_SCOPE) +endfunction() diff --git a/Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists-check.cmake b/Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists-check.cmake new file mode 100644 index 0000000..655120a --- /dev/null +++ b/Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists-check.cmake @@ -0,0 +1,25 @@ +cmake_policy(SET CMP0011 NEW) + +set(vcFiltersFile "${RunCMake_TEST_BINARY_DIR}/SourceGroupTree.vcxproj.filters") +if(NOT EXISTS "${vcFiltersFile}") + set(RunCMake_TEST_FAILED "Filters file ${vcFiltersFile} does not exist.") + return() +endif() + +file(STRINGS "${vcFiltersFile}" lines) + +include(${RunCMake_TEST_SOURCE_DIR}/SourceGroupHelpers.cmake) + +set(SOURCE_GROUPS_TO_FIND + "Dir" + "Dir\\DirNested" + "SourcesPrefix" + "SourcesPrefix\\PrefixedNested" +) + +foreach(GROUP_NAME IN LISTS ${SOURCE_GROUPS_TO_FIND}) + find_source_group("${lines}" ${GROUP_NAME}) + if(NOT ${FILTER_FOUND}) + return() + endif() +endforeach() diff --git a/Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists.cmake b/Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists.cmake new file mode 100644 index 0000000..83c87a9 --- /dev/null +++ b/Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists.cmake @@ -0,0 +1,16 @@ +set(CMAKE_CONFIGURATION_TYPES Debug) + +set(SRC_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/Dir/foo.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Dir/DirNested/foo_nested.cpp +) + +set(PREFIXED_SRC_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/Prefixed/bar.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Prefixed/PrefixedNested/bar_nested.cpp +) + +add_custom_target(SourceGroupTree SOURCES ${SRC_FILES} ${PREFIXED_SRC_FILES}) + +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${SRC_FILES}) +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/Prefixed PREFIX SourcesPrefix FILES ${PREFIXED_SRC_FILES}) diff --git a/Tests/RunCMake/VS10Project/VsConfigurationType-check.cmake b/Tests/RunCMake/VS10Project/VsConfigurationType-check.cmake index 4690970..bbd34da 100644 --- a/Tests/RunCMake/VS10Project/VsConfigurationType-check.cmake +++ b/Tests/RunCMake/VS10Project/VsConfigurationType-check.cmake @@ -9,7 +9,7 @@ file(STRINGS "${vcProjectFile}" lines) foreach(line IN LISTS lines) if(line MATCHES "^ *<ConfigurationType>(.*)</ConfigurationType>$") set(propertyFound TRUE) - set(expectedValue "MyValue") + set(expectedValue "MyValue foo") set(actualValue ${CMAKE_MATCH_1}) if(NOT (${actualValue} STREQUAL ${expectedValue})) set(RunCMake_TEST_FAILED "ConfigurationType \"${actualValue}\" differs from expected value \"${expectedValue}\".") diff --git a/Tests/RunCMake/VS10Project/VsConfigurationType.cmake b/Tests/RunCMake/VS10Project/VsConfigurationType.cmake index a73dfe8..a2f544a 100644 --- a/Tests/RunCMake/VS10Project/VsConfigurationType.cmake +++ b/Tests/RunCMake/VS10Project/VsConfigurationType.cmake @@ -1,3 +1,3 @@ enable_language(CXX) add_library(foo foo.cpp) -set_target_properties(foo PROPERTIES VS_CONFIGURATION_TYPE "MyValue") +set_target_properties(foo PROPERTIES VS_CONFIGURATION_TYPE "MyValue $<TARGET_PROPERTY:foo,NAME>") diff --git a/Tests/RunCMake/VS10Project/VsPrecompileHeaders-check.cmake b/Tests/RunCMake/VS10Project/VsPrecompileHeaders-check.cmake new file mode 100644 index 0000000..82ca421 --- /dev/null +++ b/Tests/RunCMake/VS10Project/VsPrecompileHeaders-check.cmake @@ -0,0 +1,69 @@ +set(pch_header "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/cmake_pch.hxx") +set(pch_source "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/cmake_pch.cxx") + +file(TO_NATIVE_PATH "${pch_source}" pch_source_win) + +if(NOT EXISTS "${pch_header}") + set(RunCMake_TEST_FAILED "Generated PCH header ${pch_header} does not exist.") + return() +endif() +if(NOT EXISTS "${pch_source}") + set(RunCMake_TEST_FAILED "Generated PCH header ${pch_source} does not exist.") + return() +endif() + +set(tgt_project "${RunCMake_TEST_BINARY_DIR}/tgt.vcxproj") +if (NOT EXISTS "${tgt_project}") + set(RunCMake_TEST_FAILED "Generated project file ${tgt_project} doesn't exist.") + return() +endif() + +file(STRINGS ${tgt_project} tgt_projects_strings) + +foreach(line IN LISTS tgt_projects_strings) + if (line MATCHES "<PrecompiledHeader.*>Use</PrecompiledHeader>") + set(have_pch_use ON) + endif() + + if (line MATCHES "<PrecompiledHeader.*>Create</PrecompiledHeader>") + set(have_pch_create ON) + endif() + + if (line MATCHES "<PrecompiledHeaderFile.*>${pch_header}</PrecompiledHeaderFile>") + set(have_pch_header ON) + endif() + + if (line MATCHES "<ForcedIncludeFiles.*>${pch_header}</ForcedIncludeFiles>") + set(have_force_pch_header ON) + endif() + + string(FIND "${line}" "<ClCompile Include=\"${pch_source_win}\">" find_pos) + if (NOT find_pos EQUAL "-1") + set(have_pch_source_compile ON) + endif() +endforeach() + +if (NOT have_pch_use) + set(RunCMake_TEST_FAILED "Generated project should have the <PrecompiledHeader>Use</PrecompiledHeader> block.") + return() +endif() + +if (NOT have_pch_create) + set(RunCMake_TEST_FAILED "Generated project should have the <PrecompiledHeader>Create</PrecompiledHeader> block.") + return() +endif() + +if (NOT have_pch_header) + set(RunCMake_TEST_FAILED "Generated project should have the <PrecompiledHeaderFile>${pch_header}</PrecompiledHeaderFile> block.") + return() +endif() + +if (NOT have_force_pch_header) + set(RunCMake_TEST_FAILED "Generated project should have the <ForcedIncludeFiles>${pch_header}</ForcedIncludeFiles> block.") + return() +endif() + +if (NOT have_pch_source_compile) + set(RunCMake_TEST_FAILED "Generated project should have the <ClCompile Include=\"${pch_source_win}\"> block.") + return() +endif() diff --git a/Tests/RunCMake/VS10Project/VsPrecompileHeaders.cmake b/Tests/RunCMake/VS10Project/VsPrecompileHeaders.cmake new file mode 100644 index 0000000..6d208c9 --- /dev/null +++ b/Tests/RunCMake/VS10Project/VsPrecompileHeaders.cmake @@ -0,0 +1,4 @@ +project(VsPrecompileHeaders CXX) + +add_library(tgt SHARED empty.cxx) +target_precompile_headers(tgt PRIVATE stdafx.h) diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index 191f56d..1dfa8b2 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -12,6 +12,7 @@ run_cmake(XcodeObjectNeedsQuote) run_cmake(XcodeOptimizationFlags) run_cmake(XcodePreserveNonOptimizationFlags) run_cmake(XcodePreserveObjcFlag) +run_cmake(XcodePrecompileHeaders) if (NOT XCODE_VERSION VERSION_LESS 6) run_cmake(XcodePlatformFrameworks) endif() diff --git a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake index ef772ea..8c0b470 100644 --- a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake @@ -5,6 +5,7 @@ enable_language(C) if(CMAKE_SYSTEM_NAME STREQUAL "iOS") set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") + set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "") set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO") endif() diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake index f6c00b1..c221033 100644 --- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake @@ -11,6 +11,7 @@ if(NOT IOS) endif() set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") +set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "") set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf") set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO") diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake index ec11dbb..172f2e8 100644 --- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake @@ -7,6 +7,7 @@ if(XCODE_VERSION VERSION_GREATER_EQUAL 9) endif() set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") +set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "") set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf") add_library(foo SHARED foo.cpp) diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake index 58e96b4..038a890 100644 --- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake @@ -7,6 +7,7 @@ if(XCODE_VERSION VERSION_GREATER_EQUAL 9) endif() set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") +set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "") set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf") add_library(foo SHARED foo.cpp) diff --git a/Tests/RunCMake/XcodeProject/XcodePrecompileHeaders-check.cmake b/Tests/RunCMake/XcodeProject/XcodePrecompileHeaders-check.cmake new file mode 100644 index 0000000..aa3eafc --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodePrecompileHeaders-check.cmake @@ -0,0 +1,35 @@ +set(pch_header "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/tgt.dir/cmake_pch.hxx") + +if(NOT EXISTS "${pch_header}") + set(RunCMake_TEST_FAILED "Generated PCH header ${pch_header} does not exist.") + return() +endif() + +set(tgt_project "${RunCMake_TEST_BINARY_DIR}/XcodePrecompileHeaders.xcodeproj/project.pbxproj") +if (NOT EXISTS "${tgt_project}") + set(RunCMake_TEST_FAILED "Generated project file ${tgt_project} doesn't exist.") + return() +endif() + +file(STRINGS ${tgt_project} tgt_projects_strings) + +foreach(line IN LISTS tgt_projects_strings) + if (line MATCHES "GCC_PRECOMPILE_PREFIX_HEADER = YES;") + set(have_pch_prefix ON) + endif() + + string(FIND "${line}" "GCC_PREFIX_HEADER = \"${pch_header}\";" find_pos) + if (NOT find_pos EQUAL "-1") + set(have_pch_header ON) + endif() +endforeach() + +if (NOT have_pch_prefix) + set(RunCMake_TEST_FAILED "Generated project should have the GCC_PRECOMPILE_PREFIX_HEADER = YES; line.") + return() +endif() + +if (NOT have_pch_header) + set(RunCMake_TEST_FAILED "Generated project should have the GCC_PREFIX_HEADER = \"${pch_header}\"; line.") + return() +endif() diff --git a/Tests/RunCMake/XcodeProject/XcodePrecompileHeaders.cmake b/Tests/RunCMake/XcodeProject/XcodePrecompileHeaders.cmake new file mode 100644 index 0000000..f86bcf4 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodePrecompileHeaders.cmake @@ -0,0 +1,4 @@ +project(XcodePrecompileHeaders CXX) + +add_library(tgt foo.cpp) +target_precompile_headers(tgt PRIVATE stdafx.h) diff --git a/Tests/RunCMake/color_warning.c b/Tests/RunCMake/color_warning.c new file mode 100644 index 0000000..831abd9 --- /dev/null +++ b/Tests/RunCMake/color_warning.c @@ -0,0 +1,7 @@ +#include <stdio.h> +int main(void) +{ + printf( + "/tmp/hello.c:3:2: \033[35mwarning:\033[0m Hello, World! [-W#warnings]\n"); + return 0; +} diff --git a/Tests/RunCMake/ctest_build/IgnoreColor-stdout.txt b/Tests/RunCMake/ctest_build/IgnoreColor-stdout.txt new file mode 100644 index 0000000..cd1720f --- /dev/null +++ b/Tests/RunCMake/ctest_build/IgnoreColor-stdout.txt @@ -0,0 +1,2 @@ + 0 Compiler errors + 1 Compiler warnings diff --git a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake index 1092d2a..b2e562a 100644 --- a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake @@ -1,6 +1,8 @@ include(RunCTest) set(CASE_CTEST_BUILD_ARGS "") +set(RunCMake_USE_LAUNCHERS TRUE) +set(RunCMake_USE_CUSTOM_BUILD_COMMAND FALSE) function(run_ctest_build CASE_NAME) set(CASE_CTEST_BUILD_ARGS "${ARGN}") @@ -45,3 +47,9 @@ function(run_BuildChangeId) run_ctest(BuildChangeId) endfunction() run_BuildChangeId() + +set(RunCMake_USE_LAUNCHERS FALSE) +set(RunCMake_USE_CUSTOM_BUILD_COMMAND TRUE) +set(RunCMake_BUILD_COMMAND "${COLOR_WARNING}") +run_ctest(IgnoreColor) +unset(RunCMake_BUILD_COMMAND) diff --git a/Tests/RunCMake/ctest_build/test.cmake.in b/Tests/RunCMake/ctest_build/test.cmake.in index 6f15ec9..9f7fa13 100644 --- a/Tests/RunCMake/ctest_build/test.cmake.in +++ b/Tests/RunCMake/ctest_build/test.cmake.in @@ -9,7 +9,10 @@ set(CTEST_CMAKE_GENERATOR "@RunCMake_GENERATOR@") set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") -set(CTEST_USE_LAUNCHERS TRUE) +set(CTEST_USE_LAUNCHERS "@RunCMake_USE_LAUNCHERS@") +if (@RunCMake_USE_CUSTOM_BUILD_COMMAND@) + set(CTEST_BUILD_COMMAND "\"@RunCMake_BUILD_COMMAND@\"") +endif() set(ctest_build_args "@CASE_CTEST_BUILD_ARGS@") ctest_start(Experimental) diff --git a/Tests/RunCMake/ctest_start/AppendDifferentGroup-stderr.txt b/Tests/RunCMake/ctest_start/AppendDifferentGroup-stderr.txt new file mode 100644 index 0000000..9e493a6 --- /dev/null +++ b/Tests/RunCMake/ctest_start/AppendDifferentGroup-stderr.txt @@ -0,0 +1 @@ +^Group given in TAG does not match group given in ctest_start\(\)$ diff --git a/Tests/RunCMake/ctest_start/AppendDifferentGroup-stdout.txt b/Tests/RunCMake/ctest_start/AppendDifferentGroup-stdout.txt new file mode 100644 index 0000000..5f83653 --- /dev/null +++ b/Tests/RunCMake/ctest_start/AppendDifferentGroup-stdout.txt @@ -0,0 +1,8 @@ +Run dashboard with to-be-determined model + Source directory: .*/Tests/RunCMake/ctest_start/AppendDifferentGroup + Build directory: .*/Tests/RunCMake/ctest_start/AppendDifferentGroup-build + Group: ExperimentalDifferent + Site: test-site + Build name: test-build-name + Use existing tag: 19551112-2204 - ExperimentalDifferent + Use ExperimentalDifferent tag: [0-9-]+ diff --git a/Tests/RunCMake/ctest_start/AppendDifferentTrack-stderr.txt b/Tests/RunCMake/ctest_start/AppendDifferentTrack-stderr.txt index 0d6d19d..9e493a6 100644 --- a/Tests/RunCMake/ctest_start/AppendDifferentTrack-stderr.txt +++ b/Tests/RunCMake/ctest_start/AppendDifferentTrack-stderr.txt @@ -1 +1 @@ -^Track given in TAG does not match track given in ctest_start\(\)$ +^Group given in TAG does not match group given in ctest_start\(\)$ diff --git a/Tests/RunCMake/ctest_start/AppendDifferentTrack-stdout.txt b/Tests/RunCMake/ctest_start/AppendDifferentTrack-stdout.txt index 25085ef..022e2ec 100644 --- a/Tests/RunCMake/ctest_start/AppendDifferentTrack-stdout.txt +++ b/Tests/RunCMake/ctest_start/AppendDifferentTrack-stdout.txt @@ -1,7 +1,7 @@ Run dashboard with to-be-determined model Source directory: .*/Tests/RunCMake/ctest_start/AppendDifferentTrack Build directory: .*/Tests/RunCMake/ctest_start/AppendDifferentTrack-build - Track: ExperimentalDifferent + Group: ExperimentalDifferent Site: test-site Build name: test-build-name Use existing tag: 19551112-2204 - ExperimentalDifferent diff --git a/Tests/RunCMake/ctest_start/MissingGroupArg-result.txt b/Tests/RunCMake/ctest_start/MissingGroupArg-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_start/MissingGroupArg-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_start/MissingGroupArg-stderr.txt b/Tests/RunCMake/ctest_start/MissingGroupArg-stderr.txt new file mode 100644 index 0000000..e0480f6 --- /dev/null +++ b/Tests/RunCMake/ctest_start/MissingGroupArg-stderr.txt @@ -0,0 +1,2 @@ +^CMake Error at .*/Tests/RunCMake/ctest_start/MissingGroupArg/test\.cmake:[0-9]+ \(ctest_start\): + ctest_start GROUP argument missing group name$ diff --git a/Tests/RunCMake/ctest_start/MissingGroupArgAppend-result.txt b/Tests/RunCMake/ctest_start/MissingGroupArgAppend-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_start/MissingGroupArgAppend-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_start/MissingGroupArgAppend-stderr.txt b/Tests/RunCMake/ctest_start/MissingGroupArgAppend-stderr.txt new file mode 100644 index 0000000..8ae53ff --- /dev/null +++ b/Tests/RunCMake/ctest_start/MissingGroupArgAppend-stderr.txt @@ -0,0 +1,2 @@ +^CMake Error at .*/Tests/RunCMake/ctest_start/MissingGroupArgAppend/test\.cmake:[0-9]+ \(ctest_start\): + ctest_start GROUP argument missing group name$ diff --git a/Tests/RunCMake/ctest_start/MissingGroupArgQuiet-result.txt b/Tests/RunCMake/ctest_start/MissingGroupArgQuiet-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_start/MissingGroupArgQuiet-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_start/MissingGroupArgQuiet-stderr.txt b/Tests/RunCMake/ctest_start/MissingGroupArgQuiet-stderr.txt new file mode 100644 index 0000000..c4f8900 --- /dev/null +++ b/Tests/RunCMake/ctest_start/MissingGroupArgQuiet-stderr.txt @@ -0,0 +1,2 @@ +^CMake Error at .*/Tests/RunCMake/ctest_start/MissingGroupArgQuiet/test\.cmake:[0-9]+ \(ctest_start\): + ctest_start GROUP argument missing group name$ diff --git a/Tests/RunCMake/ctest_start/MissingTrackArg-stderr.txt b/Tests/RunCMake/ctest_start/MissingTrackArg-stderr.txt index 7b42bc9..2a72a83 100644 --- a/Tests/RunCMake/ctest_start/MissingTrackArg-stderr.txt +++ b/Tests/RunCMake/ctest_start/MissingTrackArg-stderr.txt @@ -1,2 +1,2 @@ ^CMake Error at .*/Tests/RunCMake/ctest_start/MissingTrackArg/test\.cmake:[0-9]+ \(ctest_start\): - ctest_start TRACK argument missing track name$ + ctest_start TRACK argument missing group name$ diff --git a/Tests/RunCMake/ctest_start/MissingTrackArgAppend-stderr.txt b/Tests/RunCMake/ctest_start/MissingTrackArgAppend-stderr.txt index 695bfad..7ff82ab 100644 --- a/Tests/RunCMake/ctest_start/MissingTrackArgAppend-stderr.txt +++ b/Tests/RunCMake/ctest_start/MissingTrackArgAppend-stderr.txt @@ -1,2 +1,2 @@ ^CMake Error at .*/Tests/RunCMake/ctest_start/MissingTrackArgAppend/test\.cmake:[0-9]+ \(ctest_start\): - ctest_start TRACK argument missing track name$ + ctest_start TRACK argument missing group name$ diff --git a/Tests/RunCMake/ctest_start/MissingTrackArgQuiet-stderr.txt b/Tests/RunCMake/ctest_start/MissingTrackArgQuiet-stderr.txt index 9438522..c23b1bf 100644 --- a/Tests/RunCMake/ctest_start/MissingTrackArgQuiet-stderr.txt +++ b/Tests/RunCMake/ctest_start/MissingTrackArgQuiet-stderr.txt @@ -1,2 +1,2 @@ ^CMake Error at .*/Tests/RunCMake/ctest_start/MissingTrackArgQuiet/test\.cmake:[0-9]+ \(ctest_start\): - ctest_start TRACK argument missing track name$ + ctest_start TRACK argument missing group name$ diff --git a/Tests/RunCMake/ctest_start/NoAppendDifferentGroup-stdout.txt b/Tests/RunCMake/ctest_start/NoAppendDifferentGroup-stdout.txt new file mode 100644 index 0000000..13a3883 --- /dev/null +++ b/Tests/RunCMake/ctest_start/NoAppendDifferentGroup-stdout.txt @@ -0,0 +1,7 @@ +Run dashboard with model Experimental + Source directory: .*/Tests/RunCMake/ctest_start/NoAppendDifferentGroup + Build directory: .*/Tests/RunCMake/ctest_start/NoAppendDifferentGroup-build + Group: ExperimentalDifferent + Site: test-site + Build name: test-build-name + Use ExperimentalDifferent tag: [0-9-]+ diff --git a/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt b/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt index 20a29be..c511e0d 100644 --- a/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt +++ b/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt @@ -1,7 +1,7 @@ Run dashboard with model Experimental Source directory: .*/Tests/RunCMake/ctest_start/NoAppendDifferentTrack Build directory: .*/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-build - Track: ExperimentalDifferent + Group: ExperimentalDifferent Site: test-site Build name: test-build-name Use ExperimentalDifferent tag: [0-9-]+ diff --git a/Tests/RunCMake/ctest_start/RunCMakeTest.cmake b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake index 905ad00..da85b39 100644 --- a/Tests/RunCMake/ctest_start/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake @@ -26,18 +26,24 @@ run_ctest_start(WriteModelToTagExperimental Experimental QUIET) run_ctest_start(WriteModelToTagContinuous Continuous QUIET) run_ctest_start(WriteModelToTagNightly Nightly QUIET) run_ctest_start(WriteModelToTagNoMatchingTrack Continuous TRACK SomeWeirdTrackName QUIET) +run_ctest_start(WriteModelToTagNoMatchingGroup Continuous GROUP SomeWeirdTrackName QUIET) run_ctest_start(AppendSameModel Continuous APPEND) run_ctest_start(AppendDifferentModel Experimental APPEND) run_ctest_start(AppendNoModel APPEND) run_ctest_start(AppendDifferentTrack TRACK ExperimentalDifferent APPEND) +run_ctest_start(AppendDifferentGroup GROUP ExperimentalDifferent APPEND) run_ctest_start(NoAppendDifferentTrack Experimental TRACK ExperimentalDifferent) +run_ctest_start(NoAppendDifferentGroup Experimental GROUP ExperimentalDifferent) run_ctest_start(AppendNoMatchingTrack Continuous APPEND) run_ctest_start(AppendOldContinuous Continuous APPEND) run_ctest_start(AppendOldNoModel APPEND) run_ctest_start(NoModel QUIET) run_ctest_start(MissingTrackArg Experimental TRACK) +run_ctest_start(MissingGroupArg Experimental GROUP) run_ctest_start(MissingTrackArgAppend Experimental TRACK APPEND) +run_ctest_start(MissingGroupArgAppend Experimental GROUP APPEND) run_ctest_start(MissingTrackArgQuiet Experimental TRACK QUIET) +run_ctest_start(MissingGroupArgQuiet Experimental GROUP QUIET) run_ctest_start(TooManyArgs Experimental ${RunCMake_BINARY_DIR}/TooManyArgs-build ${RunCMake_BINARY_DIR}/TooManyArgs-build diff --git a/Tests/RunCMake/ctest_start/WriteModelToTagNoMatchingGroup-check.cmake b/Tests/RunCMake/ctest_start/WriteModelToTagNoMatchingGroup-check.cmake new file mode 100644 index 0000000..bd2862d --- /dev/null +++ b/Tests/RunCMake/ctest_start/WriteModelToTagNoMatchingGroup-check.cmake @@ -0,0 +1 @@ +check_tag_contents("^[0-9-]+\nSomeWeirdTrackName\nContinuous\n$") diff --git a/Tests/RunCMake/find_path/EmptyOldStyle-stdout.txt b/Tests/RunCMake/find_path/EmptyOldStyle-stdout.txt new file mode 100644 index 0000000..8f21eb8 --- /dev/null +++ b/Tests/RunCMake/find_path/EmptyOldStyle-stdout.txt @@ -0,0 +1 @@ +-- VAR-NOTFOUND diff --git a/Tests/RunCMake/find_path/EmptyOldStyle.cmake b/Tests/RunCMake/find_path/EmptyOldStyle.cmake new file mode 100644 index 0000000..d78bb65 --- /dev/null +++ b/Tests/RunCMake/find_path/EmptyOldStyle.cmake @@ -0,0 +1,2 @@ +find_path(VAR ONLY_CMAKE_FIND_ROOT_PATH) +message(STATUS "${VAR}") diff --git a/Tests/RunCMake/find_path/RunCMakeTest.cmake b/Tests/RunCMake/find_path/RunCMakeTest.cmake index 8b5b5b7..ed55f51 100644 --- a/Tests/RunCMake/find_path/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_path/RunCMakeTest.cmake @@ -1,5 +1,6 @@ include(RunCMake) +run_cmake(EmptyOldStyle) run_cmake(FromPATHEnv) run_cmake(PrefixInPATH) diff --git a/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported-stderr.txt b/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported-stderr.txt index 6bb44ab..3204225 100644 --- a/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported-stderr.txt +++ b/Tests/RunCMake/target_link_libraries/StaticPrivateDepNotExported-stderr.txt @@ -1 +1 @@ -CMake Error: install\(EXPORT "Exp" ...\) includes target "foo" which requires target "not_exported" that is not in the export set. +CMake Error: install\(EXPORT "Exp" ...\) includes target "foo" which requires target "not_exported" that is not in any export set. diff --git a/Tests/SourceFileProperty/CMakeLists.txt b/Tests/SourceFileProperty/CMakeLists.txt index 1b6506d..5e55f7b 100644 --- a/Tests/SourceFileProperty/CMakeLists.txt +++ b/Tests/SourceFileProperty/CMakeLists.txt @@ -1,19 +1,27 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.1) project(SourceFileProperty C) -set(sources) - if (EXISTS icasetest.c) # If a file exists by this name, use it. set_source_files_properties(icasetest.c PROPERTIES - COMPILE_FLAGS -DNEEDED_TO_WORK) + COMPILE_DEFINITIONS NEEDED_TO_WORK) else () # Work on case-sensitive file systems as well. set_source_files_properties(main.c PROPERTIES - COMPILE_FLAGS -DNO_NEED_TO_CALL) + COMPILE_DEFINITIONS NO_NEED_TO_CALL) endif () -list(APPEND sources ICaseTest.c) -add_executable(SourceFileProperty main.c ${sources}) +add_executable(SourceFileProperty main.c) +target_sources(SourceFileProperty PRIVATE ICaseTest.c) + +get_source_file_property(LANG_MAIN main.c LANGUAGE) +if(NOT "${LANG_MAIN}" STREQUAL "C") + message(FATAL_ERROR "Bad language for file main.c") +endif() + +get_property(LANG_TEST SOURCE ICaseTest.c PROPERTY LANGUAGE) +if (NOT "${LANG_TEST}" STREQUAL "C") + message(FATAL_ERROR "Bad language for file ICaseTest.c") +endif () |