Commit 7b298b09 authored by Pádraig Brady's avatar Pádraig Brady Committed by Pádraig Brady

Fix pch generation when linker flags used with GCC

-c is required to avoid linking (and the associated missing "main" message)
when linker flags like "-Wl,-z,relro" are passed to GCC
parent 45f69313
...@@ -125,11 +125,11 @@ MACRO(_PCH_GET_COMPILE_COMMAND out_command _input _output) ...@@ -125,11 +125,11 @@ MACRO(_PCH_GET_COMPILE_COMMAND out_command _input _output)
STRING(REGEX REPLACE "^ +" "" pchsupport_compiler_cxx_arg1 ${CMAKE_CXX_COMPILER_ARG1}) STRING(REGEX REPLACE "^ +" "" pchsupport_compiler_cxx_arg1 ${CMAKE_CXX_COMPILER_ARG1})
SET(${out_command} SET(${out_command}
${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input} ${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} -x c++-header -o ${_output} -c ${_input}
) )
ELSE(CMAKE_CXX_COMPILER_ARG1) ELSE(CMAKE_CXX_COMPILER_ARG1)
SET(${out_command} SET(${out_command}
${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input} ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} -c ${_input}
) )
ENDIF(CMAKE_CXX_COMPILER_ARG1) ENDIF(CMAKE_CXX_COMPILER_ARG1)
ELSE() ELSE()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment