diff --git a/cmake/set_default_flags.cmake b/cmake/set_default_flags.cmake index d8ed58f0bc93266a604d8579165246a0eff17384..7049a826459209fe04463b13c94ca67873b54423 100644 --- a/cmake/set_default_flags.cmake +++ b/cmake/set_default_flags.cmake @@ -4,6 +4,9 @@ # Set default compiler flags for C++, including the flags for thelatest C++ standard (see # enable_latest_cxx_support.cmake) # +# It will also append ${PROJECT_NAME}_CXX_FLAGS to the CMAKE_CXX_FLAGS, so it is a good idea to set any project +# specific flags before calling this macro. +# ####################################################################################################################### ####################################################################################################################### @@ -18,7 +21,7 @@ # ####################################################################################################################### -include(enable_latest_cxx_support.cmake) +include(cmake/enable_latest_cxx_support.cmake) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${PROJECT_NAME}_CXX_FLAGS} -Wall -Wextra -Wshadow -pedantic -Wuninitialized") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 --coverage") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")