diff options
author | Brad King <brad.king@kitware.com> | 2019-01-22 16:37:12 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-01-22 16:37:49 (GMT) |
commit | fa5bf870df1ce5d9cbcf61be736beb0b1e87b85b (patch) | |
tree | c07fe06038855289fbedd074307acb621a66826f /Source/cmCoreTryCompile.cxx | |
parent | a1f65014a30c7e9da15c87e3cca1d86b480c5339 (diff) | |
parent | 5990ecb74133e1a9c885fc0ea62896b501d37fef (diff) | |
download | CMake-fa5bf870df1ce5d9cbcf61be736beb0b1e87b85b.zip CMake-fa5bf870df1ce5d9cbcf61be736beb0b1e87b85b.tar.gz CMake-fa5bf870df1ce5d9cbcf61be736beb0b1e87b85b.tar.bz2 |
Merge topic 'implicit-includes'
5990ecb741 Compute implicit include directories from compiler output
d751d2d2ed CMakeDetermineCompilerABI: set locale to C for try_compile()
c765ae495a CMakeDetermineCompilerABI: pass verbose flag during compilation
8c5221fb1f try_compile: Preserve special characters in COMPILE_DEFINITIONS
15ad830062 Refactor exclusion of -I/usr/include to avoid per-language values
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2716
Diffstat (limited to 'Source/cmCoreTryCompile.cxx')
-rw-r--r-- | Source/cmCoreTryCompile.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index fcb27b4..272535d 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -599,7 +599,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv, fprintf(fout, "link_directories(${LINK_DIRECTORIES})\n"); // handle any compile flags we need to pass on if (!compileDefs.empty()) { - fprintf(fout, "add_definitions(%s)\n", cmJoin(compileDefs, " ").c_str()); + // Pass using bracket arguments to preserve content. + fprintf(fout, "add_definitions([==[%s]==])\n", + cmJoin(compileDefs, "]==] [==[").c_str()); } /* Use a random file name to avoid rapid creation and deletion |