From 687f6e78533b0afd3a8cffc9af985e1c987b7b5a Mon Sep 17 00:00:00 2001 From: Hao Song Date: Sat, 10 Nov 2012 20:25:40 +0000 Subject: [PATCH] =?UTF-8?q?[nV]=20=E5=AF=B9CMake/Utils.cmake=E7=9A=84?= =?UTF-8?q?=E4=B8=80=E5=A4=84=E6=94=B9=E8=BF=9B=EF=BC=8C=E5=9C=A8add=5Fcom?= =?UTF-8?q?mon=5Fto=5Ftarget=E5=AE=8F=E7=9A=84=E5=AE=9A=E4=B9=89=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E4=BB=85=E5=BD=93PCHSupport.cmake=E6=8A=A5=E5=91=8APC?= =?UTF-8?q?HSupport=5FFOUND=E6=97=B6=E4=BD=BF=E7=94=A8=E9=A2=84=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E5=A4=B4=E6=96=87=E4=BB=B6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMake/Utils.cmake | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/CMake/Utils.cmake b/CMake/Utils.cmake index 4db8967..5900bf4 100755 --- a/CMake/Utils.cmake +++ b/CMake/Utils.cmake @@ -39,11 +39,13 @@ endif (NOT CMAKE_BUILD_TYPE) include(PCHSupport) macro (add_common_to_target target) - add_native_precompiled_header( - ${target} - ${CMAKE_CURRENT_SOURCE_DIR}/common.h - ${CMAKE_CURRENT_SOURCE_DIR}/common.cpp - ) + if (PCHSupport_FOUND) + add_native_precompiled_header( + ${target} + ${CMAKE_CURRENT_SOURCE_DIR}/common.h + ${CMAKE_CURRENT_SOURCE_DIR}/common.cpp + ) + endif (PCHSupport_FOUND) endmacro () macro (new_shared_library project) @@ -86,4 +88,5 @@ endmacro () macro (new_nv_script script package) configure_file(${script} ${NVSCRIPT_OUTPUT_PATH}/${package}/${script} COPYONLY) install(FILES ${script} DESTINATION ${NVSCRIPT_RELATIVE_DIR}/${package}/) -endmacro () \ No newline at end of file +endmacro () +