summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-12-20 15:28:53 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2023-12-20 16:05:09 (GMT)
commit255c2e14309a4861b929f65698b7326cff6c63ad (patch)
treeca95124b1313e52251e59c4ff33922916b5626ae /Tests/RunCMake
parent158316dc0c0fb856feb67ca3cacd7681170b5e0a (diff)
downloadCMake-255c2e14309a4861b929f65698b7326cff6c63ad.zip
CMake-255c2e14309a4861b929f65698b7326cff6c63ad.tar.gz
CMake-255c2e14309a4861b929f65698b7326cff6c63ad.tar.bz2
Ninja: LINK_OPTIONS property should support newlines
Fixes: #25513
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/Ninja/LINK_OPTIONSWithNewlines.cmake7
-rw-r--r--Tests/RunCMake/Ninja/RunCMakeTest.cmake2
2 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/Ninja/LINK_OPTIONSWithNewlines.cmake b/Tests/RunCMake/Ninja/LINK_OPTIONSWithNewlines.cmake
new file mode 100644
index 0000000..285966e
--- /dev/null
+++ b/Tests/RunCMake/Ninja/LINK_OPTIONSWithNewlines.cmake
@@ -0,0 +1,7 @@
+enable_language(C)
+
+add_library(hello STATIC hello.c)
+
+target_link_options(hello PRIVATE "-FLAGS=[
+ FLAG1,
+ FLAG2]")
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
index 42ab1d8..13d9620 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -405,3 +405,5 @@ endfunction()
if(CMake_TEST_Qt_version)
run_QtAutoMocSkipPch()
endif()
+
+run_cmake(LINK_OPTIONSWithNewlines)