summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d009457)
raw | patch | inline | side by side (parent: d009457)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 31 Mar 2008 20:45:11 +0000 (20:45 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Mon, 31 Mar 2008 20:45:11 +0000 (20:45 +0000) |
add optional profiling flags
CMakeLists.txt | patch | blob | history | |
CMakeScripts/ConfigCompileFlags.cmake | patch | blob | history | |
config.h.cmake | patch | blob | history |
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8b3c5ef23d721862ed3d305440910576eadda684..0df1c0e69da73c513c2d480dd751d4af96fc18e5 100644 (file)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
SET(CMAKE_BACKWARDS_COMPATIBILITY 2.4)\r
SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)\r
\r
+# Set to true if compiler/linker should enable profiling:\r
+#SET(ENABLE_PROFILING TRUE)\r
+\r
SET(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)\r
SET(CMAKE_SKIP_RPATH:BOOL OFF)\r
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeScripts)\r
index f82fd52bb593bb62db41fb81150be295cd1218bb..4e789bc2ea03a0668c90174e8ce5fd55a65696a9 100644 (file)
SET(COMPILE_WARNING_FLAGS "-Wall -Wformat-security -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch")
SET(COMPILE_OPTIMIZATION_FLAGS "-O2")
-SET(DEFINE_FLAGS "-DHAVE_CONFIG_H -D_INTL_REDIRECT_INLINE ")
+#define the flags for profiling if desired:
+IF (ENABLE_PROFILING)
+ SET(COMPILE_PROFILING_FLAGS "-pg")
+ SET(LINK_PROFILING_FLAGS "-pg")
+ENDIF (ENABLE_PROFILING)
+
+
+SET(DEFINE_FLAGS "${DEFINE_FLAGS} -DVERSION=\\\"${INKSCAPE_VERSION}\\\"")
+SET(DEFINE_FLAGS "${DEFINE_FLAGS} -DHAVE_CONFIG_H -D_INTL_REDIRECT_INLINE ")
IF (WIN32)
SET(DEFINE_FLAGS "${DEFINE_FLAGS} -DXP_WIN")
# for Inkboard:
SET(DEFINE_FLAGS "${DEFINE_FLAGS} -DHAVE_SSL -DRELAYTOOL_SSL=\"static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }\" ")
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_WARNING_FLAGS} ${COMPILE_OPTIMIZATION_FLAGS} ${DEFINE_FLAGS} -DVERSION=\\\"${INKSCAPE_VERSION}\\\" ")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_WARNING_FLAGS} ${COMPILE_OPTIMIZATION_FLAGS} ${DEFINE_FLAGS} ${COMPILE_PROFILING_FLAGS} ")
SET(CMAKE_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM} -j2")
diff --git a/config.h.cmake b/config.h.cmake
index 5d229e6863449da3aa8f630201f2307972dd2762..b21ecf080aaf2936e45241e0f49722b8b2d19543 100644 (file)
--- a/config.h.cmake
+++ b/config.h.cmake
#endif
/* This is for require-config.h */
-#define PACKAGE_TARNAME "$PROJECT_NAME} ${INKSCAPE_VERSION}"
+#define PACKAGE_TARNAME "${PROJECT_NAME} ${INKSCAPE_VERSION}"
/* Use binreloc thread support? */
#cmakedefine BR_PTHREADS
#cmakedefine ENABLE_OSX_APP_LOCATIONS
/* Translation domain used */
-#define GETTEXT_PACKAGE "$PROJECT_NAME}"
+#define GETTEXT_PACKAGE "${PROJECT_NAME}"
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#cmakedefine HAVE_BIND_TEXTDOMAIN_CODESET
#cmakedefine NO_MINUS_C_MINUS_O
/* Name of package */
-#define PACKAGE "$PROJECT_NAME}"
+#define PACKAGE "${PROJECT_NAME}"
/* Define to the address where bug reports for this package should be sent. */
#cmakedefine PACKAGE_BUGREPORT
#cmakedefine PACKAGE_LOCALE_DIR
/* Define to the full name of this package. */
-#define PACKAGE_NAME "$PROJECT_NAME}"
+#define PACKAGE_NAME "${PROJECT_NAME}"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "$PROJECT_NAME} ${INKSCAPE_VERSION}"
+#define PACKAGE_STRING "${PROJECT_NAME} ${INKSCAPE_VERSION}"
/* Define to the version of this package. */
#define PACKAGE_VERSION "${INKSCAPE_VERSION}"