[Orxonox-commit 2651] r7356 - code/branches/doc/doc/api

rgrieder at orxonox.net rgrieder at orxonox.net
Sun Sep 5 17:31:56 CEST 2010


Author: rgrieder
Date: 2010-09-05 17:31:56 +0200 (Sun, 05 Sep 2010)
New Revision: 7356

Modified:
   code/branches/doc/doc/api/CMakeLists.txt
   code/branches/doc/doc/api/doxy.config.in
Log:
This should take care of most of the conditional compilation for Doxygen. Mind that the API reference is now dependent on the machine Doxygen runs. Previously there was just a mixture (i.e. any #ifdef evaluated false and therefore the #else block (if available) was chosen).

Modified: code/branches/doc/doc/api/CMakeLists.txt
===================================================================
--- code/branches/doc/doc/api/CMakeLists.txt	2010-09-05 11:29:07 UTC (rev 7355)
+++ code/branches/doc/doc/api/CMakeLists.txt	2010-09-05 15:31:56 UTC (rev 7356)
@@ -63,6 +63,21 @@
     FILE(WRITE ${INTERNAL_DOCFILE} "// empty...")
   ENDIF()
 
+  # Take care of most of the conditional compilation problems
+  # (Doxygen requires separate input for that)
+  IF(WIN32)
+    SET(DOXY_PLATFORM_DEF "ORXONOX_PLATFORM_WINDOWS")
+  ELSEIF(APPLE)
+    SET(DOXY_PLATFORM_DEF "ORXONOX_PLATFORM_APPLE ORXONOX_PLATFORM_UNIX")
+  ELSE()
+    SET(DOXY_PLATFORM_DEF "ORXONOX_PLATFORM_LINUX ORXONOX_PLATFORM_UNIX")
+  ENDIF()
+  IF(MSVC)
+    SET(DOXY_COMPILER_DEF "ORXONOX_COMPILER_MSVC")
+  ELSE()
+    SET(DOXY_COMPILER_DEF "ORXONOX_COMPILER_GCC")
+  ENDIF()
+
   IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in)
     # use (configured) doxy.config from (out of place) BUILD tree:
     SET(DOXY_CONFIG ${CMAKE_CURRENT_BINARY_DIR}/doxy.config)

Modified: code/branches/doc/doc/api/doxy.config.in
===================================================================
--- code/branches/doc/doc/api/doxy.config.in	2010-09-05 11:29:07 UTC (rev 7355)
+++ code/branches/doc/doc/api/doxy.config.in	2010-09-05 15:31:56 UTC (rev 7356)
@@ -1291,7 +1291,7 @@
 # compilation will be performed. Macro expansion can be done in a controlled
 # way by setting EXPAND_ONLY_PREDEF to YES.
 
-MACRO_EXPANSION        = YES
+MACRO_EXPANSION        = NO
 
 # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
 # then the macro expansion is limited to the macros specified with the
@@ -1308,7 +1308,7 @@
 # contain include files that are not input files but should be processed by
 # the preprocessor.
 
-INCLUDE_PATH           =
+INCLUDE_PATH           = #@DOXYGEN_INCLUDE_DIRECTORIES@
 
 # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
 # patterns (like *.h and *.hpp) to filter out the header-files in the
@@ -1325,7 +1325,9 @@
 # undefined via #undef or recursively expanded use the := operator
 # instead of the = operator.
 
-PREDEFINED             = DOXYGEN_SHOULD_SKIP_THIS
+PREDEFINED             = DOXYGEN_SHOULD_SKIP_THIS \
+                         @DOXY_PLATFORM_DEF@ \
+                         @DOXY_COMPILER_DEF@
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
 # this tag can be used to specify a list of macro names that should be expanded.




More information about the Orxonox-commit mailing list