Commit df2aca9d authored by Brad King's avatar Brad King

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.
parent 359775b9
......@@ -1095,6 +1095,11 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
KWSYS_SET_PROPERTY(TEST kwsys.testProcess-${n} PROPERTY LABELS ${KWSYS_LABELS_TEST})
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
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/testSharedForward.c.in
${PROJECT_BINARY_DIR}/testSharedForward.c @ONLY IMMEDIATE)
......
......@@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2009)
SET(KWSYS_DATE_STAMP_MONTH 11)
# KWSys version date day component. Format is DD.
SET(KWSYS_DATE_STAMP_DAY 20)
SET(KWSYS_DATE_STAMP_DAY 23)
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