Hi all,

I have a project with multiple interdependent subpackages here, each
of which has its own export config file. The dependency hierarchy is
reflected in the `INCLUDE()` statements in the export files.

I would like to avoid that an export config file is included more than
once, so I'm guarding the files with
```
IF(NOT <name of the subpackage>_CONFIG_INCLUDED)
  SET(<name of the subpackage>_CONFIG_INCLUDED 1)
  [...]
  <setting of export variable etc>
  [...]
ENDIF()
```
This looks very much like the old C/C++ `#ifdef` `#include` header
guards, so I was wondering if this is an appropriate pattern for CMake
too. Or maybe there is another CMake command that already does exactly
what I want?

Cheers,
Nico
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to