Skip to content

Commit 63db50a

Browse files
committed
done
1 parent 62f8f8f commit 63db50a

File tree

282 files changed

+94
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

282 files changed

+94
-104
lines changed

CMakeLists.txt

+42-32
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,105 @@
11
cmake_minimum_required(VERSION 3.16)
2-
project(SPHINXsys VERSION 1.0.0 LANGUAGES CXX)
2+
project(SPHinXsys VERSION 1.0.0 LANGUAGES CXX)
33

44
set(SPHINXSYS_PROJECT_DIR ${PROJECT_SOURCE_DIR})
55
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${SPHINXSYS_PROJECT_DIR}/cmake)
66
include(Common) # brings macro to current namespace
77

8-
#------ Options
8+
# ------ Options
99
option(SPHINXSYS_2D "Build sphinxsys_2d library" ON)
1010
option(SPHINXSYS_3D "Build sphinxsys_3d library" ON)
1111
option(SPHINXSYS_BUILD_TESTS "Build tests" ON)
1212
option(SPHINXSYS_DEVELOPER_MODE "Developer mode has more flags active for code quality" ON)
1313

14-
#------ Global properties (Some cannot be set on INTERFACE targets)
14+
# ------ Global properties (Some cannot be set on INTERFACE targets)
1515
set(CMAKE_VERBOSE_MAKEFILE OFF CACHE BOOL "Enable verbose compilation commands for Makefile and Ninja" FORCE) # Extra fluff needed for Ninja: https://github.com/ninja-build/ninja/issues/900
1616
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Generate `compile_commands.json` file which is necessary for code completioner, static analyzer, etc
1717

18-
#set(CMAKE_CXX_STANDARD_REQUIRED ON) # C++ standard requirement for all targets is NOT optional
18+
# set(CMAKE_CXX_STANDARD_REQUIRED ON) # C++ standard requirement for all targets is NOT optional
1919
set(CMAKE_CXX_EXTENSIONS OFF) # Disable any non-standard compiler specific C++ extensions for all targets.
2020

2121
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) # Enable for all targets, needed for python modules
2222

23-
#------ Declare core library
23+
# ------ Declare core library
2424
add_library(sphinxsys_core INTERFACE)
2525

26-
#------ Local properties
26+
# ------ Local properties
2727
target_compile_features(sphinxsys_core INTERFACE cxx_std_17) # Requires a compiler supporting at least C++17
28-
### Generic properties below enabled for INTERFACE targets only for CMake>=3.19
29-
#set_target_properties(sphinxsys_core PROPERTIES CXX_EXTENSIONS OFF) # Disable any non-standard compiler specific C++ extensions
30-
#set_target_properties(sphinxsys_core PROPERTIES CXX_STANDARD_REQUIRED ON) # C++ standard requirement for targets is NOT optional
31-
#set_target_properties(sphinxsys_core PROPERTIES CXX_STANDARD 17)
3228

29+
# ## Generic properties below enabled for INTERFACE targets only for CMake>=3.19
30+
# set_target_properties(sphinxsys_core PROPERTIES CXX_EXTENSIONS OFF) # Disable any non-standard compiler specific C++ extensions
31+
# set_target_properties(sphinxsys_core PROPERTIES CXX_STANDARD_REQUIRED ON) # C++ standard requirement for targets is NOT optional
32+
# set_target_properties(sphinxsys_core PROPERTIES CXX_STANDARD 17)
3333
if(${CMAKE_SYSTEM_NAME} MATCHES Windows)
3434
set_target_properties(sphinxsys_core PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) # For correct DLL generation on Windows
3535
target_compile_definitions(sphinxsys_core INTERFACE _USE_MATH_DEFINES NOMINMAX)
3636
target_compile_options(sphinxsys_core INTERFACE /MP)
37-
target_compile_options(sphinxsys_core INTERFACE /permissive-)
38-
# target_compile_options(sphinxsys_core INTERFACE $<$<BOOL:${SPHINXSYS_DEVELOPER_MODE}>:/W4 /WX>) # TODO: For when one gets rid of Simbody
37+
target_compile_options(sphinxsys_core INTERFACE /permissive-)
38+
39+
# target_compile_options(sphinxsys_core INTERFACE $<$<BOOL:${SPHINXSYS_DEVELOPER_MODE}>:/W4 /WX>) # TODO: For when one gets rid of Simbody
3940
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
4041
target_compile_options(sphinxsys_core INTERFACE $<$<BOOL:${SPHINXSYS_DEVELOPER_MODE}>:-Werror>)
41-
target_compile_options(sphinxsys_core INTERFACE $<$<BOOL:${SPHINXSYS_DEVELOPER_MODE}>:-Wall>)
42-
# target_compile_options(sphinxsys_core INTERFACE $<$<BOOL:${SPHINXSYS_DEVELOPER_MODE}>:-Wextra>) # TODO:
42+
target_compile_options(sphinxsys_core INTERFACE $<$<BOOL:${SPHINXSYS_DEVELOPER_MODE}>:-Wall>)
43+
44+
# target_compile_options(sphinxsys_core INTERFACE $<$<BOOL:${SPHINXSYS_DEVELOPER_MODE}>:-Wextra>) # TODO:
4345
# target_compile_options(sphinxsys_core INTERFACE $<$<BOOL:${SPHINXSYS_DEVELOPER_MODE}>:-Wpedantic>) # For strict C++ standard compliance # TODO:
4446
endif()
4547

46-
#------ Dependencies
47-
### SIMD flags
48+
# ------ Dependencies
49+
# ## SIMD flags
4850
find_package(SIMD QUIET)
4951
target_compile_options(sphinxsys_core INTERFACE ${SIMD_CXX_FLAGS})
50-
### Simbody
52+
53+
# ## Simbody
5154
find_package(Simbody CONFIG REQUIRED)
5255
set(Simbody_LIBS
53-
$<$<BOOL:${Simbody_LIBRARIES}>:${Simbody_LIBRARIES}> # contains "SimTKcommon SimTKmath SimTKsimbody" in triplet with dynamic linking, empty otherwise
56+
$<$<BOOL:${Simbody_LIBRARIES}>:${Simbody_LIBRARIES}> # contains "SimTKcommon SimTKmath SimTKsimbody" in triplet with dynamic linking, empty otherwise
5457
$<$<BOOL:${Simbody_STATIC_LIBRARIES}>:${Simbody_STATIC_LIBRARIES}> # contains "SimTKcommon_static SimTKmath_static SimTKsimbody_static" in triplet with static linking, empty otherwise
5558
)
5659
target_link_libraries(sphinxsys_core INTERFACE ${Simbody_LIBS})
5760
target_compile_definitions(sphinxsys_core INTERFACE _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING) # Because of Simbody headers
58-
### Eigen
61+
62+
# ## Eigen
5963
find_package(Eigen3 CONFIG REQUIRED)
6064
target_link_libraries(sphinxsys_core INTERFACE Eigen3::Eigen)
61-
### TBB
65+
66+
# ## TBB
6267
find_package(TBB CONFIG REQUIRED)
63-
target_link_libraries(sphinxsys_core INTERFACE TBB::tbb TBB::tbbmalloc $<$<PLATFORM_ID:Windows>:TBB::tbbmalloc_proxy>)
64-
### Threads
68+
target_link_libraries(sphinxsys_core INTERFACE TBB::tbb TBB::tbbmalloc $<$<PLATFORM_ID:Windows>:TBB::tbbmalloc_proxy>)
69+
70+
# ## Threads
6571
find_package(Threads REQUIRED)
6672
target_link_libraries(sphinxsys_core INTERFACE Threads::Threads)
67-
### Boost
68-
set(Boost_NO_WARN_NEW_VERSIONS TRUE) # In case your CMake version is older than the release of Boost found
69-
# Boost geometry and program-options are old enough to afford skipping this warning
73+
74+
# ## Boost
75+
set(Boost_NO_WARN_NEW_VERSIONS TRUE) # In case your CMake version is older than the release of Boost found
76+
77+
# Boost geometry and program-options are old enough to afford skipping this warning
7078
find_package(Boost REQUIRED)
7179
find_path(BOOST_INCLUDE_DIR boost/geometry) # Header-only Boost libraries are not components
80+
7281
if(NOT BOOST_INCLUDE_DIR)
7382
message(FATAL_ERROR "Please install Boost.Geometry library")
7483
endif()
84+
7585
target_link_libraries(sphinxsys_core INTERFACE Boost::boost)
7686
find_package(Boost QUIET COMPONENTS program_options)
87+
7788
if(TARGET Boost::program_options)
7889
target_compile_definitions(sphinxsys_core INTERFACE BOOST_AVAILABLE)
7990
target_link_libraries(sphinxsys_core INTERFACE Boost::program_options)
8091
endif()
8192

82-
#------ Setup the concrete libraries
83-
add_subdirectory(SPHINXsys)
93+
# ------ Setup the concrete libraries
94+
add_subdirectory(src)
8495
add_subdirectory(modules)
8596

86-
#------ Setup the tests
97+
# ------ Setup the tests
8798
if(SPHINXSYS_BUILD_TESTS)
8899
enable_testing()
89100
add_subdirectory(tests)
90101
endif()
91102

92-
#------ Extra scripts to install
93-
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/PythonScriptStore/RegressionTest/regression_test_base_tool.py
94-
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/PythonScriptStore/RegressionTest)
95-
103+
# ------ Extra scripts to install
104+
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/PythonScriptStore/RegressionTest/regression_test_base_tool.py
105+
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/PythonScriptStore/RegressionTest)

Doxyfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ PROJECT_BRIEF =
5151
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
5252
# the logo to the output directory.
5353

54-
PROJECT_LOGO = ./SPHINXsys/logo.png
54+
PROJECT_LOGO = ./assets/logo.png
5555

5656
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
5757
# into which the generated documentation will be written. If a relative path is
@@ -790,8 +790,8 @@ WARN_LOGFILE =
790790
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
791791
# Note: If this tag is empty the current directory is searched.
792792

793-
INPUT = SPHINXsys \
794-
./SPHINXsys/mainpage.md
793+
INPUT = assets \
794+
./assets/mainpage.md
795795

796796
# This tag can be used to specify the character encoding of the source files
797797
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

README.md

+1-1

SPHINXsys/CMakeLists.txt

-1
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

SPHINXsys/logo.png assets/logo.png

File renamed without changes.

cmake/ImportSPHINXsysFromSource.cmake

-20
This file was deleted.

cmake/ImportSPHINXsysFromSource_for_2D_build.cmake

-23
This file was deleted.

cmake/ImportSPHINXsysFromSource_for_3D_build.cmake

-22
This file was deleted.

cmake/ImportSPHinXsysFromSource.cmake

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FILE(GLOB_RECURSE SPHinXsysHeaderPathList ${SPHINXSYS_PROJECT_DIR}/src/*.h)
2+
3+
SET(SPHinXsysHeaderPath "")
4+
5+
FOREACH(file_path ${SPHinXsysHeaderPathList})
6+
GET_FILENAME_COMPONENT(dir_path ${file_path} PATH)
7+
SET(SPHinXsysHeaderPath ${SPHinXsysHeaderPath} ${dir_path})
8+
ENDFOREACH()
9+
10+
LIST(REMOVE_DUPLICATES SPHinXsysHeaderPath)
11+
12+
INCLUDE_DIRECTORIES("${SPHinXsysHeaderPath}")
13+
LINK_DIRECTORIES("${CMAKE_BINARY_DIR}/SPHinXsys/lib")
14+
LINK_DIRECTORIES("${CMAKE_BINARY_DIR}/SPHinXsys/bin")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FILE(GLOB_RECURSE SPHinXsysHeaderPathListShared ${SPHINXSYS_PROJECT_DIR}/src/shared/*.h)
2+
FILE(GLOB_RECURSE SPHinXsysHeaderPathListFor2DBuild ${SPHINXSYS_PROJECT_DIR}/src/for_2D_build/*.h)
3+
FILE(GLOB_RECURSE SPHinXsysHeaderPathListFor2DBuildHpp ${CMAKE_CURRENT_SOURCE_DIR}/src/for_2D_build/*.hpp)
4+
5+
SET(SPHinXsysHeaderPath "")
6+
7+
FOREACH(file_path ${SPHinXsysHeaderPathListShared} ${SPHinXsysHeaderPathListFor2DBuild} ${SPHinXsysHeaderPathListFor2DBuildHpp})
8+
GET_FILENAME_COMPONENT(dir_path ${file_path} PATH)
9+
SET(SPHinXsysHeaderPath ${SPHinXsysHeaderPath} ${dir_path})
10+
ENDFOREACH()
11+
12+
LIST(REMOVE_DUPLICATES SPHinXsysHeaderPath)
13+
14+
# message(STATUS ${SPHinXsysHeaderPath})
15+
INCLUDE_DIRECTORIES("${SPHinXsysHeaderPath}")
16+
LINK_DIRECTORIES("${CMAKE_BINARY_DIR}/SPHinXsys/lib")
17+
LINK_DIRECTORIES("${CMAKE_BINARY_DIR}/SPHinXsys/bin")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FILE(GLOB_RECURSE SPHinXsysHeaderPathListShared ${SPHINXSYS_PROJECT_DIR}/src/shared/*.h)
2+
FILE(GLOB_RECURSE SPHinXsysHeaderPathListFor3DBuild ${SPHINXSYS_PROJECT_DIR}/src/for_3D_build/*.h)
3+
FILE(GLOB_RECURSE SPHinXsysHeaderPathListFor3DBuildHpp ${SPHINXSYS_PROJECT_DIR}/src/for_3D_build/*.hpp)
4+
5+
SET(SPHinXsysHeaderPath "")
6+
7+
FOREACH(file_path ${SPHinXsysHeaderPathListShared} ${SPHinXsysHeaderPathListFor3DBuild} ${SPHinXsysHeaderPathListFor3DBuildHpp})
8+
GET_FILENAME_COMPONENT(dir_path ${file_path} PATH)
9+
SET(SPHinXsysHeaderPath ${SPHinXsysHeaderPath} ${dir_path})
10+
ENDFOREACH()
11+
12+
LIST(REMOVE_DUPLICATES SPHinXsysHeaderPath)
13+
14+
INCLUDE_DIRECTORIES("${SPHinXsysHeaderPath}")
15+
LINK_DIRECTORIES("${CMAKE_BINARY_DIR}/SPHinXsys/lib")
16+
LINK_DIRECTORIES("${CMAKE_BINARY_DIR}/SPHinXsys/bin")

contributing.md

+1-2
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)