Project name #define is sent to source code in compile time
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@intra2net.com>
Tue, 22 Feb 2011 14:47:51 +0000 (15:47 +0100)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@intra2net.com>
Tue, 22 Feb 2011 14:47:51 +0000 (15:47 +0100)
CMakeLists.txt

index 2ddab70..877ebe6 100644 (file)
@@ -15,9 +15,12 @@ set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
 # enable or disable the full compiler output
 set( CMAKE_VERBOSE_MAKEFILE OFF )
 
+set( CMAKE_BUILD_TYPE Debug )
+
 # add definitions, compiler switches, etc.
 add_definitions(
     -Werror -Wall -Wextra -Weffc++ -O2 -DVERSION_STRING=${VERSION_STRING}
+    -DPROJECT_NAME=\"${PROJECT_NAME}\"
 )
 
 # more build in the source folder