-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cantilever beam example with shell particles
- Loading branch information
1 parent
0f85134
commit 55c8d20
Showing
2 changed files
with
421 additions
and
0 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
tests/3d_examples/cantilever_beam_with_shell/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${SPHINXSYS_PROJECT_DIR}/cmake) # main (top) cmake dir | ||
set(CMAKE_VERBOSE_MAKEFILE on) | ||
|
||
STRING( REGEX REPLACE ".*/(.*)" "\\1" CURRENT_FOLDER ${CMAKE_CURRENT_SOURCE_DIR} ) | ||
PROJECT("${CURRENT_FOLDER}") | ||
|
||
include(ImportSPHINXsysFromSource_for_3D_build) | ||
|
||
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) | ||
set(EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}/bin/") | ||
set(BUILD_INPUT_PATH "${EXECUTABLE_OUTPUT_PATH}/input") | ||
set(BUILD_RELOAD_PATH "${EXECUTABLE_OUTPUT_PATH}/reload") | ||
|
||
aux_source_directory(. DIR_SRCS) | ||
ADD_EXECUTABLE(${PROJECT_NAME} ${DIR_SRCS}) | ||
target_link_libraries(${PROJECT_NAME} gtest gtest_main) | ||
|
||
#gtest_discover_tests(${PROJECT_NAME} WORKING_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}) | ||
|
||
if(NOT SPH_ONLY_STATIC_BUILD) # usual dynamic build | ||
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
set_target_properties(${PROJECT_NAME} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}") | ||
target_link_libraries(${PROJECT_NAME} sphinxsys_3d) | ||
add_dependencies(${PROJECT_NAME} sphinxsys_3d) | ||
else(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||
target_link_libraries(${PROJECT_NAME} sphinxsys_3d stdc++) | ||
else(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||
target_link_libraries(${PROJECT_NAME} sphinxsys_3d stdc++ stdc++fs dl) | ||
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||
|
||
if(DEFINED BOOST_AVAILABLE) # link Boost if available (not for Windows) | ||
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES}) | ||
endif() | ||
endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
else() # static build only | ||
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
set_target_properties(${PROJECT_NAME} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}") | ||
target_link_libraries(${PROJECT_NAME} sphinxsys_static_3d) | ||
else(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||
target_link_libraries(${PROJECT_NAME} sphinxsys_static_3d stdc++) | ||
else(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||
target_link_libraries(${PROJECT_NAME} sphinxsys_static_3d stdc++ stdc++fs dl) | ||
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | ||
|
||
if(DEFINED BOOST_AVAILABLE) # link Boost if available (not for Windows) | ||
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES}) | ||
endif() | ||
endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||
endif() | ||
if(NOT BUILD_WITH_SIMBODY) # link Simbody if not built by the project | ||
target_link_libraries(${PROJECT_NAME} ${Simbody_LIBRARIES}) | ||
endif() | ||
if(NOT BUILD_WITH_ONETBB) # link TBB if not built by the project | ||
target_link_libraries(${PROJECT_NAME} ${TBB_LIBRARYS}) | ||
endif() |
Oops, something went wrong.