Commit 0ad60388 authored by Davis King's avatar Davis King

Fixed a bug that caused cmake to not provide the correct preprocessor

definitions until cmake was run twice.  This was causing some projects to not
build properly.
parent 71c79240
......@@ -14,12 +14,13 @@ endif()
# Determine the path to dlib.
string(REGEX REPLACE "cmake$" "" dlib_path ${CMAKE_CURRENT_LIST_FILE})
include(${dlib_path}/add_global_compiler_switch.cmake)
if (CMAKE_COMPILER_IS_GNUCXX)
# By default, g++ won't warn or error if you forget to return a value in a
# function which requires you to do so. This option makes it give a warning
# for doing this.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wreturn-type")
add_global_compiler_switch(-Wreturn-type)
endif()
# Setup some options to allow a user to enable SSE and AVX instruction use.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment