aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/doc/examples
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-04-19 11:19:22 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-04-19 11:19:22 -0400
commit84d1b2ae3a7187f418b1cbbec03eabda372ea699 (patch)
tree2a62b619ec3e5299edfcf3b7e4a184670ff3e29a /unsupported/doc/examples
parent40b2aaa8b149403a8f345f1f7721ddd6088db669 (diff)
add platform check for how to link to the standard math library.
This allows to support QNX.
Diffstat (limited to 'unsupported/doc/examples')
-rw-r--r--unsupported/doc/examples/CMakeLists.txt25
1 files changed, 14 insertions, 11 deletions
diff --git a/unsupported/doc/examples/CMakeLists.txt b/unsupported/doc/examples/CMakeLists.txt
index cb42b2ab9..61af3e5a5 100644
--- a/unsupported/doc/examples/CMakeLists.txt
+++ b/unsupported/doc/examples/CMakeLists.txt
@@ -3,15 +3,18 @@ FILE(GLOB examples_SRCS "*.cpp")
ADD_CUSTOM_TARGET(unsupported_examples)
FOREACH(example_src ${examples_SRCS})
-GET_FILENAME_COMPONENT(example ${example_src} NAME_WE)
-ADD_EXECUTABLE(example_${example} ${example_src})
-GET_TARGET_PROPERTY(example_executable
- example_${example} LOCATION)
-ADD_CUSTOM_COMMAND(
- TARGET example_${example}
- POST_BUILD
- COMMAND ${example_executable}
- ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out
-)
-ADD_DEPENDENCIES(unsupported_examples example_${example})
+ GET_FILENAME_COMPONENT(example ${example_src} NAME_WE)
+ ADD_EXECUTABLE(example_${example} ${example_src})
+ if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
+ target_link_libraries(example_${example} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
+ endif()
+ GET_TARGET_PROPERTY(example_executable
+ example_${example} LOCATION)
+ ADD_CUSTOM_COMMAND(
+ TARGET example_${example}
+ POST_BUILD
+ COMMAND ${example_executable}
+ ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out
+ )
+ ADD_DEPENDENCIES(unsupported_examples example_${example})
ENDFOREACH(example_src)