CMakeLists.txt
changeset 1050 d9d1cb759951
parent 1000 404b98971e1f
child 1062 caf16813b1e8
equal deleted inserted replaced
53:a5008da45c45 54:43747c08e88c
    89 ENDIF()
    89 ENDIF()
    90 SET(LEMON_CXX_WARNING_FLAGS ${CXX_WARNING} CACHE STRING "LEMON warning flags.")
    90 SET(LEMON_CXX_WARNING_FLAGS ${CXX_WARNING} CACHE STRING "LEMON warning flags.")
    91 
    91 
    92 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}")
    92 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LEMON_CXX_WARNING_FLAGS}")
    93 
    93 
    94 SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb -O0" CACHE STRING
    94 IF(MSVC)
       
    95   SET( CMAKE_CXX_FLAGS_MAINTAINER "/WX ${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING
    95     "Flags used by the C++ compiler during maintainer builds."
    96     "Flags used by the C++ compiler during maintainer builds."
    96     FORCE )
    97     )
    97 SET( CMAKE_C_FLAGS_MAINTAINER "-Werror -O0" CACHE STRING
    98   SET( CMAKE_C_FLAGS_MAINTAINER "/WX ${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING
    98     "Flags used by the C compiler during maintainer builds."
    99     "Flags used by the C compiler during maintainer builds."
    99     FORCE )
   100     )
   100 SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
   101   SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
       
   102     "${CMAKE_EXE_LINKER_FLAGS_DEBUG}" CACHE STRING
       
   103     "Flags used for linking binaries during maintainer builds."
       
   104     )
       
   105   SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
       
   106     "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" CACHE STRING
       
   107     "Flags used by the shared libraries linker during maintainer builds."
       
   108     )
       
   109 ELSE()
       
   110   SET( CMAKE_CXX_FLAGS_MAINTAINER "-Werror -ggdb -O0" CACHE STRING
       
   111     "Flags used by the C++ compiler during maintainer builds."
       
   112     )
       
   113   SET( CMAKE_C_FLAGS_MAINTAINER "-Werror -O0" CACHE STRING
       
   114     "Flags used by the C compiler during maintainer builds."
       
   115     )
       
   116   SET( CMAKE_EXE_LINKER_FLAGS_MAINTAINER
   101     "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
   117     "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
   102     "Flags used for linking binaries during maintainer builds."
   118     "Flags used for linking binaries during maintainer builds."
   103     FORCE )
   119     )
   104 SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
   120   SET( CMAKE_SHARED_LINKER_FLAGS_MAINTAINER
   105     "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
   121     "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING
   106     "Flags used by the shared libraries linker during maintainer builds."
   122     "Flags used by the shared libraries linker during maintainer builds."
   107     FORCE )
   123     )
       
   124 ENDIF()
       
   125 
   108 MARK_AS_ADVANCED(
   126 MARK_AS_ADVANCED(
   109     CMAKE_CXX_FLAGS_MAINTAINER
   127     CMAKE_CXX_FLAGS_MAINTAINER
   110     CMAKE_C_FLAGS_MAINTAINER
   128     CMAKE_C_FLAGS_MAINTAINER
   111     CMAKE_EXE_LINKER_FLAGS_MAINTAINER
   129     CMAKE_EXE_LINKER_FLAGS_MAINTAINER
   112     CMAKE_SHARED_LINKER_FLAGS_MAINTAINER )
   130     CMAKE_SHARED_LINKER_FLAGS_MAINTAINER )