From cf0a9c6232844c1cdf5d0345dd25cf66d179f075 Mon Sep 17 00:00:00 2001 From: KoeMai Date: Sat, 17 Mar 2018 13:06:10 +0100 Subject: [PATCH] Fix test program for old compilers. --- .../successful-build/project-folder/cmakelists.txt | 1 + test/extension-tests/successful-build/project-folder/main.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/extension-tests/successful-build/project-folder/cmakelists.txt b/test/extension-tests/successful-build/project-folder/cmakelists.txt index 6b58e9bf..e4a06667 100644 --- a/test/extension-tests/successful-build/project-folder/cmakelists.txt +++ b/test/extension-tests/successful-build/project-folder/cmakelists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.0.0) project(TestBuildProcess VERSION 0.1.0) add_executable(TestBuildProcess main.cpp) +set_property(TARGET TestBuildProcess PROPERTY CXX_STANDARD 98) add_custom_command( TARGET TestBuildProcess diff --git a/test/extension-tests/successful-build/project-folder/main.cpp b/test/extension-tests/successful-build/project-folder/main.cpp index 8f9fd9b4..8e283501 100644 --- a/test/extension-tests/successful-build/project-folder/main.cpp +++ b/test/extension-tests/successful-build/project-folder/main.cpp @@ -21,8 +21,8 @@ std::string getCompilerName() { } std::string get_env_var(const std::string& key) { - const auto env = std::getenv(key.c_str()); - return env != nullptr ? env : ""; + const char* env = std::getenv(key.c_str()); + return env != NULL ? env : ""; } int main(int, char**) {