mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-07 21:51:47 +08:00
Fixed CMakeLists.txt files to prevent CMake 3.0.0 warnings about deprecated LOCATION target property.
Small whitespace cleanup in CMakelLists.txt.
This commit is contained in:
parent
3afdc6d95a
commit
36506511a1
@ -6,12 +6,10 @@ foreach(example_src ${examples_SRCS})
|
|||||||
if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
|
if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
|
||||||
target_link_libraries(${example} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
target_link_libraries(${example} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
||||||
endif()
|
endif()
|
||||||
get_target_property(example_executable
|
|
||||||
${example} LOCATION)
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET ${example}
|
TARGET ${example}
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${example_executable}
|
COMMAND ${example}
|
||||||
ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out
|
ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out
|
||||||
)
|
)
|
||||||
add_dependencies(all_examples ${example})
|
add_dependencies(all_examples ${example})
|
||||||
|
@ -14,12 +14,10 @@ foreach(snippet_src ${snippets_SRCS})
|
|||||||
if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
|
if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
|
||||||
target_link_libraries(${compile_snippet_target} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
target_link_libraries(${compile_snippet_target} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
||||||
endif()
|
endif()
|
||||||
get_target_property(compile_snippet_executable
|
|
||||||
${compile_snippet_target} LOCATION)
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET ${compile_snippet_target}
|
TARGET ${compile_snippet_target}
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${compile_snippet_executable}
|
COMMAND ${compile_snippet_target}
|
||||||
ARGS >${CMAKE_CURRENT_BINARY_DIR}/${snippet}.out
|
ARGS >${CMAKE_CURRENT_BINARY_DIR}/${snippet}.out
|
||||||
)
|
)
|
||||||
add_dependencies(all_snippets ${compile_snippet_target})
|
add_dependencies(all_snippets ${compile_snippet_target})
|
||||||
@ -27,4 +25,4 @@ foreach(snippet_src ${snippets_SRCS})
|
|||||||
PROPERTIES OBJECT_DEPENDS ${snippet_src})
|
PROPERTIES OBJECT_DEPENDS ${snippet_src})
|
||||||
endforeach(snippet_src)
|
endforeach(snippet_src)
|
||||||
|
|
||||||
ei_add_target_property(compile_tut_arithmetic_transpose_aliasing COMPILE_FLAGS -DEIGEN_NO_DEBUG)
|
ei_add_target_property(compile_tut_arithmetic_transpose_aliasing COMPILE_FLAGS -DEIGEN_NO_DEBUG)
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
if(NOT EIGEN_TEST_NOQT)
|
if(NOT EIGEN_TEST_NOQT)
|
||||||
find_package(Qt4)
|
find_package(Qt4)
|
||||||
if(QT4_FOUND)
|
if(QT4_FOUND)
|
||||||
@ -6,16 +5,16 @@ if(NOT EIGEN_TEST_NOQT)
|
|||||||
endif()
|
endif()
|
||||||
endif(NOT EIGEN_TEST_NOQT)
|
endif(NOT EIGEN_TEST_NOQT)
|
||||||
|
|
||||||
|
|
||||||
if(QT4_FOUND)
|
if(QT4_FOUND)
|
||||||
add_executable(Tutorial_sparse_example Tutorial_sparse_example.cpp Tutorial_sparse_example_details.cpp)
|
add_executable(Tutorial_sparse_example Tutorial_sparse_example.cpp Tutorial_sparse_example_details.cpp)
|
||||||
target_link_libraries(Tutorial_sparse_example ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
|
target_link_libraries(Tutorial_sparse_example ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET Tutorial_sparse_example
|
TARGET Tutorial_sparse_example
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND Tutorial_sparse_example ARGS ${CMAKE_CURRENT_BINARY_DIR}/../html/Tutorial_sparse_example.jpeg
|
COMMAND Tutorial_sparse_example ARGS ${CMAKE_CURRENT_BINARY_DIR}/../html/Tutorial_sparse_example.jpeg
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(all_examples Tutorial_sparse_example)
|
add_dependencies(all_examples Tutorial_sparse_example)
|
||||||
endif(QT4_FOUND)
|
endif(QT4_FOUND)
|
||||||
|
|
||||||
|
@ -10,12 +10,10 @@ FOREACH(example_src ${examples_SRCS})
|
|||||||
if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
|
if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
|
||||||
target_link_libraries(example_${example} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
target_link_libraries(example_${example} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
||||||
endif()
|
endif()
|
||||||
GET_TARGET_PROPERTY(example_executable
|
|
||||||
example_${example} LOCATION)
|
|
||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
TARGET example_${example}
|
TARGET example_${example}
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${example_executable}
|
COMMAND example_${example}
|
||||||
ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out
|
ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out
|
||||||
)
|
)
|
||||||
ADD_DEPENDENCIES(unsupported_examples example_${example})
|
ADD_DEPENDENCIES(unsupported_examples example_${example})
|
||||||
|
@ -14,12 +14,10 @@ FOREACH(snippet_src ${snippets_SRCS})
|
|||||||
if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
|
if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
|
||||||
target_link_libraries(${compile_snippet_target} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
target_link_libraries(${compile_snippet_target} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
||||||
endif()
|
endif()
|
||||||
GET_TARGET_PROPERTY(compile_snippet_executable
|
|
||||||
${compile_snippet_target} LOCATION)
|
|
||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
TARGET ${compile_snippet_target}
|
TARGET ${compile_snippet_target}
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND ${compile_snippet_executable}
|
COMMAND ${compile_snippet_target}
|
||||||
ARGS >${CMAKE_CURRENT_BINARY_DIR}/${snippet}.out
|
ARGS >${CMAKE_CURRENT_BINARY_DIR}/${snippet}.out
|
||||||
)
|
)
|
||||||
ADD_DEPENDENCIES(unsupported_snippets ${compile_snippet_target})
|
ADD_DEPENDENCIES(unsupported_snippets ${compile_snippet_target})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user