summaryrefslogtreecommitdiff
path: root/include/CMakeLists.txt
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-05-24 21:54:15 -0400
committerAdam <Adam@anope.org>2012-05-24 21:54:15 -0400
commit38d5f20deba313355943883b7b539a82f7a701ee (patch)
treeacf8a422c82d760d666a5aa35abec90a17cc7905 /include/CMakeLists.txt
parent70fb5900a2cc8eb00d1d25b39bd137488e845338 (diff)
Added a ./Config option for using precompiled headers
Diffstat (limited to 'include/CMakeLists.txt')
-rw-r--r--include/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index f7e653a8a..6170cde27 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -18,7 +18,7 @@ if(NOT WIN32)
endif(NOT WIN32)
set(PCH_SOURCES_GCH "")
-if(CMAKE_COMPILER_IS_GNUCXX)
+if(USE_PCH AND CMAKE_COMPILER_IS_GNUCXX)
string(REPLACE " " ";" PCH_CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_FLAGS}")
file(GLOB PCH_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h")
@@ -57,7 +57,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
DEPENDS ${INCLUDES_LIST} VERBATIM
)
endforeach(PCH_SOURCE ${PCH_SOURCES})
-endif(CMAKE_COMPILER_IS_GNUCXX)
+endif(USE_PCH AND CMAKE_COMPILER_IS_GNUCXX)
# Add a custom target to the above file
add_custom_target(headers DEPENDS version ${CMAKE_CURRENT_BINARY_DIR}/version_build ${PCH_SOURCES_GCH})