mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
84d1b2ae3a
This allows to support QNX.
21 lines
637 B
CMake
21 lines
637 B
CMake
file(GLOB examples_SRCS "*.cpp")
|
|
|
|
add_custom_target(all_examples)
|
|
|
|
foreach(example_src ${examples_SRCS})
|
|
get_filename_component(example ${example_src} NAME_WE)
|
|
add_executable(${example} ${example_src})
|
|
if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
|
|
target_link_libraries(${example} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
|
endif()
|
|
get_target_property(example_executable
|
|
${example} LOCATION)
|
|
add_custom_command(
|
|
TARGET ${example}
|
|
POST_BUILD
|
|
COMMAND ${example_executable}
|
|
ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out
|
|
)
|
|
add_dependencies(all_examples ${example})
|
|
endforeach(example_src)
|