CHECK_C_COMPILER_FLAG(-fPIC SUPPORT_FPIC)
IF(SUPPORT_FPIC)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_C_FLAGS} -fPIC")
ENDIF(SUPPORT_FPIC)
CHECK_C_COMPILER_FLAG(-fpic SUPPORT_Fpic)
IF(SUPPORT_Fpic)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic")
+ SET(CMAKE_EXE_LINKER_FLAGS"${CMAKE_C_FLAGS} -fpic")
ENDIF(SUPPORT_Fpic)
# Optimization flags
ENDIF(NOT CMAKE_C_OPT_FLAGS)
IF(DEBUG_MODE MATCHES "ON")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
+ SET(CMAKE_BUILD_TYPE "Debug")
ENDIF(DEBUG_MODE MATCHES "ON")
SET(CMAKE_C_FLAGS "${CMAKE_C_OPT_FLAGS} ${CMAKE_C_FLAGS} ${CMAKE_C_WARN_FLAGS}")