summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/manual/cmake-properties.7.rst34
-rw-r--r--Help/prop_dir/COMPILE_DEFINITIONS_CONFIG.rst2
-rw-r--r--Help/prop_sf/COMPILE_DEFINITIONS_CONFIG.rst2
-rw-r--r--Help/prop_tgt/COMPILE_DEFINITIONS_CONFIG.rst2
-rw-r--r--Modules/Compiler/QCC-C.cmake2
-rw-r--r--Modules/Compiler/QCC-CXX.cmake12
-rw-r--r--Modules/Compiler/QCC.cmake24
-rw-r--r--Modules/Platform/QNX-QCC-C.cmake4
-rw-r--r--Modules/Platform/QNX-QCC-CXX.cmake4
-rw-r--r--Modules/Platform/QNX.cmake22
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmGlobalGenerator.cxx7
-rw-r--r--Source/cmGlobalGenerator.h4
-rw-r--r--Source/cmGlobalNinjaGenerator.h6
-rw-r--r--Source/cmGlobalVisualStudio10Generator.h4
-rw-r--r--Source/cmGlobalVisualStudio6Generator.h8
-rw-r--r--Source/cmGlobalVisualStudio7Generator.h8
-rw-r--r--Source/cmGlobalVisualStudio8Generator.h2
-rw-r--r--Source/cmGlobalVisualStudioGenerator.h7
-rw-r--r--Source/cmGlobalXCodeGenerator.h9
-rw-r--r--Source/cmake.cxx2
-rw-r--r--Source/kwsys/SystemInformation.cxx5
-rw-r--r--Source/kwsys/Terminal.c6
-rw-r--r--Source/kwsys/testProcess.c15
-rw-r--r--Tests/CTestTestMemcheck/CMakeLists.txt6
-rw-r--r--Tests/CTestTestMemcheck/testAddressSanitizer.cmake4
-rw-r--r--Tests/CTestTestMemcheck/testLeakSanitizer.cmake4
-rw-r--r--Tests/Complex/CMakeLists.txt15
-rw-r--r--Tests/ComplexOneConfig/CMakeLists.txt15
29 files changed, 162 insertions, 75 deletions
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index e4546c1..17dadc2 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -51,7 +51,6 @@ Properties on Directories
/prop_dir/CACHE_VARIABLES
/prop_dir/CLEAN_NO_CUSTOM
/prop_dir/CMAKE_CONFIGURE_DEPENDS
- /prop_dir/COMPILE_DEFINITIONS_CONFIG
/prop_dir/COMPILE_DEFINITIONS
/prop_dir/COMPILE_OPTIONS
/prop_dir/DEFINITIONS
@@ -101,7 +100,6 @@ Properties on Targets
/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MAX
/prop_tgt/COMPATIBLE_INTERFACE_NUMBER_MIN
/prop_tgt/COMPATIBLE_INTERFACE_STRING
- /prop_tgt/COMPILE_DEFINITIONS_CONFIG
/prop_tgt/COMPILE_DEFINITIONS
/prop_tgt/COMPILE_FEATURES
/prop_tgt/COMPILE_FLAGS
@@ -205,9 +203,7 @@ Properties on Targets
/prop_tgt/PDB_OUTPUT_DIRECTORY_CONFIG
/prop_tgt/PDB_OUTPUT_DIRECTORY
/prop_tgt/POSITION_INDEPENDENT_CODE
- /prop_tgt/POST_INSTALL_SCRIPT
/prop_tgt/PREFIX
- /prop_tgt/PRE_INSTALL_SCRIPT
/prop_tgt/PRIVATE_HEADER
/prop_tgt/PROJECT_LABEL
/prop_tgt/PUBLIC_HEADER
@@ -277,7 +273,6 @@ Properties on Source Files
/prop_sf/ABSTRACT
/prop_sf/AUTOUIC_OPTIONS
/prop_sf/AUTORCC_OPTIONS
- /prop_sf/COMPILE_DEFINITIONS_CONFIG
/prop_sf/COMPILE_DEFINITIONS
/prop_sf/COMPILE_FLAGS
/prop_sf/EXTERNAL_OBJECT
@@ -317,3 +312,32 @@ Properties on Installed Files
/prop_inst/CPACK_NEVER_OVERWRITE.rst
/prop_inst/CPACK_PERMANENT.rst
+
+
+Deprecated Properties on Directories
+=====================================
+
+.. toctree::
+ :maxdepth: 1
+
+ /prop_dir/COMPILE_DEFINITIONS_CONFIG
+
+
+Deprecated Properties on Targets
+================================
+
+.. toctree::
+ :maxdepth: 1
+
+ /prop_tgt/COMPILE_DEFINITIONS_CONFIG
+ /prop_tgt/POST_INSTALL_SCRIPT
+ /prop_tgt/PRE_INSTALL_SCRIPT
+
+
+Deprecated Properties on Source Files
+=====================================
+
+.. toctree::
+ :maxdepth: 1
+
+ /prop_sf/COMPILE_DEFINITIONS_CONFIG
diff --git a/Help/prop_dir/COMPILE_DEFINITIONS_CONFIG.rst b/Help/prop_dir/COMPILE_DEFINITIONS_CONFIG.rst
index c22606b..a6af45f 100644
--- a/Help/prop_dir/COMPILE_DEFINITIONS_CONFIG.rst
+++ b/Help/prop_dir/COMPILE_DEFINITIONS_CONFIG.rst
@@ -1,6 +1,8 @@
COMPILE_DEFINITIONS_<CONFIG>
----------------------------
+Ignored. See CMake Policy :policy:`CMP0043`.
+
Per-configuration preprocessor definitions in a directory.
This is the configuration-specific version of :prop_dir:`COMPILE_DEFINITIONS`
diff --git a/Help/prop_sf/COMPILE_DEFINITIONS_CONFIG.rst b/Help/prop_sf/COMPILE_DEFINITIONS_CONFIG.rst
index e695f38..8487076 100644
--- a/Help/prop_sf/COMPILE_DEFINITIONS_CONFIG.rst
+++ b/Help/prop_sf/COMPILE_DEFINITIONS_CONFIG.rst
@@ -1,6 +1,8 @@
COMPILE_DEFINITIONS_<CONFIG>
----------------------------
+Ignored. See CMake Policy :policy:`CMP0043`.
+
Per-configuration preprocessor definitions on a source file.
This is the configuration-specific version of COMPILE_DEFINITIONS.
diff --git a/Help/prop_tgt/COMPILE_DEFINITIONS_CONFIG.rst b/Help/prop_tgt/COMPILE_DEFINITIONS_CONFIG.rst
index e359d2c..84bd5e4 100644
--- a/Help/prop_tgt/COMPILE_DEFINITIONS_CONFIG.rst
+++ b/Help/prop_tgt/COMPILE_DEFINITIONS_CONFIG.rst
@@ -1,6 +1,8 @@
COMPILE_DEFINITIONS_<CONFIG>
----------------------------
+Ignored. See CMake Policy :policy:`CMP0043`.
+
Per-configuration preprocessor definitions on a target.
This is the configuration-specific version of :prop_tgt:`COMPILE_DEFINITIONS`
diff --git a/Modules/Compiler/QCC-C.cmake b/Modules/Compiler/QCC-C.cmake
new file mode 100644
index 0000000..ae4a2f4
--- /dev/null
+++ b/Modules/Compiler/QCC-C.cmake
@@ -0,0 +1,2 @@
+include(Compiler/QCC)
+__compiler_qcc(C)
diff --git a/Modules/Compiler/QCC-CXX.cmake b/Modules/Compiler/QCC-CXX.cmake
new file mode 100644
index 0000000..a676bbe
--- /dev/null
+++ b/Modules/Compiler/QCC-CXX.cmake
@@ -0,0 +1,12 @@
+include(Compiler/QCC)
+__compiler_qcc(CXX)
+
+# If the toolchain uses qcc for CMAKE_CXX_COMPILER instead of QCC, the
+# default for the driver is not c++.
+set(CMAKE_CXX_COMPILE_OBJECT
+ "<CMAKE_CXX_COMPILER> -lang-c++ <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+
+set(CMAKE_CXX_LINK_EXECUTABLE
+ "<CMAKE_CXX_COMPILER> -lang-c++ <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+
+set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
diff --git a/Modules/Compiler/QCC.cmake b/Modules/Compiler/QCC.cmake
new file mode 100644
index 0000000..76477e4
--- /dev/null
+++ b/Modules/Compiler/QCC.cmake
@@ -0,0 +1,24 @@
+
+#=============================================================================
+# Copyright 2002-2014 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+include(Compiler/GNU)
+
+macro(__compiler_qcc lang)
+ __compiler_gnu(${lang})
+
+ # http://www.qnx.com/developers/docs/6.4.0/neutrino/utilities/q/qcc.html#examples
+ set(CMAKE_${lang}_COMPILE_OPTIONS_TARGET "-V")
+
+ set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-Wp,-isystem,")
+ set(CMAKE_DEPFILE_FLAGS_${lang} "-Wc,-MMD,<DEPFILE>,-MT,<OBJECT>,-MF,<DEPFILE>")
+endmacro()
diff --git a/Modules/Platform/QNX-QCC-C.cmake b/Modules/Platform/QNX-QCC-C.cmake
deleted file mode 100644
index e5721a7..0000000
--- a/Modules/Platform/QNX-QCC-C.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-
-include(Platform/QNX)
-
-__compiler_qcc(C)
diff --git a/Modules/Platform/QNX-QCC-CXX.cmake b/Modules/Platform/QNX-QCC-CXX.cmake
deleted file mode 100644
index e490bbe..0000000
--- a/Modules/Platform/QNX-QCC-CXX.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-
-include(Platform/QNX)
-
-__compiler_qcc(CXX)
diff --git a/Modules/Platform/QNX.cmake b/Modules/Platform/QNX.cmake
index cc551bd..ebc4609 100644
--- a/Modules/Platform/QNX.cmake
+++ b/Modules/Platform/QNX.cmake
@@ -1,5 +1,8 @@
set(QNXNTO 1)
+include(Platform/GNU)
+unset(CMAKE_LIBRARY_ARCHITECTURE_REGEX)
+
set(CMAKE_DL_LIBS "")
# Shared libraries with no builtin soname may not be linked safely by
@@ -14,22 +17,3 @@ foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
endforeach()
-
-include(Platform/GNU)
-unset(CMAKE_LIBRARY_ARCHITECTURE_REGEX)
-
-macro(__compiler_qcc lang)
- # http://www.qnx.com/developers/docs/6.4.0/neutrino/utilities/q/qcc.html#examples
- set(CMAKE_${lang}_COMPILE_OPTIONS_TARGET "-V")
-
- set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-Wp,-isystem,")
- set(CMAKE_DEPFILE_FLAGS_${lang} "-Wc,-MMD,<DEPFILE>,-MT,<OBJECT>,-MF,<DEPFILE>")
-
- if (lang STREQUAL CXX)
- # If the toolchain uses qcc for CMAKE_CXX_COMPILER instead of QCC, the
- # default for the driver is not c++.
- set(CMAKE_CXX_COMPILE_OBJECT
- "<CMAKE_CXX_COMPILER> -lang-c++ <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
- endif()
-
-endmacro()
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index c034126..2d17cbe 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 0)
-set(CMake_VERSION_PATCH 20140721)
+set(CMake_VERSION_PATCH 20140723)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 6d737b1..ae6861e 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1153,7 +1153,7 @@ bool cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const
return false;
}
-void cmGlobalGenerator::Generate()
+void cmGlobalGenerator::DoGenerate()
{
// Some generators track files replaced during the Generate.
// Start with an empty vector:
@@ -1162,6 +1162,11 @@ void cmGlobalGenerator::Generate()
// clear targets to issue warning CMP0042 for
this->CMP0042WarnTargets.clear();
+ this->Generate();
+}
+
+void cmGlobalGenerator::Generate()
+{
// Check whether this generator is allowed to run.
if(!this->CheckALLOW_DUPLICATE_CUSTOM_TARGETS())
{
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index ee3f269..6b608bb 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -80,7 +80,7 @@ public:
* basically creates a series of LocalGenerators for each directory and
* requests that they Generate.
*/
- virtual void Generate();
+ void DoGenerate();
/**
* Set/Get and Clear the enabled languages.
@@ -338,6 +338,8 @@ public:
bool GenerateCPackPropertiesFile();
protected:
+ virtual void Generate();
+
typedef std::vector<cmLocalGenerator*> GeneratorVector;
// for a project collect all its targets by following depend
// information, and also collect all the targets
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index ff110d7..4cbbeea 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -182,9 +182,6 @@ public:
/// Overloaded methods. @see cmGlobalGenerator::GetDocumentation()
static void GetDocumentation(cmDocumentationEntry& entry);
- /// Overloaded methods. @see cmGlobalGenerator::Generate()
- virtual void Generate();
-
/// Overloaded methods. @see cmGlobalGenerator::EnableLanguage()
virtual void EnableLanguage(std::vector<std::string>const& languages,
cmMakefile* mf,
@@ -302,6 +299,9 @@ public:
virtual void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const;
protected:
+ /// Overloaded methods. @see cmGlobalGenerator::Generate()
+ virtual void Generate();
+
/// Overloaded methods.
/// @see cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS()
virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const { return true; }
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index cb639dd..9f154e9 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -47,8 +47,6 @@ public:
///! create the correct local generator
virtual cmLocalGenerator *CreateLocalGenerator();
- virtual void Generate();
-
/**
* Try to determine system infomation such as shared library
* extension, pthreads, byte order etc.
@@ -93,6 +91,8 @@ public:
virtual void FindMakeProgram(cmMakefile*);
protected:
+ virtual void Generate();
+
virtual const char* GetIDEVersion() { return "10.0"; }
std::string const& GetMSBuildCommand();
diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h
index b2fd28f..57c2660 100644
--- a/Source/cmGlobalVisualStudio6Generator.h
+++ b/Source/cmGlobalVisualStudio6Generator.h
@@ -64,13 +64,6 @@ public:
);
/**
- * Generate the all required files for building this project/tree. This
- * basically creates a series of LocalGenerators for each directory and
- * requests that they Generate.
- */
- virtual void Generate();
-
- /**
* Generate the DSW workspace file.
*/
virtual void OutputDSWFile();
@@ -94,6 +87,7 @@ public:
virtual bool IsForVS6() const { return true; }
protected:
+ virtual void Generate();
virtual const char* GetIDEVersion() { return "6.0"; }
private:
virtual std::string GetVSMakeProgram() { return this->GetMSDevCommand(); }
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index bd84433..390b97c 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -72,13 +72,6 @@ public:
);
/**
- * Generate the all required files for building this project/tree. This
- * basically creates a series of LocalGenerators for each directory and
- * requests that they Generate.
- */
- virtual void Generate();
-
- /**
* Generate the DSW workspace file.
*/
virtual void OutputSLNFile();
@@ -113,6 +106,7 @@ public:
virtual std::string Encoding();
protected:
+ virtual void Generate();
virtual const char* GetIDEVersion() { return "7.0"; }
std::string const& GetDevEnvCommand();
diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h
index aea2f01..d7e1f3a 100644
--- a/Source/cmGlobalVisualStudio8Generator.h
+++ b/Source/cmGlobalVisualStudio8Generator.h
@@ -45,7 +45,6 @@ public:
* target.
*/
virtual void Configure();
- virtual void Generate();
/**
* Where does this version of Visual Studio look for macros for the
@@ -69,6 +68,7 @@ public:
return !this->WindowsCEVersion.empty(); }
protected:
+ virtual void Generate();
virtual const char* GetIDEVersion() { return "8.0"; }
virtual std::string FindDevEnvCommand();
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index 05dbb11..356f4d4 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -27,11 +27,6 @@ public:
virtual ~cmGlobalVisualStudioGenerator();
/**
- * Basic generate implementation for all VS generators.
- */
- virtual void Generate();
-
- /**
* Configure CMake's Visual Studio macros file into the user's Visual
* Studio macros directory.
*/
@@ -90,6 +85,8 @@ public:
void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const;
protected:
+ virtual void Generate();
+
// Does this VS version link targets to each other if there are
// dependencies in the SLN file? This was done for VS versions
// below 8.
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index ae23e3b..fcdd349 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -64,13 +64,6 @@ public:
std::vector<std::string> const& makeOptions = std::vector<std::string>()
);
- /**
- * Generate the all required files for building this project/tree. This
- * basically creates a series of LocalGenerators for each directory and
- * requests that they Generate.
- */
- virtual void Generate();
-
/** Append the subdirectory for the given configuration. */
virtual void AppendDirectoryForConfig(const std::string& prefix,
const std::string& config,
@@ -91,6 +84,8 @@ public:
virtual bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf);
void AppendFlag(std::string& flags, std::string const& flag);
+protected:
+ virtual void Generate();
private:
cmXCodeObject* CreateOrGetPBXGroup(cmTarget& cmtarget,
cmSourceGroup* sg);
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index a051c87..5aa1ab0 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1715,7 +1715,7 @@ int cmake::Generate()
{
return -1;
}
- this->GlobalGenerator->Generate();
+ this->GlobalGenerator->DoGenerate();
if ( !this->GraphVizFile.empty() )
{
std::cout << "Generate graphviz: " << this->GraphVizFile << std::endl;
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index 6544098..2521aac 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -3696,7 +3696,10 @@ void SystemInformationImplementation::SetStackTraceOnError(int enable)
// install ours
struct sigaction sa;
sa.sa_sigaction=(SigAction)StacktraceSignalHandler;
- sa.sa_flags=SA_SIGINFO|SA_RESTART|SA_RESETHAND;
+ sa.sa_flags=SA_SIGINFO|SA_RESETHAND;
+# ifdef SA_RESTART
+ sa.sa_flags|=SA_RESTART;
+# endif
sigemptyset(&sa.sa_mask);
sigaction(SIGABRT,&sa,0);
diff --git a/Source/kwsys/Terminal.c b/Source/kwsys/Terminal.c
index 6d7ec41..e13003f 100644
--- a/Source/kwsys/Terminal.c
+++ b/Source/kwsys/Terminal.c
@@ -104,11 +104,11 @@ void kwsysTerminal_cfprintf(int color, FILE* stream, const char* format, ...)
}
/*--------------------------------------------------------------------------*/
-/* Detect cases when a stream is definately not interactive. */
+/* Detect cases when a stream is definitely not interactive. */
#if !defined(KWSYS_TERMINAL_ISATTY_WORKS)
static int kwsysTerminalStreamIsNotInteractive(FILE* stream)
{
- /* The given stream is definately not interactive if it is a regular
+ /* The given stream is definitely not interactive if it is a regular
file. */
struct stat stream_stat;
if(fstat(fileno(stream), &stream_stat) == 0)
@@ -212,7 +212,7 @@ static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100,
(void)default_tty;
return isatty(fileno(stream))? 1:0;
#else
- /* Check for cases in which the stream is definately not a tty. */
+ /* Check for cases in which the stream is definitely not a tty. */
if(kwsysTerminalStreamIsNotInteractive(stream))
{
return 0;
diff --git a/Source/kwsys/testProcess.c b/Source/kwsys/testProcess.c
index 6d5eb71..3d62822 100644
--- a/Source/kwsys/testProcess.c
+++ b/Source/kwsys/testProcess.c
@@ -11,11 +11,13 @@
============================================================================*/
#include "kwsysPrivate.h"
#include KWSYS_HEADER(Process.h)
+#include KWSYS_HEADER(Encoding.h)
/* Work-around CMake dependency scanning limitation. This must
duplicate the above list of headers. */
#if 0
# include "Process.h.in"
+# include "Encoding.h.in"
#endif
#include <stdio.h>
@@ -393,6 +395,19 @@ int runChild(const char* cmd[], int state, int exception, int value,
int main(int argc, const char* argv[])
{
int n = 0;
+
+#ifdef _WIN32
+ int i;
+ char new_args[10][_MAX_PATH];
+ LPWSTR* w_av = CommandLineToArgvW(GetCommandLineW(), &argc);
+ for(i=0; i<argc; i++)
+ {
+ kwsysEncoding_wcstombs(new_args[i], w_av[i], _MAX_PATH);
+ argv[i] = new_args[i];
+ }
+ LocalFree(w_av);
+#endif
+
#if 0
{
HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE);
diff --git a/Tests/CTestTestMemcheck/CMakeLists.txt b/Tests/CTestTestMemcheck/CMakeLists.txt
index d16d432..3ad0b26 100644
--- a/Tests/CTestTestMemcheck/CMakeLists.txt
+++ b/Tests/CTestTestMemcheck/CMakeLists.txt
@@ -121,7 +121,7 @@ set(CTEST_EXTRA_CODE)
# add LeakSanitizer test
set(CTEST_EXTRA_CODE
-"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"report_bugs=1 history_size=5 exitcode=55\")
+"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\")
")
set(CMAKELISTS_EXTRA_CODE
@@ -136,7 +136,7 @@ set_tests_properties(CTestTestMemcheckDummyLeakSanitizer PROPERTIES
".*Memory checking results:.*Direct leak - 2.*Indirect leak - 1.*")
# add AddressSanitizer test
set(CTEST_EXTRA_CODE
-"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"report_bugs=1 history_size=5 exitcode=55\")
+"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\")
")
set(CMAKELISTS_EXTRA_CODE
@@ -225,7 +225,7 @@ set_tests_properties(CTestTestMemcheckDummyValgrindIgnoreMemcheck
PASS_REGULAR_EXPRESSION "\n2/2 Test #2: RunCMakeAgain .*${ctest_and_tool_outputs}$")
set_tests_properties(CTestTestMemcheckDummyBC PROPERTIES
- PASS_REGULAR_EXPRESSION "\n1/1 MemCheck #1: RunCMake \\.+ Passed +[0-9]+.[0-9]+ sec\n\n100% tests passed, 0 tests failed out of 1\n(.*\n)?Error parsing XML in stream at line 1: no element found\n")
+ PASS_REGULAR_EXPRESSION "\n1/1 MemCheck #1: RunCMake \\.+ Passed +[0-9]+.[0-9]+ sec\n${guard_malloc_lines}\n100% tests passed, 0 tests failed out of 1\n(.*\n)?Error parsing XML in stream at line 1: no element found\n")
set_tests_properties(CTestTestMemcheckDummyValgrindInvalidSupFile PROPERTIES
PASS_REGULAR_EXPRESSION "\nCannot find memory checker suppression file: ${CTEST_ESCAPED_REALPATH_CMAKE_CURRENT_BINARY_DIR}/does-not-exist\n")
diff --git a/Tests/CTestTestMemcheck/testAddressSanitizer.cmake b/Tests/CTestTestMemcheck/testAddressSanitizer.cmake
index a359e28..a073151 100644
--- a/Tests/CTestTestMemcheck/testAddressSanitizer.cmake
+++ b/Tests/CTestTestMemcheck/testAddressSanitizer.cmake
@@ -5,6 +5,10 @@ message("ASAN_OPTIONS = [$ENV{ASAN_OPTIONS}]")
string(REGEX REPLACE ".*log_path=\"([^\"]*)\".*" "\\1" LOG_FILE "$ENV{ASAN_OPTIONS}")
message("LOG_FILE=[${LOG_FILE}]")
+# if we are not asked to simulate address sanitizer don't do it
+if(NOT "$ENV{ASAN_OPTIONS}]" MATCHES "simulate_sanitizer.1")
+ return()
+endif()
# clear the log file
file(REMOVE "${LOG_FILE}.2343")
diff --git a/Tests/CTestTestMemcheck/testLeakSanitizer.cmake b/Tests/CTestTestMemcheck/testLeakSanitizer.cmake
index ca0a264..d0e38ce 100644
--- a/Tests/CTestTestMemcheck/testLeakSanitizer.cmake
+++ b/Tests/CTestTestMemcheck/testLeakSanitizer.cmake
@@ -4,6 +4,10 @@
message("ASAN_OPTIONS = [$ENV{ASAN_OPTIONS}]")
string(REGEX REPLACE ".*log_path=\"([^\"]*)\".*" "\\1" LOG_FILE "$ENV{ASAN_OPTIONS}")
message("LOG_FILE=[${LOG_FILE}]")
+# if we are not asked to simulate leak sanitizer don't do it
+if(NOT "$ENV{ASAN_OPTIONS}]" MATCHES "simulate_sanitizer.1")
+ return()
+endif()
# clear the log file
file(REMOVE "${LOG_FILE}.2343")
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt
index 222250c..5e5eead 100644
--- a/Tests/Complex/CMakeLists.txt
+++ b/Tests/Complex/CMakeLists.txt
@@ -14,6 +14,21 @@ if(POLICY CMP0003)
endif()
endif()
+# It is not recommended to set a policy to OLD, but this test
+# covers the OLD behavior of some policies.
+foreach(p
+ CMP0029
+ CMP0032
+ CMP0033
+ CMP0034
+ CMP0043
+ CMP0050
+ )
+ if(POLICY ${p})
+ cmake_policy(SET ${p} OLD)
+ endif()
+endforeach()
+
# Test building without per-rule echo lines in Makefiles.
set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt
index 3f17dcc..3b73e70 100644
--- a/Tests/ComplexOneConfig/CMakeLists.txt
+++ b/Tests/ComplexOneConfig/CMakeLists.txt
@@ -14,6 +14,21 @@ if(POLICY CMP0003)
endif()
endif()
+# It is not recommended to set a policy to OLD, but this test
+# covers the OLD behavior of some policies.
+foreach(p
+ CMP0029
+ CMP0032
+ CMP0033
+ CMP0034
+ CMP0043
+ CMP0050
+ )
+ if(POLICY ${p})
+ cmake_policy(SET ${p} OLD)
+ endif()
+endforeach()
+
# Test building without per-rule echo lines in Makefiles.
set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)