Re: [CMake] using macros

2016-01-15 Thread Owen Hogarth II
Yes, indeed. Yikes, thanks for this! On Thu, Jan 14, 2016, 17:21 Petr Kmoch wrote: > Hi Owen. > > As a sanity check, the definition of the macro in the toplevel CMakeList > comes *before* the add_subdirectory() command for the one which errors out, > right? > > Petr > > On Thu, Jan 14, 2016 at 8

Re: [CMake] using macros

2016-01-14 Thread Petr Kmoch
Hi Owen. As a sanity check, the definition of the macro in the toplevel CMakeList comes *before* the add_subdirectory() command for the one which errors out, right? Petr On Thu, Jan 14, 2016 at 8:25 AM, Owen Hogarth II wrote: > I am trying to use a macro to enable c99 in some of my cmake modul

[CMake] using macros

2016-01-13 Thread Owen Hogarth II
I am trying to use a macro to enable c99 in some of my cmake modules. In the top level cmake file I add this macro macro(use_c99) if (CMAKE_VERSION VERSION_LESS "3.1") if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "--std=gnu99 ${CMAKE_C_FLAGS}") endif () else ()