Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Flags for coverage.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 17 Jun 2010 13:14:20 +0000 (13:14 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 17 Jun 2010 13:14:20 +0000 (13:14 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7894 48e7efb5-ca39-0410-a469-dd3cf9ba447f

CMakeLists.txt
buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/Flags.cmake

index 66ccec4..c375a7c 100644 (file)
@@ -46,11 +46,7 @@ if(WIN32)
     set(_WIN32 1)
 endif(WIN32)
 
     set(_WIN32 1)
 endif(WIN32)
 
-if(enable_coverage)
-       add_definitions (${INCLUDES} -fprofile-arcs -ftest-coverage)
-else(enable_coverage)
-       add_definitions (${INCLUDES})
-endif(enable_coverage)
+add_definitions (${INCLUDES})
 
 ### Setup Options
 include(${PROJECT_DIRECTORY}/buildtools/Cmake/Option.cmake)
 
 ### Setup Options
 include(${PROJECT_DIRECTORY}/buildtools/Cmake/Option.cmake)
index 168aff8..5c6e95a 100644 (file)
@@ -156,7 +156,7 @@ if(enable_ruby)
                                set(RUBY_LIBRARY_NAME ruby)
                        endif(NOT RUBY_LIBRARY_NAME)
                        string(REGEX REPLACE "libruby.*$" "" RUBY_LIBRARY ${RUBY_LIBRARY})
                                set(RUBY_LIBRARY_NAME ruby)
                        endif(NOT RUBY_LIBRARY_NAME)
                        string(REGEX REPLACE "libruby.*$" "" RUBY_LIBRARY ${RUBY_LIBRARY})
-                       SET(CMAKE_EXE_LINKER_FLAGS "-L${RUBY_LIBRARY}")
+                       SET(CMAKE_EXE_LINKER_FLAGS "-L${RUBY_LIBRARY} ")
                        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${RUBY_CONFIG_INCLUDE_DIR} ") #path to config.h
                        string(COMPARE EQUAL "${RUBY_INCLUDE_DIR}" "${RUBY_CONFIG_INCLUDE_DIR}" operation)
                        if(NOT operation)
                        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${RUBY_CONFIG_INCLUDE_DIR} ") #path to config.h
                        string(COMPARE EQUAL "${RUBY_INCLUDE_DIR}" "${RUBY_CONFIG_INCLUDE_DIR}" operation)
                        if(NOT operation)
index 3c0c6e5..16465a2 100644 (file)
@@ -2,7 +2,7 @@ set(warnCFLAGS "")
 set(optCFLAGS "")
 
 if(NOT WIN32)
 set(optCFLAGS "")
 
 if(NOT WIN32)
-       set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS}-g3)
+       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-g3")
 endif(NOT WIN32)
 
 if(enable_supernovae)
 endif(NOT WIN32)
 
 if(enable_supernovae)
@@ -20,3 +20,9 @@ endif(enable_compile_optimizations)
 
 set(CMAKE_C_FLAGS "${optCFLAGS}${warnCFLAGS}${CMAKE_C_FLAGS}")
 
 
 set(CMAKE_C_FLAGS "${optCFLAGS}${warnCFLAGS}${CMAKE_C_FLAGS}")
 
+if(enable_coverage)
+       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
+       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
+       set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
+endif(enable_coverage)
+