Forráskód Böngészése

Merge pull request #798 from richardkchapman/slow-compile-705

Fix gh-705 Slow compiles of generated stubs
Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 13 éve
szülő
commit
1c30ad7a0c
1 módosított fájl, 3 hozzáadás és 0 törlés
  1. 3 0
      esp/scm/smcscm.cmake

+ 3 - 0
esp/scm/smcscm.cmake

@@ -55,6 +55,9 @@ foreach ( loop_var ${ESPSCM_SRCS} )
     set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}.int PROPERTIES GENERATED TRUE)
     set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}.ipp PROPERTIES GENERATED TRUE)
     set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}_esp.cpp PROPERTIES GENERATED TRUE)
+    if (CMAKE_COMPILER_IS_GNUCXX)
+      set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}_esp.cpp PROPERTIES COMPILE_FLAGS "-O0")
+    endif ()
     set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}_esp.ipp PROPERTIES GENERATED TRUE)
     set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}.xml PROPERTIES GENERATED TRUE)
     set ( ESP_GENERATED_INCLUDES ${ESP_GENERATED_INCLUDES} ${ESPSCM_GENERATED_DIR}/${result}.esp ${ESPSCM_GENERATED_DIR}/${result}.hpp ${ESPSCM_GENERATED_DIR}/${result}.int ${ESPSCM_GENERATED_DIR}/${result}.ipp ${ESPSCM_GENERATED_DIR}/${result}_esp.ipp ${ESPSCM_GENERATED_DIR}/${result}.xml )