Backport lots of new features from the 1.41.0 branch.
[boost:cmake.git] / tools / build / CMake / test / tools / tool-a / src / CMakeLists.txt
1 #
2 # Copyright Troy D. Straszheim
3 #
4 # Distributed under the Boost Software License, Version 1.0.
5 # See http://www.boost.org/LICENSE_1_0.txt
6 #
7 boost_add_library(a
8
9   lib.cpp
10
11   SHARED_COMPILE_FLAGS           "-DSHARED_OR_STATIC=SHARED"
12   STATIC_COMPILE_FLAGS           "-DSHARED_OR_STATIC=STATIC"
13   DEBUG_COMPILE_FLAGS            "-DDEBUG_OR_RELEASE=DEBUG"
14   RELEASE_COMPILE_FLAGS          "-DDEBUG_OR_RELEASE=RELEASE"
15   SINGLE_THREADED_COMPILE_FLAGS  "-DSINGLE_OR_MULTI=SINGLE_THREADED"
16   MULTI_THREADED_COMPILE_FLAGS   "-DSINGLE_OR_MULTI=MULTI_THREADED"
17   )
18
19 foreach(shared_or_static SHARED STATIC)
20   foreach(debug_or_release DEBUG RELEASE)
21     foreach(single_or_multi SINGLE_THREADED MULTI_THREADED)
22   
23       boost_add_executable(${shared_or_static}-${debug_or_release}-${single_or_multi}
24
25         main.cpp
26         
27         DEPENDS a
28
29         ${shared_or_static}
30         ${debug_or_release}
31         ${single_or_multi}
32         )
33     endforeach()    
34   endforeach()    
35 endforeach()
36