KWSys: Work-around llvm-gcc-4.2 optimizer bug
Under -O3 optimization this compiler breaks our testProcess.c source file. We force -O0 for the file to avoid the problem.
This commit is contained in:
parent
647d7105b4
commit
574902fef2
|
@ -1095,6 +1095,11 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
|
||||||
KWSYS_SET_PROPERTY(TEST kwsys.testProcess-${n} PROPERTY LABELS ${KWSYS_LABELS_TEST})
|
KWSYS_SET_PROPERTY(TEST kwsys.testProcess-${n} PROPERTY LABELS ${KWSYS_LABELS_TEST})
|
||||||
ENDFOREACH(n)
|
ENDFOREACH(n)
|
||||||
|
|
||||||
|
# Some Apple compilers produce bad optimizations in this source.
|
||||||
|
IF(APPLE AND "${CMAKE_C_COMPILER_ID}" MATCHES "^(GNU|LLVM)$")
|
||||||
|
SET_SOURCE_FILES_PROPERTIES(testProcess.c PROPERTIES COMPILE_FLAGS -O0)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# Test SharedForward
|
# Test SharedForward
|
||||||
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/testSharedForward.c.in
|
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/testSharedForward.c.in
|
||||||
${PROJECT_BINARY_DIR}/testSharedForward.c @ONLY IMMEDIATE)
|
${PROJECT_BINARY_DIR}/testSharedForward.c @ONLY IMMEDIATE)
|
||||||
|
|
Loading…
Reference in New Issue