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
693 B
CMake
21 lines
693 B
CMake
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})
|
|
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)
|