diff options
author | Brad King <brad.king@kitware.com> | 2011-03-04 13:59:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-03-04 13:59:56 (GMT) |
commit | 1dafa7498f0dced8522b8244dd8dbf8176f0fe5b (patch) | |
tree | afe4a7ad84ade68a28711c4e594a47a24eb85993 /Tests/Assembler/CMakeLists.txt | |
parent | 4139a734fae11d2ece631ff4805556ee2a6de66b (diff) | |
download | CMake-1dafa7498f0dced8522b8244dd8dbf8176f0fe5b.zip CMake-1dafa7498f0dced8522b8244dd8dbf8176f0fe5b.tar.gz CMake-1dafa7498f0dced8522b8244dd8dbf8176f0fe5b.tar.bz2 |
Fix Assembler test to parse C flags string before using
Commit 1f6c6b1c (use CMAKE_C_FLAGS when generating the assembler file,
2011-03-03) added use of CMAKE_C_FLAGS to the assembler generation step.
However, this variable is meant for direct substitution into a shell
command line so we need to parse it to separate the arguments first.
Diffstat (limited to 'Tests/Assembler/CMakeLists.txt')
-rw-r--r-- | Tests/Assembler/CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Tests/Assembler/CMakeLists.txt b/Tests/Assembler/CMakeLists.txt index 4036cbd..ce42afb 100644 --- a/Tests/Assembler/CMakeLists.txt +++ b/Tests/Assembler/CMakeLists.txt @@ -7,7 +7,9 @@ set(SRCS) # and also generate assembler files from C: if("${CMAKE_GENERATOR}" MATCHES "Makefile") if(("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|HP|SunPro|XL)$") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel" AND UNIX)) - execute_process(COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_FLAGS} -S "${CMAKE_CURRENT_SOURCE_DIR}/main.c" -o "${CMAKE_CURRENT_BINARY_DIR}/main.s") + set(C_FLAGS "${CMAKE_C_FLAGS}") + separate_arguments(C_FLAGS) + execute_process(COMMAND ${CMAKE_C_COMPILER} ${C_FLAGS} -S "${CMAKE_CURRENT_SOURCE_DIR}/main.c" -o "${CMAKE_CURRENT_BINARY_DIR}/main.s") set(SRCS "${CMAKE_CURRENT_BINARY_DIR}/main.s") endif(("${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|HP|SunPro|XL)$") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel" AND UNIX)) endif("${CMAKE_GENERATOR}" MATCHES "Makefile") |