diff options
Diffstat (limited to 'Source')
-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 137b25f..ef250d7 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 |