Update cmake configuration from master

This commit is contained in:
C. Antonio Sanchez
2025-02-16 11:22:08 -08:00
parent 052d91349a
commit f1922b6dac
17 changed files with 984 additions and 777 deletions

View File

@@ -6,6 +6,7 @@ foreach(example_src ${examples_SRCS})
if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
target_link_libraries(${example} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
endif()
target_link_libraries(${example} Eigen3::Eigen)
add_custom_command(
TARGET ${example}
POST_BUILD
@@ -13,8 +14,4 @@ foreach(example_src ${examples_SRCS})
ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out
)
add_dependencies(all_examples ${example})
endforeach()
if(EIGEN_COMPILER_SUPPORT_CPP11)
ei_add_target_property(nullary_indexing COMPILE_FLAGS "-std=c++11")
endif()
endforeach()

View File

@@ -15,6 +15,7 @@ foreach(snippet_src ${snippets_SRCS})
if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
target_link_libraries(${compile_snippet_target} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
endif()
target_link_libraries(${compile_snippet_target} Eigen3::Eigen)
if(${snippet_src} MATCHES "cxx11")
set_target_properties(${compile_snippet_target} PROPERTIES COMPILE_FLAGS "-std=c++11")
endif()

View File

@@ -7,7 +7,7 @@ endif()
if(QT4_FOUND)
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} Eigen3::Eigen)
add_custom_command(
TARGET Tutorial_sparse_example
@@ -23,7 +23,7 @@ if(EIGEN_COMPILER_SUPPORT_CPP11)
add_executable(random_cpp11 random_cpp11.cpp)
target_link_libraries(random_cpp11 ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
add_dependencies(all_examples random_cpp11)
ei_add_target_property(random_cpp11 COMPILE_FLAGS "-std=c++11")
target_compile_options(random_cpp11 PRIVATE "-std=c++11")
add_custom_command(
TARGET random_cpp11